html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #131414;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

a { color: #75B3B4; }

/* ---------- shell ---------- */
.crm-appbar { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.crm-drawer { border-right: 1px solid rgba(255, 255, 255, 0.06); }
.crm-brand { color: rgba(255, 255, 255, 0.9); text-decoration: none; font-weight: 600; letter-spacing: 0.02em; margin-left: 4px; }
.crm-brand span, .account-brand span { color: #75B3B4; }
.crm-lang { min-width: 40px; }
.crm-logout { display: inline-flex; margin: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head h5 { margin-right: auto; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.toolbar .grow { flex: 1 1 220px; max-width: 360px; }
.toolbar .pick { flex: 0 1 200px; }
.muted { color: rgba(255, 255, 255, 0.55); }
.small { font-size: 0.8rem; }
.clickable { cursor: pointer; }
.nowrap { white-space: nowrap; }
.overdue { color: #e5736b; font-weight: 600; }
.done-text { text-decoration: line-through; color: rgba(255, 255, 255, 0.45); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.panel { background: #1b1c1c; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 16px; }
.section-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin: 0 0 8px; }
.mud-table-row.clickable:hover td { background: rgba(117, 179, 180, 0.07); }

/* ---------- task board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.board-col { background: #1b1c1c; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 10px; min-height: 300px; }
.board-col-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.85rem; padding: 2px 4px 10px; }
.board-card { background: #242626; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 6px; padding: 10px; margin-bottom: 8px; cursor: grab; }
.board-card:hover { border-color: rgba(117, 179, 180, 0.5); }
.board-card-title { font-weight: 500; margin-bottom: 6px; overflow-wrap: anywhere; }
.board-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }
.prio-Urgent { border-left: 3px solid #e5736b; }
.prio-High { border-left: 3px solid #E0A458; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; overflow: hidden; background: #1b1c1c; }
.cal-head { padding: 6px 8px; font-size: 0.75rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.cal-week { padding: 6px 4px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.cal-day { min-height: 118px; padding: 4px 6px 6px; border-top: 1px solid rgba(255, 255, 255, 0.06); border-left: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.other { background: #171818; }
.cal-day.other .cal-date { color: rgba(255, 255, 255, 0.3); }
.cal-day.weekend { background: #181919; }
.cal-day-top { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.cal-date { font-size: 0.8rem; font-weight: 600; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; }
.cal-day.today .cal-date { background: #75B3B4; color: #0c1717; }
.cal-add { opacity: 0; transition: opacity 0.1s; }
.cal-day:hover .cal-add, .cal-add:focus-within { opacity: 1; }
.cal-item { display: block; box-sizing: border-box; font-size: 0.75rem; line-height: 1.25; padding: 2px 6px; border-radius: 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; text-align: left; color: inherit; font-family: inherit; width: 100%; }
.cal-event { background: rgba(117, 179, 180, 0.22); border-left: 3px solid #75B3B4; }
.cal-task { background: rgba(224, 164, 88, 0.14); border-left: 3px solid #E0A458; }
.cal-task.done { opacity: 0.5; text-decoration: line-through; }
.cal-hours { margin-top: auto; font-size: 0.72rem; color: #6fbf8b; background: none; border: 0; padding: 0; text-align: right; cursor: pointer; font-family: inherit; }
.cal-item:hover, .cal-hours:hover { filter: brightness(1.3); }
.cal-legend { display: flex; gap: 16px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); margin-top: 8px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* ---------- assistant ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 820px; padding: 10px 14px; border-radius: 10px; overflow-wrap: anywhere; }
.chat-user { align-self: flex-end; background: rgba(117, 179, 180, 0.2); white-space: pre-wrap; }
.chat-assistant { align-self: flex-start; background: #1f2121; border: 1px solid rgba(255, 255, 255, 0.06); }
.chat-assistant p { margin: 0 0 8px; }
.chat-assistant p:last-child { margin-bottom: 0; }
.chat-assistant ul, .chat-assistant ol { margin: 0 0 8px; padding-left: 22px; }
.chat-assistant table { border-collapse: collapse; margin-bottom: 8px; }
.chat-assistant th, .chat-assistant td { border: 1px solid rgba(255, 255, 255, 0.12); padding: 3px 8px; text-align: left; }
.chat-assistant code { background: rgba(255, 255, 255, 0.08); padding: 1px 4px; border-radius: 3px; }
.chat-tools { align-self: flex-start; font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); padding-left: 4px; }

/* ---------- static account pages ---------- */
.account-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.account-card { width: 100%; max-width: 380px; background: #1b1c1c; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 28px; }
.account-brand { font-weight: 600; letter-spacing: 0.02em; margin-bottom: 20px; }
.account-card h1 { font-size: 1.3rem; margin: 0 0 16px; }
.account-card label { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); margin: 12px 0 4px; }
.account-card input[type=email], .account-card input[type=password], .account-card input[type=text] {
    width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.18);
    background: #131414; color: inherit; font-size: 0.95rem;
}
.account-card input:focus-visible { outline: 2px solid #75B3B4; outline-offset: 1px; }
.account-card .account-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.account-card button { width: 100%; margin-top: 18px; padding: 10px; border: 0; border-radius: 6px; background: #75B3B4; color: #0c1717; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.account-card button:hover { background: #8cc4c5; }
.account-error { background: rgba(229, 115, 107, 0.15); border: 1px solid rgba(229, 115, 107, 0.4); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; }
.account-ok { background: rgba(111, 191, 139, 0.15); border: 1px solid rgba(111, 191, 139, 0.4); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; }
.account-hint { font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); margin: 16px 0 0; }
.account-lang { display: flex; gap: 14px; margin-top: 20px; font-size: 0.8rem; }
.account-lang a { color: rgba(255, 255, 255, 0.5); text-decoration: none; }
.account-lang a.active { color: #75B3B4; }

#blazor-error-ui { background: #5a2520; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; left: 0; padding: 0.6rem 1.25rem; position: fixed; width: 100%; z-index: 2000; box-sizing: border-box; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
#blazor-error-ui a { color: #fff; }

@media (max-width: 700px) {
    .cal-day { min-height: 80px; }
    .cal { grid-template-columns: 0 repeat(7, minmax(0, 1fr)); }
    .cal-week, .cal-head:first-child { display: none; }
}
.mud-tabs .mud-tab { text-transform: none; font-size: 0.9rem; }
