/* Mauris Assistant — shared responsive UI (mobile-first, no framework) */
:root {
    /* Sidebar (always dark strip) */
    --bg: #0f172a;
    --panel: #1e293b;
    --muted: #64748b;
    --text: #e2e8f0;
    --line: #334155;
    --accent: #38bdf8;
    --link: #456F93;
    --link-hover: #2F5270;
    --link-soft: #E8EFF6;
    --ok: #22c55e;
    --warn: #f59e0b;
    --bad: #ef4444;
    --side: 208px;
    --page-pad: 16px;
    --touch-min: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    /* Page surfaces (light by default; dark via mauris-theme-dark.css) */
    --page-bg: #f1f5f9;
    --page-text: #0f172a;
    --surface: #ffffff;
    --surface-border: #e2e8f0;
    --field-border: #cbd5e1;
    --label-color: #475569;
    --btn-sec-bg: #e2e8f0;
    --btn-sec-text: #0f172a;
    --table-head-bg: #f8fafc;
    --flash-bg: #dcfce7;
    --flash-border: #86efac;
    --flash-text: #166534;
    --error-bg: #fee2e2;
    --error-border: #fca5a5;
    --error-text: #991b1b;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--page-bg);
    color: var(--page-text);
    line-height: 1.45;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img, svg { max-width: 100%; height: auto; }

h1 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); margin: 0 0 14px; }
h2 { font-size: 1rem; margin: 20px 0 10px; }

.muted { color: var(--muted); }

/* Buttons — touch-friendly on phones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent);
    color: #04283a;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    min-height: var(--touch-min);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.btn.secondary { background: var(--btn-sec-bg); color: var(--btn-sec-text); }
.btn.ghost { background: transparent; color: #cbd5e1; border: 1px solid #475569; }
.btn.btn-compact{
    padding:4px 10px;
    min-height:28px;
    font-size:12px;
    line-height:1.25;
    border-radius:6px;
    gap:5px;
}
.btn .btn-icon{flex:0 0 auto;opacity:.85}

/* Forms */
label { display: block; font-size: 13px; color: var(--label-color); margin: 10px 0 4px; }
input, select, textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--field-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    min-height: var(--touch-min);
    background: var(--surface);
    color: var(--page-text);
}
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; }

.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.flash {
    background: var(--flash-bg);
    border: 1px solid var(--flash-border);
    color: var(--flash-text);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}
.errors {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}

/* Tables — horizontal scroll on narrow screens */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 14px;
}
.table-scroll table { min-width: 560px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
    vertical-align: top;
}
th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
}
.badge.s-open { background: #dbeafe; color: #1e40af; }
.badge.s-progress { background: #fef3c7; color: #92400e; }
.badge.s-testing { background: #ede9fe; color: #5b21b6; }
.badge.s-done { background: #dcfce7; color: #166534; }

.b-plan { background: #e0f2fe; color: #075985; }
.b-report { background: #dcfce7; color: #166534; }
.b-review { background: #fef3c7; color: #92400e; }
.b-overdue, .b-reminded { background: #fee2e2; color: #991b1b; }
.b-closed { background: #e2e8f0; color: #334155; }
.b-other, .b-noactivity, .b-exempt { background: #f1f5f9; color: #475569; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
}
.stat .n { font-size: 24px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: min(100%, 200px); }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow: auto;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Pagination */
.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.pagination-summary { font-size: 13px; margin: 0; }
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
.pagination li { margin: 0; padding: 0; list-style: none; }
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--link);
    text-decoration: none;
    touch-action: manipulation;
}
.pagination .page-link:hover:not(.disabled):not(.current) { background: #f8fafc; color: var(--link-hover); text-decoration: underline; }
.pagination .page-link.current { background: var(--link-soft); border-color: #B7C9DA; color: var(--link); font-weight: 600; }
.pagination .page-link.disabled { color: #94a3b8; background: #f8fafc; }

/* Language + theme switchers */
.lang, .theme { display: flex; gap: 2px; align-items: center; }
.lang a, .theme a {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 4px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}
.theme a { font-size: 14px; font-weight: 600; }
.lang a.active, .theme a.active { color: #04283a; background: var(--accent); }
.lang a:hover, .theme a:hover { text-decoration: none; color: #fff; }
.lang a.active:hover, .theme a.active:hover { color: #04283a; }
.tasks-header .theme a { color: #cbd5e1; }
.tasks-header .theme a.active { color: #04283a; background: var(--accent); }

/* Avatars / people */
.person, .yt-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}
.person-name, .yt-person-name { overflow: hidden; text-overflow: ellipsis; }
.avatar {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 1 / 1;
    background: #e2e8f0;
    overflow: hidden;
    /* Thin ring so edges read clearly on light backgrounds (social-app style). */
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}
img.avatar {
    display: block;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}
span.avatar,
.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.avatar-sm .avatar, .yt-person-sm .avatar { width: 28px; height: 28px; }
.avatar-md .avatar, .yt-person-md .avatar { width: 40px; height: 40px; }
.avatar-lg .avatar, .yt-person-lg .avatar { width: 48px; height: 48px; }
.avatar-md .avatar-fallback, .yt-person-md .avatar-fallback { font-size: 13px; }
.avatar-lg .avatar-fallback, .yt-person-lg .avatar-fallback { font-size: 15px; }
.avatar-fallback { font-size: 11px; font-weight: 700; color: #334155; border-radius: 50%; }
.yt-presence {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, .12);
    box-sizing: border-box;
    display: inline-block;
}
.yt-person-md .yt-presence { width: 10px; height: 10px; }
.yt-person-lg .yt-presence { width: 12px; height: 12px; }
.yt-presence-green { background: #22c55e; }
.yt-presence-yellow { background: #eab308; }
.yt-presence-grey, .yt-presence-red { background: #94a3b8; }
.yt-person-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
    display: inline-block;
    line-height: 0;
    overflow: visible;
}
.yt-person-avatar-wrap .person {
    display: block;
}
.yt-presence-corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.yt-person-md .yt-presence-corner { width: 12px; height: 12px; }
.yt-person-lg .yt-presence-corner { width: 14px; height: 14px; }
.yt-person-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}
.yt-presence-ago {
    font-size: 11px;
    font-weight: 500;
    color: #a16207;
    line-height: 1.2;
    white-space: nowrap;
}
.review-queue td { vertical-align: middle; }
.review-queue .yt-person {
    gap: 10px;
    max-width: 220px;
}
.review-queue .yt-person-name {
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
}
.review-queue .avatar,
.review-queue img.avatar {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.dash-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}
.dash-month-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.dash-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.dash-money {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.dash-money-sub { font-size: 12px; margin-top: 2px; }
.dash-months .money-in { color: #166534; }
.dash-months .money-out { color: #b91c1c; }
.dash-today {
    display: block;
    margin-bottom: 8px;
}
.dash-today-head {
    margin-bottom: 12px;
}
.dash-today-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.dash-today-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.dash-today-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748b;
    flex: 0 0 auto;
}
.dash-today-title-text {
    min-width: 0;
}
.dash-today-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    text-decoration: none;
    flex: 0 0 auto;
    box-sizing: border-box;
}
.dash-today-nav-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.dash-today-nav-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    background: #f8fafc;
}
.dash-today-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 28px 16px 24px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px dashed #e2e8f0;
}
.dash-today-empty-icon {
    margin-bottom: 4px;
    opacity: 0.9;
}
.dash-today-empty-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}
.dash-today-empty-text {
    margin: 0;
    max-width: 360px;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}
.dash-today-activity {
    /* Explicit L/R columns; PHP packs people by content weight so heights match. */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 28px;
    align-items: start;
}
.dash-today-activity--single {
    /* Still reserve two tracks so one person stays in the left column —
       status stays next to the name instead of stretching full width. */
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 860px) {
    .dash-today-activity { grid-template-columns: 1fr; }
}
.dash-today-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.dash-person-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
}
.dash-person-block {
    padding: 0;
    min-width: 0;
}
.dash-today-activity .dash-person-block {
    padding: 0;
    margin: 0;
    border-bottom: 0;
    min-width: 0;
    box-sizing: border-box;
}
.dash-person-meta {
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.dash-person-seen { font-size: 11px; }
.dash-last-seen {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.dash-day-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 8px 2px 6px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.dash-day-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-sizing: border-box;
}
.dash-day-hours {
    font-weight: 500;
    opacity: 0.85;
}
.dash-day-prompts {
    font-weight: 500;
    opacity: 0.9;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 1.4;
}
.dash-day-working {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.dash-day-working .dash-day-icon { background: #22c55e; }
.dash-day-on_call {
    color: #a16207;
    background: #fffbeb;
    border-color: #fde68a;
}
.dash-day-on_call .dash-day-icon { background: #eab308; }
.dash-day-present {
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.dash-day-finished {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.dash-day-finished .dash-day-icon {
    width: 9px;
    height: 9px;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
}
.dash-day-finished .dash-day-icon::after {
    content: "";
    position: absolute;
    left: 1px;
    top: -1px;
    width: 4px;
    height: 7px;
    border: solid #64748b;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.dash-day-not_finished {
    color: #64748b;
    background: #f8fafc;
    border-color: #e2e8f0;
}
.dash-day-not_finished .dash-day-icon {
    background: transparent;
    border: 2px solid #94a3b8;
}
.dash-day-vacation,
.dash-day-sick,
.dash-day-unpaid,
.dash-day-paid_day_off {
    color: #0c4a6e;
    background: #e0f2fe;
    border-color: #7dd3fc;
}
.dash-day-vacation .dash-day-icon,
.dash-day-sick .dash-day-icon,
.dash-day-unpaid .dash-day-icon,
.dash-day-paid_day_off .dash-day-icon { background: #38bdf8; }
/* Leave day chips stay blue; presence dots stay green/yellow/grey from
   last-seen activity — vacation must not override portal presence. */
/* Presence corner stays true portal/Cursor activity — do not recolor grey
   dots green just because the person filed a Telegram plan ("Working"). */
.dash-person-focus {
    margin: 4px 0 0 34px;
    font-size: 12px;
    line-height: 1.35;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.dash-chat-activity {
    margin: 4px 0 0 34px;
    font-size: 12px;
    line-height: 1.35;
    color: #475569;
}
.dash-chat-activity-label {
    color: #64748b;
}
.dash-chat-activity-sep {
    margin: 0 0.35em;
    color: #94a3b8;
}
.dash-person-link,
a.yt-person-avatar-link,
a.yt-person-name-link {
    color: inherit;
    text-decoration: none;
}
.dash-person-link:hover .yt-person-name,
a.yt-person-name-link:hover {
    text-decoration: underline;
}
a.yt-person-avatar-link {
    display: inline-flex;
    line-height: 0;
    flex: 0 0 auto;
    cursor: pointer;
}
a.yt-person-name-link {
    cursor: pointer;
}
.yt-person-actions {
    white-space: nowrap;
    vertical-align: middle;
}
.yt-person-actions a {
    margin-left: 10px;
    display: inline;
}
.yt-person-actions a:first-child {
    margin-left: 0;
}
.yt-table-wrap td.yt-person-actions {
    vertical-align: middle;
}
/* All Tasks list: one-line status + compact assignee (Brief #88). */
.yt-tasks-list-wrap {
    overflow-x: auto;
}
.yt-tasks-list {
    width: 100%;
    min-width: 760px;
    table-layout: auto;
}
.yt-tasks-list th,
.yt-tasks-list td {
    vertical-align: middle;
}
.yt-tasks-list .yt-tasks-col-id {
    width: 1%;
    white-space: nowrap;
}
.yt-tasks-list .yt-tasks-col-summary {
    min-width: 12rem;
}
.yt-tasks-list .yt-tasks-col-status {
    width: 11.5rem;
    min-width: 11.5rem;
    white-space: nowrap;
}
.yt-tasks-list .yt-state {
    white-space: nowrap;
    display: inline-block;
    max-width: none;
}
.yt-tasks-list .yt-tasks-col-assignee {
    width: 9.5rem;
    max-width: 11rem;
    white-space: nowrap;
}
.yt-tasks-list .yt-tasks-col-project {
    width: 10rem;
    white-space: nowrap;
}
.yt-tasks-list .yt-tasks-col-updated {
    width: 1%;
    white-space: nowrap;
}
.dash-focus-project {
    min-width: 0;
}
.dash-focus-project-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-bottom: 1px;
}
.dash-focus-project--one .dash-focus-project-head {
    margin-bottom: 0;
}
.dash-focus-project-name {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}
a.dash-focus-project-name:hover {
    text-decoration: underline;
    color: #1d4ed8;
}
.dash-focus-one-sep {
    color: #94a3b8;
    font-weight: 500;
    user-select: none;
}
.dash-focus-task-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 0;
    line-height: 1.45;
    padding-left: 10px;
    border-left: 2px solid #e2e8f0;
    min-width: 0;
}
.dash-focus-task-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 2px solid #e2e8f0;
    min-width: 0;
}
.dash-focus-task-list li {
    min-width: 0;
    padding-left: 2px;
}
.dash-focus-task {
    display: inline;
    max-width: 100%;
    text-decoration: none;
    color: #1d4ed8;
    overflow-wrap: anywhere;
}
.dash-focus-task:hover {
    text-decoration: underline;
}
.dash-focus-task-sep {
    display: inline-block;
    color: #64748b;
    margin: 0 0.55em;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1;
    user-select: none;
    opacity: 0.85;
}
.dash-focus-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
    margin-top: 2px;
}
.dash-focus-label {
    color: #94a3b8;
    font-weight: 600;
    flex: 0 0 auto;
}
.dash-focus-chip {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 1px 7px;
    color: #0f172a;
}
.dash-focus-tasks { min-width: 0; }
.dash-today .avatar,
.dash-today img.avatar {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.profile-dl {
    display: grid;
    grid-template-columns: minmax(100px, 120px) 1fr;
    gap: 8px 14px;
    margin: 0;
    font-size: 14px;
}
.profile-dl dt { color: #64748b; margin: 0; }
.profile-dl dd { margin: 0; word-break: break-word; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    touch-action: manipulation;
}
.nav-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 90;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}
.sidebar-backdrop.is-open { display: block; }

body.nav-open { overflow: hidden; }

/* --- Admin layout --- */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
    flex: 0 0 var(--side);
    width: var(--side);
    background: var(--bg);
    color: var(--text);
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    padding-top: calc(12px + var(--safe-top));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 100;
}
.sidebar .brand {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 12px;
}
.sidebar .brand img { width: 22px; height: 22px; }

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #cbd5e1;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    min-height: var(--touch-min);
    touch-action: manipulation;
}
.nav a svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .8; }
.nav a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.nav a.active { background: #1e293b; color: #fff; border-left-color: var(--accent); }
.nav a.active svg { opacity: 1; color: var(--accent); }
.nav-section {
    margin: 14px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
}

.side-foot {
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: var(--safe-bottom);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.aa-nav-dots {
    display: block;
    text-align: center;
    color: #64748b;
    font-size: 16px;
    letter-spacing: .12em;
    line-height: 1;
    padding: 2px 0;
    text-decoration: none;
    opacity: .45;
}
.aa-nav-dots:hover,
.aa-nav-dots.active {
    color: #cbd5e1;
    opacity: .9;
    text-decoration: none;
}
.side-user {
    color: #94a3b8;
    font-size: 13px;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content { flex: 1; min-width: 0; }
.content main,
main.page-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px var(--page-pad);
    padding-bottom: calc(16px + var(--safe-bottom));
}

.admin-topbar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px var(--page-pad);
    padding-top: calc(10px + var(--safe-top));
    background: var(--bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 80;
}

/* --- Tasks layout --- */
.tasks-header {
    --tasks-nav-collapse: 1100px;
    --tasks-chrome-h: 40px;
    background: #0f172a;
    color: #fff;
    padding: 8px var(--page-pad);
    padding-top: calc(8px + var(--safe-top));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 80;
    overflow: visible;
    min-height: calc(var(--tasks-chrome-h) + 16px);
}
.tasks-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tasks-header .brand:hover,
.tasks-header .brand:focus-visible {
    color: #fff;
    text-decoration: none;
}
.tasks-header .brand img {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 4px;
}
.tasks-header .sp { flex: 1 1 8px; min-width: 8px; }
/* Only top-level nav links — not dropdown/panel anchors (account menu, notify foot). */
.tasks-nav > a {
    color: #cbd5e1;
    font-size: 14px;
    padding: 6px 4px;
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex: 0 0 auto;
}
.tasks-nav > a:hover { color: #fff; text-decoration: none; }
.tasks-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    order: 20;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(255,255,255,.12);
    margin: 0;
}
.tasks-nav.is-open { display: flex; }
.tasks-nav-actions,
.tasks-chrome {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: 0;
    overflow: visible;
    height: var(--tasks-chrome-h);
}
.tasks-chrome > .lang,
.tasks-chrome > .yt-notify-wrap,
.tasks-chrome > .tasks-user-menu {
    display: inline-flex;
    align-items: center;
    height: var(--tasks-chrome-h);
    overflow: visible;
}
.tasks-header .lang a {
    height: var(--tasks-chrome-h);
    min-height: var(--tasks-chrome-h);
    padding: 0 8px;
    color: #cbd5e1;
}
.tasks-header .lang a.active {
    color: #04283a;
}
.tasks-header .yt-notify-bell {
    width: var(--tasks-chrome-h);
    height: var(--tasks-chrome-h);
    color: #cbd5e1;
}
.tasks-header .yt-notify-badge {
    top: 4px;
    right: 4px;
}
.tasks-header .tasks-user-menu-trigger {
    height: var(--tasks-chrome-h);
    min-height: var(--tasks-chrome-h);
    padding: 0 8px;
    line-height: 0;
    overflow: visible;
}
.tasks-header .yt-person,
.tasks-header .person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    line-height: 1.2;
    overflow: visible;
}
.tasks-header .yt-person-name,
.tasks-header .person-name {
    line-height: 1.2;
}
.tasks-header .avatar,
.tasks-header img.avatar,
.tasks-header .avatar-fallback,
.tasks-header .yt-person-sm .avatar,
.tasks-header .avatar-sm .avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: block;
    overflow: hidden;
    line-height: 0;
}
.tasks-header span.avatar,
.tasks-header .avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tasks-header .yt-presence {
    flex: 0 0 auto;
    align-self: center;
}
.tasks-header .nav-toggle { display: inline-flex; flex: 0 0 auto; }
.nav-toggle-label { white-space: nowrap; }
.tasks-toolbar-user { display: inline-flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 13px; max-width: 140px; }
.tasks-toolbar-user .yt-person-name { color: #cbd5e1; }

.tasks-user-menu { position: relative; display: inline-flex; align-items: center; overflow: visible; }
.tasks-user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 180px;
    padding: 4px 8px;
    margin: 0;
    border: 0;
    border-radius: 8px;
    overflow: visible;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    min-height: var(--touch-min);
    min-width: 0;
}
.tasks-user-menu-trigger:hover,
.tasks-user-menu-trigger[aria-expanded="true"] { background: rgba(255,255,255,.08); }
.tasks-user-menu-trigger .yt-person-name { color: #e2e8f0; }
.tasks-user-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(9,30,66,.18);
}
.tasks-user-menu-panel[hidden] { display: none !important; }
.tasks-user-menu-item,
a.tasks-user-menu-item,
button.tasks-user-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-height: var(--touch-min);
    box-sizing: border-box;
}
.tasks-user-menu-item:hover,
a.tasks-user-menu-item:hover,
button.tasks-user-menu-item:hover {
    background: #f1f5f9;
    text-decoration: none;
    color: #0f172a;
}
.tasks-user-menu-danger,
button.tasks-user-menu-danger { color: #b91c1c; font-weight: 500; }
.tasks-user-menu-danger:hover,
button.tasks-user-menu-danger:hover { background: #fef2f2; color: #991b1b; }
.tasks-user-menu-form { margin: 0; width: 100%; }

/* People / Projects — nav label + compact chevron menu (not a form select). */
.tasks-nav .yt-board-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #cbd5e1;
    font-size: 14px;
}
.tasks-nav .yt-board-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    min-height: var(--touch-min);
    appearance: none;
    -webkit-appearance: none;
}
.tasks-nav .yt-board-switcher-trigger:hover,
.tasks-nav .yt-board-switcher-trigger[aria-expanded="true"] {
    color: #fff;
}
.tasks-nav .yt-board-switcher-label { white-space: nowrap; }
.tasks-nav .yt-board-switcher-chevron {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    opacity: .75;
    display: block;
}
.yt-board-switcher-panel {
    position: fixed;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 280px;
    width: min(300px, calc(100vw - 16px));
    max-width: min(320px, calc(100vw - 16px));
    max-height: min(70vh, 420px);
    padding: 8px;
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(9,30,66,.18);
    box-sizing: border-box;
}
.yt-board-switcher-panel[hidden] { display: none !important; }
.yt-board-switcher-search {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    box-sizing: border-box;
}
.yt-board-switcher-search:focus {
    outline: 2px solid rgba(15,23,42,.2);
    outline-offset: 1px;
}
.yt-board-switcher-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: auto;
    min-height: 0;
}
.yt-board-switcher-group {
    margin: 8px 10px 2px;
    padding: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 16px;
    user-select: none;
}
.yt-board-switcher-group[hidden] { display: none !important; }
.yt-board-switcher-group:first-of-type { margin-top: 4px; }
.yt-board-switcher-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 5px 10px;
    border-radius: 6px;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    box-sizing: border-box;
    min-height: 32px;
    height: 32px;
}
.yt-board-switcher-item[hidden],
.yt-board-switcher-empty[hidden] { display: none !important; }
.yt-board-switcher-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
}
.yt-board-switcher-item.is-current {
    background: #e8eef6;
    color: #0f172a;
}
.yt-board-switcher-check {
    flex: 0 0 12px;
    width: 12px;
    font-size: 12px;
    line-height: 1;
    opacity: 0;
}
.yt-board-switcher-item.is-current .yt-board-switcher-check { opacity: 1; }
.yt-board-switcher-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    overflow: hidden;
    box-sizing: border-box;
}
.yt-board-switcher-media-person { border-radius: 50%; }
.yt-board-switcher-media-project {
    border-radius: 5px;
    background: #eef1f4;
    border: 1px solid #e3e6ea;
}
.yt-board-switcher-item .person,
.yt-board-switcher-media .person {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0;
}
.tasks-header .yt-board-switcher-item .avatar,
.tasks-header .yt-board-switcher-item img.avatar,
.tasks-header .yt-board-switcher-item .avatar-fallback,
.yt-board-switcher-item .avatar,
.yt-board-switcher-icon,
.yt-board-switcher-icon-fallback {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    flex: 0 0 22px;
    box-sizing: border-box;
}
.yt-board-switcher-item .avatar,
.yt-board-switcher-item img.avatar,
.yt-board-switcher-item .avatar-fallback {
    border-radius: 50%;
    object-fit: cover;
}
.yt-board-switcher-icon {
    display: block;
    border-radius: 0;
    background: transparent;
    border: 0;
    object-fit: contain;
    object-position: center;
}
.yt-board-switcher-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    background: transparent;
    border: 0;
}
.yt-board-switcher-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.yt-board-switcher-empty {
    margin: 0;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 20px;
    color: #64748b;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: stretch;
}
.filters select,
.filters input[type="text"] {
    flex: 1 1 140px;
    min-width: 0;
    width: auto;
    min-height: var(--touch-min);
}

.comment { border-top: 1px solid #eef2f7; padding: 8px 0; }

/* Login (guest) — full-bleed soft stage + Apple-like enter motion */
main.page-main:has(.login-page) {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    min-height: 100vh;
    position: relative;
}
main.page-main:has(.login-page) > .flash,
main.page-main:has(.login-page) > .errors {
    position: absolute;
    top: calc(56px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: min(400px, calc(100% - 2 * var(--page-pad)));
    margin: 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.login-page {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100vh;
    padding: calc(24px + var(--safe-top)) var(--page-pad) calc(24px + var(--safe-bottom));
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 18% 12%, rgba(56, 189, 248, 0.16), transparent 60%),
        radial-gradient(720px 480px at 88% 78%, rgba(69, 111, 147, 0.14), transparent 55%),
        linear-gradient(165deg, #f8fafc 0%, #eef3f8 48%, #e8eef5 100%);
}
.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    animation: login-orb 18s ease-in-out infinite alternate;
}
.login-page::before {
    width: min(42vw, 340px);
    height: min(42vw, 340px);
    left: -6%;
    top: 18%;
    background: rgba(56, 189, 248, 0.22);
}
.login-page::after {
    width: min(36vw, 280px);
    height: min(36vw, 280px);
    right: -4%;
    bottom: 12%;
    background: rgba(100, 116, 139, 0.18);
    animation-delay: -7s;
    animation-duration: 22s;
}
.login-chrome {
    position: absolute;
    top: calc(14px + var(--safe-top));
    right: calc(14px + var(--safe-right));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: saturate(1.2) blur(12px);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    animation: login-chrome-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.login-chrome .lang a,
.login-chrome .theme a {
    color: #64748b;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: 7px;
}
.login-chrome .lang a.active,
.login-chrome .theme a.active {
    color: #04283a;
    background: rgba(56, 189, 248, 0.85);
}
.login-chrome .lang a:hover,
.login-chrome .theme a:hover {
    color: #0f172a;
    background: rgba(148, 163, 184, 0.2);
}
.login-chrome .lang a.active:hover,
.login-chrome .theme a.active:hover {
    color: #04283a;
    background: rgba(56, 189, 248, 0.95);
}
.login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
    animation: login-rise 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.login-card.card {
    margin: 0;
    padding: 28px 26px 24px;
    border-radius: 18px;
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(15, 23, 42, 0.07);
    backdrop-filter: saturate(1.15) blur(8px);
    -webkit-backdrop-filter: saturate(1.15) blur(8px);
    background: rgba(255, 255, 255, 0.88);
}
.login-brand {
    text-align: center;
    margin-bottom: 18px;
}
.login-title {
    margin: 0;
    font-size: clamp(1.35rem, 3.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--page-text);
}
.login-form label:not(.login-remember) {
    margin-top: 12px;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--page-text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.login-remember input {
    width: auto;
    margin: 0;
    accent-color: #0ea5e9;
}
.login-submit {
    width: 100%;
    margin-top: 18px;
    border-radius: 10px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.login-submit:hover {
    filter: brightness(1.03);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}
.login-submit:active {
    transform: scale(0.985);
}
@keyframes login-rise {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes login-chrome-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes login-orb {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(18px, -22px, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .login-page::before,
    .login-page::after,
    .login-wrap,
    .login-chrome,
    .login-submit {
        animation: none !important;
        transition: none !important;
    }
}

/* Mobile breakpoints */
@media (max-width: 767px) {
    :root { --page-pad: 8px; }

    .nav-toggle { display: inline-flex; }

    .layout { flex-direction: column; }

    .admin-topbar { display: flex; }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(280px, 88vw);
        max-width: 88vw;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.25);
    }
    .sidebar.is-open { transform: translateX(0); }

    .content main,
    main.page-main {
        padding-top: 8px;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: calc(12px + var(--safe-bottom));
    }

    /* Tasks: compact header chrome on phones */
    .tasks-nav > a {
        padding: 10px 4px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        width: 100%;
        min-height: var(--touch-min);
    }
    .tasks-nav .yt-board-switcher {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .tasks-nav .yt-board-switcher-trigger {
        width: 100%;
        padding: 10px 4px;
        justify-content: flex-start;
    }
    .tasks-toolbar-user { max-width: none; }
    .tasks-user-menu-trigger { max-width: min(160px, 42vw); }
    .tasks-user-menu-panel { right: 0; left: auto; width: min(280px, calc(100vw - 16px)); }
    .nav-toggle-label { display: none; }
    @media (max-width: 420px) {
        .tasks-user-menu-trigger .yt-person-name { display: none; }
        .tasks-user-menu-trigger { max-width: none; }
    }

    .profile-dl { grid-template-columns: 1fr; gap: 2px; }
    .profile-dl dt { font-weight: 600; margin-top: 8px; }

    .inline { flex-direction: column; align-items: stretch; }
    .inline > * { width: 100%; }

    h1 .person-name { overflow: hidden; text-overflow: ellipsis; }
}

/* Tasks: inline single-row links only when there is room for UK labels */
@media (min-width: 1100px) {
    .tasks-header {
        flex-wrap: nowrap;
    }
    .tasks-header .nav-toggle { display: none; }
    .tasks-nav {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px 12px;
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        order: unset;
        padding: 0;
        margin: 0;
        border: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .tasks-nav > a {
        border: none;
        width: auto;
        min-height: auto;
        padding: 6px 4px;
    }
    .tasks-nav-actions {
        flex-direction: row;
        width: auto;
        border: none;
        padding: 0;
    }
    .tasks-header .btn { width: auto; }
    .tasks-header .sp { display: none; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    :root { --side: 180px; }
    .nav a span { font-size: 13px; }
}

/* Phones → tablets: hamburger; keep lang / notify / user always visible */
@media (max-width: 1099px) {
    .tasks-header .nav-toggle { display: inline-flex; }
    .tasks-nav:not(.is-open) { display: none; }
    .tasks-nav.is-open { display: flex; }

    /* One chrome row: menu + brand + spacer + impersonate + lang/bell/avatar.
       Open nav drops to a full-width second row only. */
    .tasks-header {
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        padding: 4px 8px;
        padding-top: calc(4px + var(--safe-top));
        min-height: 0;
        --tasks-chrome-h: 36px;
    }
    .tasks-header > .sp {
        flex: 1 1 0;
        min-width: 0;
        order: 0;
    }
    .tasks-header > .impersonate-bar {
        margin-left: 0;
        order: 0;
    }
    .tasks-header > .tasks-nav-actions {
        order: 0;
        gap: 4px;
    }
    .tasks-header > .tasks-nav {
        flex: 1 0 100%;
        width: 100%;
        order: 30;
        margin-top: 2px;
    }
    .tasks-header .brand {
        gap: 6px;
        font-size: 14px;
        max-width: min(42vw, 160px);
    }
    .tasks-header .lang a {
        padding: 0 5px;
        font-size: 12px;
    }
    .tasks-header .tasks-user-menu-trigger {
        padding: 0 4px;
    }
}

@media (max-width: 480px) {
    /* Prefer chrome controls over the word “Mauris” on narrow phones. */
    .tasks-header .brand > span { display: none; }
    .tasks-header .brand { max-width: none; }
}

/* Owner “view as” — compact icon; select opens on click */
.impersonate-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    flex: 0 0 auto;
}
.impersonate-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.impersonate-toggle:hover,
.impersonate-toggle[aria-expanded="true"] {
    background: rgba(148, 163, 184, 0.18);
}
.impersonate-toggle--active,
.impersonate-bar--active .impersonate-toggle {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}
.admin-topbar .impersonate-toggle {
    color: #e2e8f0;
}
.admin-topbar .impersonate-toggle:hover,
.admin-topbar .impersonate-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
}
.admin-topbar .impersonate-toggle--active,
.admin-topbar .impersonate-bar--active .impersonate-toggle {
    background: #1d4ed8;
    border-color: #60a5fa;
    color: #eff6ff;
}
.impersonate-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    min-width: 220px;
    max-width: min(300px, 80vw);
}
.impersonate-panel[hidden] { display: none !important; }
.impersonate-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    max-height: min(70vh, 380px);
    overflow-y: auto;
}
.impersonate-option {
    display: grid;
    grid-template-columns: 0.9em 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 3px 8px;
    min-height: 28px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 12.5px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}
.impersonate-option:hover:not(:disabled),
.impersonate-option:focus-visible:not(:disabled) {
    background: #eff6ff;
    outline: none;
}
.impersonate-option:disabled {
    cursor: default;
    opacity: 1;
}
.impersonate-option-check {
    width: 0.9em;
    text-align: center;
    color: #2563eb;
    font-weight: 700;
    font-size: 11px;
}
.impersonate-option-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #cbd5e1;
    display: grid;
    place-items: center;
}
.impersonate-option-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.impersonate-option-initials {
    font-size: 9px;
    font-weight: 700;
    color: #334155;
    line-height: 1;
}
.impersonate-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.impersonate-you-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
}
/* Active view-as target (or yourself when not impersonating) */
.impersonate-option.is-current {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #2563eb;
}
.impersonate-option.is-current:hover,
.impersonate-option.is-current:focus-visible {
    background: #dbeafe;
    border-color: #60a5fa;
}
/* Owner row keeps only the “(you)” badge — no selection chrome */
.impersonate-option.is-you:not(.is-current) {
    font-weight: 600;
}
.admin-topbar .impersonate-panel {
    border-color: rgba(255, 255, 255, 0.2);
    background: #0f172a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.admin-topbar .impersonate-option {
    color: #e2e8f0;
}
.admin-topbar .impersonate-option:hover:not(:disabled),
.admin-topbar .impersonate-option:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}
.admin-topbar .impersonate-option-check {
    color: #93c5fd;
}
.admin-topbar .impersonate-option-avatar {
    background: #334155;
}
.admin-topbar .impersonate-option-initials {
    color: #e2e8f0;
}
.admin-topbar .impersonate-you-badge {
    color: #93c5fd;
}
.admin-topbar .impersonate-option.is-current {
    background: #1e3a8a;
    border-color: #60a5fa;
    color: #eff6ff;
    box-shadow: inset 3px 0 0 #93c5fd;
}
.admin-topbar .impersonate-option.is-current:hover,
.admin-topbar .impersonate-option.is-current:focus-visible {
    background: #1d4ed8;
}
.admin-topbar .impersonate-option.is-you:not(.is-current) {
    font-weight: 600;
}

/* Friendly full-page errors */
.mauris-error {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 45%, #fdf4ff 100%);
    color: #0f172a;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.mauris-error-card {
    max-width: 520px;
    width: 100%;
    text-align: center;
}
.mauris-error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    color: #64748b;
}
.mauris-error-icon svg { width: 36px; height: 36px; }
.mauris-error-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 8px;
}
.mauris-error-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.25;
}
.mauris-error-text {
    font-size: 15px;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 22px;
}
.mauris-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.mauris-error-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
}
.mauris-error-btn-primary {
    background: #0f172a;
    color: #fff;
}
.mauris-error-btn-primary:hover { background: #1e293b; }
.mauris-error-btn-secondary {
    background: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
}
.mauris-error-btn-secondary:hover { background: #f8fafc; }

.mauris-error-contacts {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.mauris-error-contacts-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.mauris-error-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mauris-error-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.mauris-error-contact-role {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px 10px;
}

.bday-remind[hidden] { display: none; }
.bday-remind {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.bday-remind-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, .42);
    cursor: pointer;
}
.bday-remind-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
    padding: 18px 18px 16px;
}
.bday-remind-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}
.bday-remind-when {
    margin: 12px 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}
.bday-remind-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.bday-remind-list li {
    padding: 4px 0;
    font-size: 15px;
    font-weight: 600;
}
.bday-remind-card .btn {
    margin-top: 16px;
}

/* Admin ops expenses year — responsive (phones → desktop) */
.ops-year {
    min-width: 0;
    max-width: 100%;
}
.ops-year-lead {
    max-width: 72ch;
}
.ops-year-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ops-year-heading h1 {
    margin: 0;
}
.ops-year-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.ops-year-switcher-btn {
    min-height: var(--touch-min);
    padding: 6px 12px;
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    text-decoration: none;
}
.ops-year-switcher-btn:hover {
    background: #f8fafc;
    text-decoration: none;
}
.ops-year-switcher-btn--disabled {
    opacity: 0.4;
    pointer-events: none;
}
.ops-year-switcher-select-wrap {
    margin: 0;
}
.ops-year-switcher-select {
    min-height: var(--touch-min);
    min-width: 5.5rem;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 600;
}
.ops-year-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.ops-year-toolbar-copy {
    flex: 1 1 220px;
    min-width: 0;
}
.ops-year-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}
.ops-year-toggle--on {
    background: #166534;
    color: #fff;
}
.ops-year-toggle--off {
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}
.ops-year-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.ops-year-stats--net {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.ops-year-stats--analytics {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    column-gap: 16px;
}
.ops-year-stats .stat {
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 2px;
    overflow: hidden;
}
.ops-year-stats .stat .n {
    min-width: 0;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
.ops-year-stats .ops-payroll-amt {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15em 0.35em;
    white-space: normal;
    max-width: 100%;
}
.ops-year-chart-card {
    overflow: visible;
    position: relative;
}
.ops-year-chart {
    position: relative;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
}
.ops-year-chart-svg {
    display: block;
    width: 100%;
    min-width: 280px;
    height: auto;
    font: 11px system-ui, sans-serif;
}
.ops-year-net-dot {
    filter: drop-shadow(0 0 1px rgba(15, 23, 42, 0.35));
}
.ops-year-tip {
    position: absolute;
    z-index: 20;
    min-width: 200px;
    max-width: min(340px, calc(100% - 16px));
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    color: #0f172a;
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
}
.ops-year-tip[hidden] { display: none !important; }
.ops-year-tip-ym {
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
}
.ops-year-tip-note { font-weight: 500; color: #94a3b8; }
.ops-year-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    color: #0f172a;
}
.ops-year-tip-row > span { color: #0f172a; font-weight: 500; }
.ops-year-tip-row strong { font-variant-numeric: tabular-nums; }
.ops-year-tip-row.is-income > strong { color: #14532d; }
.ops-year-tip-row.is-expense > strong { color: #7f1d1d; }
.ops-year-tip-row.is-net {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
}
.ops-year-tip-row.is-net > span {
    color: #0f172a;
    font-weight: 700;
}
.ops-year-tip-row.is-net.is-pos > strong { color: #14532d; }
.ops-year-tip-row.is-net.is-neg > strong { color: #7f1d1d; }
.ops-year-tip-row.is-net.is-zero > strong { color: #475569; }
.ops-year-tip-calc {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.ops-year-tip-calc .is-income { color: #14532d; }
.ops-year-tip-calc .is-expense { color: #7f1d1d; }
.ops-year-tip-calc .is-net.is-pos { color: #14532d; }
.ops-year-tip-calc .is-net.is-neg { color: #7f1d1d; }
.ops-year-tip-calc .is-net.is-zero { color: #475569; }
.ops-year-tip-op { color: #64748b; font-weight: 500; }
.ops-year-tip-seg {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    color: #0f172a;
}
.ops-year-tip-seg > span { color: #0f172a; font-weight: 700; }
.ops-year-tip-seg strong { font-variant-numeric: tabular-nums; font-weight: 700; }
.ops-year-tip-seg.is-income > strong { color: #14532d; }
.ops-year-tip-seg.is-expense > strong { color: #7f1d1d; }
.ops-year-tip-parts {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e2e8f0;
}
.ops-year-tip-part {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 1px 0;
    font-size: 11px;
    color: #0f172a;
}
.ops-year-tip-part > span { color: #0f172a; font-weight: 500; }
.ops-year-tip-part strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.ops-year-tip-part.is-income > strong { color: #14532d; }
.ops-year-tip-part.is-expense > strong { color: #7f1d1d; }
.ops-year-tip-part-more {
    font-size: 11px;
    margin-top: 2px;
}
.ops-year-tip-extra {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}
.ops-year-tip-extra-h {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
    text-transform: none;
}
.ops-year-tip-extra-note {
    font-size: 11px;
    color: #94a3b8;
}
.ops-year-seg { cursor: crosshair; }
.ops-year-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #334155;
    line-height: 1.35;
}
.ops-year-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
}
.ops-year-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    vertical-align: middle;
}
.ops-year-swatch--sm {
    width: 8px;
    height: 8px;
    margin-right: 4px;
}
.ops-year-line {
    display: inline-block;
    width: 18px;
    height: 0;
    border-top: 2px solid currentColor;
    flex: 0 0 auto;
    vertical-align: middle;
    margin-right: 2px;
}
.ops-year-line--dashed {
    border-top-style: dashed;
    opacity: 0.85;
}
.ops-year-chart-note {
    margin-top: 8px;
}
.ops-year-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ops-year-panel {
    min-width: 0;
    overflow: hidden;
}
.ops-year-ytd-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.ops-year-panel .table-scroll {
    margin-bottom: 0;
}
.ops-year-table--ytd {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}
.ops-year-table--ytd th:nth-child(1),
.ops-year-table--ytd td:nth-child(1) {
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ops-year-table--ytd th:nth-child(2),
.ops-year-table--ytd td:nth-child(2) {
    width: 12.5rem;
    text-align: right;
    white-space: nowrap;
}
.ops-year-table--ytd th:nth-child(3),
.ops-year-table--ytd td:nth-child(3) {
    width: 3.25rem;
    text-align: right;
    white-space: nowrap;
}
.ops-year-table--monthly {
    min-width: 720px;
}
.ops-year-table--monthly th:nth-child(1),
.ops-year-table--monthly td:nth-child(1) {
    white-space: nowrap;
    width: 1%;
}
.ops-year-table--monthly th.ops-year-fb-col,
.ops-year-table--monthly td:nth-child(10) {
    width: 4.5rem;
    max-width: 5.5rem;
    text-align: right;
    white-space: nowrap;
}
.ops-year-monthly-scroll {
    margin-bottom: 24px;
}
.ops-year-provider {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}
.ops-year-provider .provider-icon,
.ops-year-provider svg {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
}
.ops-year-provider-name {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ops-year-month-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}
.ops-year-month-link:hover {
    text-decoration: underline;
}
.ops-year-detail-toggle-head {
    width: 2rem;
    padding-left: 2px;
    padding-right: 4px;
}
.ops-year-detail-toggle-cell {
    width: 2rem;
    padding-left: 2px;
    padding-right: 4px;
    text-align: right;
    vertical-align: middle;
}
.ops-year-detail-toggle-cell .ops-year-detail-btn {
    margin-left: auto;
}
.ops-year-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    flex: 0 0 auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ops-year-detail-btn:hover,
.ops-year-detail-btn:focus-visible {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f8fafc;
    outline: none;
}
.ops-year-detail-btn[aria-expanded="true"] {
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}
.ops-year-detail-btn[aria-expanded="true"] .ops-year-detail-chevron {
    transform: rotate(180deg);
}
.ops-year-detail-chevron {
    display: block;
    transition: transform 0.15s ease;
}
.ops-year-details {
    margin: 4px 0 10px;
}
.ops-year-details[hidden] {
    display: none !important;
}
.ops-year-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 28px 36px;
    margin-top: 8px;
}
.ops-year-detail-col {
    min-width: 0;
}
.ops-year-detail-heading {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.ops-year-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    min-height: 32px;
}
.ops-year-income-part {
    padding-left: 18px;
    min-height: 26px;
    border-bottom-color: #f8fafc;
    font-size: 12px;
}
.ops-year-income-type {
    font-weight: 600;
}
.ops-year-detail-usd {
    flex: 0 0 auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ops-payroll-heading {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ops-payroll-legend {
    margin-top: 0;
    font-size: 12px;
}
.ops-payroll-amt {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2em;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ops-year-detail-usd .ops-payroll-amt {
    justify-content: flex-end;
}
.ops-payroll-excel {
    color: #1d4ed8;
    font-weight: 600;
}
html[data-theme="dark"] .ops-payroll-excel {
    color: #60a5fa;
}
.ops-payroll-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: help;
    flex: 0 0 auto;
    line-height: 0;
    vertical-align: middle;
    border-radius: 999px;
}
.ops-payroll-info:hover,
.ops-payroll-info:focus {
    color: #334155;
    outline: none;
}
.ops-payroll-info:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #94a3b8;
}
.ops-payroll-info--heading {
    color: #64748b;
}
.ops-payroll-info svg {
    display: block;
}
.ops-wise-status {
    font-size: 11px;
    font-weight: 600;
    margin-left: 0.25em;
}
.ops-wise-status--paid {
    color: #14532d;
}
.ops-wise-status--pending {
    color: #92400e;
}
.ops-wise-status--failed {
    color: #991b1b;
}
.ops-wise-status--planned {
    color: #475569;
}
html[data-theme="dark"] .ops-wise-status--paid {
    color: #86efac;
}
html[data-theme="dark"] .ops-wise-status--pending {
    color: #fcd34d;
}
html[data-theme="dark"] .ops-wise-status--failed {
    color: #fca5a5;
}
html[data-theme="dark"] .ops-wise-status--planned {
    color: #94a3b8;
}

@media (max-width: 767px) {
    .ops-year-heading {
        flex-direction: column;
        align-items: stretch;
    }
    .ops-year-switcher {
        width: 100%;
        justify-content: space-between;
    }
    .ops-year-switcher-select {
        flex: 1 1 auto;
        width: 100%;
    }
    .ops-year-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ops-year-toggle {
        width: 100%;
    }
    .ops-year-stats,
    .ops-year-stats--net,
    .ops-year-stats--analytics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
    }
    .ops-year-stats .stat {
        padding: 8px 6px;
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 8px;
    }
    .ops-year-stats .stat .n {
        font-size: clamp(1.05rem, 5.5vw, 1.35rem);
    }
    .ops-year-stats .stat .l {
        font-size: 12px;
    }
    .ops-year-chart-svg {
        min-width: 320px;
        font-size: 10px;
    }
    .ops-year-legend {
        gap: 6px 12px;
        font-size: 11px;
    }
    .ops-year-split {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ops-year-table th,
    .ops-year-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .ops-year-table--monthly {
        min-width: 680px;
    }
    .ops-year-month-detail td {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 430px) {
    .ops-year-stats,
    .ops-year-stats--net,
    .ops-year-stats--analytics {
        grid-template-columns: 1fr 1fr;
    }
    .ops-year-lead {
        font-size: 13px;
    }
    .ops-year-chart-svg {
        min-width: 300px;
    }
    .ops-year-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .ops-year-stats,
    .ops-year-stats--net,
    .ops-year-stats--analytics {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .ops-year-stats--net {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .ops-year-chart-svg {
        min-width: 0;
    }
}
