@font-face { font-family: "Noto Sans"; src: url("fonts/NotoSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("fonts/NotoSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --font-ui: "Noto Sans", "Segoe UI", Arial, sans-serif;
  --font-editorial: Georgia, "Times New Roman", serif;
  --canvas: #fff; --surface: #f7f7f5; --ink: #171713; --muted: #65645e;
  --rule: #d8d7d2; --action: #154bd8; --action-soft: #eef3ff;
  --exception: #c83a2a; --exception-soft: #fff2f0; --warning: #a45c00;
  --success: #16724a; --denied: #5a5861; --focus: #154bd8;
  --control-border: #8c8b85; --action-hover: #103cad;
  --success-soft: #edf8f3; --warning-soft: #fff7e8; --on-action: #fff;
  --radius-control: 6px; --radius-panel: 10px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #181915; --surface: #23241f; --ink: #f3f2ed; --muted: #b8b7b0;
  --rule: #4b4c45; --action: #89a9ff; --action-soft: #26365f;
  --exception: #ff9487; --exception-soft: #4b2925; --warning: #f2b766;
  --success: #78d7a6; --denied: #c0bec7; --focus: #b2c6ff;
  --control-border: #777970; --action-hover: #a8beff;
  --success-soft: #203d31; --warning-soft: #45351f; --on-action: #11130f;
}
:root[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --canvas: #181915; --surface: #23241f; --ink: #f3f2ed; --muted: #b8b7b0;
    --rule: #4b4c45; --action: #89a9ff; --action-soft: #26365f;
    --exception: #ff9487; --exception-soft: #4b2925; --warning: #f2b766;
    --success: #78d7a6; --denied: #c0bec7; --focus: #b2c6ff;
    --control-border: #777970; --action-hover: #a8beff;
    --success-soft: #203d31; --warning-soft: #45351f; --on-action: #11130f;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color: var(--ink); background: var(--canvas); font-family: var(--font-ui); }
body { margin: 0; min-width: 320px; overflow-x: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"], progress { accent-color: var(--action); }
button, select { min-height: 44px; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 12px 16px; background: var(--ink); color: var(--canvas); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.product-mark { margin: 0 0 32px; font-weight: 700; letter-spacing: -.02em; }
.section-label { margin: 0 0 8px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2 { font-family: var(--font-editorial); font-weight: 400; }
h1 { margin: 0; font-size: clamp(2rem, 3.2vw, 3.25rem); line-height: 1.02; }
h2 { font-size: 1.625rem; line-height: 1.14; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--canvas); font-weight: 700; text-decoration: none; }
.button--primary { border-color: var(--action); color: var(--on-action); background: var(--action); }
.button--primary:hover { background: var(--action-hover); }
.button--danger { border-color: var(--exception); color: var(--exception); background: var(--canvas); }
.button--danger:hover { background: var(--exception-soft); }
.button--quiet:hover { background: var(--surface); }
.button:disabled { cursor: not-allowed; color: var(--denied); background: var(--surface); border-color: var(--rule); }
.icon-button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.5rem; }

.session-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.session-gate__content { width: min(560px, 100%); }
.session-gate h1 { margin-bottom: 20px; }
.session-gate p { color: var(--muted); line-height: 1.55; }
.session-gate__secondary-title { margin: 32px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font-size: 20px; }
.trusted-device-account { margin: 4px 0 0; font-weight: 700; color: var(--ink) !important; }
.session-form { display: grid; gap: 12px; margin-top: 28px; }
.demo-access { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.demo-access summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.offline-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); background: var(--surface); }
.offline-panel { width: min(620px, 100%); padding: clamp(28px, 6vw, 56px); border: 1px solid var(--rule); border-top: 5px solid var(--action); border-radius: var(--radius-panel); background: var(--canvas); box-shadow: 0 18px 54px rgba(23,23,19,.09); }
.offline-mark { display: block; margin-bottom: 32px; border-radius: 14px; }
.offline-panel h1 { margin-bottom: 20px; }
.offline-panel > p:not(.section-label) { max-width: 54ch; color: var(--muted); line-height: 1.6; }
.offline-note { margin: 24px 0; padding: 14px 16px; border-left: 4px solid var(--warning); background: var(--surface); }
label { font-size: .875rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--canvas); }
textarea { min-height: 112px; resize: vertical; }
.form-error, .field-error { min-height: 20px; margin: 4px 0 0; color: var(--exception); font-size: .8125rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(520px, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 12px 12px; border-right: 1px solid var(--rule); background: var(--canvas); }
.sidebar-brand { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 8px 12px; font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.sidebar-brand__mark { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: var(--radius-control); color: #fff; background: var(--action); }
.sidebar-brand__mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 2px; padding-top: 8px; }
.sidebar-nav__secondary { display: grid; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.nav-item { position: relative; min-height: 44px; width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-left: 2px solid transparent; border-radius: 0 var(--radius-control) var(--radius-control) 0; color: var(--ink); background: transparent; text-align: left; text-decoration: none; }
.nav-item > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-item > span:first-child:last-child { grid-column: 2 / -1; }
.nav-item:hover { background: var(--surface); }
.nav-item--active { border-left-color: var(--action); color: var(--action); background: var(--action-soft); font-weight: 700; }
.notification-badge { min-width: 24px; height: 24px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 12px; color: var(--on-action); background: var(--exception); font-size: .75rem; font-weight: 700; }
.session-tools { margin-top: 14px; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--rule); }
.session-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--on-action); background: var(--action); font-size: .75rem; font-weight: 700; }
.session-tools__identity { min-width: 0; }
.session-tools > :not(.session-avatar):not(.session-tools__identity) { grid-column: 1 / -1; }
.session-tools p { margin: 0; font-weight: 700; }
.session-tools label { color: var(--muted); font-size: .75rem; }
.actor-roles { display: grid; gap: 3px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.workspace { min-width: 0; padding: 30px clamp(24px, 3.4vw, 52px) 72px; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--ink); }
.header-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.workspace-create { gap: 7px; }
.create-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.summary { margin: 14px 0 0; color: var(--muted); }
.view-switch { display: flex; gap: 4px; margin-top: 20px; }
.view-switch__button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); background: var(--canvas); font-weight: 700; }
.view-switch__button:hover { background: var(--surface); }
.view-switch__button--active { border-color: var(--action); color: var(--action); background: var(--action-soft); }
.view-controls { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; padding: 20px 0; }
.mobile-filter-toggle { display: none; }
.task-search { flex: 1 1 280px; min-width: min(280px, 100%); }
.task-search input { padding-left: 14px; font-weight: 400; }
.view-controls select { width: auto; max-width: 100%; flex: 1 1 220px; min-width: 150px; }
.filter-button { flex: 0 0 auto; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.filter-button--active { border-bottom-color: var(--action); color: var(--action); font-weight: 700; }
.task-region h2 { margin: 20px 0 12px; font-family: var(--font-ui); font-size: 1.125rem; font-weight: 700; }
.task-list { display: grid; gap: 24px; }
.task-band { min-width: 0; }
.task-band__heading { min-height: 44px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 8px; border-bottom: 1px solid var(--rule); color: var(--action); font-family: var(--font-ui); font-size: .9375rem; font-weight: 700; }
.task-band--attention .task-band__heading { color: var(--exception); }
.task-band__count { color: var(--muted); font-weight: 400; }
.task-band__rows { display: grid; }
.task-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); }
.task-pagination p { margin: 0; }
.task-pagination .field-error { flex-basis: 100%; }
.task-detail--loading > :not(#task-detail-loading):not(.task-detail__header) { display: none; }
.task-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: minmax(220px, 1fr) 124px 92px; gap: 14px; align-items: center; padding: 9px 8px; border: 0; border-bottom: 1px solid var(--rule); background: var(--canvas); text-align: left; }
:root[data-density="compact"] .task-row { min-height: 64px; padding-block: 8px; }
.task-row:hover { background: var(--surface); }
.task-row--selected { box-shadow: inset 3px 0 var(--action); background: var(--action-soft); }
.task-row--archived { opacity: .68; }
.task-row--archived:hover, .task-row--archived.task-row--selected { opacity: 1; }
.task-title { display: block; margin-bottom: 4px; font-weight: 700; }
.task-meta, .task-status { color: var(--muted); font-size: .8125rem; }
.task-status { color: var(--ink); font-weight: 700; }
.task-priority--critical { color: var(--exception); }
.task-priority--high { color: var(--warning); }
.task-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-column { min-width: 0; border-top: 2px solid var(--ink); }
.board-column__header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 50px; padding: 12px 4px 8px; }
.board-column__header h3 { margin: 0; font-family: var(--font-ui); font-size: .875rem; }
.board-column__header span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.board-column__list { display: grid; gap: 8px; }
.board-card, .calendar-task { width: 100%; min-height: 64px; display: grid; gap: 5px; padding: 10px; border: 1px solid var(--rule); border-left: 3px solid var(--action); background: var(--canvas); text-align: left; }
.board-card:hover, .calendar-task:hover { background: var(--surface); }
.board-card__title, .calendar-task__title { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.board-card__meta, .calendar-task__meta { color: var(--muted); font-size: .6875rem; overflow-wrap: anywhere; }
.board-column__empty { margin: 0; padding: 12px 4px; color: var(--muted); font-size: .8125rem; }
.calendar-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin-bottom: 14px; }
.calendar-header h3 { margin: 0; text-align: center; font-family: var(--font-ui); font-size: 1rem; text-transform: capitalize; }
.calendar-header .button { min-width: 44px; padding-inline: 12px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: 7px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: .6875rem; font-weight: 700; text-align: right; }
.calendar-day { min-width: 0; min-height: 112px; padding: 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.calendar-day:nth-child(7n + 1) { border-left: 1px solid var(--rule); }
.calendar-day--outside { background: var(--surface); }
.calendar-day__number { display: block; margin-bottom: 5px; color: var(--muted); font-size: .6875rem; font-weight: 700; text-align: right; }
.calendar-day--today { position: relative; z-index: 1; background: var(--action-soft); box-shadow: inset 0 0 0 2px var(--action); }
.calendar-day--today .calendar-day__number { width: max-content; min-width: 28px; margin: 0 0 5px auto; padding: 3px 7px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: .75rem; line-height: 1.4; text-align: center; }
.calendar-day__tasks { display: grid; gap: 4px; }
.calendar-task { min-height: 44px; padding: 5px; }
.calendar-task__title { font-size: .6875rem; }
.calendar-task__meta { font-size: .625rem; }
.calendar-unscheduled { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ink); }
.calendar-unscheduled h3 { margin: 0 0 10px; font-family: var(--font-ui); font-size: .875rem; }
.calendar-unscheduled-list, #calendar-unscheduled-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.loading-state { min-height: 140px; padding: 24px 8px; color: var(--muted); }
.loading-line { display: block; height: 14px; width: 70%; margin-bottom: 14px; background: var(--surface); animation: pulse 1.4s ease-in-out infinite; }
.loading-line--short { width: 38%; }
@keyframes pulse { 50% { opacity: .45; } }
.state-panel { padding: 28px 0; border-top: 1px solid var(--rule); }
.state-panel h3, .state-panel h2 { margin: 0 0 8px; }
.state-panel p { max-width: 560px; color: var(--muted); line-height: 1.5; }
.state-panel--denied { border-top-color: var(--denied); }

.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--action); background: var(--action-soft); }
.notice strong, .notice p { display: block; margin: 0; }
.notice p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.notice--error { border-left-color: var(--exception); background: var(--exception-soft); }
.notice--success { border-left-color: var(--success); background: var(--success-soft); }
.notice--denied { border-left-color: var(--denied); background: var(--surface); }
.notice--warning { border-left-color: var(--warning); background: var(--warning-soft); }
#telegram-content-panel { align-items: flex-start; }

.task-detail { position: fixed; z-index: 20; top: 0; right: 0; width: 400px; height: 100vh; overflow-y: auto; padding: 60px 32px 32px; border-left: 1px solid var(--rule); background: var(--canvas); box-shadow: -12px 0 32px rgba(23,23,19,.08); }
.detail-close { position: absolute; top: 12px; right: 12px; }
.task-detail h2 { margin: 0 0 28px; }
.task-metadata { margin: 0; }
.task-metadata div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.task-metadata dt { color: var(--muted); font-size: .8125rem; }
.task-metadata dd { margin: 0; }
.task-actions { display: grid; gap: 10px; margin-top: 28px; }
.task-actions__hint { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }

.task-watchers { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); }
.task-watchers__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.task-watchers__header h3 { margin: 0; font-size: 1rem; }
.task-watchers__header span { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.watcher-list { display: grid; gap: 2px; margin: 14px 0 0; padding: 0; list-style: none; }
.watcher-item { min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.watcher-item__name { min-width: 0; overflow-wrap: anywhere; }
.watcher-item button { min-width: 44px; min-height: 44px; padding: 4px 8px; border: 0; background: transparent; font-size: .75rem; }
.watcher-item button:hover { background: var(--surface); }
.watcher-empty, .watcher-candidates-empty { margin: 14px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.watcher-add { display: grid; gap: 7px; margin-top: 16px; }
.watcher-add > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.watcher-add .button { padding-inline: 12px; }
.watcher-permission { margin-top: 16px; font-size: .8125rem; line-height: 1.4; }

.task-checklist { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); }
.task-checklist__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.task-checklist__header h3 { margin: 0; font-size: 1rem; }
.task-checklist__header span { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.checklist-list { display: grid; gap: 2px; margin: 14px 0 0; padding: 0; list-style: none; }
.checklist-item { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.checklist-toggle { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; min-width: 0; font-weight: 400; }
.checklist-toggle input { width: 20px; min-height: 20px; height: 20px; margin: 0 12px; accent-color: var(--action); }
.checklist-item--completed .checklist-item__text { color: var(--muted); text-decoration: line-through; }
.checklist-item__text { align-self: center; overflow-wrap: anywhere; }
.checklist-item__meta { display: block; margin-top: 3px; color: var(--muted); font-size: .6875rem; }
.checklist-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 2px; margin-left: 44px; }
.checklist-item__actions button { min-width: 44px; min-height: 44px; padding: 4px 8px; border: 0; background: transparent; font-size: .75rem; }
.checklist-item__actions button:hover { background: var(--surface); }
.checklist-item__actions button:disabled { cursor: not-allowed; color: #aaa; }
.checklist-empty { margin: 14px 0 0; color: var(--muted); font-size: .875rem; }
.checklist-add { display: grid; gap: 7px; margin-top: 16px; }
.checklist-add > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.checklist-add .button { padding-inline: 12px; }
.checklist-permission { margin-top: 16px; font-size: .8125rem; line-height: 1.4; }

.task-files { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); }
.task-files__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.task-files__header h3 { margin: 0; font-size: 1rem; }
.task-files__header span { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.file-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.file-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.file-item > div { min-width: 0; display: grid; gap: 3px; }
.file-item strong { overflow-wrap: anywhere; font-size: .875rem; }
.file-item div span { color: var(--muted); font-size: .75rem; }
.file-state { max-width: 144px; color: var(--muted); font-size: .6875rem; line-height: 1.35; text-align: right; }
.file-state--scan_failed, .file-state--rejected { color: var(--exception); }
.file-empty { margin: 14px 0 0; color: var(--muted); font-size: .875rem; }
.file-resume { margin-top: 14px; padding: 10px 12px; border-left: 4px solid var(--warning); background: var(--surface); }
.file-resume p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.file-resume p + p { margin-top: 6px; }
.file-upload { display: grid; gap: 8px; margin-top: 16px; }
.file-upload p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.file-upload progress { width: 100%; height: 12px; accent-color: var(--action); }
.file-upload .button { justify-self: start; }
.file-permission { margin-top: 16px; font-size: .8125rem; line-height: 1.4; }

.task-comments { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); }
.task-comments__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.task-comments__header h3 { margin: 0; font-size: 1rem; }
.task-comments__header span { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.comment-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.comment-item { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.comment-item__header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.comment-item__author { font-size: .8125rem; font-weight: 700; }
.comment-item__time { flex: 0 0 auto; color: var(--muted); font-size: .6875rem; }
.comment-item__context { display: block; margin-top: 3px; color: var(--muted); font-size: .6875rem; }
.comment-item__body { margin: 8px 0 0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-item--hidden .comment-item__body { color: var(--muted); font-style: italic; }
.comment-item__actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.comment-item__actions button { min-width: 44px; min-height: 44px; padding: 4px 8px; border: 0; background: transparent; font-size: .75rem; }
.comment-item__actions button:hover { background: var(--surface); }
.comment-empty { margin: 14px 0 0; color: var(--muted); font-size: .875rem; }
.comment-add { display: grid; gap: 7px; margin-top: 16px; }
.comment-add textarea { min-height: 88px; }
.comment-add .button { justify-self: start; }
.comment-permission { margin-top: 16px; font-size: .8125rem; line-height: 1.4; }

.notification-panel { position: fixed; z-index: 25; top: 0; right: 0; width: 400px; height: 100vh; overflow-y: auto; padding: 60px 32px 32px; border-left: 1px solid var(--rule); background: var(--canvas); box-shadow: -12px 0 32px rgba(23,23,19,.12); }
.audit-panel { position: fixed; z-index: 26; top: 0; right: 0; width: 480px; height: 100vh; overflow-y: auto; padding: 60px 32px 32px; border-left: 1px solid var(--rule); background: var(--canvas); box-shadow: -12px 0 32px rgba(23,23,19,.12); }
.monitoring-panel, .analytics-panel, .timeline-panel { position: fixed; z-index: 27; top: 0; right: 0; width: 520px; height: 100vh; overflow-y: auto; padding: 60px 32px 32px; border-left: 1px solid var(--rule); background: var(--canvas); box-shadow: -12px 0 32px rgba(23,23,19,.12); }
.people-admin-panel { position: fixed; z-index: 28; top: 0; right: 0; width: 620px; height: 100vh; overflow-y: auto; padding: 60px 32px 32px; border-left: 1px solid var(--rule); background: var(--canvas); box-shadow: -12px 0 32px rgba(23,23,19,.12); }
.people-admin-panel h2 { margin: 0 0 12px; }
.people-access-gate { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 22px; padding: 14px 16px; border-left: 4px solid var(--action); background: var(--action-soft); }
.people-access-gate h3, .people-access-gate p { margin: 0; }
.people-access-gate h3 { font-size: .9375rem; }
.people-access-gate p { margin-top: 4px; }
.people-admin-proof { display: grid; gap: 8px; margin: -10px 0 22px; padding: 16px; border: 1px solid var(--action); background: var(--canvas); }
.people-admin-proof > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
.people-admin-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin: 0 0 20px; border-block: 1px solid var(--rule); }
.people-admin-summary div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--rule); }
.people-admin-summary div:last-child { border-right: 0; }
.people-admin-summary dt { color: var(--muted); font-size: .75rem; }
.people-admin-summary dd { margin: 4px 0 0; font-family: var(--font-editorial); font-size: 1.75rem; }
.people-admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.people-team-form { display: grid; gap: 8px; margin: 0 0 20px; padding: 18px; border: 1px solid var(--rule); background: var(--surface); }
.people-team-form__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.people-team-form h3 { margin: 0 0 4px; }
.people-team-form__heading p { margin: 0; }
.people-team-management { margin: 0 0 24px; border-block: 1px solid var(--rule); }
#people-team-management-list { display: grid; }
.people-team-row { min-height: 68px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.people-team-row:first-child { border-top: 0; }
.people-team-row > div { min-width: 0; display: grid; gap: 3px; }
.people-team-row span { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.people-team-row > .people-team-row__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.people-team-row--archived { opacity: .72; }
.people-admin-feedback { margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--success); background: var(--surface); }
.people-admin-filters { display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,.45fr) minmax(180px,.45fr); gap: 12px; margin-bottom: 22px; }
.people-admin-filters label { display: grid; gap: 7px; font-size: .75rem; font-weight: 700; }
.people-invitations { margin: 0 0 24px; border-block: 1px solid var(--rule); }
.people-section-heading { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.people-section-heading h3, .people-section-heading p { margin: 0; }
.people-section-heading--employees { min-height: 58px; }
.people-invitation-list { display: grid; padding-bottom: 12px; }
.people-invitation { min-height: 72px; display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.people-invitation > div { min-width: 0; display: grid; gap: 2px; }
.people-invitation > div span { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.status-badge { padding: 4px 8px; border: 1px solid currentColor; border-radius: var(--radius-control); color: var(--muted); font-size: .6875rem; font-weight: 700; }
.status-badge--pending { color: var(--warning); }
.status-badge--claimed { color: var(--success); }
.status-badge--expired { color: var(--denied); }
.people-admin-list { display: grid; gap: 8px; }
.people-card { padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-control); overflow: clip; }
.people-card--blocked { border-left: 4px solid var(--exception); }
.people-card__heading { width: 100%; min-height: 72px; display: grid; grid-template-columns: minmax(0,1fr) auto 92px; align-items: center; gap: 16px; padding: 12px 16px; border: 0; background: var(--canvas); text-align: left; }
.people-card__heading:hover { background: var(--surface); }
.people-card__heading-copy { min-width: 0; display: grid; gap: 3px; }
.people-card h3 { margin: 0; font-size: 1rem; }
.people-card__identity { margin: 0; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.people-card__status { flex: 0 0 auto; color: var(--muted); font-size: .6875rem; font-weight: 700; }
.people-card__chevron { color: var(--action); font-size: .75rem; font-weight: 700; text-align: right; }
.people-card__details { padding: 18px 16px 20px; border-top: 1px solid var(--rule); background: var(--surface); }
.people-card__details:focus { outline: none; }
.people-card__summary { margin: 0 0 16px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.people-card__details > textarea { min-height: 76px; margin-top: 7px; }
.people-card__actions { display: grid; gap: 8px; margin: 14px 0; }
.people-card__actions-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.people-memberships { display: grid; gap: 10px; margin-top: 14px; }
.people-membership { padding-top: 10px; border-top: 1px solid var(--rule); }
.people-membership__label { margin: 0 0 7px; font-size: .8125rem; font-weight: 700; }
.people-membership__controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.people-membership__controls--assignment { grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) auto; }
.people-replace-responsible { display: flex; align-items: center; gap: 8px; margin: 7px 0 0; font-size: .75rem; }
.people-replace-responsible input { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; margin: 0; }
.people-action-dialog { width: min(560px, calc(100% - 32px)); }
.people-action-dialog form { padding: 24px; }
.people-action-target { padding: 12px; border-left: 4px solid var(--action); background: var(--surface); font-weight: 700; overflow-wrap: anywhere; }
.team-rename-dialog { width: min(520px, calc(100% - 32px)); }
.team-rename-dialog form { display: grid; gap: 10px; padding: 24px; }
.admin-section-nav { display: flex; gap: 0; margin: -8px 0 28px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: thin; }
.admin-section-nav a { min-width: max-content; min-height: 48px; display: inline-flex; align-items: center; padding: 10px 16px; border-bottom: 3px solid transparent; color: var(--muted); font-size: .8125rem; font-weight: 700; text-decoration: none; }
.admin-section-nav a:hover { color: var(--ink); background: var(--surface); }
.admin-section-nav a.is-active { border-bottom-color: var(--action); color: var(--action); }
.admin-information-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.admin-information-card { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid var(--rule); border-top: 4px solid var(--action); border-radius: var(--radius-panel); }
.admin-information-card h2 { margin: 0 0 12px; font-size: 1.5rem; }
.admin-information-card p { flex: 1; margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.monitoring-panel h2 { margin: 0 0 12px; }
.monitoring-overall { margin: 0; padding: 12px 14px; border-left: 4px solid var(--warning); background: var(--surface); line-height: 1.45; }
.monitoring-overall--healthy { border-left-color: var(--success); }
.monitoring-overall--unavailable { border-left-color: var(--exception); }
.monitoring-generated { margin: 8px 0 24px; color: var(--muted); font-size: .75rem; }
.monitoring-list { display: grid; gap: 12px; }
.monitoring-card { padding: 16px; border: 1px solid var(--rule); border-left: 4px solid var(--warning); border-radius: var(--radius-control); }
.monitoring-card--healthy { border-left-color: var(--success); }
.monitoring-card--unavailable { border-left-color: var(--exception); }
.monitoring-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.monitoring-card h3 { margin: 2px 0 8px; font-size: 1rem; }
.monitoring-card > p { margin: 0 0 14px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.monitoring-status { flex: 0 0 auto; padding: 4px 7px; border: 1px solid currentColor; border-radius: 4px; color: var(--warning); font-size: .6875rem; font-weight: 700; }
.monitoring-status--healthy { color: var(--success); }
.monitoring-status--unavailable { color: var(--exception); }
.monitoring-metrics { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; margin: 0; font-size: .75rem; }
.monitoring-metrics dt { color: var(--muted); }
.monitoring-metrics dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.monitoring-email-action { width: 100%; margin-top: 18px; }
.analytics-panel h2 { margin: 0 0 12px; }
.analytics-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 24px 0; padding-block: 16px; border-block: 1px solid var(--rule); }
.analytics-filters label { color: var(--muted); font-size: .75rem; }
.analytics-filters select { min-width: 0; }
.analytics-filters .button { grid-column: 1 / -1; justify-self: end; }
.analytics-snapshot { color: var(--muted); font-size: .75rem; }
.analytics-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--ink); }
.analytics-metrics div { min-width: 0; padding: 14px 10px; border-bottom: 1px solid var(--rule); }
.analytics-metrics dt { color: var(--muted); font-size: .75rem; }
.analytics-metrics dd { margin: 4px 0 0; font: 700 1.375rem/1.2 var(--font-ui); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.analytics-section { margin-top: 26px; }
.analytics-section h3, .analytics-export h3 { margin: 0 0 10px; }
.analytics-attention-row { width: 100%; min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 9px 0; text-align: left; border-bottom: 1px solid var(--rule); }
.analytics-attention-row span { color: var(--muted); font-size: .75rem; }
.analytics-trend { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.analytics-trend div { min-width: 0; padding: 8px; background: var(--canvas); }
.analytics-trend time, .analytics-trend span { display: block; color: var(--muted); font-size: .6875rem; }
.analytics-trend strong { display: block; margin-block: 4px; }
.analytics-definitions { margin-top: 24px; border-block: 1px solid var(--rule); }
.analytics-definitions summary { padding-block: 12px; font-weight: 700; cursor: pointer; }
.analytics-definitions dl { margin: 0 0 14px; }
.analytics-definitions dt { margin-top: 10px; font-weight: 700; }
.analytics-definitions dd { margin: 3px 0 0; color: var(--muted); font-size: .8125rem; }
.analytics-export { display: grid; gap: 9px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ink); }
.analytics-export p { margin: 0; }
.analytics-export .button { justify-self: start; }
.timeline-panel h2 { margin: 0 0 12px; }
.timeline-list { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.timeline-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.timeline-item time { grid-row: span 2; color: var(--muted); font-size: .75rem; }
.timeline-item span { color: var(--muted); font-size: .8125rem; }
.email-admin-dialog { width: min(640px, calc(100% - 32px)); }
.email-admin-content { max-height: calc(100vh - 34px); overflow-y: auto; padding: 24px; }
.email-admin-dialog .dialog-heading h2 { margin-bottom: 12px; }
.email-admin-dialog form { padding: 0; }
.email-admin-form { display: grid; gap: 9px; margin-top: 18px; padding-top: 18px !important; border-top: 1px solid var(--rule); }
.email-admin-form h3 { margin: 0; }
.email-admin-form > p, .email-config-form fieldset > p { margin: 0 0 8px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.email-config-form fieldset { min-width: 0; display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
.email-config-form legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.email-config-form fieldset:disabled { opacity: .62; }
.email-admin-feedback { margin: 10px 0 0; padding: 12px; border-left: 4px solid var(--success); background: var(--surface); line-height: 1.45; }
.email-admin-actions { flex-wrap: wrap; }
.audit-panel h2 { margin: 0 0 12px; }
.audit-integrity { margin: 0 0 24px; padding: 12px 14px; border-left: 4px solid var(--warning); background: var(--surface); }
.audit-integrity--ok { border-left-color: var(--success); }
.audit-integrity--broken { border-left-color: var(--exception); color: var(--exception); }
.audit-list { border-top: 1px solid var(--rule); }
.audit-item { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.audit-item span { font-size: .8125rem; overflow-wrap: anywhere; }
.audit-item small { color: var(--muted); font-size: .6875rem; }
.audit-empty { color: var(--muted); }
.notification-panel h2 { margin: 0 0 8px; }
.notification-summary { margin: 0 0 24px; color: var(--muted); }
.notification-toolbar { display: grid; gap: 12px; margin-bottom: 18px; }
.notification-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.notification-filters button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink); background: var(--canvas); font: inherit; }
.notification-filters button[aria-pressed="true"] { border-color: var(--action); color: var(--action); background: var(--action-soft); font-weight: 700; }
.notification-toolbar > .button { justify-self: start; }
.notification-list { border-top: 1px solid var(--rule); }
.notification-item { width: 100%; min-height: 96px; display: grid; gap: 6px; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--rule); background: var(--canvas); text-align: left; }
.notification-item:hover { background: var(--surface); }
.notification-item--unread { box-shadow: inset 3px 0 var(--action); background: var(--action-soft); }
.notification-item__title { font-weight: 700; }
.notification-item__event { color: var(--ink); font-size: .875rem; }
.notification-item__meta { color: var(--muted); font-size: .75rem; }
.notification-error { padding: 16px 0; border-top: 1px solid var(--exception); }
.notification-error p { margin: 0 0 12px; color: var(--exception); line-height: 1.45; }
.notification-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; }
.notification-pagination p { margin: 0; color: var(--muted); }
.notification-denied-state { border-top-color: var(--denied); }

.task-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-panel); box-shadow: 0 20px 60px rgba(23,23,19,.18); }
.task-dialog { color: var(--ink); background: var(--canvas); }
.task-dialog::backdrop { background: rgba(23,23,19,.44); }
.task-dialog form { display: grid; gap: 9px; padding: 24px; }
.form-field { display: grid; gap: 9px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 12px; }
.dialog-heading .icon-button { flex: 0 0 44px; }
.dialog-heading h2, .task-dialog--reason h2 { margin: 0 0 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.permission-note { margin: 0 0 8px; padding: 12px; color: var(--denied); background: var(--surface); }
.email-test-destination { display: grid; gap: 6px; }
.email-test-destination strong { color: var(--ink); }
.email-test-destination span { overflow-wrap: anywhere; }
.mobile-nav { display: none; }
.mobile-header { display: none; }
.mobile-more-dialog { width: min(430px, 100%); max-width: none; max-height: min(76vh, 640px); margin: auto 0 0 auto; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: var(--canvas); color: var(--ink); }
.mobile-more-dialog::backdrop { background: rgba(23, 23, 19, .34); }
.mobile-more-dialog__content { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
.mobile-more-dialog__content h2 { margin: 0; }
.mobile-more-dialog__content nav { display: grid; gap: 2px; }
.mobile-more-dialog__content nav button, .mobile-more-dialog__content nav a { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 0; border-bottom: 1px solid var(--rule); color: inherit; background: var(--canvas); text-align: left; text-decoration: none; }

.preference-dialog { width: min(620px, calc(100% - 32px)); }
.preference-content { max-height: calc(100vh - 34px); overflow-y: auto; padding: 24px; }
.preference-content > p { color: var(--muted); line-height: 1.5; }
.preference-form { display: grid; gap: 9px; margin-top: 20px; }
.preference-check { min-height: 56px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 8px; }
.preference-check input { width: 24px; height: 24px; min-height: 24px; justify-self: center; }
.preference-check span { display: grid; gap: 3px; }
.preference-check small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.shortcut-help { margin-top: 8px; padding-block: 8px; border-block: 1px solid var(--rule); }
.shortcut-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.shortcut-help dl { display: grid; gap: 8px; margin: 10px 0; }
.shortcut-help dl div { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 10px; }
.shortcut-help dt, .shortcut-help dd { margin: 0; }
.shortcut-help kbd { display: inline-grid; min-width: 30px; min-height: 30px; place-items: center; padding: 3px 7px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: 700 .75rem/1 var(--font-ui); }
.shortcut-help p { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.preference-feedback { margin: 8px 0 0; padding: 10px 12px; border-left: 4px solid var(--success); background: var(--success-soft); }
.preference-actions { flex-wrap: wrap; }

.offboarding-dialog { width: min(680px, calc(100% - 32px)); }
.offboarding-content { max-height: calc(100vh - 34px); overflow-y: auto; padding: 24px; }
.offboarding-content > p { color: var(--muted); line-height: 1.5; }
.offboarding-form { display: grid; gap: 10px; margin-top: 18px; }
.offboarding-target { margin: 0; font-weight: 700; }
.offboarding-teams { display: grid; gap: 10px; }
.offboarding-team { padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-control); }
.offboarding-team h3 { margin: 0 0 6px; font: 700 .9375rem/1.3 var(--font-ui); }
.offboarding-team p { margin: 0 0 10px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.offboarding-team label { display: grid; gap: 6px; margin-top: 9px; }
.offboarding-confirm { min-height: 56px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; }
.offboarding-confirm input { width: 24px; height: 24px; min-height: 24px; justify-self: center; }
.offboarding-status { margin: 8px 0 0; padding: 12px; border-left: 4px solid var(--warning); background: var(--warning-soft); }
.offboarding-status--success { border-left-color: var(--success); background: var(--success-soft); }
.offboarding-actions { flex-wrap: wrap; }

.privileged-recovery-dialog { width: min(700px, calc(100% - 32px)); }
.privileged-recovery-content { max-height: calc(100vh - 34px); overflow-y: auto; padding: 24px; }
.privileged-recovery-content > p { color: var(--muted); line-height: 1.5; }
.privileged-recovery-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.privileged-recovery-section h3 { margin: 0 0 10px; }
.privileged-recovery-card { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.privileged-recovery-card p { margin: 3px 0; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.privileged-recovery-card .button { margin-top: 8px; }
.privileged-recovery-action { display: grid; gap: 9px; margin-top: 22px; padding: 16px; border: 1px solid var(--rule); }
.privileged-recovery-action h3, .privileged-recovery-action p { margin: 0; }
.privileged-recovery-feedback { margin: 16px 0 0; padding: 12px; border-left: 4px solid var(--success); background: var(--success-soft); }
.privileged-recovery-actions { flex-wrap: wrap; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); }
.auth-aside { padding: 36px; background: var(--surface); border-right: 1px solid var(--rule); }
.auth-aside p:last-child { color: var(--muted); line-height: 1.55; }
.auth-main { display: grid; place-items: center; padding: 32px; }
.auth-panel { width: min(560px, 100%); }
.auth-panel h1 { margin-bottom: 16px; }
.auth-panel > p { color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 10px; margin-top: 28px; }
.auth-form .button { margin-top: 10px; }
.auth-panel summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.auth-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; padding: 14px 16px; background: var(--surface); border-left: 4px solid var(--action); }
.auth-code code { font-family: "Noto Sans Mono", monospace; font-size: 1rem; overflow-wrap: anywhere; }
.auth-qr-card { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: center; margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.auth-qr-card img { display: block; width: 232px; height: 232px; max-width: 100%; border-radius: 12px; background: #fff; }
.auth-qr-card h2 { margin: 0 0 8px; }
.auth-qr-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.auth-qr-card .auth-code { margin-bottom: 0; }
.auth-recovery-material { display: grid; gap: 16px; }
.auth-recovery-codes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 16px 16px 16px 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-muted); overflow-wrap: anywhere; }
.auth-recovery-codes code { font-family: "Noto Sans Mono", monospace; font-size: .88rem; }
.auth-steps { margin: 24px 0; padding: 0; list-style: none; counter-reset: auth-step; }
.auth-steps li { counter-increment: auth-step; padding: 10px 0 10px 40px; position: relative; border-bottom: 1px solid var(--rule); }
.auth-steps li::before { content: counter(auth-step); position: absolute; left: 0; top: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; }
.auth-secondary { margin-top: 18px; }
.auth-help-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 16px; color: var(--action); font-weight: 700; }
.auth-help-link--adjacent { margin-top: 0; }
.auth-help-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; text-decoration: underline; }
.auth-proof-choice { display: grid; gap: 8px; margin: 8px 0; }
.auth-proof-choice label { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.auth-proof-choice input { width: 24px; height: 24px; flex: 0 0 24px; }

/* R1 Simplicity: the approved progressive-disclosure workspace shell. */
.topbar { position: sticky; z-index: 24; top: 0; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--canvas) 96%, transparent); }
.topbar-brand { min-width: 0; display: flex; align-items: center; gap: 12px; letter-spacing: -.02em; }
.topbar-brand__mark { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: var(--radius-control); color: var(--canvas); background: var(--ink); font-weight: 700; }
.topbar-actions { min-width: 0; display: flex; align-items: center; gap: 16px; }
.topbar-notification { position: relative; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; border: 0; background: transparent; }
.topbar-notification { color: inherit; text-decoration: none; }
.topbar-notification:hover { background: var(--surface); }
.topbar-notification svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar-profile { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: var(--radius-control); color: inherit; text-decoration: none; }
.topbar-profile:hover, .topbar-profile--active { background: var(--surface); }
.topbar-profile--active { box-shadow: inset 0 -2px var(--action); }
.topbar-profile > span:last-child { min-width: 0; display: grid; }
.topbar-profile strong, .topbar-profile small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile small { color: var(--muted); font-size: .75rem; }

.app-shell { min-height: calc(100vh - 68px); grid-template-columns: 224px minmax(520px, 1fr); }
.sidebar { top: 68px; height: calc(100vh - 68px); padding: 24px 16px 16px; background: var(--surface); }
.sidebar-nav { gap: 4px; padding-top: 0; }
.nav-item { min-height: 44px; grid-template-columns: 28px minmax(0, 1fr) auto; padding: 0 12px; border: 0; border-radius: var(--radius-control); }
.nav-item__index { grid-column: auto !important; color: var(--muted); font-size: .75rem; font-weight: 400; }
.nav-item > b { color: var(--muted); font-size: .75rem; }
.nav-item--active { border: 0; color: var(--action); background: var(--action-soft); }
.nav-item--active .nav-item__index { color: var(--action); }
.nav-more { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--rule); }
.nav-more summary { min-height: 44px; display: flex; align-items: center; padding: 0 12px; cursor: pointer; font-weight: 700; }
.nav-more button, .nav-more a { width: 100%; min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 0; border-radius: var(--radius-control); color: inherit; background: transparent; text-align: left; text-decoration: none; }
.nav-more button:hover, .nav-more a:hover { background: var(--canvas); }
.nav-more a.is-active { color: var(--action); background: var(--action-soft); font-weight: 700; }
.session-tools { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: auto; padding: 14px 8px 0; }
.session-tools__identity { grid-column: 1; }
.session-tools .button { padding-inline: 8px; font-size: .75rem; }

.workspace { padding: 32px 24px 120px; }
.workspace-header { padding-bottom: 0; border-bottom: 0; }
.workspace-header .section-label { margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.workspace-header h1 { font-size: clamp(2rem, 3.2vw, 3.25rem); }
.workspace-create { gap: 6px; }
.manager-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; border-block: 1px solid var(--rule); }
.metric { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 20px 16px; border-right: 1px solid var(--rule); }
.metric:last-child { border-right: 0; }
.metric > span, .metric small { color: var(--muted); }
.metric strong { grid-row: span 2; font-family: var(--font-editorial); font-size: 1.625rem; font-weight: 400; }
.metric small { overflow-wrap: anywhere; }
.metric--attention strong { color: var(--exception); }
.view-switch { width: max-content; padding: 4px; background: var(--surface); border-radius: var(--radius-control); }
.view-switch__button { border: 0; border-radius: 4px; background: transparent; }
.view-switch__button--active { color: var(--action); background: var(--canvas); box-shadow: 0 1px 3px rgba(23,23,19,.12); }
.view-controls { margin-top: 12px; padding: 12px 0; border-block: 1px solid var(--rule); }
.task-region > h2 { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.task-list { gap: 0; }
.task-band { margin-top: 28px; }
.task-band:first-child { margin-top: 0; }
.task-band__heading { padding: 0 8px 8px; border-bottom-color: var(--ink); color: var(--ink); }
.task-band--attention .task-band__heading { color: var(--ink); }
.task-row { min-height: 68px; grid-template-columns: 4px minmax(230px, 1fr) minmax(110px, .48fr) 124px 112px; gap: 12px; padding: 10px 8px; transition: background 120ms cubic-bezier(.2,.8,.2,1); }
.task-row__signal { width: 3px; height: 32px; background: var(--action); }
.task-row__signal--attention { background: var(--exception); }
.task-row__signal--next { background: var(--rule); }
.task-row__main { min-width: 0; display: grid; }
.task-title { margin: 0; }
.task-row__person, .task-row__due { color: var(--muted); font-size: .8125rem; }
.task-status { justify-self: start; max-width: 100%; padding: 4px 8px; border-radius: var(--radius-control); color: var(--warning); background: var(--warning-soft); font-size: .75rem; font-weight: 400; overflow-wrap: anywhere; }
.task-status--in_progress, .task-status--completed { color: var(--success); background: var(--success-soft); }
.task-status--attention { color: var(--exception); background: var(--exception-soft); }
.state-panel { margin-top: 28px; padding: 32px; border: 1px solid var(--rule); border-left: 4px solid var(--action); border-radius: var(--radius-panel); background: var(--surface); }
.state-panel h3 { font-family: var(--font-editorial); font-size: 1.625rem; font-weight: 400; }
.task-detail { top: 68px; height: calc(100vh - 68px); padding: 32px 24px 120px; }

.route-page-active .workspace > :not(.route-page) { display: none !important; }
.route-page { width: 100%; max-width: 1320px; min-width: 0; }
.route-page:focus { outline: none; }
.route-page__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.route-page__copy { max-width: 760px; }
.route-page__heading .summary { line-height: 1.5; }
.route-page .route-panel { position: static; z-index: auto; width: 100%; height: auto; min-height: 0; overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
.route-page .route-panel > .section-label:first-of-type { margin-top: 0; }
.route-page .route-panel > .section-label:first-of-type { display: none; }
.route-page .route-panel > h2:first-of-type { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.route-page .analytics-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.route-page .analytics-panel > .permission-note { display: none; }
.route-page .timeline-panel > .permission-note { display: none; }
.route-page .timeline-list { margin-top: 0; border-top: 0; }
.analytics-denied-state { border-top-color: var(--denied); }
.route-create-form { width: min(760px, 100%); display: grid; gap: 18px; padding: 0; }
.route-create-form .dialog-actions { position: static; justify-content: flex-start; margin: 4px 0 0; padding: 0; background: transparent; }
.task-route-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.task-route-toolbar p { margin: 0; color: var(--muted); }
.task-route-band { margin-top: 28px; }
.task-route-state { max-width: 760px; }
.task-route-hint { margin-top: 20px; color: var(--muted); }
.calendar-route-loading { max-width: 760px; }
.calendar-route-error { max-width: 760px; }
.calendar-route-toolbar { min-height: 68px; display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 240px); align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.calendar-route-navigation { display: flex; gap: 8px; }
.calendar-route-navigation .button { min-width: 44px; }
.calendar-route-title { margin: 0; text-align: center; text-transform: capitalize; }
.calendar-route-team { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; color: var(--muted); }
.calendar-route-view { margin-top: 20px; }
.calendar-route-empty-note { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--action); background: var(--action-soft); color: var(--muted); line-height: 1.45; }
.search-route-loading, .search-route-error { max-width: 760px; }
.search-route-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; max-width: 920px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.search-route-label { display: grid; gap: 7px; font-weight: 700; }
.search-route-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.search-route-pagination p { margin: 0; }
.queue-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.queue-route-card { min-width: 0; display: grid; align-content: start; gap: 16px; padding: 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.queue-route-card:nth-child(2n) { border-right: 0; }
.queue-route-card .section-label { margin: 0; }
.queue-route-card h2 { margin: 0; }
.queue-route-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.queue-route-card__facts > div { display: grid; gap: 4px; }
.queue-route-card__facts dt { color: var(--muted); }
.queue-route-card__facts dd { margin: 0; font-weight: 700; }
.queue-route-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.teams-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.team-route-card { min-width: 0; padding: 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.team-route-card:nth-child(2n) { border-right: 0; }
.team-route-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.team-route-card__heading h2 { margin: 0; }
.team-route-card__overdue { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #efb6af; border-radius: var(--radius-control); color: var(--exception); background: var(--exception-soft); font-size: .75rem; }
.team-route-card__meta { margin: 8px 0 20px; color: var(--muted); }
.team-route-card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.team-route-card__facts > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
.team-route-card__facts dt { color: var(--muted); }
.team-route-card__facts dd { margin: 0; font-weight: 700; }
.team-route-card__members { margin-top: 16px; }
.team-route-card__members summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--action); font-weight: 700; }
.team-route-card__members ul { margin: 0; padding: 0; list-style: none; }
.team-route-card__members li { padding: 10px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.team-route-card__own-role { color: var(--muted); }
.route-page .notification-panel > #audit-mobile-button,
.route-page .notification-panel > #monitoring-mobile-button,
.route-page .notification-panel > #people-admin-mobile-button,
.route-page .notification-panel > #analytics-mobile-button,
.route-page .notification-panel > #timeline-mobile-button,
.route-page .notification-panel > #telegram-settings-open { display: none !important; }
.route-team-form { width: min(620px, 100%); display: grid; gap: 14px; margin-top: 28px; padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--surface); }
.settings-route-list { border-top: 1px solid var(--rule); }
.settings-route-row { min-height: 112px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.settings-route-row h2 { margin: 0; font-family: var(--font-ui); font-size: 1rem; font-weight: 700; }
.settings-route-row p { margin: 6px 0 0; color: var(--muted); }
.settings-route-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.account-connection-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: .8125rem; font-weight: 700; }
.account-connection-status::before { width: 9px; height: 9px; border-radius: 50%; background: currentColor; content: ""; }
.account-connection-status--connected { color: var(--success); }
.account-connection-status--disconnected, .account-connection-status--disabled { color: var(--muted); }
.account-connection-status--error { color: var(--denied); }
.account-profile-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 20px; margin-bottom: 32px; padding: 24px; border: 1px solid var(--rule); border-left: 4px solid var(--action); border-radius: var(--radius-panel); background: var(--surface); }
.account-profile-card__avatar { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; color: var(--on-action); background: var(--action); font-size: 1.125rem; font-weight: 700; }
.account-profile-card__identity { min-width: 0; }
.account-profile-card h2 { margin: 0; }
.account-profile-card p { margin: 5px 0 0; color: var(--muted); }
.account-role-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.account-role { padding: 5px 8px; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--canvas); font-size: .75rem; }
.account-demo-field { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 360px); align-items: center; gap: 20px; color: var(--muted); }
.totp-reconfiguration-dialog form > section { display: grid; gap: 12px; }
.totp-reconfiguration-dialog form > section[hidden] { display: none; }
.totp-reconfiguration-dialog form > section > label { display: grid; gap: 7px; }
.totp-reconfiguration-qr { display: block; width: min(240px, 100%); aspect-ratio: 1; margin: 0 auto; background: #fff; border: 1px solid var(--rule); }
.totp-reconfiguration-secret { align-items: center; overflow-wrap: anywhere; }
.totp-reconfiguration-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0; padding-left: 24px; font-family: var(--font-mono); overflow-wrap: anywhere; }
.more-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.more-route-grid .button { min-height: 64px; justify-content: flex-start; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
.more-route-grid .button:nth-child(odd) { border-right: 1px solid var(--rule); }

@media (min-width: 1180px) {
  .view-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) repeat(6, auto); align-items: start; }
  .view-controls .task-search { grid-column: 1; }
  .view-controls #task-team-filter { grid-column: 2; }
  .view-controls #saved-view-select { grid-column: 1 / 8; }
  .view-controls #save-view-open { grid-column: 8; }
  .view-controls #saved-view-delete { grid-column: 8; }
  .app-shell:has(.task-detail:not([hidden])) { grid-template-columns: 224px minmax(520px, 1fr) 400px; }
  .app-shell:has(.task-detail:not([hidden])) .task-detail { position: sticky; grid-column: 3; box-shadow: none; }
}

@media (max-width: 900px) {
  .topbar { min-height: 60px; padding-inline: 20px; }
  .topbar-create, .topbar-notification__label, .topbar-profile > span:last-child { display: none; }
  .topbar-notification { padding-inline: 4px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .workspace { padding: 24px 20px calc(112px + env(safe-area-inset-bottom)); }
  .workspace-header { align-items: center; }
  .workspace-header .button { display: none; }
  .workspace-header .workspace-create { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; padding: 0; border: 0; border-radius: 50%; font-size: 0; line-height: 1; }
  .workspace-header .workspace-create span { display: none; }
  .workspace-header .workspace-create .create-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .manager-overview { grid-template-columns: 1fr 1fr; }
  .metric { border-bottom: 1px solid var(--rule); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .task-row { grid-template-columns: 4px minmax(0, 1fr) auto; }
  .task-row__person, .task-row .task-status { display: none; }
  .task-row__due { text-align: right; }
  .task-board { grid-template-columns: 1fr; }
  .board-column { border-top-width: 1px; }
  .calendar-weekdays { display: none; }
  .calendar-grid { display: block; }
  .calendar-day { min-height: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--rule); }
  .calendar-day--empty:not(.calendar-day--today), .calendar-day--outside { display: none; }
  .calendar-day__number { margin: 0; text-align: left; }
  .calendar-day--today { padding-inline: 8px; }
  .calendar-day--today .calendar-day__number { margin: 0; }
  .calendar-route-view--empty .calendar-weekdays,
  .calendar-route-view--empty .calendar-grid { display: grid; }
  .calendar-route-view--empty .calendar-day,
  .calendar-route-view--empty .calendar-day--empty,
  .calendar-route-view--empty .calendar-day--outside { display: block; min-height: 52px; padding: 6px 2px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .calendar-route-view--empty .calendar-day:nth-child(7n + 1) { border-left: 1px solid var(--rule); }
  .calendar-route-view--empty .calendar-day__number { text-align: center; }
  #calendar-unscheduled-list, .calendar-unscheduled-list { grid-template-columns: 1fr; }
  .task-detail { top: 60px; width: min(100%, 430px); height: calc(100vh - 60px); padding: 56px 20px calc(96px + env(safe-area-inset-bottom)); }
  .notification-panel { width: min(100%, 430px); padding: 56px 20px calc(96px + env(safe-area-inset-bottom)); }
  .audit-panel { width: min(100%, 430px); padding: 56px 20px calc(96px + env(safe-area-inset-bottom)); }
  .monitoring-panel, .analytics-panel, .timeline-panel { width: min(100%, 430px); padding: 56px 20px calc(96px + env(safe-area-inset-bottom)); }
  .people-admin-panel { width: min(100%, 430px); padding: 56px 20px calc(96px + env(safe-area-inset-bottom)); }
  .people-admin-proof > div, .people-card__actions-row, .people-membership__controls { grid-template-columns: 1fr; }
  .people-admin-proof .button, .people-card__actions-row .button, .people-membership__controls .button { width: 100%; }
  .people-access-gate { display: grid; grid-template-columns: 1fr; }
  .people-access-gate .button { width: 100%; }
  .people-admin-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .people-admin-summary div:nth-child(2) { border-right: 0; }
  .people-admin-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .people-admin-filters { grid-template-columns: 1fr; }
  .people-invitation { grid-template-columns: minmax(0,1fr) auto; }
  .people-invitation .button { grid-column: 1 / -1; width: 100%; }
  .people-team-row { grid-template-columns: 1fr; }
  .people-team-row .button { width: 100%; }
  .people-card__heading { grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; }
  .people-card__heading-copy { grid-column: 1; grid-row: 1; }
  .people-card__status { grid-column: 1; grid-row: 2; }
  .people-card__chevron { grid-column: 2; grid-row: 1 / span 2; }
  .admin-section-nav { margin-inline: -20px; padding-inline: 4px; }
  .admin-information-grid { grid-template-columns: 1fr; }
  .admin-information-card { min-height: 0; padding: 20px; }
  .mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; width: 100vw; display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--canvas); }
  .mobile-nav button, .mobile-nav a { position: relative; width: 100%; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 6px 2px; border: 0; border-top: 2px solid transparent; color: inherit; background: var(--canvas); font-size: .6875rem; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
  .mobile-nav > :not(.mobile-create) { justify-self: stretch; }
  .mobile-nav .mobile-nav__active { border-top-color: var(--action); color: var(--action); font-weight: 700; }
  .mobile-nav .notification-badge { position: absolute; top: 0; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: .625rem; }
  .mobile-nav .mobile-create { width: 50px; height: 50px; min-height: 50px; display: grid; place-items: center; align-self: center; justify-self: center; margin-top: -18px; padding: 0; border: 0; border-radius: 50%; color: var(--on-action); background: var(--action); font-size: 0; line-height: 1; box-shadow: 0 6px 18px rgba(21,75,216,.24); }
  .mobile-nav .mobile-create .create-icon { width: 20px; height: 20px; }
  .auth-page { display: block; }
  .auth-aside { padding: 20px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .auth-aside p:last-child { margin-bottom: 0; }
  .auth-main { display: block; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); }
  .auth-qr-card { grid-template-columns: 1fr; justify-items: center; padding: 16px; }
  .auth-qr-card > div { width: 100%; }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 16px; }
  .topbar-profile { display: none; }
  .manager-overview { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(2) { border-right: 0; }
  .metric:last-child { grid-column: auto; }
  .metric { padding-block: 12px; }
  .view-switch { width: 100%; }
  .view-switch__button { min-width: 0; flex: 1 1 0; padding-inline: 6px; }
  #telegram-content-panel { align-items: stretch; flex-direction: column; }
  #telegram-content-panel .button { width: 100%; }
  .workspace-header { padding-bottom: 24px; }
  .route-page__heading { display: grid; gap: 16px; }
  .route-page__heading .header-actions, .route-page__heading .header-actions .button { width: 100%; }
  .calendar-route-toolbar { grid-template-columns: 1fr; gap: 12px; }
  .calendar-route-title { grid-row: 1; text-align: left; }
  .calendar-route-navigation { grid-row: 2; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .calendar-route-team { grid-row: 3; grid-template-columns: 1fr; gap: 6px; }
  .search-route-form { grid-template-columns: 1fr; }
  .search-route-form .button, .search-route-pagination .button { width: 100%; }
  .route-page .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary { font-size: .875rem; }
  .task-row { min-height: 76px; padding-inline: 4px; }
  .task-row__main .task-meta { display: none; }
  .task-band__heading { padding-inline: 4px; }
  .view-controls { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .mobile-filter-toggle { display: inline-flex; justify-self: end; }
  .view-controls:not(.view-controls--expanded) > :not(.mobile-filter-toggle) { display: none; }
  .view-controls--expanded .mobile-filter-toggle { justify-self: stretch; }
  .view-controls--expanded .task-search, .view-controls--expanded select, .view-controls--expanded .button { width: 100%; }
  .task-dialog { width: 100%; max-width: 100%; max-height: calc(100vh - 12px); margin: auto 0 0; border-radius: 10px 10px 0 0; }
  .task-dialog form { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .totp-reconfiguration-codes { grid-template-columns: 1fr; }
  .dialog-actions { position: sticky; bottom: 0; margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--canvas); }
  .preference-content { max-height: calc(100vh - 12px); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .preference-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .offboarding-content { max-height: calc(100vh - 12px); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .offboarding-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .privileged-recovery-content { max-height: calc(100vh - 12px); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .privileged-recovery-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .analytics-filters, .analytics-metrics { grid-template-columns: 1fr; }
  .route-page .analytics-metrics { grid-template-columns: 1fr; }
  .analytics-filters .button { grid-column: auto; width: 100%; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item time { grid-row: auto; }
  #recurrence-dialog .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; margin-inline: 0; padding-inline: 0; }
  #recurrence-dialog .dialog-actions button[type="submit"] { grid-column: 1 / -1; width: 100%; }
  .email-admin-content { max-height: calc(100vh - 12px); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .email-admin-actions { position: static; margin-inline: 0; padding: 0; background: transparent; }
  .file-item { grid-template-columns: 1fr; }
  .file-state { max-width: none; text-align: left; }
  .route-page__heading { display: grid; gap: 18px; }
  .route-page__heading .header-actions { display: flex; }
  .teams-route-grid, .more-route-grid, .queue-route-grid { grid-template-columns: 1fr; }
  .team-route-card, .team-route-card:nth-child(2n), .more-route-grid .button:nth-child(odd), .queue-route-card { border-right: 0; }
  .team-route-card { padding-inline: 0; }
  .queue-route-card { padding-inline: 0; }
  .queue-route-card__actions .button { flex: 1 1 180px; }
  .task-route-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .team-route-card__facts > div, .settings-route-row { grid-template-columns: 1fr; }
  .settings-route-row .button { justify-self: start; }
  .settings-route-actions, .settings-route-actions .button { width: 100%; }
  .account-profile-card { grid-template-columns: 48px minmax(0, 1fr); align-items: start; padding: 20px 16px; }
  .account-profile-card__avatar { width: 48px; height: 48px; }
  .account-role-list { grid-column: 1 / -1; }
  .account-demo-field { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* R2.2 Operations Command — approved visual system, 2026-08-28. */
:root[data-theme="light"],
:root[data-theme="system"] {
  color-scheme: light;
  --font-editorial: var(--font-ui);
  --page-bg: #f4f7f9;
  --canvas: #ffffff;
  --surface: #eef2f5;
  --surface-elevated: #fff;
  --ink: #14282b;
  --muted: #40585a;
  --rule: #d6e0e5;
  --action: #087568;
  --action-soft: #ddf4ee;
  --action-hover: #065e55;
  --exception: #c83c2f;
  --exception-soft: #fff0ee;
  --warning: #9a5b08;
  --warning-soft: #fff6df;
  --success: #167458;
  --success-soft: #e7f6f0;
  --denied: #5d6d6f;
  --focus: #087568;
  --control-border: #b8c6cd;
  --on-action: #fff;
  --radius-control: 8px;
  --radius-panel: 12px;
  --sidebar: #163239;
  --sidebar-hover: #20434a;
  --sidebar-active: #285059;
  --sidebar-ink: #f7fbf8;
  --sidebar-muted: #acc8c5;
  --sidebar-rule: #28484e;
  --surface-raised: #e5edf1;
  --surface-hover: #f7fafb;
  --surface-strong: #fff;
  --surface-translucent: rgba(255,255,255,.72);
  --progress-track: #dce5e9;
  --panel-backdrop: rgba(20,40,43,.24);
  --shadow-color: rgba(17,43,46,.2);
  --shadow-soft: rgba(20,40,43,.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --font-editorial: var(--font-ui);
  --page-bg: #0c120f;
  --canvas: #111915;
  --surface: #18231d;
  --surface-elevated: #1d2922;
  --surface-raised: #253229;
  --surface-hover: #2a3930;
  --surface-strong: #314138;
  --surface-translucent: rgba(236,246,239,.10);
  --ink: #edf5ef;
  --muted: #a8b8ad;
  --rule: #394940;
  --action: #67c9b7;
  --action-soft: #193a33;
  --action-hover: #83d9ca;
  --exception: #ff9085;
  --exception-soft: #4b2927;
  --warning: #f3bd73;
  --warning-soft: #44351f;
  --success: #76d5a5;
  --success-soft: #203d31;
  --denied: #aeb8b1;
  --focus: #8ee1d2;
  --control-border: #52645a;
  --on-action: #071b16;
  --sidebar: #0a1511;
  --sidebar-hover: #142821;
  --sidebar-active: #1d4037;
  --sidebar-ink: #f3f8f4;
  --sidebar-muted: #9db7ac;
  --sidebar-rule: #274137;
  --progress-track: #33433a;
  --panel-backdrop: rgba(0,7,4,.58);
  --shadow-color: rgba(0,0,0,.48);
  --shadow-soft: rgba(0,0,0,.28);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --font-editorial: var(--font-ui);
    --page-bg: #0c120f;
    --canvas: #111915;
    --surface: #18231d;
    --surface-elevated: #1d2922;
    --surface-raised: #253229;
    --surface-hover: #2a3930;
    --surface-strong: #314138;
    --surface-translucent: rgba(236,246,239,.10);
    --ink: #edf5ef;
    --muted: #a8b8ad;
    --rule: #394940;
    --action: #67c9b7;
    --action-soft: #193a33;
    --action-hover: #83d9ca;
    --exception: #ff9085;
    --exception-soft: #4b2927;
    --warning: #f3bd73;
    --warning-soft: #44351f;
    --success: #76d5a5;
    --success-soft: #203d31;
    --denied: #aeb8b1;
    --focus: #8ee1d2;
    --control-border: #52645a;
    --on-action: #071b16;
    --sidebar: #0a1511;
    --sidebar-hover: #142821;
    --sidebar-active: #1d4037;
    --sidebar-ink: #f3f8f4;
    --sidebar-muted: #9db7ac;
    --sidebar-rule: #274137;
    --progress-track: #33433a;
    --panel-backdrop: rgba(0,7,4,.58);
    --shadow-color: rgba(0,0,0,.48);
    --shadow-soft: rgba(0,0,0,.28);
  }
}

html,
body { background: var(--page-bg, var(--canvas)); }
body { color: var(--ink); line-height: 1.48; }
h1, h2 { letter-spacing: -.035em; }
h1 { font-weight: 700; }
h2 { font-weight: 700; }
.button { border-color: var(--control-border); background: var(--surface-elevated, var(--canvas)); transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.button:hover { border-color: var(--action); }
.button:active { transform: translateY(1px); }
.button--primary { border-color: var(--action); background: var(--action); }
.button--primary:hover { border-color: var(--action-hover); background: var(--action-hover); }
input, select, textarea { border-color: var(--control-border); background: var(--surface-elevated, var(--canvas)); }

@media (min-width: 901px) {
  .topbar {
    position: fixed;
    z-index: 34;
    top: 0;
    right: 0;
    left: 248px;
    min-height: 68px;
    padding: 0 30px;
    border-bottom-color: var(--rule);
    justify-content: flex-end;
    background: color-mix(in srgb, var(--canvas) 96%, transparent);
    backdrop-filter: blur(10px);
  }
  .topbar-brand { display: none; }
  .app-shell { min-height: 100vh; grid-template-columns: 248px minmax(520px, 1fr); }
  .sidebar { top: 0; height: 100vh; }
  .workspace { padding-top: 104px; }
  .task-detail { top: 68px; height: calc(100vh - 68px); }
}

.sidebar {
  z-index: 36;
  padding: 18px 14px 14px;
  border-right-color: var(--sidebar-rule);
  color: var(--sidebar-ink);
  background: var(--sidebar);
}
.sidebar-brand {
  min-height: 50px;
  gap: 11px;
  padding: 5px 8px;
  border-radius: 10px;
  color: var(--sidebar-ink);
  text-decoration: none;
}
.sidebar-brand:hover { background: var(--sidebar-hover); }
.sidebar-brand__mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; background: var(--action); }
.sidebar-brand > span:last-child { display: grid; min-width: 0; }
.sidebar-brand strong { font-size: .98rem; letter-spacing: -.015em; }
.sidebar-brand small { color: var(--sidebar-muted); font-size: .68rem; font-weight: 400; }
.sidebar-nav { gap: 3px; padding-top: 18px; }
.nav-group-label,
.nav-more summary {
  margin: 8px 10px 7px;
  color: #8fb2ae;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.nav-item {
  min-height: 44px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #c7d9d6;
}
.nav-item > svg,
.nav-more a > svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--sidebar-ink); background: var(--sidebar-hover); }
.nav-item--active { color: #fff; background: var(--sidebar-active); }
.nav-item--active::before { position: absolute; top: 10px; bottom: 10px; left: -14px; width: 3px; border-radius: 0 4px 4px 0; background: var(--action); content: ""; }
.nav-item > b { min-width: 22px; padding: 1px 6px 2px; border-radius: 7px; color: #d1e1de; background: #294b51; font-size: .72rem; text-align: center; }
.nav-item--active > b { color: #fff; background: #37636a; }
.nav-more { margin-top: 16px; padding-top: 9px; border-top-color: #2b4c52; }
.nav-more summary { min-height: 44px; padding: 0; list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more button,
.nav-more a { min-height: 44px; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #c7d9d6; }
.nav-more button:hover,
.nav-more a:hover { color: var(--sidebar-ink); background: var(--sidebar-hover); }
.nav-more a.is-active { color: #fff; background: var(--sidebar-active); }

.workspace { max-width: 1600px; padding-right: clamp(24px, 4vw, 64px); padding-bottom: 96px; padding-left: clamp(24px, 4vw, 64px); }
.workspace-header { align-items: center; }
.workspace-header h1 { font-size: clamp(2rem, 3vw, 2.8rem); }
.workspace-header .section-label { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
[data-workspace-route="today"] .workspace-header .section-label,
[data-workspace-route="today"] .workspace-header .summary { display: none; }
[data-workspace-route="today"] .workspace-header h1 { font-size: clamp(1.45rem, 2vw, 1.9rem); }
.today-rates { min-height: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin-top: 6px; color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.today-rates__source { color: var(--ink); font-weight: 700; }
.today-rates__value { color: var(--ink); font-variant-numeric: tabular-nums; }
.today-rates button { min-height: 44px; padding: 0 4px; border: 0; color: var(--action); background: transparent; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.today-rates button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.summary { max-width: 64ch; }
.header-actions { align-items: center; }
.workspace-create { min-height: 46px; padding-inline: 18px; box-shadow: 0 6px 18px rgba(8,117,104,.14); }
.manager-overview { overflow: hidden; margin-top: 28px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--canvas); }
.metric { min-height: 108px; padding: 20px; }
.metric strong { color: var(--ink); font-family: var(--font-ui); font-size: 1.7rem; font-weight: 700; }
.metric--attention strong { color: var(--exception); }
.view-switch { margin-top: 24px; padding: 4px; border: 1px solid var(--rule); background: var(--surface-raised); }
.view-switch__button { border-radius: 7px; color: var(--muted); }
.view-switch__button--active { color: var(--action); background: var(--surface-elevated, var(--canvas)); box-shadow: 0 2px 8px var(--shadow-soft); }
.view-controls { gap: 8px; margin-top: 16px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--canvas); }
.saved-filter-tools { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--rule); }
.saved-filter-tools > summary { min-height: 44px; display: inline-flex; align-items: center; color: var(--action); cursor: pointer; font-weight: 700; list-style-position: inside; }
.saved-filter-tools > p { max-width: 72ch; margin: 2px 0 12px; color: var(--muted); font-size: .8rem; }
.saved-filter-tools__controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 8px; }
.filter-button { border-radius: 7px; }
.filter-button:hover { background: var(--surface); }
.filter-button--active { border-bottom-color: transparent; color: var(--action); background: var(--action-soft); }

.task-list { gap: 18px; }
.task-band { overflow: hidden; margin-top: 18px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--canvas); }
.task-band:first-child { margin-top: 0; }
.task-band__heading { padding: 10px 14px; border-bottom-color: var(--rule); background: var(--surface); }
.task-row { min-height: 72px; padding: 10px 14px; background: var(--canvas); }
.task-row:hover { background: var(--surface-hover); }
.task-row--selected { background: var(--action-soft); }
.task-row__signal { border-radius: 6px; }
.task-title { color: var(--ink); }
.task-meta { color: var(--muted); }
.task-status { border-radius: 999px; }

.task-board { gap: 12px; align-items: stretch; overflow-x: auto; padding: 2px 0 12px; }
.board-column { min-width: 205px; padding: 10px; border: 1px solid var(--rule); border-top: 3px solid #8b9999; border-radius: var(--radius-panel); background: var(--surface-raised); }
.board-column--in_progress { border-top-color: var(--action); }
.board-column--in_review { border-top-color: var(--warning); }
.board-column--completed { border-top-color: var(--success); }
.board-column--cancelled { border-top-color: var(--exception); }
.board-column__header { min-height: 46px; padding: 7px 4px 10px; }
.board-column__header h3 { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.board-column__header span { display: grid; min-width: 24px; min-height: 24px; place-items: center; border-radius: 999px; background: var(--surface-translucent); }
.board-column__list { gap: 10px; }
.board-card { min-height: 148px; align-content: start; gap: 9px; padding: 14px; border: 1px solid var(--rule); border-left: 4px solid var(--action); border-radius: 10px; background: var(--surface-elevated, var(--canvas)); box-shadow: 0 3px 10px var(--shadow-soft); }
.board-card--critical { border-left-color: var(--exception); }
.board-card--high { border-left-color: var(--warning); }
.board-card:hover { border-color: var(--control-border); background: var(--surface-strong); box-shadow: 0 8px 20px var(--shadow-soft); transform: translateY(-1px); }
.board-card__title { line-height: 1.35; }
.board-card__meta { font-size: .72rem; }
.board-card__facts { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--muted); font-size: .7rem; }
.board-card__person { max-width: 54%; text-align: right; }
.board-card__due--attention { color: var(--exception); font-weight: 700; }
.board-card__progress { display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 999px; background: var(--progress-track); }
.board-card__progress::before { display: block; width: var(--task-progress); height: 100%; border-radius: inherit; background: var(--action); content: ""; }
.board-column__empty { min-height: 90px; display: grid; place-items: center; padding: 16px; border: 1px dashed var(--control-border); border-radius: 9px; text-align: center; }

.task-detail-backdrop { position: fixed; z-index: 38; inset: 68px 0 0 248px; display: none; width: auto; min-height: 0; padding: 0; border: 0; background: var(--panel-backdrop); cursor: default; }
.app-shell:has(.task-detail:not([hidden])) .task-detail-backdrop { display: block; }
.task-detail { z-index: 40; width: min(580px, calc(100vw - 32px)); padding: 0; border-left-color: var(--rule); background: var(--surface-elevated, var(--canvas)); box-shadow: -20px 0 54px var(--shadow-color); }
.task-detail { display: flex; flex-direction: column; overflow: hidden; }
.task-detail h2 { margin: 0; font-size: 1.5rem; line-height: 1.15; }
.task-detail__header {
  min-height: 78px;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-elevated, var(--canvas));
}
.task-detail__header > div:first-child { min-width: 0; }
.task-detail__toolbar { display: flex; flex: 0 0 auto; gap: 4px; }
.task-detail__toolbar .icon-button { position: static; border: 1px solid transparent; border-radius: var(--radius-control); }
.task-detail__toolbar .icon-button:hover { border-color: var(--rule); background: var(--surface); }
.detail-more { font-size: 1.7rem; line-height: 1; }
.task-detail__body { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); }
.task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--rule);
}
.task-summary > div { min-width: 0; padding: 8px 10px; background: var(--canvas); }
.task-summary dt { color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.task-summary dd { margin: 2px 0 0; color: var(--ink); font-size: .79rem; font-weight: 700; overflow-wrap: anywhere; }
.task-discussion { position: relative; margin-top: 16px; }
.task-comments__header { align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.task-comments__header .section-label { margin-bottom: 3px; }
.task-comments__header h3 { margin: 0; font-size: 1.08rem; }
.task-discussion__copy { margin: 7px 0 0; color: var(--muted); font-size: .76rem; }
.task-discussion .task-comments { min-height: 132px; margin-top: 0; padding-top: 4px; border-top: 0; }
.task-discussion .comment-list { gap: 10px; }
.task-discussion .comment-item {
  width: min(88%, 440px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
}
.task-discussion .comment-item--own { justify-self: end; border-color: color-mix(in srgb, var(--action) 45%, var(--rule)); border-radius: 12px 12px 4px 12px; background: var(--action-soft); }
.task-discussion .comment-item__header,
.task-discussion .comment-item__context { grid-column: 1 / -1; }
.task-discussion .comment-item__body { grid-column: 1; margin-top: 6px; }
.task-discussion .comment-item__actions { grid-column: 2; align-self: end; justify-self: end; flex-wrap: nowrap; margin: 0 -6px -6px 0; }
.task-discussion .comment-action { width: 44px; min-width: 44px; height: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0; border-radius: 9px; color: var(--muted); }
.task-discussion .comment-action:hover { color: var(--ink); background: var(--surface-hover); }
.task-discussion .comment-action:focus-visible { color: var(--ink); outline: 3px solid var(--focus); outline-offset: 1px; }
.task-discussion .comment-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-discussion .task-files--compact { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--surface); }
.task-discussion .task-files__header { padding-bottom: 2px; }
.task-discussion .task-files__header h3 { font-size: .82rem; }
.task-discussion .file-list { margin-top: 4px; }
.task-discussion .file-item { padding: 8px 0; }
.task-composer {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 8px;
  margin: 14px -6px -24px;
  padding: 10px 6px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface-elevated, var(--canvas)) 95%, transparent);
  backdrop-filter: blur(10px);
}
.task-composer .file-upload { grid-column: 1; align-self: start; margin: 0; }
.composer-icon-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--control-border); border-radius: var(--radius-control); color: var(--ink); background: var(--canvas); cursor: pointer; }
.composer-icon-button:hover { border-color: var(--action); color: var(--action); background: var(--surface-hover); }
.composer-icon-button:disabled { cursor: wait; opacity: .55; }
.composer-icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-composer .comment-add { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0; }
.task-composer .comment-add textarea { min-height: 44px; max-height: 160px; padding-block: 10px; resize: vertical; background: var(--canvas); }
.task-composer .comment-add .button { min-width: 100px; min-height: 44px; justify-self: end; }
.task-composer .composer-help,
.task-composer .upload-status,
.task-composer progress,
.task-composer .field-error,
.task-composer .file-permission { grid-column: 1 / -1; }
.composer-help,
.upload-status { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.task-composer progress { width: 100%; height: 7px; accent-color: var(--action); }
.task-discussion--drop-active::after { position: absolute; z-index: 6; inset: 42px 0 0; display: grid; place-items: center; border: 2px dashed var(--action); border-radius: var(--radius-panel); color: var(--action); background: color-mix(in srgb, var(--action-soft) 94%, transparent); font-weight: 700; content: "Отпустите файл, чтобы прикрепить"; pointer-events: none; }
.notification-backdrop { position: fixed; z-index: 42; inset: 68px 0 0; width: 100%; min-height: 0; padding: 0; border: 0; background: var(--panel-backdrop); cursor: default; }
.notification-panel { z-index: 43; top: 68px; width: min(430px, 100vw); height: calc(100vh - 68px); padding: 28px 24px calc(32px + env(safe-area-inset-bottom)); background: var(--surface-elevated, var(--canvas)); box-shadow: -20px 0 54px var(--shadow-color); }
.task-detail-tools-backdrop { position: absolute; z-index: 3; inset: 0; min-height: 0; width: 100%; padding: 0; border: 0; background: var(--panel-backdrop); }
.task-detail-tools {
  position: absolute;
  z-index: 4;
  inset: 0 0 0 auto;
  width: min(500px, 92%);
  overflow-y: auto;
  padding: 26px 24px calc(36px + env(safe-area-inset-bottom));
  border-left: 1px solid var(--rule);
  background: var(--surface-elevated, var(--canvas));
  box-shadow: -16px 0 40px var(--shadow-color);
}
.task-detail-tools__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.task-detail-tools__header h3 { margin: 0; font-size: 1.25rem; }
.task-detail-tools__header .icon-button { flex: 0 0 44px; border-radius: var(--radius-control); }
.task-detail-tools__header .icon-button:hover { background: var(--surface); }
.task-detail-tools .task-actions { margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.task-detail-tools .task-metadata { margin-top: 4px; }
.task-detail-tools .task-watchers,
.task-detail-tools .task-checklist { border-top-color: var(--rule); }
.audit-panel,
.monitoring-panel,
.analytics-panel,
.timeline-panel,
.people-admin-panel { z-index: 38; }

.task-dialog { width: min(520px, 100vw); min-width: 0; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0 0 0 auto; border: 0; border-left: 1px solid var(--rule); border-radius: 0; background: var(--surface-elevated, var(--canvas)); box-shadow: -20px 0 54px var(--shadow-color); }
.task-dialog::backdrop { background: rgba(20,40,43,.34); }
.task-dialog form { min-width: 0; min-height: 100%; align-content: start; gap: 11px; overflow-y: auto; padding: 30px 32px calc(96px + env(safe-area-inset-bottom)); }
.dialog-heading { margin-bottom: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.dialog-heading h2 { margin: 0; }
.create-schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-schedule-grid .form-field { display: grid; align-content: start; gap: 7px; }
.dialog-actions { gap: 10px; padding-top: 14px; }
.route-create-form { padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--canvas); }
.state-panel { background: var(--canvas); }
.route-page__heading { border-bottom-color: var(--rule); }

@media (min-width: 1180px) {
  .app-shell:has(.task-detail:not([hidden])) { grid-template-columns: 248px minmax(520px, 1fr); }
  .app-shell:has(.task-detail:not([hidden])) .task-detail { position: fixed; grid-column: auto; box-shadow: -20px 0 54px var(--shadow-color); }
}

@media (max-width: 1179px) and (min-width: 901px) {
  .task-board { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
}

@media (max-width: 900px) {
  .topbar { position: sticky; inset: auto; min-height: 62px; padding-inline: 18px; background: color-mix(in srgb, var(--canvas) 97%, transparent); }
  .topbar-brand__mark { border-radius: 9px; background: var(--sidebar); }
  .app-shell { min-height: calc(100vh - 62px); }
  .workspace { padding: 26px 20px calc(112px + env(safe-area-inset-bottom)); }
  .workspace-header { align-items: flex-start; }
  .workspace-header h1 { font-size: 2.35rem; }
  .manager-overview { grid-template-columns: 1fr 1fr; }
  .task-board { grid-template-columns: 1fr; overflow: visible; }
  .board-column { min-width: 0; }
  .task-detail-backdrop { inset: 62px 0 0; }
  .task-detail { top: 62px; height: calc(100vh - 62px); width: min(100%, 520px); }
  .notification-backdrop { inset: 62px 0 0; }
  .notification-panel { top: 62px; height: calc(100vh - 62px); }
  .mobile-nav { gap: 2px; padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--canvas) 98%, transparent); box-shadow: 0 -8px 24px rgba(20,40,43,.08); }
  .mobile-nav button,
  .mobile-nav a { gap: 3px; flex-direction: column; border-top: 0; border-radius: 8px; background: transparent; }
  .mobile-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav .mobile-nav__active:not(.mobile-create) { border-top-color: transparent; color: var(--action); background: var(--action-soft); }
  .mobile-nav .mobile-create { box-shadow: 0 8px 22px rgba(8,117,104,.28); }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 14px; }
  .workspace { padding: 22px 16px calc(112px + env(safe-area-inset-bottom)); }
  .workspace-header { padding-bottom: 18px; }
  .workspace-header h1 { font-size: 2.1rem; }
  .manager-overview { grid-template-columns: 1fr; margin-top: 18px; }
  .metric { min-height: 86px; padding: 14px 16px; }
  .view-switch { margin-top: 18px; }
  .view-controls { padding: 10px; }
  .saved-filter-tools__controls { grid-template-columns: 1fr; }
  .saved-filter-tools__controls .button { width: 100%; }
  .task-band { border-radius: 10px; }
  .task-row { padding-inline: 10px; }
  .task-detail { width: 100%; padding: 0; }
  .task-detail__header { min-height: 72px; padding: 13px 14px 11px; }
  .task-detail__body { padding: 12px 14px calc(20px + env(safe-area-inset-bottom)); }
  .task-detail h2 { font-size: 1.35rem; }
  .task-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-discussion .comment-item { width: 94%; }
  .task-composer { bottom: -20px; margin-bottom: -20px; }
  .task-composer .comment-add { grid-template-columns: minmax(0, 1fr) 44px; }
  .task-composer .comment-add .button { min-width: 44px; width: 44px; overflow: hidden; padding: 0; color: var(--on-action); font-size: 0; }
  .task-composer .comment-add .button::before { color: var(--on-action); font-size: 1.15rem; content: "➤"; }
  .composer-help { font-size: .64rem; }
  .notification-panel { width: 100%; padding: 22px 18px calc(28px + env(safe-area-inset-bottom)); }
  .task-detail-tools { width: 100%; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); border-left: 0; }
  .task-dialog { width: 100vw; min-width: 0; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .task-dialog form { padding: 22px 20px calc(96px + env(safe-area-inset-bottom)); }
  .create-schedule-grid { grid-template-columns: 1fr; }
  .dialog-actions { margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--surface-elevated, var(--canvas)); }
  .route-create-form { padding: 18px 14px; }
}

/* R2.2 teams, administration and account surfaces. */
.teams-route-list {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: var(--canvas);
}
.team-route-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, .8fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule);
}
.team-route-row:last-child { border-bottom: 0; }
.team-route-row__identity { min-width: 0; }
.team-route-row__identity h2 { margin: 0; font-size: 1.15rem; }
.team-route-row__identity p { margin: 5px 0 0; color: var(--muted); }
.team-route-row__facts {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
  margin: 0;
}
.team-route-row__facts > div { padding-left: 12px; border-left: 1px solid var(--rule); }
.team-route-row__facts dd { margin: 0; color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.team-route-row__facts dt { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.team-route-row__members { min-width: 112px; }
.team-route-row__members-empty { color: var(--muted); font-size: .8rem; text-align: right; }
.team-route-row__members summary { min-height: 44px; cursor: pointer; list-style: none; }
.team-route-row__members summary::-webkit-details-marker { display: none; }
.team-route-row__members ul { min-width: 240px; margin: 12px 0 0; padding: 0; list-style: none; }
.team-route-row__members li { padding: 8px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.team-route-row__own-role { color: var(--muted); }
.team-route-row__actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.route-team-form__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.route-page .people-admin-panel { max-width: 100%; }
.route-page .people-admin-panel > h2:first-of-type { display: none; }
.people-access-gate {
  border: 1px solid color-mix(in srgb, var(--action) 48%, var(--rule));
  border-left: 4px solid var(--action);
  border-radius: var(--radius-control);
  background: var(--action-soft);
}
.people-admin-proof,
.people-team-form { border-radius: var(--radius-control); background: var(--canvas); }
.people-admin-summary {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: var(--canvas);
}
.people-admin-summary div { background: var(--canvas); }
.people-admin-toolbar { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.people-admin-filters { padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--surface); }
.people-invitations { overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--canvas); }
.people-invitations .people-section-heading { padding-inline: 16px; background: var(--surface); }
.people-invitation-list { padding: 0; }
.people-invitation { padding: 12px 16px; }
.people-invitation__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.people-invitation__actions .button { min-width: max-content; }
.people-admin-list { gap: 10px; }
.people-card { border-radius: var(--radius-panel); background: var(--canvas); }
.people-card__heading { min-height: 78px; padding: 14px 18px; }
.people-card__details { background: var(--surface-hover); }
.people-card__status { color: var(--action); }
.admin-section-nav { max-width: 100%; }
.admin-section-nav a.is-active { border-bottom-color: var(--action); color: var(--action); }

.account-route-list .settings-route-row { padding-inline: 2px; }
.account-route-list .settings-route-row h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-channel-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 0;
}
.account-channel-status--success { color: var(--success); background: var(--success-soft); }
.account-channel-status--error { color: var(--exception); background: var(--exception-soft); }
.account-channel-status--muted,
.account-channel-status--loading { color: var(--muted); }

@media (max-width: 900px) {
  .team-route-row { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .team-route-row__facts { grid-column: 1 / -1; grid-row: 2; }
  .team-route-row__actions { grid-column: 2; grid-row: 1; }
  .admin-section-nav { width: 100%; margin-inline: 0; padding-inline: 0; }
  .people-invitation__actions { grid-column: 1 / -1; width: 100%; }
  .people-invitation__actions .button { width: auto; flex: 1 1 160px; }
}

@media (max-width: 430px) {
  .team-route-row { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; }
  .team-route-row__facts,
  .team-route-row__actions { grid-column: 1; grid-row: auto; }
  .team-route-row__actions { justify-content: flex-start; flex-wrap: wrap; }
  .team-route-row__members { width: 100%; }
  .team-route-row__members-empty { text-align: left; }
  .team-route-row__members summary { width: 100%; justify-content: center; }
  .team-route-row__members ul { min-width: 0; }
  .team-route-row__actions > .button { flex: 1 1 140px; }
  .people-team-row { grid-template-columns: minmax(0, 1fr); }
  .people-team-row > .people-team-row__actions { justify-content: stretch; }
  .people-team-row__actions .button { flex: 1 1 140px; }
  .route-team-form__actions,
  .route-team-form__actions .button { width: 100%; }
  .people-admin-summary div { padding-inline: 12px; }
  .people-admin-filters { padding: 12px; }
  .people-invitation { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .people-invitation__actions { display: grid; grid-template-columns: 1fr; }
  .people-invitation__actions .button { width: 100%; }
  .account-route-list .settings-route-row { gap: 14px; }
}
