/* ══ حالت تیره ══════════════════════════════════════════════════════════════
   «مود دارک هم برای سامانه اضافه کن». Everything hangs on html[data-theme=dark]
   (set by the moon in the top bar, js/theme.js). The portal is drawn from
   tokens, so most of it turns by giving the tokens dark values; what follows
   the tokens is every place a colour was written out by hand, found by
   walking every page dark and measuring each box's ground and lettering.

   The same rules hold in the dark: lettering on the house purple stays white;
   purple is only in the marks; every text clears 4.5:1 on its ground. Loaded
   last of all. */

html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #13131b;              /* fields and the ground inside cards */
    --surface: #1c1c26;         /* cards and panels */
    --border: #33333f;
    --border-soft: #292934;
    --text: #ececf3;            /* 14.9:1 on --surface */
    --muted: #a6a6b4;           /* 7.4:1 on --surface */

    --primary: #4f46e5;
    --primary-hover: #5d55f0;
    --primary-soft: #2a2754;
    --accent: #4f46e5;          /* fills stay the house purple; white on it 6.3:1 */
    --accent-soft: #2a2754;
    --accent-ink: #aca7ff;      /* the colour as text, on a dark ground: 8.1:1 */
    --accent-deep: #c4c0ff;
    --on-accent: #ffffff;

    --green-deep: #5fcf93;
    --red-deep: #ff8f7f;
    --navy: #8fbbe8;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 14px 34px rgba(0, 0, 0, 0.45);

    /* the frame (shell.css) */
    --frame: #16161f;
    --panel-bg: #0f0f15;

    /* the shared hover palette (interactions.css) */
    --interaction-purple: #7d76ff;
    --interaction-ink: #c9c6ff;
    --interaction-fill: #2a2754;
    --interaction-ring: 0 0 0 3px rgba(125, 118, 255, 0.22);

    /* the login card */
    --login-ink: #0f0f15;
    --login-card: #1c1c26;
    --login-edge: #33304f;
    --login-glow: #7d76ff;
    --login-text: #ececf3;
    --login-muted: #a6a6b4;

    /* the stage beside the login card (login-stage.css) */
    --lx-ink: #ececf3;
    --lx-muted: #a6a6b4;
    --lx-line: #33304f;
}

html[data-theme="dark"] body { background: var(--frame); color: var(--text); }
html[data-theme="dark"] body.no-chrome { background: var(--login-ink); }

/* the turn between the two: colours cross-fade for a moment */
html.theme-fading, html.theme-fading * {
    transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease, fill 0.28s ease !important;
}

/* ── the toggle itself: a moon in the light, a sun in the dark ──
   One icon at a time, in the bar and in the phone's menu row alike. */
:is(.topbar-theme, .side-theme) :is(.theme-moon, .theme-sun) { align-items: center; justify-content: center; }
:is(.topbar-theme, .side-theme) .theme-moon { display: inline-flex; }
:is(.topbar-theme, .side-theme) .theme-sun { display: none; }
html[data-theme="dark"] :is(.topbar-theme, .side-theme) .theme-moon { display: none; }
html[data-theme="dark"] :is(.topbar-theme, .side-theme) .theme-sun { display: inline-flex; }
.topbar-theme { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.topbar-theme .theme-sun { display: none; }
html[data-theme="dark"] .topbar-theme .theme-moon { display: none; }
html[data-theme="dark"] .topbar-theme .theme-sun { display: inline-flex; }


/* ── AUTO: begin (tools/make_dark.py) ── */
@media screen {
/* style.css */
html[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] a {
    color: inherit;
}
html[data-theme="dark"] .muted {
    color: var(--muted);
}
html[data-theme="dark"] .topbar {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .topbar-toggle {
    background: none;
    border: none;
    color: var(--on-accent);
}
html[data-theme="dark"] .workspace-name {
    border-inline-start: 1px solid rgba(0, 0, 0, 0.22);
}
html[data-theme="dark"] .topbar form.topbar-search input[type="search"] {
    border: none;
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .topbar form.topbar-search input[type="search"]::placeholder {
    color: #9a9aa2;
}
html[data-theme="dark"] .topbar form.topbar-search input[type="search"]:focus {
    outline: none;
}
html[data-theme="dark"] .search-mark {
    color: #9595a7;
}
html[data-theme="dark"] .quick-results {
    background: var(--panel, var(--surface));
    border: 1px solid var(--border);
}
html[data-theme="dark"] .quick-group + .quick-group {
    border-top: 1px solid var(--border);
}
html[data-theme="dark"] .quick-kind {
    color: var(--muted);
}
html[data-theme="dark"] .quick-item {
    color: var(--text);
}
html[data-theme="dark"] .quick-item:hover,
html[data-theme="dark"] .quick-item:focus {
    background: var(--accent-soft);
}
html[data-theme="dark"] .quick-sub {
    color: var(--muted);
}
html[data-theme="dark"] .quick-empty {
    color: var(--muted);
}
html[data-theme="dark"] .quick-all {
    border-top: 1px solid var(--border);
    color: var(--accent-ink);
}
html[data-theme="dark"] .topbar-avatar,
html[data-theme="dark"] .topbar-disc {
    background: rgba(0, 0, 0, 0.15);
    color: var(--on-accent);
}
html[data-theme="dark"] .topbar-item {
    color: var(--on-accent);
}
html[data-theme="dark"] .sidebar {
    background: var(--surface);
    border-inline-start: 0;
}
html[data-theme="dark"] .side-link {
    color: #9999a4;
    background: none;
}
html[data-theme="dark"] .side-link:hover {
    color: var(--text);
}
html[data-theme="dark"] .side-link:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .side-link.active {
    color: var(--text);
    background: none;
}
html[data-theme="dark"] .side-icon {
    color: #9a9aa2;
    background: transparent;
}
html[data-theme="dark"] .side-link:hover .side-icon {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .side-link.active .side-icon {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .side-badge {
    color: #fff;
}
html[data-theme="dark"] .side-badge.badge-green {
    background: var(--green);
    color: #fff;
}
html[data-theme="dark"] .side-badge.badge-red {
    background: var(--red);
    color: #fff;
}
html[data-theme="dark"] .side-badge.badge-orange {
    background: var(--orange);
    color: #fff;
}
html[data-theme="dark"] .side-badge.badge-blue {
    background: var(--blue);
    color: #fff;
}
html[data-theme="dark"] .side-panel {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .side-panel-head {
    background: var(--surface);
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .colleague-item:hover {
    background: var(--bg);
}
html[data-theme="dark"] .colleague-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .colleague-sub {
    color: var(--muted);
}
html[data-theme="dark"] .mon-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] a.mon-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .mon-card-cap {
    color: var(--muted);
}
html[data-theme="dark"] .mon-card.is-warn .mon-card-num {
    color: var(--red-deep);
}
html[data-theme="dark"] .tabs {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .tab {
    color: var(--muted);
    border-bottom: 2px solid transparent;
}
html[data-theme="dark"] .tab:hover {
    color: var(--text);
}
html[data-theme="dark"] .tab.active {
    color: var(--accent-ink);
    border-bottom-color: var(--accent-ink);
}
html[data-theme="dark"] .btn {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
}
html[data-theme="dark"] form input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] form select,
html[data-theme="dark"] form textarea {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] form input::placeholder,
html[data-theme="dark"] form textarea::placeholder {
    color: #a6a6b0;
}
html[data-theme="dark"] form input:focus,
html[data-theme="dark"] form select:focus,
html[data-theme="dark"] form textarea:focus {
    outline: none;
    border-color: var(--accent-ink);
    background: var(--surface);
}
html[data-theme="dark"] .form-box {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .error {
    color: #ea7171;
    background: #3f1818;
    border: 1px solid #822b2b;
}
html[data-theme="dark"] .login-brand-title {
    color: var(--login-text);
}
html[data-theme="dark"] .login-brand-sub {
    color: var(--login-muted);
}
html[data-theme="dark"] body.no-chrome {
    background: var(--login-ink);
    color: var(--login-text);
}
html[data-theme="dark"] .login-box {
    background: var(--login-card);
    border: 1px solid var(--login-edge);
    color: var(--login-text);
}
html[data-theme="dark"] .login-beam {
    background: radial-gradient(55% 100% at 50% 0%, rgba(167, 129, 255, 0.22) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(167, 129, 255, 0.2) 0%,
                        rgba(167, 129, 255, 0.07) 34%, transparent 70%);
}
html[data-theme="dark"] .login-beam::after {
    background: linear-gradient(to bottom, rgba(167, 129, 255, 0.3) 0%,
                                rgba(178, 142, 255, 0.12) 45%, transparent 88%);
}
html[data-theme="dark"] .login-seal {
    color: #ffffff;
    background: linear-gradient(145deg, #6a5cf0 0%, #4f46e5 100%);
    border: 1px solid rgba(79, 70, 229, 0.35);
}
html[data-theme="dark"] .login-box h1 {
    color: var(--login-text);
}
html[data-theme="dark"] .login-hint {
    color: var(--login-muted);
}
html[data-theme="dark"] .login-box label {
    color: var(--login-muted);
}
html[data-theme="dark"] .login-box form input:not([type="checkbox"]):not([type="radio"]) {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--login-text);
}
html[data-theme="dark"] .login-box form input::placeholder {
    color: #a6a6b0;
}
html[data-theme="dark"] .login-box form input:not([type="checkbox"]):not([type="radio"]):focus {
    background: var(--surface);
    border-color: var(--login-glow);
    outline: none;
}
html[data-theme="dark"] .login-ways {
    border-top: 1px solid var(--login-edge);
}
html[data-theme="dark"] .login-ways a {
    color: var(--accent-ink);
}
html[data-theme="dark"] .no-chrome .btn {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .panel {
    background: var(--surface);
    border: 0;
}
html[data-theme="dark"] .panel-head {
    color: var(--text);
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .panel-head::before {
    background: var(--accent);
}
html[data-theme="dark"] .panel-head-green::before {
    background: var(--green-deep);
}
html[data-theme="dark"] .panel-head-red::before {
    background: var(--red-deep);
}
html[data-theme="dark"] .panel-head-orange::before {
    background: var(--orange);
}
html[data-theme="dark"] .panel-head-blue::before {
    background: var(--accent);
}
html[data-theme="dark"] .line-row {
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .line-row:last-child {
    border-bottom: none;
}
html[data-theme="dark"] .line-row:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover {
    background: var(--bg);
}
html[data-theme="dark"] .line-date {
    color: var(--muted);
}
html[data-theme="dark"] .greeting-chip {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--muted);
}
html[data-theme="dark"] .stat {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .stat span:last-child {
    color: var(--muted);
}
html[data-theme="dark"] .stat-today {
    border-top: 3px solid var(--green);
}
html[data-theme="dark"] .stat-today .stat-num {
    color: var(--green);
}
html[data-theme="dark"] .stat-overdue {
    border-top: 3px solid var(--red);
}
html[data-theme="dark"] .stat-overdue .stat-num {
    color: var(--red);
}
html[data-theme="dark"] .stat-followup {
    border-top: 3px solid var(--blue);
}
html[data-theme="dark"] .stat-followup .stat-num {
    color: var(--blue);
}
html[data-theme="dark"] .stat-letters {
    border-top: 3px solid var(--orange);
}
html[data-theme="dark"] .stat-letters .stat-num {
    color: var(--orange);
}
html[data-theme="dark"] .team-avatar {
    border: 2px solid var(--surface);
}
html[data-theme="dark"] .team-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .desk-profile {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .desk-profile-role {
    color: var(--accent-ink);
}
html[data-theme="dark"] .online-dot {
    color: var(--green-deep);
}
html[data-theme="dark"] .online-dot::before {
    background: var(--green);
}
html[data-theme="dark"] .task-group-title {
    color: var(--muted);
}
html[data-theme="dark"] .task-row {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-inline-start: 4px solid var(--green);
    color: var(--text);
}
html[data-theme="dark"] .task-row.prio-important {
    border-inline-start-color: var(--orange);
}
html[data-theme="dark"] .task-row.prio-urgent {
    border-inline-start-color: var(--red);
}
html[data-theme="dark"] .task-check {
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--green);
}
html[data-theme="dark"] .task-title {
    color: var(--text);
}
html[data-theme="dark"] .task-title:hover {
    color: var(--accent-ink);
}
html[data-theme="dark"] .task-meta {
    color: var(--muted);
}
html[data-theme="dark"] .letter-row {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .letter-row:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .letter-row.letter-unread {
    border-inline-start: 4px solid var(--orange);
}
html[data-theme="dark"] .letter-sender-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .priority-normal,
html[data-theme="dark"] .priority-low {
    background: var(--bg);
    color: #919cab;
}
html[data-theme="dark"] .priority-important,
html[data-theme="dark"] .priority-high {
    background: #3f2b18;
    color: #e77a55;
}
html[data-theme="dark"] .priority-urgent {
    background: #3f1c18;
    color: #e77474;
}
html[data-theme="dark"] .status-open {
    background: #3f3718;
    color: #e78c55;
}
html[data-theme="dark"] .status-development { background: #2e1f57; color: #c4b5fd; }
html[data-theme="dark"] .status-in_progress {
    background: #18293f;
    color: #7c96e9;
}
html[data-theme="dark"] .status-resolved {
    background: #183f25;
    color: #60dc8f;
}
html[data-theme="dark"] .status-closed {
    background: var(--bg);
    color: #8c9ab1;
}
html[data-theme="dark"] .tag-color-0 {
    background: #18293f;
    color: #7c96e9;
}
html[data-theme="dark"] .tag-color-1 {
    background: #3f182e;
    color: #ea71a2;
}
html[data-theme="dark"] .tag-color-2 {
    background: #183f25;
    color: #60dc8f;
}
html[data-theme="dark"] .tag-color-3 {
    background: #3f3c18;
    color: #e7a255;
}
html[data-theme="dark"] .tag-color-4 {
    background: #1f183f;
    color: #ad86e9;
}
html[data-theme="dark"] .tag-color-5 {
    background: #3f2e18;
    color: #e77a55;
}
html[data-theme="dark"] .badge {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .role-badge {
    background: var(--bg);
    border: 1px solid var(--border-soft);
    color: var(--muted);
}
html[data-theme="dark"] .card {
    background: var(--surface);
    border: 0;
}
html[data-theme="dark"] .group-card {
    color: var(--text);
}
html[data-theme="dark"] .group-card:hover {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .table-wrap {
    background: var(--surface);
    border: 0;
}
html[data-theme="dark"] .table th {
    color: var(--muted);
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .table td {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .table tbody tr:last-child td {
    border-bottom: 0;
}
html[data-theme="dark"] .table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable):hover td {
    background: var(--accent-soft);
}
html[data-theme="dark"] .table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable):hover {
    background: var(--bg);
}
html[data-theme="dark"] .table tbody tr:last-child td {
    border-bottom: none;
}
html[data-theme="dark"] .table-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .picker-box {
    border: 1px solid var(--border);
    background: var(--bg);
}
html[data-theme="dark"] .picker-item:hover {
    background: var(--surface);
}
html[data-theme="dark"] .picker-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .profile-box {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .unit-avatar-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .ticket-meta {
    color: var(--muted);
}
html[data-theme="dark"] .comment {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .attachment-item {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .attachment-item:hover {
    border-color: var(--accent-ink);
    color: var(--accent-ink);
}
html[data-theme="dark"] .btn-icon {
    color: var(--accent-ink);
    border: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .btn-icon:hover {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .calendar-grid {
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .calendar-weekday {
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .calendar-cell {
    background: var(--surface);
}
html[data-theme="dark"] .calendar-cell-empty {
    background: var(--bg);
}
html[data-theme="dark"] .calendar-daynum {
    color: var(--muted);
}
html[data-theme="dark"] .modal {
    background: rgba(20, 20, 30, 0.45);
}
html[data-theme="dark"] .modal-inner {
    background: var(--surface);
}
html[data-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .modal-header button {
    border: none;
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .modal-header button:hover {
    color: var(--text);
}
html[data-theme="dark"] #modal-frame {
    border: none;
}
html[data-theme="dark"] .error-code {
    color: var(--accent-ink);
}
html[data-theme="dark"] .priority-first {
    background: #1b3b28;
    color: #5fdea0;
}
html[data-theme="dark"] .priority-essential {
    background: #3f2b18;
    color: #e77a55;
}
html[data-theme="dark"] .priority-non_essential {
    background: var(--bg);
    color: #919cab;
}
html[data-theme="dark"] .priority-okr {
    background: #1f183f;
    color: #ad86e9;
}
html[data-theme="dark"] .jp-display {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] .jp-display:hover {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .jp-clear {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .jp-clear:hover {
    color: var(--red);
    border-color: var(--red);
}
html[data-theme="dark"] .jp-popup {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .jp-nav {
    border: none;
    background: var(--bg);
    color: var(--accent-ink);
}
html[data-theme="dark"] .jp-nav:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .jp-wd {
    color: var(--muted);
}
html[data-theme="dark"] .jp-cell {
    border: none;
    background: none;
    color: var(--text);
}
html[data-theme="dark"] .jp-cell:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .jp-selected {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .link-btn {
    border: none;
    background: none;
    color: var(--accent-ink);
}
html[data-theme="dark"] .colleague-card {
    border: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .calendar-add {
    color: var(--accent-ink);
}
html[data-theme="dark"] .calendar-add:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .btn-ghost {
    background: var(--surface);
    color: var(--accent-ink);
    border: 1px solid var(--accent);
}
html[data-theme="dark"] .btn-ghost:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .row-link {
    background: none;
    border: none;
    color: var(--accent-ink);
}
html[data-theme="dark"] .row-link-danger {
    color: var(--red-deep);
}
html[data-theme="dark"] .field-hint code {
    background: var(--bg);
}
html[data-theme="dark"] .stat-icon {
    color: inherit;
}
html[data-theme="dark"] .stat-today .stat-icon {
    color: var(--green);
}
html[data-theme="dark"] .stat-overdue .stat-icon {
    color: var(--red);
}
html[data-theme="dark"] .stat-followup .stat-icon {
    color: var(--blue);
}
html[data-theme="dark"] .stat-letters .stat-icon {
    color: var(--orange);
}
html[data-theme="dark"] a.colleague-item {
    color: inherit;
}
html[data-theme="dark"] .chat-peers {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .chat-peers-head {
    background: var(--surface);
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .chat-peer {
    color: var(--text);
    border-inline-end: 3px solid transparent;
}
html[data-theme="dark"] .chat-peer:hover {
    background: var(--bg);
}
html[data-theme="dark"] .chat-peer.active {
    background: var(--accent-soft);
    border-inline-end-color: var(--accent-deep);
}
html[data-theme="dark"] .chat-peer-placeholder {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .chat-peer-public {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .chat-peer-sub {
    color: var(--muted);
}
html[data-theme="dark"] .chat-main {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .chat-head {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .chat-head-sub {
    color: var(--muted);
}
html[data-theme="dark"] .chat-thread {
    background: var(--bg);
}
html[data-theme="dark"] .bubble {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .bubble-row.mine .bubble {
    background: var(--accent);
    border-color: var(--accent-ink);
    color: var(--on-accent);
}
html[data-theme="dark"] .bubble-sender {
    color: var(--accent-ink);
}
html[data-theme="dark"] .bubble-row.mine .bubble-sender {
    color: var(--on-accent);
}
html[data-theme="dark"] .chat-compose {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .btn-danger {
    background: var(--red);
}
html[data-theme="dark"] .btn-danger:hover {
    background: var(--red);
}
html[data-theme="dark"] .choice-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .choice-danger {
    border-color: #82362b;
}
html[data-theme="dark"] .kpi {
    background: var(--surface);
    border: 0;
}
html[data-theme="dark"] .kpi-cap {
    color: var(--muted);
}
html[data-theme="dark"] .kpi-sub {
    color: var(--muted);
}
html[data-theme="dark"] .kpi-primary {
    border-inline-start: 3px solid var(--accent);
}
html[data-theme="dark"] .kpi-primary .kpi-num {
    color: var(--accent-ink);
}
html[data-theme="dark"] .kpi-green {
    color: var(--green);
}
html[data-theme="dark"] .kpi-red {
    color: var(--red);
}
html[data-theme="dark"] .kpi-navy {
    color: var(--navy);
}
html[data-theme="dark"] .report-tabs .tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
}
html[data-theme="dark"] .chart-val.is-zero {
    color: var(--muted);
}
html[data-theme="dark"] .chart-lbl {
    color: var(--muted);
}
html[data-theme="dark"] .prog-track {
    background: var(--bg);
}
html[data-theme="dark"] .prog-fill {
    background: var(--accent);
}
html[data-theme="dark"] .donut-num {
    fill: var(--text);
}
html[data-theme="dark"] .donut-cap {
    fill: var(--muted);
}
html[data-theme="dark"] .sop-way {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .sop-way:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .sop-sample {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .sop-sample:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .sop-sample.is-on {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .sop-step-no {
    color: var(--muted);
}
html[data-theme="dark"] .scope-form select {
    background: var(--bg);
}
html[data-theme="dark"] .panel-head-live::before {
    background: var(--green);
}
html[data-theme="dark"] .live-card {
    border: 1px solid var(--border-soft);
    background: var(--bg);
}
html[data-theme="dark"] .live-dot {
    background: var(--green);
}
html[data-theme="dark"] .filter-bar select {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .row-denied {
    background: var(--accent-soft);
}
html[data-theme="dark"] .org-node::before,
html[data-theme="dark"] .org-node::after {
    border-top: 2px solid var(--border);
}
html[data-theme="dark"] .org-node::after {
    border-inline-start: 2px solid var(--border);
}
html[data-theme="dark"] .org-node:first-child::before {
    border: 0;
}
html[data-theme="dark"] .org-node:last-child::after {
    border-top: 0;
}
html[data-theme="dark"] .org-node:last-child::before {
    border-inline-end: 2px solid var(--border);
}
html[data-theme="dark"] .org-node:only-child::after {
    border-top: 0;
}
html[data-theme="dark"] .org-children::before {
    border-inline-start: 2px solid var(--border);
}
html[data-theme="dark"] .org-chain-step {
    background: var(--bg);
}
html[data-theme="dark"] .org-chain-step.is-me {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .org-chain-arrow {
    color: var(--muted);
}
html[data-theme="dark"] .panel-head-warn::before {
    background: var(--orange);
}
html[data-theme="dark"] .tab-badge {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .tab.active .tab-badge {
    background: var(--surface);
    color: var(--accent-ink);
}
html[data-theme="dark"] .row-selected {
    background: var(--accent-soft);
}
html[data-theme="dark"] .row-critical {
    background: #3f1e18;
}
html[data-theme="dark"] .cell-warn {
    color: var(--red-deep);
}
html[data-theme="dark"] .kpi-orange {
    color: var(--orange);
}
html[data-theme="dark"] .panel-body > .table-wrap {
    background: transparent;
    border: 0;
}
html[data-theme="dark"] .side-panel-link {
    color: var(--accent-ink);
    background: none;
    border: none;
}
html[data-theme="dark"] .field-label {
    color: var(--text);
}
html[data-theme="dark"] .field-cell input,
html[data-theme="dark"] .field-cell select,
html[data-theme="dark"] .field-cell textarea {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .field-static .field-fixed {
    border: 1px dashed var(--border);
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .input-affix .affix {
    border: 1px solid var(--border);
    border-inline-end: 0;
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .grid-table input,
html[data-theme="dark"] .grid-table select,
html[data-theme="dark"] .grid-table textarea {
    border: 1px solid var(--border);
    background: var(--surface);
}
html[data-theme="dark"] .grid-num {
    color: var(--muted);
}
html[data-theme="dark"] .req {
    color: var(--red);
}
html[data-theme="dark"] .sub-head {
    color: var(--text);
}
html[data-theme="dark"] .answer dt {
    color: var(--muted);
}
html[data-theme="dark"] .back-link {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
}
html[data-theme="dark"] .back-link:hover {
    color: var(--accent-ink);
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .badge-green,
html[data-theme="dark"] .badge-create,
html[data-theme="dark"] .badge-kpi-met {
    background: #183f2b;
    color: #5ce1a4;
}
html[data-theme="dark"] .badge-red,
html[data-theme="dark"] .badge-delete,
html[data-theme="dark"] .badge-kpi-missed {
    background: #3f1c18;
    color: #e07d70;
}
html[data-theme="dark"] .badge-orange,
html[data-theme="dark"] .badge-denied,
html[data-theme="dark"] .badge-kpi-empty {
    background: #3f2b18;
    color: #e79c55;
}
html[data-theme="dark"] .badge-blue,
html[data-theme="dark"] .badge-update {
    background: #182a3f;
    color: #609be6;
}
html[data-theme="dark"] .badge-navy,
html[data-theme="dark"] .badge-login,
html[data-theme="dark"] .badge-auto {
    background: #182c3f;
    color: #63a4d9;
}
html[data-theme="dark"] .badge-logout,
html[data-theme="dark"] .badge-kpi-unscored {
    background: var(--bg);
    color: #9898a4;
}
html[data-theme="dark"] .chat-attach {
    color: var(--muted);
}
html[data-theme="dark"] .chat-attach:hover {
    background: var(--bg);
    color: var(--accent-ink);
}
html[data-theme="dark"] .chat-chosen {
    color: var(--muted);
}
html[data-theme="dark"] .bubble-file {
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
}
html[data-theme="dark"] .bubble-file:hover {
    background: rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .bubble-row.mine .bubble-file {
    background: rgba(28, 28, 38, 0.22);
}
html[data-theme="dark"] .bubble-row.mine .bubble-file:hover {
    background: rgba(28, 28, 38, 0.34);
}
html[data-theme="dark"] .approval-label {
    color: var(--muted);
}
html[data-theme="dark"] .approval-pending {
    background: #3f2f18;
    color: #e7ad55;
}
html[data-theme="dark"] .approval-yes {
    background: #1a3c29;
    color: #62da9f;
}
html[data-theme="dark"] .approval-no {
    background: #3f1c18;
    color: #e27664;
}
html[data-theme="dark"] .voice-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
}
html[data-theme="dark"] .voice-btn:hover {
    background: var(--bg);
    color: var(--accent-ink);
}
html[data-theme="dark"] .voice.is-recording .voice-btn {
    background: var(--red);
    color: #fff;
}
html[data-theme="dark"] .voice-timer {
    color: var(--red);
}
html[data-theme="dark"] .voice-drop {
    border: 0;
    background: transparent;
    color: var(--red);
}
html[data-theme="dark"] .voice-error {
    color: var(--red);
}
html[data-theme="dark"] .meeting-form {
    border: 0;
}
html[data-theme="dark"] .transcript {
    background: var(--bg);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .transcript-error {
    color: var(--red);
}
html[data-theme="dark"] .bubble-delete button {
    border: 0;
    background: none;
    color: inherit;
}
html[data-theme="dark"] .bell-count {
    background: var(--red-deep);
    color: #fff;
}
html[data-theme="dark"] .notif-icon {
    color: var(--muted);
}
html[data-theme="dark"] .notif-row.is-unread {
    background: var(--accent-soft);
    border-inline-start: 3px solid var(--accent);
}
html[data-theme="dark"] .notif-row.is-unread .notif-icon {
    color: var(--accent-ink);
}
html[data-theme="dark"] #enable-push.is-on {
    color: var(--green-deep);
    border-color: var(--green-deep);
}
html[data-theme="dark"] .sig-canvas {
    background: var(--surface);
    border: 1px dashed var(--border);
}
html[data-theme="dark"] .sig-status.is-bad {
    color: var(--red-deep);
}
html[data-theme="dark"] .sig-preview {
    border: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .sig-stamp {
    background: var(--surface);
}
html[data-theme="dark"] .sig-broken {
    background: #3f1c18;
    color: var(--red-deep);
}
html[data-theme="dark"] .pw-form {
    border: 0;
    background: none;
}
html[data-theme="dark"] .pw-ok {
    background: #1a3c29;
    color: var(--green-deep);
}
html[data-theme="dark"] .action-row .software-desc.is-missing {
    color: var(--orange);
}
html[data-theme="dark"] .work-side {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .work-link {
    color: #9999a4;
    border-inline-end: 0;
}
html[data-theme="dark"] .work-link:hover {
    color: var(--text);
}
html[data-theme="dark"] .work-link.active {
    background: none;
    color: var(--text);
}
html[data-theme="dark"] .work-link.active .work-icon {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .work-icon-home {
    background: rgba(224, 82, 63, 0.12);
    color: var(--red-deep);
}
html[data-theme="dark"] .work-icon-chat {
    background: rgba(47, 128, 237, 0.12);
    color: var(--navy);
}
html[data-theme="dark"] .work-icon-projects {
    background: rgba(232, 114, 28, 0.12);
    color: #e79755;
}
html[data-theme="dark"] .work-icon-tasks {
    background: rgba(29, 122, 76, 0.12);
    color: var(--green-deep);
}
html[data-theme="dark"] .work-icon-letters {
    background: rgba(232, 114, 28, 0.12);
    color: #e79755;
}
html[data-theme="dark"] .work-icon-monitoring {
    background: rgba(36, 96, 143, 0.12);
    color: var(--navy);
}
html[data-theme="dark"] .work-link.is-soon {
    color: var(--muted);
}
html[data-theme="dark"] .work-link.is-soon:hover {
    background: transparent;
}
html[data-theme="dark"] .work-soon {
    color: var(--muted);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .work-side .side-panel {
    border-top: 1px solid var(--border-soft);
}
@media (max-width: 700px) {
html[data-theme="dark"] .work-side .side-panel {
    border-top: none;
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .work-link {
    border-inline-end: none;
}
}
html[data-theme="dark"] .chip {
    border: 1px solid transparent;
}
html[data-theme="dark"] .chip-red {
    background: #3f1c18;
    color: #e6796b;
}
html[data-theme="dark"] .chip-orange {
    background: #3f2b18;
    color: #e7a055;
}
html[data-theme="dark"] .chip-green {
    background: #1b3b28;
    color: #5fdea0;
}
html[data-theme="dark"] .chip-blue {
    background: #18273f;
    color: #659be1;
}
html[data-theme="dark"] .chip-purple {
    background: #25183f;
    color: #a88adb;
}
html[data-theme="dark"] .chip-teal {
    background: #1e3937;
    color: #5fded7;
}
html[data-theme="dark"] .chip-grey {
    background: var(--bg);
    color: #979ca5;
}
html[data-theme="dark"] .chip-on {
    border-color: currentColor;
}
html[data-theme="dark"] .letter-clip {
    color: var(--muted);
}
html[data-theme="dark"] .letter-side .line-date {
    color: var(--muted);
}
html[data-theme="dark"] .label-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .label-edit > summary {
    color: var(--muted);
}
html[data-theme="dark"] .label-new {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .compose {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .compose-row {
    border-block-end: 1px solid var(--border-soft);
}
html[data-theme="dark"] .compose-plus {
    color: var(--muted);
}
html[data-theme="dark"] .field-error {
    color: var(--red-deep);
}
html[data-theme="dark"] .jp-cell.jp-blocked {
    color: var(--muted);
}
html[data-theme="dark"] .kpi-link {
    color: inherit;
}
html[data-theme="dark"] .kpi-link .kpi-sub {
    color: var(--accent-ink);
}
html[data-theme="dark"] .meeting-share > summary,
html[data-theme="dark"] .meeting-replies > summary {
    color: var(--accent-ink);
}
html[data-theme="dark"] .reply-row {
    border-inline-start: 3px solid var(--accent-soft);
}
html[data-theme="dark"] .progress-bar {
    background: var(--border-soft);
}
html[data-theme="dark"] .progress-fill {
    background: var(--accent);
}
html[data-theme="dark"] .member-chip {
    background: var(--bg);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .project-msg {
    background: var(--bg);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .project-msg.mine {
    background: var(--accent-soft);
    border-color: transparent;
}
html[data-theme="dark"] .tc-title input {
    border: none;
    border-bottom: 2px solid var(--border);
    background: transparent;
}
html[data-theme="dark"] .tc-title input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}
html[data-theme="dark"] .tc-title input.is-empty {
    border-bottom-color: var(--red);
}
html[data-theme="dark"] .tc-title input::placeholder {
    color: var(--muted);
}
html[data-theme="dark"] .tc-box {
    border: 1px dashed var(--border);
    background: var(--surface);
}
html[data-theme="dark"] .tc-desc {
    border: none;
    border-bottom: 1px dashed var(--border);
    background: transparent;
}
html[data-theme="dark"] .tc-desc:focus {
    outline: none;
    border-bottom-color: var(--accent);
}
html[data-theme="dark"] .tc-fold {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .tc-fold:first-child {
    border-top: none;
}
html[data-theme="dark"] .tc-fold > summary:hover {
    color: var(--accent-ink);
}
html[data-theme="dark"] .tc-plus {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .check-row.is-done .check-text {
    color: var(--muted);
}
html[data-theme="dark"] .cal-switch {
    color: var(--text);
}
html[data-theme="dark"] .cal-knob {
    background: var(--border);
}
html[data-theme="dark"] .cal-knob::after {
    background: var(--surface);
}
html[data-theme="dark"] .cal-switch.is-on .cal-knob {
    background: var(--accent);
}
html[data-theme="dark"] .calendar-daynum:hover {
    color: var(--accent-ink);
}
html[data-theme="dark"] .cal-dot {
    color: var(--muted);
}
html[data-theme="dark"] .cal-dot-mark {
    background: var(--accent);
}
html[data-theme="dark"] .doc-misfiled {
    border-inline-start: 3px solid var(--red);
}
html[data-theme="dark"] .doc-warn {
    color: var(--red-deep);
}
html[data-theme="dark"] .chan-new > summary {
    color: var(--accent-ink);
}
html[data-theme="dark"] .check-plus {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent-ink);
}
html[data-theme="dark"] .check-plus:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
html[data-theme="dark"] .mon-mark {
    color: #fff;
}
html[data-theme="dark"] .mark-blue {
    background: var(--accent);
}
html[data-theme="dark"] .mark-green {
    background: var(--green-deep);
}
html[data-theme="dark"] .mark-teal {
    background: #0f7c78;
}
html[data-theme="dark"] .mark-amber {
    background: #a8720a;
}
html[data-theme="dark"] .mark-red {
    background: var(--red-deep);
}
html[data-theme="dark"] .mon-fact {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .mon-fact-key {
    color: var(--muted);
}
html[data-theme="dark"] .mon-section {
    color: #fff;
}
html[data-theme="dark"] .tone-green-deep {
    background: #146c43;
}
html[data-theme="dark"] .tone-green {
    background: #2f7d32;
}
html[data-theme="dark"] .tone-blue {
    background: var(--accent);
}
html[data-theme="dark"] .tone-teal {
    background: #0f7c78;
}
html[data-theme="dark"] .tone-orange {
    background: #b5540b;
}
html[data-theme="dark"] .mon-mark {
    color: #fff;
}
html[data-theme="dark"] .mark-blue {
    background: var(--blue);
}
html[data-theme="dark"] .mark-green {
    background: var(--green-deep);
}
html[data-theme="dark"] .mark-teal {
    background: #14605c;
}
html[data-theme="dark"] .mark-amber {
    background: #8a4a06;
}
html[data-theme="dark"] .mark-red {
    background: var(--red-deep);
}
html[data-theme="dark"] .mon-fact {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .mon-fact-value {
    color: var(--accent-ink);
}
html[data-theme="dark"] .mon-section {
    color: #fff;
}
html[data-theme="dark"] .mon-section.tone-green-deep {
    background: #14603b;
}
html[data-theme="dark"] .mon-section.tone-green {
    background: var(--green-deep);
}
html[data-theme="dark"] .mon-section.tone-blue {
    background: var(--accent);
}
html[data-theme="dark"] .mon-section.tone-teal {
    background: #14605c;
}
html[data-theme="dark"] .mon-section.tone-orange {
    background: #9a4a09;
}
html[data-theme="dark"] .head-note {
    color: var(--muted);
}
html[data-theme="dark"] .blame {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .blame:last-child {
    border-bottom: none;
}
html[data-theme="dark"] .blame-action.is-generated {
    color: var(--muted);
}
html[data-theme="dark"] .blame-action.is-generated b {
    color: var(--text);
}
html[data-theme="dark"] .pending-row {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .pending-row:last-child {
    border-bottom: none;
}
html[data-theme="dark"] .dictate-btn {
    border: none;
    background: transparent;
}
html[data-theme="dark"] .dictate-btn:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .dictate-btn[data-state="recording"] {
    color: var(--red-deep);
}
html[data-theme="dark"] .meeting-share > summary,
html[data-theme="dark"] .meeting-replies > summary,
html[data-theme="dark"] .record-fold > summary {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent-ink);
}
html[data-theme="dark"] .meeting-share > summary:hover,
html[data-theme="dark"] .meeting-replies > summary:hover,
html[data-theme="dark"] .record-fold > summary:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .compose-clip:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .profile-avatar-form {
    border-inline-start: 1px solid var(--border-soft);
}
@media (max-width: 700px) {
html[data-theme="dark"] .profile-avatar-form {
    border-inline-start: none;
    border-top: 1px solid var(--border-soft);
}
}
html[data-theme="dark"] .sheet-block {
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .sheet-head {
    background: var(--accent-soft);
    color: var(--accent-deep);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .sheet-block .table-wrap {
    border: none;
}
html[data-theme="dark"] .sheet-table tbody tr:nth-child(even) {
    background: #212136;
}
html[data-theme="dark"] .sheet-table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable):hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .sheet-answers th[scope="row"] {
    background: transparent;
    color: var(--text);
}
html[data-theme="dark"] .sheet-table .grid-num {
    color: var(--muted);
}
html[data-theme="dark"] .field-needed {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .tabs-sub {
    border-bottom: none;
}
html[data-theme="dark"] .tabs-sub .tab.active {
    background: var(--accent-soft);
    color: var(--accent-deep);
    border-bottom-color: transparent;
}
html[data-theme="dark"] .plan-note {
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .plan-note-head {
    background: var(--accent-soft);
    color: var(--accent-deep);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .plan-week td {
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .plan-table tbody tr:nth-child(even) {
    background: #212136;
}
html[data-theme="dark"] .plan-title-row th {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .plan-title-name {
    border-bottom: 1px dotted var(--muted);
}
html[data-theme="dark"] .plan-note-row th {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .plan-table tbody tr.is-picked,
html[data-theme="dark"] .plan-table tbody tr.is-picked:nth-child(even) {
    background: var(--bg);
}
html[data-theme="dark"] .notif-row.is-gone .line-title {
    color: var(--muted);
}
html[data-theme="dark"] .tab-badge-quiet {
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .letter-sheet {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .letter-head {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .letter-files {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .sig-upload {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .saved-note {
    background: #1a3c29;
    color: var(--green-deep);
}
html[data-theme="dark"] .master-section-head {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .master-number {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .master-section-en {
    color: var(--muted);
}
html[data-theme="dark"] a.mon-count,
html[data-theme="dark"] a.stat {
    color: inherit;
}
html[data-theme="dark"] a.mon-count:hover,
html[data-theme="dark"] a.stat:hover {
    border-color: var(--accent);
}
html[data-theme="dark"] .chat-pick-mark {
    color: var(--accent);
}
html[data-theme="dark"] .chat-pick-row {
    border: 1px solid var(--border-soft);
    color: inherit;
    background: var(--surface);
}
html[data-theme="dark"] .chat-pick-row:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .panel-head .head-link,
html[data-theme="dark"] .panel-head .row-link,
html[data-theme="dark"] .panel-head a {
    color: var(--accent-ink);
}
html[data-theme="dark"] .panel-head a.btn,
html[data-theme="dark"] .panel-head button.btn {
    color: var(--on-accent);
}
html[data-theme="dark"] a.kpi {
    color: inherit;
}
html[data-theme="dark"] a.kpi:hover {
    border-color: var(--accent);
}
html[data-theme="dark"] .filter-row .filter-label {
    color: var(--muted);
}
html[data-theme="dark"] .jalali-picker .jp-display {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] .tab-add {
    color: var(--accent-ink);
}
html[data-theme="dark"] .panel-body > .form-box,
html[data-theme="dark"] .panel-body > form.form-box {
    background: none;
    border: none;
}
html[data-theme="dark"] .tab-strip {
    border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .tab-strip .tabs {
    border-bottom: none;
}
html[data-theme="dark"] .group-new {
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg);
}
html[data-theme="dark"] .group-new-foot .row-link {
    background: none;
    border: none;
    color: var(--muted);
}
html[data-theme="dark"] .row-link-danger {
    background: none;
    border: none;
    color: var(--red-deep);
}
html[data-theme="dark"] .cell-stamp {
    color: var(--muted);
}
html[data-theme="dark"] .cell-stamp.is-on {
    color: var(--green-deep);
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table-wrap {
    background: none;
    border: none;
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table tr {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table td {
    border: none;
    border-block-end: 1px solid var(--border-soft);
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table td:last-child {
    border-block-end: none;
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table td[data-label]::before {
    color: var(--muted);
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table td[colspan] {
    color: var(--muted);
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .table tr:has(td[colspan]) {
    background: none;
}
}
@media screen and (max-width: 1024px) {
html[data-theme="dark"] .chart-scroll.is-dense::-webkit-scrollbar-thumb {
    background: var(--border);
}
}
@media screen and (max-width: 700px) {
html[data-theme="dark"] .side-fold > .side-panel-head::after {
    border-left: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
}
}
html[data-theme="dark"] .calendar-task {
    background: var(--cal-tint, var(--bg));
    color: var(--text);
    border-inline-start: 3px solid var(--cal-edge, var(--muted));
}
html[data-theme="dark"] .calendar-task:hover {
    background: var(--cal-edge, var(--muted));
    color: #fff;
}
html[data-theme="dark"] .calendar-task.priority-first {
    --cal-tint: #1b3b28;
}
html[data-theme="dark"] .calendar-task.priority-essential {
    --cal-tint: #3f2e18;
}
html[data-theme="dark"] .calendar-task.priority-non_essential {
    --cal-tint: var(--bg);
}
html[data-theme="dark"] .calendar-task.priority-okr {
    --cal-tint: #26183f;
}
html[data-theme="dark"] .calendar-task.priority-important {
    --cal-tint: #3f2e18;
}
html[data-theme="dark"] .calendar-task.priority-urgent {
    --cal-tint: #3f1a18;
}
html[data-theme="dark"] .calendar-cell.is-target {
    background: var(--accent-soft);
}
html[data-theme="dark"] .calendar-hint {
    color: var(--muted);
}
html[data-theme="dark"] .letter-filter-row .label-menu > .tab {
    border: 1px solid var(--border);
    background: var(--surface);
}
html[data-theme="dark"] .unit-mark-blue {
    background: #181f3f;
    color: #938fe0;
}
html[data-theme="dark"] .unit-mark-green {
    background: #183f29;
    color: #5ede9c;
}
html[data-theme="dark"] .unit-mark-orange {
    background: #3f2c18;
    color: #e79455;
}
html[data-theme="dark"] .unit-mark-violet {
    background: #25183f;
    color: #ad86ea;
}
html[data-theme="dark"] .unit-card-link {
    color: inherit;
}
html[data-theme="dark"] .unit-card-link:hover {
    border-color: var(--accent);
}
html[data-theme="dark"] .unit-card-go {
    color: var(--accent-ink);
}
html[data-theme="dark"] .org-card {
    border: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .org-card:hover {
    border-color: var(--border);
}
html[data-theme="dark"] .org-avatar {
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .org-role {
    color: var(--muted);
}
html[data-theme="dark"] .org-extra {
    color: var(--accent-ink);
    background: var(--accent-soft);
}
html[data-theme="dark"] .org-count {
    color: var(--muted);
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .org-depth-0 {
    border-color: var(--accent);
}
html[data-theme="dark"] .org-depth-0 .org-avatar {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .org-depth-1 {
    border-color: var(--border);
}
html[data-theme="dark"] .org-card.is-me {
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .org-node::before,
html[data-theme="dark"] .org-node::after {
    border-top-color: var(--border-soft);
}
html[data-theme="dark"] .org-node:last-child::before {
    border-inline-end-color: var(--border-soft);
}
html[data-theme="dark"] .org-node::after {
    border-inline-start-color: var(--border-soft);
}
html[data-theme="dark"] .board-cap {
    color: var(--muted);
}
html[data-theme="dark"] .board-pick {
    border: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c1c22' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .board-pick[data-state="todo"] {
    background-color: #232933;
    color: #979aa5;
}
html[data-theme="dark"] .board-pick[data-state="doing"] {
    background-color: #3f3418;
    color: #e7bb55;
}
html[data-theme="dark"] .board-pick[data-state="review"] {
    background-color: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .board-pick[data-state="blocked"] {
    background-color: #3f1d18;
    color: #e27b6e;
}
html[data-theme="dark"] .board-pick:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .board-pick.board-closed {
    background-image: none;
}
html[data-theme="dark"] .board-pick.board-closed[data-state="done"] {
    background-color: #183f29;
    color: #61db9f;
}
html[data-theme="dark"] .board-weight {
    color: var(--muted);
    background: var(--bg);
}
html[data-theme="dark"] .report-face {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .report-body {
    background: var(--bg);
}
html[data-theme="dark"] .report-when {
    color: var(--muted);
}
html[data-theme="dark"] .report-called {
    color: var(--muted);
}
html[data-theme="dark"] .report-form {
    border: 1px solid var(--border);
    background: var(--surface);
}
html[data-theme="dark"] .report-form:focus-within {
    border-color: var(--accent);
}
html[data-theme="dark"] .report-label {
    color: var(--muted);
}
html[data-theme="dark"] .report-form textarea {
    border: 0 !important;
    border-bottom: 1px solid var(--border-soft) !important;
    background: transparent !important;
}
html[data-theme="dark"] .report-form textarea:focus {
    outline: none;
    border-bottom-color: var(--accent) !important;
}
html[data-theme="dark"] .report-tool {
    color: #9999a4;
    background: var(--bg);
}
html[data-theme="dark"] .report-tool:hover,
html[data-theme="dark"] .report-tool[aria-expanded="true"] {
    color: var(--accent-ink);
    background: var(--accent-soft);
}
html[data-theme="dark"] .report-tool:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .report-hint {
    color: var(--muted);
}
html[data-theme="dark"] .mention-panel {
    background: var(--surface);
}
html[data-theme="dark"] .report-form .mention-find {
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
}
html[data-theme="dark"] .report-form .mention-find:focus {
    border-color: var(--accent) !important;
    outline: none;
}
html[data-theme="dark"] .mention-opt:hover,
html[data-theme="dark"] .mention-opt.is-active {
    background: var(--bg);
}
html[data-theme="dark"] .mention-tick {
    border: 1.5px solid #8a8a94;
    background: var(--surface);
}
html[data-theme="dark"] .mention-tick.is-on {
    background: var(--accent);
    border-color: var(--accent);
}
html[data-theme="dark"] .mention-tick.is-on::after {
    border: solid var(--border);
}
html[data-theme="dark"] .mention-face {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .mention-online {
    background: #22a55b;
}
html[data-theme="dark"] .mention-name {
    color: var(--text);
}
html[data-theme="dark"] .mention-unit {
    color: #55e7dc;
    background: #183f39;
}
html[data-theme="dark"] .mention-empty {
    color: var(--muted);
}
html[data-theme="dark"] .mention-tag {
    color: var(--accent-ink);
    background: var(--accent-soft);
}
html[data-theme="dark"] .side-rail-top {
    background: linear-gradient(to bottom, rgba(79, 70, 229, 0), rgba(79, 70, 229, 0.55));
}
html[data-theme="dark"] .side-rail-bottom {
    background: linear-gradient(to bottom, rgba(79, 70, 229, 0.55), rgba(79, 70, 229, 0));
}
html[data-theme="dark"] .side-fold-btn {
    border: 0;
    background: transparent;
    color: var(--accent);
}
html[data-theme="dark"] .side-fold-btn:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .side-fold-btn:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .side-fold-btn:hover {
    background: transparent;
    color: var(--accent-deep);
}
@media (min-width: 901px) {
html[data-theme="dark"] body.side-folded .side-link:has(.side-badge) .side-icon::after {
    background: var(--red);
}
}
html[data-theme="dark"] .topbar {
    background: var(--surface);
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .topbar-toggle {
    color: var(--text);
}
html[data-theme="dark"] .brand-tile {
    background: var(--accent);
}
html[data-theme="dark"] .brand-name {
    color: var(--text);
}
html[data-theme="dark"] .workspace-name {
    color: #9999a4;
    border-inline-start-color: var(--border);
}
html[data-theme="dark"] .topbar form.topbar-search input[type="search"] {
    background: var(--bg);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .topbar form.topbar-search input[type="search"]:focus {
    background: var(--surface);
    border-color: var(--accent);
}
html[data-theme="dark"] .topbar-item {
    color: #9999a4;
}
html[data-theme="dark"] .topbar-item:hover {
    color: var(--text);
}
html[data-theme="dark"] .topbar-disc {
    background: var(--bg);
    color: #9999a4;
}
html[data-theme="dark"] .topbar-item:hover .topbar-disc {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .topbar-avatar {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .task-check.is-locked {
    background: var(--surface);
}
html[data-theme="dark"] .view-only-note {
    background: var(--bg);
    color: #9999a4;
}
html[data-theme="dark"] .oc-node::before,
html[data-theme="dark"] .oc-node::after {
    border-top: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-node::after {
    border-inline-start: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-node:first-child::before {
    border: 0;
}
html[data-theme="dark"] .oc-node:last-child::after {
    border-top: 0;
}
html[data-theme="dark"] .oc-node:last-child::before {
    border-inline-end: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-node:only-child::after {
    border-top: 0;
}
html[data-theme="dark"] .oc-children::before {
    border-inline-start: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-children::after {
    background: var(--oc-line);
}
html[data-theme="dark"] .oc-box::before {
    background: var(--oc-bead);
}
html[data-theme="dark"] .oc-children.oc-stack > .oc-node::after {
    border-top: 0;
    border-inline-start: 1.5px solid var(--oc-line);
    border-bottom: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-children.oc-stack > .oc-node:first-child > .oc-box::after {
    border-top: 1.5px solid var(--oc-line);
}
html[data-theme="dark"] .oc-gold {
    background: var(--oc-gold);
    color: #fff;
}
html[data-theme="dark"] .oc-gold .oc-face {
    background: rgba(28, 28, 38, 0.22);
    color: #fff;
}
html[data-theme="dark"] .oc-navy {
    background: var(--oc-navy);
    color: #fff;
}
html[data-theme="dark"] .oc-navy .oc-name {
    color: rgba(255, 255, 255, 0.8);
}
html[data-theme="dark"] .oc-navy .oc-icon {
    color: #f2c98a;
}
html[data-theme="dark"] .oc-navy .oc-face {
    background: rgba(28, 28, 38, 0.14);
    color: #fff;
}
html[data-theme="dark"] .oc-card {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .oc-card .oc-name {
    color: #9999a4;
}
html[data-theme="dark"] .oc-card .oc-icon {
    color: #dea85e;
}
html[data-theme="dark"] .oc-card .oc-face {
    background: var(--bg);
    color: #9999a4;
}
html[data-theme="dark"] .oc-me {
    background: var(--accent);
    color: var(--on-accent);
}
@media (max-width: 700px) {
html[data-theme="dark"] .oc-children > .oc-node::after,
html[data-theme="dark"] .oc-children.oc-stack > .oc-node::after,
html[data-theme="dark"] .oc-children.oc-stack > .oc-node:first-child::after {
    border: 0;
    border-inline-start: 1.5px solid var(--oc-line);
    border-bottom: 1.5px solid var(--oc-line);
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .oc-children > .oc-node:not(:last-child)::before {
    border: 0;
    border-inline-start: 1.5px solid var(--oc-line);
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .oc-node:only-child::after {
    border-top: 0;
}
}
html[data-theme="dark"] .seat-box {
    border: 1px solid var(--border-soft);
}
@media (max-width: 700px) {
html[data-theme="dark"] .panel .table tr,
html[data-theme="dark"] .card .table tr {
    background: none;
    border: 0;
    border-block-end: 1px solid var(--border-soft);
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .panel .table tr:last-child,
html[data-theme="dark"] .card .table tr:last-child {
    border-block-end: 0;
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .panel .table td,
html[data-theme="dark"] .card .table td {
    border-block-end: 0;
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .table tbody th {
    border: 0;
    color: var(--muted);
    background: none;
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .tab-strip {
    border-bottom: 0;
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .tab-strip .tabs {
    border-bottom: 1px solid var(--border);
}
}
@media (max-width: 900px) {
html[data-theme="dark"] body.sidebar-open::before {
    background: rgba(20, 20, 40, 0.28);
}
}
html[data-theme="dark"] .jalali-picker .jp-display {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352525c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.6' width='17' height='15.9' rx='2.6'/%3E%3Cpath d='M8 3v3.2M16 3v3.2M3.5 9.6h17'/%3E%3Cpath d='M8 13.4h.01M12 13.4h.01M16 13.4h.01M8 16.9h.01M12 16.9h.01'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .band-green {
    background: #1d7a4c;
}
html[data-theme="dark"] .band-blue {
    background: #2f80ed;
}
html[data-theme="dark"] .band-orange {
    background: #e8721c;
}
html[data-theme="dark"] .band-red {
    background: #b8392a;
}
html[data-theme="dark"] .band-grey {
    background: var(--bg);
}
html[data-theme="dark"] .stat-tile {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .stat-tile-cap {
    color: var(--muted);
}
html[data-theme="dark"] .stat-tile-num.is-warn {
    color: #df7d72;
}
html[data-theme="dark"] .stat-tile-sub {
    color: var(--muted);
}
html[data-theme="dark"] .delta {
    color: var(--muted);
}
html[data-theme="dark"] .delta.is-up {
    color: #62da9f;
}
html[data-theme="dark"] .delta.is-down {
    color: #df7d72;
}
html[data-theme="dark"] .band-bar {
    background: var(--surface);
}
html[data-theme="dark"] .band-legend {
    color: #9999a4;
}
html[data-theme="dark"] .band-key b {
    color: var(--text);
}
html[data-theme="dark"] .meter {
    background: var(--bg);
}
html[data-theme="dark"] .meter-tick {
    background: var(--surface);
}
html[data-theme="dark"] .spark-base {
    stroke: var(--border);
}
html[data-theme="dark"] .spark-line {
    fill: none;
    stroke: var(--accent);
}
html[data-theme="dark"] .spark-dot {
    fill: var(--accent);
    stroke: var(--surface);
}
html[data-theme="dark"] .score-col-track {
    border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .score-col-lbl {
    color: var(--muted);
}
html[data-theme="dark"] .hbar-track {
    background: var(--bg);
}
html[data-theme="dark"] .hbar-fill {
    background: var(--accent);
}
html[data-theme="dark"] a.hbar-row {
    color: inherit;
}
html[data-theme="dark"] .hbar-link:hover,
html[data-theme="dark"] .hbar-link:focus-visible {
    background: var(--accent-soft);
}
html[data-theme="dark"] .hbar-link:hover .hbar-label,
html[data-theme="dark"] .hbar-link:focus-visible .hbar-label {
    color: var(--accent-ink);
}
html[data-theme="dark"] .hbar-link:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .todo-row {
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .todo-row:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .todo-row:hover .todo-label {
    color: var(--accent-ink);
}
html[data-theme="dark"] .todo-go {
    color: var(--muted);
}
html[data-theme="dark"] .desk-sub {
    color: #9999a4;
}
html[data-theme="dark"] .desk-person {
    color: var(--text);
}
html[data-theme="dark"] .line-date.is-late {
    color: #df7d72;
}
html[data-theme="dark"] .month-chip {
    background: var(--surface);
    color: #9999a4;
}
html[data-theme="dark"] .month-chip.is-on {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .perf-row {
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .perf-row:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .perf-row:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover {
    background: var(--bg);
}
html[data-theme="dark"] .perf-face {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .perf-parts {
    color: #9999a4;
}
html[data-theme="dark"] .perf-part b {
    color: var(--text);
}
html[data-theme="dark"] .perf-part-card {
    background: var(--bg);
}
html[data-theme="dark"] .perf-part-card .hbar-track {
    background: var(--surface);
}
html[data-theme="dark"] .suggest-row {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .suggest-row:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .mark-row {
    border: 0;
}
html[data-theme="dark"] .mark-option span {
    background: var(--bg);
}
html[data-theme="dark"] .mark-option small {
    color: #9999a4;
}
html[data-theme="dark"] .mark-option span {
    border: 2px solid transparent;
}
html[data-theme="dark"] .mark-option:hover input:not(:checked) + span {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-ink);
}
html[data-theme="dark"] .mark-option input:checked + span {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .mark-option input:checked + span small {
    color: var(--on-accent);
}
html[data-theme="dark"] .mark-option input:focus-visible + span {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .kpi-enter-row {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .kpi-enter-row:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .kpi-enter-now {
    color: #9999a4;
}
html[data-theme="dark"] .kpi-units {
    background: var(--surface);
}
html[data-theme="dark"] .kpi-unit-link {
    color: var(--text);
}
html[data-theme="dark"] .kpi-unit-link.is-on {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .panel .review-box .form-box {
    background: none;
    border: 0;
}
html[data-theme="dark"] a.mon-count {
    color: var(--text);
}
html[data-theme="dark"] a.mon-count:hover {
    background: var(--bg);
}
html[data-theme="dark"] a.mon-count:hover b,
html[data-theme="dark"] a.mon-count.is-on b {
    color: var(--accent-ink);
}
html[data-theme="dark"] a.mon-count.is-on {
    background: var(--accent-soft);
}
html[data-theme="dark"] .mon-count-plain {
    color: var(--text);
}
html[data-theme="dark"] .mon-highlight-link {
    color: var(--text);
}
html[data-theme="dark"] .mon-highlight-link:hover .line-title {
    color: var(--accent-ink);
}
html[data-theme="dark"] .calendar-grid {
    background: var(--border);
    border: 1px solid var(--border);
}
html[data-theme="dark"] .calendar-weekday {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .calendar-cell {
    background: var(--surface);
}
html[data-theme="dark"] .calendar-cell.is-other {
    background: var(--bg);
}
html[data-theme="dark"] .calendar-daynum {
    color: var(--text);
}
html[data-theme="dark"] .calendar-cell.is-other .calendar-daynum {
    color: var(--muted);
}
html[data-theme="dark"] .calendar-cell.is-holiday .calendar-daynum {
    color: var(--red-deep);
}
html[data-theme="dark"] .calendar-cell.calendar-cell-today {
    background: var(--surface);
}
html[data-theme="dark"] .calendar-cell.calendar-cell-today .calendar-daynum {
    color: var(--accent-ink);
}
html[data-theme="dark"] .calendar-add {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .calendar-cell .calendar-add:hover {
    background: var(--accent-deep);
}
html[data-theme="dark"] .calendar-add:focus-visible {
    outline: 2px solid var(--accent-ink);
}
@media (hover: none) {
html[data-theme="dark"] .calendar-add {
    background: transparent;
    color: var(--accent-ink);
}
}
@media (hover: none) {
html[data-theme="dark"] .calendar-cell-today .calendar-add,
html[data-theme="dark"] .calendar-cell.is-chosen .calendar-add {
    background: var(--accent-soft);
}
}
@media (prefers-reduced-motion: reduce) {
html[data-theme="dark"] .calendar-task.is-new {
    outline: 2px solid var(--accent);
}
}
html[data-theme="dark"] .quick-task {
    border: 0;
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .quick-task::backdrop {
    background: rgba(22, 20, 40, 0.45);
}
html[data-theme="dark"] .qt-icon-btn {
    color: var(--muted);
}
html[data-theme="dark"] .qt-icon-btn:hover,
html[data-theme="dark"] .qt-more[open] > .qt-icon-btn {
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] .qt-menu {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .qt-menu a {
    color: var(--text);
}
html[data-theme="dark"] .qt-menu a:hover {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .qt-cap {
    color: var(--muted);
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-title input {
    border: 0;
    border-bottom: 2px solid var(--border);
    background: transparent;
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-title input:focus {
    border-bottom-color: var(--accent);
}
html[data-theme="dark"] .qt-need {
    color: var(--red-deep);
}
html[data-theme="dark"] .qt-title.is-missing .qt-cap,
html[data-theme="dark"] .qt-title.is-missing .qt-need {
    color: var(--red-deep);
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-title.is-missing input {
    border-bottom-color: var(--red-deep);
}
html[data-theme="dark"] .qt-box {
    border: 1.5px dashed var(--border);
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-desc {
    border: 0;
    border-bottom: 1px dashed var(--border);
    background: transparent;
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-desc:focus {
    border-bottom-color: var(--accent);
}
html[data-theme="dark"] .qt-tool {
    border: 0;
    background: transparent;
    color: #9999a4;
}
html[data-theme="dark"] .qt-tool:hover,
html[data-theme="dark"] .qt-tool.is-on {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .qt-tool-count {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .qt-when {
    border: 1.5px solid var(--accent);
    color: var(--accent-ink);
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-picker .jp-display {
    border: 0;
    background: none;
    color: var(--accent-ink);
}
html[data-theme="dark"] .qt-pane {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .qt-add-check {
    border: 0;
    background: none;
    color: var(--accent-ink);
}
html[data-theme="dark"] .qt-add-check:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .qt-error {
    color: var(--red-deep);
}
html[data-theme="dark"] .qt-cancel {
    border: 0;
    background: none;
    color: var(--accent-ink);
}
html[data-theme="dark"] .qt-cancel:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .qt-go:disabled {
    background: var(--bg);
    color: #9a9aa2;
}
html[data-theme="dark"] .mon-section-tick {
    background: var(--surface);
    color: var(--tone);
}
html[data-theme="dark"] :is(#quick-task, .qt-editing) .qt-foot {
    background: var(--surface);
}
html[data-theme="dark"] .btn-soft {
    background: var(--surface);
    color: var(--accent-ink);
    border: 1px solid var(--border);
}
html[data-theme="dark"] .btn-soft:hover {
    border-color: var(--accent-ink);
    background: var(--accent-soft);
}
html[data-theme="dark"] .btn-won {
    background: #1d7a4c;
}
html[data-theme="dark"] .btn-lost {
    background: #b8392a;
    color: #fff;
}
html[data-theme="dark"] .crm-col {
    background: var(--bg);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-col-head {
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .crm-col-count {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .crm-col.is-target {
    background: var(--accent-soft);
}
html[data-theme="dark"] .crm-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .crm-card-money {
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-card-due {
    color: #9999a4;
}
html[data-theme="dark"] .crm-card-due.is-late {
    color: #df7d72;
}
html[data-theme="dark"] .crm-owner {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-drop {
    border: 2px dashed;
    background: var(--surface);
}
html[data-theme="dark"] .crm-drop-won {
    color: #5fdea0;
    border-color: #1d7a4c;
}
html[data-theme="dark"] .crm-drop-lost {
    color: #e6796b;
    border-color: #b8392a;
}
html[data-theme="dark"] .crm-drop-won.is-target {
    background: #1b3b28;
}
html[data-theme="dark"] .crm-drop-lost.is-target {
    background: #3f1c18;
}
html[data-theme="dark"] .crm-stagebar {
    background: var(--surface);
}
html[data-theme="dark"] .crm-step {
    border: 0;
    background: var(--bg);
    color: #9999a4;
}
html[data-theme="dark"] .crm-step:hover {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-step.is-past {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-step.is-now {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .crm-stagebar.is-closed .crm-step.is-now {
    background: #52525c;
}
html[data-theme="dark"] .crm-reasons .chip-check input:checked + .chip {
    background: #3f1c18;
    color: #e6796b;
}
html[data-theme="dark"] .crm-kind span {
    border: 1px solid var(--border);
    background: var(--surface);
    color: #9999a4;
}
html[data-theme="dark"] .crm-kind input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .crm-kind input:focus-visible + span {
    outline: 2px solid var(--accent-ink);
}
html[data-theme="dark"] .crm-plan > summary {
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-plan-item {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-plan-item:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .crm-plan-when {
    color: #9999a4;
}
html[data-theme="dark"] .crm-plan-item.is-late .crm-plan-when {
    color: #df7d72;
}
html[data-theme="dark"] .crm-act-icon {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .crm-act {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-act:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .crm-act-system .crm-act-icon {
    background: var(--bg);
    color: #9999a4;
}
html[data-theme="dark"] .crm-act-message .crm-act-icon {
    background: #25183f;
    color: #a88adb;
}
html[data-theme="dark"] .crm-act-call .crm-act-icon {
    background: #1b3b28;
    color: #5fdea0;
}
html[data-theme="dark"] .crm-act-system .crm-act-head b {
    color: #9999a4;
}
html[data-theme="dark"] .crm-sep {
    border: 0;
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-facts dt {
    color: var(--muted);
}
html[data-theme="dark"] .crm-new-form fieldset {
    border: 0;
}
html[data-theme="dark"] .crm-insight {
    background: var(--bg);
}
html[data-theme="dark"] .crm-insight.tone-red .crm-insight-dot {
    background: #b8392a;
}
html[data-theme="dark"] .crm-insight.tone-orange .crm-insight-dot {
    background: #e8721c;
}
html[data-theme="dark"] .crm-insight.tone-green .crm-insight-dot {
    background: #1d7a4c;
}
html[data-theme="dark"] .crm-insight.tone-blue .crm-insight-dot {
    background: #2f80ed;
}
html[data-theme="dark"] .crm-funnel-track {
    background: var(--bg);
}
html[data-theme="dark"] .crm-funnel-fill {
    background: var(--accent);
}
html[data-theme="dark"] .crm-connect-item {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-code {
    background: #1f1f38;
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .crm-kv dt {
    color: var(--muted);
}
html[data-theme="dark"] .crm-assign {
    border: 0;
}
html[data-theme="dark"] .crm-stage-num {
    color: var(--accent-ink);
}
html[data-theme="dark"] .okr-filters .filter-label {
    color: #9e9e9e;
}
html[data-theme="dark"] .crm-filters .filter-label {
    color: #9e9e9e;
}
html[data-theme="dark"] .okr-card {
    background: var(--surface);
    border-inline-start: 4px solid var(--border);
}
html[data-theme="dark"] .okr-card.tone-green {
    border-inline-start-color: #1d7a4c;
}
html[data-theme="dark"] .okr-card.tone-orange {
    border-inline-start-color: #e8721c;
}
html[data-theme="dark"] .okr-card.tone-red {
    border-inline-start-color: #b8392a;
}
html[data-theme="dark"] .okr-bar {
    background: var(--bg);
}
html[data-theme="dark"] .okr-bar-fill {
    background: var(--accent);
}
html[data-theme="dark"] .okr-bar-pace {
    background: #52525c;
}
html[data-theme="dark"] .okr-kr {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .okr-mini {
    background: var(--bg);
}
html[data-theme="dark"] .okr-mini > span {
    background: var(--accent);
}
html[data-theme="dark"] .okr-desc {
    color: #9696a6;
}
html[data-theme="dark"] .okr-checkin {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .okr-task {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .okr-task-tick {
    border: 1.5px solid var(--border);
    color: #62da9f;
}
html[data-theme="dark"] .okr-task.is-done .okr-task-tick {
    border-color: #1d7a4c;
    background: #1b3b28;
}
html[data-theme="dark"] .okr-task.is-done a {
    color: #9999a4;
}
html[data-theme="dark"] .okr-add-task > summary,
html[data-theme="dark"] .okr-history > summary,
html[data-theme="dark"] .okr-kr-edit > summary {
    color: var(--accent-ink);
}
html[data-theme="dark"] .okr-child {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .okr-sop {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .okr-advice {
    background: #3f2b18;
    color: #e7a055;
}
html[data-theme="dark"] .roll-banner {
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .roll-total td {
    background: var(--bg);
}
html[data-theme="dark"] .okr-bar-big {
    background: var(--surface);
}
html[data-theme="dark"] .page-lede {
    color: var(--muted);
}
html[data-theme="dark"] .recap-range {
    color: var(--muted);
}
html[data-theme="dark"] .recap-lede {
    color: var(--muted);
}
html[data-theme="dark"] .recap-block {
    background: var(--bg);
}
html[data-theme="dark"] .recap-count {
    background: var(--primary);
    color: #fff;
}
html[data-theme="dark"] .recap-hint {
    color: var(--muted);
}
html[data-theme="dark"] .recap-list li {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .recap-list li:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .recap-list a {
    color: var(--text);
}
html[data-theme="dark"] .recap-list a:hover {
    color: var(--primary);
}
html[data-theme="dark"] .recap-when {
    color: var(--muted);
}
html[data-theme="dark"] .recap-foot {
    color: var(--muted);
}
html[data-theme="dark"] .suggest-draft-text {
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] .crm-test-ok {
    color: var(--green-deep);
}
html[data-theme="dark"] .crm-test-bad {
    color: var(--red-deep);
}
html[data-theme="dark"] tr[data-href]:hover > td {
    background: var(--surface);
}
html[data-theme="dark"] .task-title,
html[data-theme="dark"] .line-title,
html[data-theme="dark"] .letter-subject,
html[data-theme="dark"] .sop-row .line-title,
html[data-theme="dark"] .crm-card-title,
html[data-theme="dark"] .crm-deal-title,
html[data-theme="dark"] .okr-card-title,
html[data-theme="dark"] .meeting-title,
html[data-theme="dark"] .quick-title,
html[data-theme="dark"] .qt-title,
html[data-theme="dark"] .tc-title,
html[data-theme="dark"] .oc-title {
    color: var(--text);
}
html[data-theme="dark"] .notif-row:not(.is-unread) .line-title {
    color: #9999a4;
}
html[data-theme="dark"] table.table tbody td:first-child > a:not(.row-link),
html[data-theme="dark"] table.table tbody td:first-child > b {
    color: var(--text);
}
html[data-theme="dark"] .okr-action.is-done .okr-action-title {
    color: var(--muted);
}
html[data-theme="dark"] .okr-action-tick {
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--green-deep, #5fdea0);
}
html[data-theme="dark"] .okr-tree-obj,
html[data-theme="dark"] .okr-tree-kr {
    background: var(--surface);
}
html[data-theme="dark"] .okr-tree-obj {
    border-inline-start: 4px solid var(--accent);
}
html[data-theme="dark"] .okr-tree-kr {
    border-inline-start: 3px solid var(--border);
}
html[data-theme="dark"] .okr-tree-cap {
    color: var(--muted);
}
html[data-theme="dark"] .okr-tree-meta {
    color: var(--muted);
}
html[data-theme="dark"] .okr-tree-action.is-done {
    color: var(--muted);
}
html[data-theme="dark"] .okr-tree-tick {
    color: var(--accent);
}
html[data-theme="dark"] .okr-tree-child {
    color: inherit;
}
html[data-theme="dark"] [data-href]:hover,
html[data-theme="dark"] a.task-row:hover,
html[data-theme="dark"] a.line-row:hover,
html[data-theme="dark"] a.crm-card:hover,
html[data-theme="dark"] a.project-card:hover,
html[data-theme="dark"] a.colleague-item:hover,
html[data-theme="dark"] a.notif-row:hover {
    background: rgba(79, 70, 229, 0.055);
}
html[data-theme="dark"] tr[data-href]:hover > td {
    background: rgba(79, 70, 229, 0.055);
}
html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover {
    border-color: var(--accent);
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not(:disabled):not([readonly]):hover,
html[data-theme="dark"] select:not(:disabled):hover,
html[data-theme="dark"] textarea:not(:disabled):not([readonly]):hover,
html[data-theme="dark"] .jalali-picker .jp-display:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent);
}
html[data-theme="dark"] .okr-kr-table .okr-kr-new input::placeholder {
    color: var(--muted);
}
html[data-theme="dark"] .oc-open {
    background: none;
}
html[data-theme="dark"] .oc-open:focus-visible {
    outline: 3px solid var(--accent);
}
html[data-theme="dark"] a.stat-tile {
    color: inherit;
}
html[data-theme="dark"] .fin-lock-note {
    border: 1px solid #82392b;
    background: #3f1e18;
    color: #dc7a6a;
}
html[data-theme="dark"] .fin-lock-note.is-open {
    border-color: #357946;
    background: #183f21;
    color: #69d38c;
}
html[data-theme="dark"] .fin-facts dt,
html[data-theme="dark"] .fin-fact-cap {
    color: var(--muted);
}
html[data-theme="dark"] .sheet-paper {
    background: var(--surface);
    border: 1.5px solid #1c1c22;
}
html[data-theme="dark"] h1.sheet-title {
    border: 1px solid #1c1c22;
}
html[data-theme="dark"] .sheet-sub {
    color: var(--muted);
}
html[data-theme="dark"] .sheet-paper .sheet-table th,
html[data-theme="dark"] .sheet-paper .sheet-table td {
    border: 1px solid #1c1c22;
}
html[data-theme="dark"] .sheet-paper .sheet-table th {
    background: var(--bg);
}
html[data-theme="dark"] .sheet-sign-date {
    color: var(--muted);
}
html[data-theme="dark"] .sheet-note-head {
    border: 1px solid #1c1c22;
    border-top: none;
    background: var(--bg);
}
html[data-theme="dark"] .sheet-note-box {
    border: 1px solid #1c1c22;
    border-top: none;
}
html[data-theme="dark"] .plan-chain-step {
    border: 1px solid var(--border);
    color: var(--muted);
}
html[data-theme="dark"] .plan-chain-step.is-done {
    border-color: #357946;
    background: #183f21;
    color: #69d38c;
}
html[data-theme="dark"] .plan-chain-step.is-now {
    border-color: var(--accent);
    color: var(--accent-ink);
}
html[data-theme="dark"] .plan-turn {
    color: var(--accent-ink);
}
html[data-theme="dark"] .report-page .kpi:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover,
html[data-theme="dark"] .report-page .kpi:focus-visible {
    background: var(--accent-soft);
}
html[data-theme="dark"] .report-page .kpi:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover .kpi-cap,
html[data-theme="dark"] .report-page .kpi:focus-visible .kpi-cap {
    color: var(--accent-ink);
}
html[data-theme="dark"] .report-page .person-row:is(a,[data-href],[onclick],[role="button"],.is-clickable):hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .report-page .filter-bar select:hover,
html[data-theme="dark"] .report-page .filter-bar select:focus {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .report-page .tab:hover {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .report-page .table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable):hover td {
    background: var(--accent-soft);
}
html[data-theme="dark"] .attachment-download {
    color: var(--accent);
}
html[data-theme="dark"] .attachment-preview {
    border: 1px solid var(--border);
    color: inherit;
}
html[data-theme="dark"] .attachment-preview::backdrop {
    background: rgba(20,20,40,.55);
}
html[data-theme="dark"] .attachment-preview iframe {
    border: 0;
}
html[data-theme="dark"] .okr-plus {
    border: 1px solid var(--accent);
    background: var(--surface);
    color: var(--accent-ink, var(--accent));
}
html[data-theme="dark"] .okr-plus:hover {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .okr-sub-row > td {
    background: var(--surface-2, #1f1f38);
}
html[data-theme="dark"] .oc-navy .oc-name,
html[data-theme="dark"] .oc-navy .oc-extra,
html[data-theme="dark"] .oc-navy .oc-title {
    color: #fff;
}
html[data-theme="dark"] .oc-gold .oc-name,
html[data-theme="dark"] .oc-gold .oc-extra {
    color: #fff;
}
html[data-theme="dark"] .oc-gold .oc-title {
    color: #fff;
}
html[data-theme="dark"] .studio-q {
    border: 0;
}
html[data-theme="dark"] .studio-option {
    border: 1px solid var(--border);
}
html[data-theme="dark"] .studio-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .plan-table .jp-display.is-missing {
    outline: 2px solid var(--red-deep);
}
html[data-theme="dark"] .plan-must {
    color: var(--red-deep);
}
html[data-theme="dark"] .plan-missing {
    background: #3f1e18;
    color: var(--red-deep);
    border: 1px solid #82392b;
}
html[data-theme="dark"] .okr-kr-table td input[type="text"],
html[data-theme="dark"] .okr-kr-table td input[type="number"],
html[data-theme="dark"] .okr-kr-table td select {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .stat-tile-cap {
    color: #9898a5;
}
html[data-theme="dark"] .stat-tile-sub {
    color: #9999a4;
}
html[data-theme="dark"] .dictate-btn {
    color: var(--accent-ink, #9591df);
    background: var(--accent-soft, #181d3f);
    border: 1px solid rgba(79, 70, 229, 0.18);
}
html[data-theme="dark"] .dictate-btn[data-state="recording"] {
    color: #fff;
    background: var(--red-deep, #b8392a);
    border-color: transparent;
}
html[data-theme="dark"] .voice-btn {
    color: var(--accent-ink, #9591df);
    background: var(--accent-soft, #181d3f);
    border: 1px solid rgba(79, 70, 229, 0.18);
}
html[data-theme="dark"] .plan-table-ruled th,
html[data-theme="dark"] .plan-table-ruled td {
    border: 1px solid var(--border, var(--border));
}
html[data-theme="dark"] .plan-table-ruled tbody tr:nth-child(even) {
    background: #212136;
}
html[data-theme="dark"] .plan-table-ruled .plan-title-row th,
html[data-theme="dark"] .plan-table-ruled .plan-tools-row th {
    border-color: var(--border, var(--border));
}
html[data-theme="dark"] .plan-tools-label {
    color: var(--text);
}
html[data-theme="dark"] .plan-pending-item {
    color: var(--text);
}
html[data-theme="dark"] .btn:disabled,
html[data-theme="dark"] .btn[disabled] {
    background: var(--bg, #232333) !important;
    color: #9a9aa2 !important;
    border-color: var(--border, var(--border)) !important;
}
html[data-theme="dark"] .field-must {
    color: var(--red-deep, #df7d72);
}
html[data-theme="dark"] .master-contract {
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .master-grid > .master-section {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .master-line {
    border-bottom: 1px dashed var(--border-soft);
}
html[data-theme="dark"] .master-section .master-line:last-child,
html[data-theme="dark"] .master-contract .master-line:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .master-save {
    background: var(--surface);
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .saved-note.is-inline {
    border: 1px solid #35794f;
}
html[data-theme="dark"] .plan-save-state.is-ok {
    background: #1a3c29;
    color: var(--green-deep);
    border: 1px solid #35794f;
}
html[data-theme="dark"] .fin-project-card {
    color: var(--text);
}
html[data-theme="dark"] .fin-project-open {
    color: var(--accent-ink);
}
html[data-theme="dark"] .flow-step + .flow-step::before {
    background: var(--border, var(--bg));
}
html[data-theme="dark"] .flow-step.is-done + .flow-step::before {
    background: #2e9d63;
}
html[data-theme="dark"] .flow-dot {
    background: var(--surface, var(--surface));
    color: var(--muted);
    border: 2px solid var(--border, var(--border));
}
html[data-theme="dark"] .flow-name {
    color: var(--text);
}
html[data-theme="dark"] .flow-note {
    color: var(--muted);
}
html[data-theme="dark"] .flow-step.is-done .flow-dot {
    background: #2e9d63;
    border-color: #2e9d63;
    color: #fff;
}
html[data-theme="dark"] .flow-step.is-now .flow-dot {
    background: var(--accent, #4f46e5);
    border-color: var(--accent, #4f46e5);
    color: #fff;
}
html[data-theme="dark"] .flow-step.is-now .flow-name {
    color: var(--accent-ink, #9591df);
}
html[data-theme="dark"] .flow-step.is-refused .flow-dot {
    background: var(--red-deep, #b8392a);
    border-color: var(--red-deep, #b8392a);
    color: #fff;
}
html[data-theme="dark"] .flow-step.is-todo .flow-name {
    color: #9999a4;
}
html[data-theme="dark"] .side-badge.badge-purple {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .stat-tile-cap,
html[data-theme="dark"] .kpi-cap,
html[data-theme="dark"] .mon-card-cap,
html[data-theme="dark"] .fin-fact-cap,
html[data-theme="dark"] .fin-facts dt {
    color: #9898a5;
}
html[data-theme="dark"] .stat-tile-sub,
html[data-theme="dark"] .kpi-sub,
html[data-theme="dark"] .stat span:last-child,
html[data-theme="dark"] .pending-figure {
    color: #9999a4;
}
html[data-theme="dark"] .fin-item {
    border: 1px solid var(--border-soft);
    background: var(--surface);
}
html[data-theme="dark"] .fin-item-drop {
    color: var(--red-deep, #df7d72);
}
html[data-theme="dark"] .field-need {
    background: #3f1c18;
    color: var(--red-deep, #e27664);
    border: 1px solid #82392b;
}
html[data-theme="dark"] .is-missing:not(#k-none),
html[data-theme="dark"] .jalali-picker.is-missing .jp-display,
html[data-theme="dark"] .picker-box.is-missing {
    border-color: var(--red-deep, #b8392a) !important;
}
html[data-theme="dark"] .saved-note.is-warn {
    background: #3f2f18;
    color: #e7ad55;
}
html[data-theme="dark"] .saved-note.is-warn.is-inline {
    border-color: #82602b;
}
html[data-theme="dark"] .saved-note.is-top {
    border: 1px solid #35794f;
}
html[data-theme="dark"] .saved-note.is-warn.is-top {
    border-color: #82602b;
}
html[data-theme="dark"] .crm-col.is-drop-before::before,
html[data-theme="dark"] .crm-col.is-drop-after::after {
    background: var(--accent);
}
html[data-theme="dark"] .crm-add-btn {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .crm-add-form {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .panel-head .btn.btn-soft {
    color: var(--accent-ink);
}
html[data-theme="dark"] .band-teal {
    background: #1f8a84;
}
html[data-theme="dark"] .apr-coefs dt,
html[data-theme="dark"] .apr-facts dt {
    color: var(--muted);
}
html[data-theme="dark"] .apr-coefs dd.is-warn {
    color: var(--red-deep, #df7d72);
}
html[data-theme="dark"] .apr-context {
    background: var(--bg);
}
html[data-theme="dark"] .apr-table tr.apr-parent td {
    background: #1b1b3c;
}
html[data-theme="dark"] .apr-table tr.is-critical-under td {
    background: #3f1e18;
}
html[data-theme="dark"] .apr-table tfoot td {
    border-top: 2px solid var(--border-soft);
}
html[data-theme="dark"] .apr-feedback-read {
    background: var(--bg);
}
html[data-theme="dark"] .apr-appeal,
html[data-theme="dark"] .apr-ca {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .apr-appeal:last-of-type,
html[data-theme="dark"] .apr-ca:last-child {
    border-bottom: 0;
}
html[data-theme="dark"] .apr-final-note {
    background: #3f2f18;
    color: #e7ad55;
}
@media (max-width: 700px) {
html[data-theme="dark"] .table.apr-table tfoot tr:has(td) {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
}
@media (max-width: 700px) {
html[data-theme="dark"] .table.apr-table tfoot td,
html[data-theme="dark"] .table.apr-table tfoot td[colspan] {
    color: inherit;
    border: 0;
}
}
html[data-theme="dark"] .act-btn {
    background: var(--surface);
    color: var(--accent-ink);
    border: 1px solid var(--border);
}
html[data-theme="dark"] .act-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent-ink);
}
html[data-theme="dark"] .act-btn:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .act-btn-danger {
    color: var(--red-deep);
}
html[data-theme="dark"] .act-btn-danger:hover {
    background: #3f1d18;
    border-color: var(--red-deep);
}
html[data-theme="dark"] .act-btn-ok {
    color: #62da9f;
}
html[data-theme="dark"] .act-btn-ok:hover {
    background: #1a3d28;
    border-color: #1d7a4c;
}
html[data-theme="dark"] .task-row.is-first {
    border-inline-start-color: #e0a100;
}
html[data-theme="dark"] .task-star {
    color: #e7b855;
}
html[data-theme="dark"] .task-star > svg.icn {
    fill: #f5b400;
    stroke: #e7b855;
}
html[data-theme="dark"] .label-sms-check {
    color: var(--muted);
}
html[data-theme="dark"] .desk-nudge {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .desk-nudge-icon {
    color: var(--accent-ink);
}
html[data-theme="dark"] .btn.btn-danger-outline {
    background: var(--surface);
    color: var(--red-deep);
    border: 1px solid var(--red-deep);
}
html[data-theme="dark"] .btn.btn-danger-outline:hover {
    background: #3f1d18;
}
/* interactions.css */
html[data-theme="dark"] :is(
#dropZone,
#zoomCtl button,
.addBtn,
.angle-card,
.attachment-item:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.back-link,
.btn,
.btn-danger,
.btn-ghost,
.btn-icon,
.btn-outline,
.btn-primary,
.btn-soft,
.btn-whatsapp,
.btn.danger,
.btn.primary,
.calendar-add,
.calendar-daynum,
.calendar-task,
.cand-card:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.card:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.card-link,
.chat-attach,
.chat-peer,
.chat-pick-row,
.check-plus,
.colleague-item:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.comboItem,
.comboToggle,
.compose-clip,
.crm-card:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.crm-step,
.dictate-btn,
.floorSwatch,
.group-card:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.hbar-link,
.issueCard,
.jalali-picker .jp-display,
.jdpDay,
.jdpToggle,
.jp-cell,
.jp-clear,
.jp-display,
.jp-nav,
.kpi-link,
.letter-row:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.letter-subject,
.line-row:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.listItem,
.login-ways a,
.mark-option > span,
.meeting-replies > summary,
.meeting-share > summary,
.mention-opt,
.modal-header button,
.mon-highlight-link,
.mon-section:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.nav-item,
.org-card:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.panel-head .head-link,
.payBtn,
.perf-row:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.picker-item,
.qt-add-check,
.qt-cancel,
.qt-icon-btn,
.qt-menu a,
.qt-tool,
.quick-all,
.quick-item:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.recap-list a,
.record-fold > summary,
.report-page .filter-bar select,
.report-page .person-row:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.report-page .tab,
.report-page .table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable),
.report-tool,
.roll-banner:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.row-link,
.saveBtn,
.sheet-table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable),
.side-fold-btn,
.side-link,
.side-panel-link,
.sop-sample:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.sop-way:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.stat:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.report-page .kpi:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.stat-tile:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.tab,
.table tbody tr:is([data-href],[onclick],.rowhover,.is-clickable),
.task-title,
.tc-fold > summary,
.themeToggle,
.todo-row:is(a,[data-href],[onclick],[role="button"],.is-clickable),
.toggleRow,
.topbar-item,
.unit-card-link,
.voice-btn,
.work-link,
.work-link.is-soon,
[contenteditable="true"],
[data-href],
[onclick],
[role="button"],
[role="option"],
[role="tab"],
a.card,
a.colleague-item,
a.crm-card,
a.kpi,
a.line-row,
a.mon-card,
a.mon-count,
a.notif-row,
a.project-card,
a.task-row,
a[href],
button,
input,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not(:disabled):not([readonly]):not(.is-soon):not(.disabled),
input:not([type="hidden"]),
select,
select:not(:disabled),
summary,
textarea,
textarea:not(:disabled):not([readonly]):not(.is-soon):not(.disabled),
tr.rowhover,
tr[data-href]
):not(:disabled):not([aria-disabled="true"]):not([readonly]):not(.is-soon):not(.disabled):hover {
    background-color: var(--interaction-fill) !important;
    background-image: none !important;
    border-color: var(--interaction-purple) !important;
    color: var(--interaction-ink) !important;
}
html[data-theme="dark"] :is(
#dropZone,
#zoomCtl button,
.addBtn,
.angle-card,
.attachment-item,
.back-link,
.btn,
.btn-danger,
.btn-ghost,
.btn-icon,
.btn-outline,
.btn-primary,
.btn-soft,
.btn-whatsapp,
.btn.danger,
.btn.primary,
.calendar-add,
.calendar-daynum,
.calendar-task,
.cand-card,
.card,
.card-link,
.chat-attach,
.chat-peer,
.chat-pick-row,
.check-plus,
.colleague-item,
.comboItem,
.comboToggle,
.compose-clip,
.crm-card,
.crm-step,
.dictate-btn,
.floorSwatch,
.group-card,
.hbar-link,
.issueCard,
.jalali-picker .jp-display,
.jdpDay,
.jdpToggle,
.jp-cell,
.jp-clear,
.jp-display,
.jp-nav,
.kpi-link,
.letter-row,
.letter-subject,
.line-row,
.listItem,
.login-ways a,
.mark-option > span,
.meeting-replies > summary,
.meeting-share > summary,
.mention-opt,
.modal-header button,
.mon-highlight-link,
.mon-section,
.nav-item,
.org-card,
.panel-head .head-link,
.payBtn,
.perf-row,
.picker-item,
.qt-add-check,
.qt-cancel,
.qt-icon-btn,
.qt-menu a,
.qt-tool,
.quick-all,
.quick-item,
.recap-list a,
.record-fold > summary,
.report-page .filter-bar select,
.report-page .person-row,
.report-page .tab,
.report-page .table tbody tr,
.report-tool,
.roll-banner,
.row-link,
.saveBtn,
.sheet-table tbody tr,
.side-fold-btn,
.side-link,
.side-panel-link,
.sop-sample,
.sop-way,
.stat,
.report-page .kpi,
.stat-tile,
.tab,
.table tbody tr,
.task-title,
.tc-fold > summary,
.themeToggle,
.todo-row,
.toggleRow,
.topbar-item,
.unit-card-link,
.voice-btn,
.work-link,
.work-link.is-soon,
[contenteditable="true"],
[data-href],
[onclick],
[role="button"],
[role="option"],
[role="tab"],
a.card,
a.colleague-item,
a.crm-card,
a.kpi,
a.line-row,
a.mon-card,
a.mon-count,
a.notif-row,
a.project-card,
a.task-row,
a[href],
button,
input,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not(:disabled):not([readonly]):not(.is-soon):not(.disabled),
input:not([type="hidden"]),
select,
select:not(:disabled),
summary,
textarea,
textarea:not(:disabled):not([readonly]):not(.is-soon):not(.disabled),
tr.rowhover,
tr[data-href]
):not(:disabled):not([aria-disabled="true"]):not([readonly]):not(.is-soon):not(.disabled):focus-visible {
    outline: 2px solid var(--interaction-purple) !important;
}
html[data-theme="dark"] :is(.table,.sheet-table,table) tr:is([data-href],[onclick],.rowhover,.is-clickable):hover > :is(td,th) {
    background-color: var(--interaction-fill) !important;
}
html[data-theme="dark"] :is(.side-link,.topbar-item):hover :is(.side-icon,.topbar-disc,.topbar-avatar),
html[data-theme="dark"] :is(.hbar-link,.mon-count,.mon-highlight-link,.todo-row):is(a,[data-href],[onclick],[role="button"],.is-clickable):hover :is(.hbar-label,b,.line-title,.todo-label) {
    background-color: var(--interaction-fill) !important;
    color: var(--interaction-ink) !important;
}
html[data-theme="dark"] .mark-option:hover input:not(:disabled) + span,
html[data-theme="dark"] .mark-option:has(input:focus-visible) span {
    background-color: var(--interaction-fill) !important;
    border-color: var(--interaction-purple) !important;
    color: var(--interaction-ink) !important;
}
html[data-theme="dark"] input:not([type="hidden"]):disabled:hover,
html[data-theme="dark"] select:disabled:hover,
html[data-theme="dark"] textarea:disabled:hover,
html[data-theme="dark"] input[readonly]:hover,
html[data-theme="dark"] textarea[readonly]:hover {
    border-color: var(--border,var(--border)) !important;
    background-color: var(--surface,var(--surface)) !important;
}
html[data-theme="dark"] a.oc-open:not(#oc-none):not(#oc-none-2):hover {
    background: none !important;
    border-color: transparent !important;
}
html[data-theme="dark"] :is(td, th, p, li, h1, h2, h3, h4, label, .line-title, .line-row, .okr-card-title, .okr-kr-title,
    .okr-card-meta, .software-desc, .muted, .project-card-sub, .crm-card-meta, .panel-head)
    > a[href]:not(.btn):not(.act-btn):not(.tab):not(.chip):not(.oc-open):not(.wf-box):not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] a.row-link:not(.btn):not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] a.line-title:not(#k-none):not(#k-none-2):hover {
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--interaction-ink) !important;
}
html[data-theme="dark"] .is-text-link:not(#k-none):not(#k-none-2):hover {
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    outline: none !important;
}
html[data-theme="dark"] :is(a.letter-row, a.roll-banner, a.line-row, a.notif-row, a.task-row, a.card, a.crm-card,
    a.project-card, a.mon-card, a.colleague-item, tr[data-href], [data-href])
    :is(.letter-subject, .row-link, .line-title, .task-title):not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] .is-inner-word:not(#k-none):not(#k-none-2):hover {
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    outline: none !important;
}
/* shell.css */
@media (min-width: 901px) {
html[data-theme="dark"] body:not(.no-chrome) {
    background: var(--frame);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .sidebar {
    background: var(--frame);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-link.active {
    background: var(--panel-bg);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-link.active::before {
    background: radial-gradient(circle at 100% 0, transparent calc(var(--tab-r) - 0.5px), var(--panel-bg) var(--tab-r));
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-link.active::after {
    background: radial-gradient(circle at 100% 100%, transparent calc(var(--tab-r) - 0.5px), var(--panel-bg) var(--tab-r));
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-link.active .side-icon {
    background: var(--accent);
    color: #ffffff;
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .sidebar .side-link.active:not(#kc-a):not(#kc-b):hover {
    background-color: var(--panel-bg) !important;
    border-color: transparent !important;
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .sidebar .side-link.active:not(#kc-a):not(#kc-b):hover .side-icon {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-fold-btn {
    background: transparent;
    color: var(--accent);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .side-fold-btn:hover {
    background: transparent;
    color: var(--accent-deep);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .app-frame {
    background: var(--panel-bg);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .topbar {
    background: var(--panel-bg);
    border-bottom: 0;
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .topbar form.topbar-search input[type="search"] {
    background: var(--surface);
    border: 1px solid transparent;
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .topbar form.topbar-search input[type="search"]:focus {
    border-color: var(--accent);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .topbar-disc {
    background: var(--surface);
}
}
@media (min-width: 901px) {
html[data-theme="dark"] .topbar-item:hover .topbar-disc {
    background: var(--surface);
    color: var(--accent-ink);
}
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat {
    border: 0;
}
html[data-theme="dark"] .panel-head {
    border-bottom-color: var(--panel-bg);
}
html[data-theme="dark"] .table td {
    border-bottom-color: var(--panel-bg);
}
/* polish.css */
html[data-theme="dark"] .act-btn-danger:not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] .btn.btn-danger-outline:not(#k-none):not(#k-none-2):hover {
    color: var(--red-deep) !important;
    background-color: #3f1d18 !important;
    border-color: var(--red-deep) !important;
}
html[data-theme="dark"] .act-btn-ok:not(#k-none):not(#k-none-2):hover {
    color: #62da9f !important;
    background-color: #1a3d28 !important;
    border-color: #1d7a4c !important;
}
html[data-theme="dark"] .tab .tab-badge {
    background: var(--bg);
    color: var(--muted);
}
html[data-theme="dark"] .tab.active .tab-badge {
    background: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .crm-kind:hover span,
html[data-theme="dark"] .chip-check:hover .chip {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] label.tc-choice:hover,
html[data-theme="dark"] .picker-item:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .can-arrange .crm-col-head:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .field-cell input,
html[data-theme="dark"] .field-cell select,
html[data-theme="dark"] .field-cell textarea {
    background: var(--bg);
}
html[data-theme="dark"] a.card {
    color: inherit;
}
html[data-theme="dark"] :is(.unit-mark-blue, .unit-mark-green, .unit-mark-orange, .unit-mark-violet) {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .file-pick {
    border: 1px dashed var(--border);
    background: var(--bg);
}
html[data-theme="dark"] .file-pick:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .file-pick:focus-within {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .avatar-fallen {
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .cal-filter > summary.panel-head::after {
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
}
html[data-theme="dark"] .cal-filter > summary.panel-head:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .colleague-card[data-href]:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
html[data-theme="dark"] .asst-hello-mark {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .asst-q > span {
    background: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .asst-subhead {
    color: #9898a5;
}
html[data-theme="dark"] .asst-tile {
    background: var(--bg);
}
html[data-theme="dark"] .asst-proj {
    color: inherit;
}
html[data-theme="dark"] .asst-proj:hover {
    background: var(--accent-soft);
}
html[data-theme="dark"] .asst-note {
    background: var(--bg);
}
html[data-theme="dark"] .asst-note.tone-red {
    background: #3f1d18;
}
html[data-theme="dark"] .asst-note.tone-orange {
    background: #3f2c18;
}
html[data-theme="dark"] .asst-note.tone-green {
    background: #1a3d28;
}
html[data-theme="dark"] .asst-suggest {
    border: 1px solid var(--border);
    background: var(--surface);
}
html[data-theme="dark"] .asst-suggest:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}
html[data-theme="dark"] .asst-ask {
    background: var(--surface);
}
html[data-theme="dark"] .asst-typing {
    background: var(--surface);
}
html[data-theme="dark"] .asst-typing i {
    background: var(--accent);
}
html[data-theme="dark"] .asst-error {
    color: var(--red-deep);
}
html[data-theme="dark"] .asst-suggest {
    color: #9898a5;
}
html[data-theme="dark"] .side-badge.badge-orange {
    background: #c2410c;
}
html[data-theme="dark"] .side-badge.badge-green {
    background: #1d7a4c;
}
html[data-theme="dark"] .side-badge.badge-red {
    background: #b8392a;
}
html[data-theme="dark"] .side-badge.badge-blue {
    background: #1c5fb4;
}
html[data-theme="dark"] .topbar-item:not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] .topbar-item:not(#k-none):not(#k-none-2):focus-visible {
    background: transparent !important;
    border-color: transparent !important;
    outline: none !important;
}
html[data-theme="dark"] .topbar-item:not(#k-none):not(#k-none-2):hover .topbar-disc {
    background-color: var(--interaction-fill) !important;
    color: var(--interaction-ink) !important;
}
html[data-theme="dark"] .topbar-item:not(#k-none):not(#k-none-2):focus-visible :is(.topbar-disc, .topbar-avatar) {
    outline: 2px solid var(--interaction-purple);
}
html[data-theme="dark"] .colleague-add-mark {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent-ink);
}
html[data-theme="dark"] .colleague-add .colleague-name {
    color: var(--accent-ink);
}
html[data-theme="dark"] a.colleague-add:hover .colleague-add-mark {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
html[data-theme="dark"] .wf-row {
    border-top: 1px solid var(--border-soft);
}
html[data-theme="dark"] .wf-intro + .wf-row {
    border-top: 0;
}
html[data-theme="dark"] .wf-icon {
    background: var(--bg);
    color: var(--text);
}
html[data-theme="dark"] .wf-sentence {
    color: #9999a4;
}
html[data-theme="dark"] .wf-box {
    border: 1px solid var(--border);
    background: var(--surface);
    color: inherit;
}
html[data-theme="dark"] .wf-box:not(#k-none):not(#k-none-2):hover,
html[data-theme="dark"] .wf-box:not(#k-none):not(#k-none-2):focus-visible {
    background: var(--interaction-fill) !important;
    border-color: var(--interaction-purple) !important;
    outline: none !important;
}
html[data-theme="dark"] .wf-go {
    color: var(--accent-ink);
}
html[data-theme="dark"] .wf-step + .wf-step::before {
    color: var(--muted);
}
html[data-theme="dark"] .wf-num {
    color: var(--accent-ink);
}
html[data-theme="dark"] .wf-label {
    color: var(--text);
}
html[data-theme="dark"] .wf-meta {
    color: var(--muted);
}
html[data-theme="dark"] .wf-late {
    color: #df7d71;
    background: #3f1c18;
}
html[data-theme="dark"] .wf-flag {
    color: #fff;
    background: #c2410c;
}
html[data-theme="dark"] .wf-meter {
    background: var(--bg);
}
html[data-theme="dark"] .wf-meter i {
    background: #7f77dd;
}
html[data-theme="dark"] .wf-step.is-slow .wf-meter i {
    background: #ea8a3c;
}
html[data-theme="dark"] .wf-step.is-empty .wf-box {
    background: transparent;
}
html[data-theme="dark"] .wf-step.is-empty .wf-num {
    color: var(--muted);
}
html[data-theme="dark"] .wf-step.is-slow .wf-box {
    border-color: #ea8a3c;
}
html[data-theme="dark"] .wf-step.is-slow .wf-box:not(#k-none):not(#k-none-2):hover {
    background: #3f2e18 !important;
    border-color: #ea8a3c !important;
}
html[data-theme="dark"] .wf-end > .wf-box {
    background: var(--bg);
    border-color: transparent;
}
html[data-theme="dark"] .unit-run-name {
    color: var(--text);
}
html[data-theme="dark"] .unit-run-num.is-late {
    color: #df7d72;
}
html[data-theme="dark"] .unit-run-of {
    color: var(--muted);
}
@media (max-width: 480px) {
html[data-theme="dark"] .topbar form.topbar-search input[type="search"] {
    color: transparent;
}
}
@media (max-width: 480px) {
html[data-theme="dark"] .topbar form.topbar-search input[type="search"]::placeholder {
    color: transparent;
}
}
@media (max-width: 480px) {
html[data-theme="dark"] .topbar-search:focus-within {
    background: inherit;
}
}
@media (max-width: 480px) {
html[data-theme="dark"] .topbar form.topbar-search:focus-within input[type="search"] {
    color: var(--text);
}
}
@media (max-width: 480px) {
html[data-theme="dark"] .topbar form.topbar-search:focus-within input[type="search"]::placeholder {
    color: #9a9aa2;
}
}
html[data-theme="dark"] .chat-older {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent-ink);
}
html[data-theme="dark"] .letter-thread .line-row.is-current {
    background: var(--accent-soft);
}
html[data-theme="dark"] .day-chip > span {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .day-chip:hover > span {
    border-color: var(--accent);
}
html[data-theme="dark"] .day-chip input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}
html[data-theme="dark"] .day-chip input:focus-visible + span {
    outline: 2px solid var(--accent-ink);
}
html[data-theme="dark"] .convo::before {
    background: var(--border);
}
html[data-theme="dark"] .convo-day-date,
html[data-theme="dark"] .convo-day-ago {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .convo-day-ago {
    color: var(--muted);
}
html[data-theme="dark"] .convo-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .convo-card-head {
    border-bottom: 1px dashed var(--border-soft);
}
html[data-theme="dark"] .convo-card-paraf .convo-card-head {
    border-bottom: 0;
}
html[data-theme="dark"] .convo-item.is-current .convo-card {
    border-color: var(--accent);
}
html[data-theme="dark"] .thread-toggle {
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--muted);
}
html[data-theme="dark"] .thread-children {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .thread-child {
    border-top: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .thread-child:first-child {
    border-top: 0;
}
html[data-theme="dark"] .plan-source {
    border: 1px dashed var(--border);
    background: var(--bg);
}
html[data-theme="dark"] .fl-shape.fl-process {
    fill: var(--fl-c, var(--fl-navy));
    stroke: var(--fl-c, var(--fl-navy));
}
html[data-theme="dark"] .fl-shape.fl-terminal,
html[data-theme="dark"] .fl-shape.fl-decision,
html[data-theme="dark"] .fl-shape.fl-document,
html[data-theme="dark"] .fl-shape.fl-io {
    fill: var(--surface);
    stroke: var(--fl-c-line, var(--fl-navy-line));
}
html[data-theme="dark"] .fl-text {
    fill: var(--fl-ink);
}
html[data-theme="dark"] .fl-text.fl-on-process {
    fill: #fff;
}
html[data-theme="dark"] .fl-edge {
    fill: none;
    stroke: var(--fl-line);
}
html[data-theme="dark"] .fl-arrowhead {
    fill: var(--fl-line);
}
html[data-theme="dark"] .fl-edge-label {
    fill: var(--fl-line);
    stroke: var(--surface);
}
html[data-theme="dark"] .flow-editor {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
html[data-theme="dark"] .fl-toolbar {
    border-bottom: 1px solid var(--border-soft);
}
html[data-theme="dark"] .fl-zoom {
    color: var(--muted);
}
html[data-theme="dark"] .fl-status.is-dirty {
    color: var(--orange);
}
html[data-theme="dark"] .fl-palette,
html[data-theme="dark"] .fl-format {
    background: var(--bg);
}
html[data-theme="dark"] .fl-palette {
    border-inline-end: 1px solid var(--border-soft);
}
html[data-theme="dark"] .fl-format {
    border-inline-start: 1px solid var(--border-soft);
}
html[data-theme="dark"] .fl-tpl-pick {
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .fl-shape-pick {
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text);
}
html[data-theme="dark"] .fl-field > span:first-child {
    color: var(--muted);
}
html[data-theme="dark"] .fl-swatch {
    background: var(--fl-c, var(--fl-navy));
    border: 2px solid var(--surface);
}
html[data-theme="dark"] .fl-format .fl-swatch[aria-pressed="true"] {
    background: var(--fl-c, var(--fl-navy));
    border-color: var(--surface);
}
html[data-theme="dark"] .fl-swatch:focus-visible {
    outline: 2px solid var(--accent);
}
html[data-theme="dark"] .fl-canvas {
    background: var(--surface);
}
html[data-theme="dark"] .fl-grid-line {
    fill: none;
    stroke: var(--border-soft);
}
html[data-theme="dark"] .fl-node.is-selected .fl-shape {
    stroke: var(--orange);
}
html[data-theme="dark"] .fl-edge-hit {
    fill: none;
    stroke: transparent;
}
html[data-theme="dark"] .fl-edge-g.is-selected .fl-edge {
    stroke: var(--orange);
}
html[data-theme="dark"] .fl-port {
    fill: var(--surface);
    stroke: var(--fl-navy-line);
}
html[data-theme="dark"] .fl-port:hover {
    fill: var(--fl-navy-line);
}
html[data-theme="dark"] .fl-resize {
    fill: var(--fl-navy-line);
}
html[data-theme="dark"] .fl-text-box {
    border: 2px solid var(--accent);
    background: var(--surface);
    color: var(--text);
}
@media (max-width: 1180px) {
html[data-theme="dark"] .fl-format {
    border-inline-start: 0;
    border-top: 1px solid var(--border-soft);
}
}
@media (max-width: 760px) {
html[data-theme="dark"] .fl-palette {
    border-inline-end: 0;
    border-bottom: 1px solid var(--border-soft);
}
}
html[data-theme="dark"] .calendar-task.calendar-task-undated {
    border: 1px dashed var(--cal-edge, var(--muted));
    border-inline-start: 3px dashed var(--cal-edge, var(--muted));
}
html[data-theme="dark"] .fl-tpl-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
html[data-theme="dark"] .fl-tpl-thumb {
    background: var(--bg);
}
/* login-motion.css */
html[data-theme="dark"] .lx-ripple {
    background: rgba(28, 28, 38, 0.55);
}
html[data-theme="dark"] .login-box .btn.is-busy {
    color: transparent;
}
html[data-theme="dark"] .login-box .btn.is-busy::after {
    border: 2.5px solid var(--border);
    border-top-color: var(--border);
}
html[data-theme="dark"] .lx-wash {
    background: radial-gradient(circle, #1b183f 0%, var(--surface) 70%);
}
/* login-stage.css */
html[data-theme="dark"] .lx-stage {
    background: linear-gradient(150deg, #1c183f 0%, #1a183f 55%, #1b183f 100%);
    border: 1px solid #382b82;
}
html[data-theme="dark"] .lx-glow {
    background: radial-gradient(circle, rgba(106, 92, 240, .18) 0%, transparent 65%);
}
html[data-theme="dark"] .lx-ring {
    border: 1.5px solid var(--border);
}
html[data-theme="dark"] .lx-device {
    background: var(--surface);
    border: 1px solid #372b82;
}
html[data-theme="dark"] .lx-grid {
    background: linear-gradient(to right, transparent calc(18% - .5px), var(--lx-line) 18%, transparent calc(18% + .5px),
                        transparent calc(82% - .5px), var(--lx-line) 82%, transparent calc(82% + .5px)),
        linear-gradient(to bottom, transparent calc(22% - .5px), var(--lx-line) 22%, transparent calc(22% + .5px),
                        transparent calc(78% - .5px), var(--lx-line) 78%, transparent calc(78% + .5px));
}
html[data-theme="dark"] .lx-spark {
    background: #1c183f;
}
html[data-theme="dark"] .lx-spark-b {
    background: var(--lx-accent);
}
html[data-theme="dark"] .lx-dial-out {
    fill: #fafaff;
    stroke: #ebe9f8;
}
html[data-theme="dark"] .lx-dial-in {
    fill: #f0eefb;
    stroke: #e2dff6;
}
html[data-theme="dark"] .lx-ticks circle {
    fill: #c3bfe4;
}
html[data-theme="dark"] .lx-device.is-typing-user .lx-ticks circle {
    fill: var(--lx-accent-2);
}
html[data-theme="dark"] .lx-core {
    color: #ffffff;
    background: var(--lx-navy);
}
html[data-theme="dark"] .lx-pulse {
    border: 2px solid rgba(79, 70, 229, .45);
}
html[data-theme="dark"] .lx-otp span {
    background: var(--surface);
    border: 1.5px solid #372b82;
    color: var(--lx-ink);
}
html[data-theme="dark"] .lx-otp b {
    background: var(--lx-ink);
}
html[data-theme="dark"] .lx-otp span.is-on {
    border-color: var(--lx-accent);
}
html[data-theme="dark"] .lx-plus {
    color: #b9b5dc;
}
html[data-theme="dark"] .lx-ok {
    color: #ffffff;
    background: linear-gradient(145deg, var(--lx-accent-2), var(--lx-accent));
}
html[data-theme="dark"] .lx-core-lock {
    background: linear-gradient(145deg, var(--lx-accent-2), var(--lx-accent));
}
html[data-theme="dark"] .lx-links line {
    stroke: #dcd9f3;
}
html[data-theme="dark"] .lx-chip {
    background: var(--surface);
    border: 1px solid #382b82;
    color: var(--lx-ink);
}
html[data-theme="dark"] .lx-chip::before {
    background: var(--c, var(--lx-accent));
}
html[data-theme="dark"] .lx-eyebrow {
    color: var(--lx-ink);
}
html[data-theme="dark"] .lx-head {
    color: var(--lx-ink);
}
html[data-theme="dark"] .lx-note {
    color: var(--lx-muted);
}
html[data-theme="dark"] .lx-dot {
    border: 0;
    background: #1c183f;
}
html[data-theme="dark"] .lx-dot.is-on {
    background: var(--lx-accent);
}
}
/* ── AUTO: end ── */

/* ── by hand, after the twins ──
   The signal tokens (--green-deep, --red-deep) are lettering in the dark, so
   they are pale; the few places that use them as a *fill* under white
   lettering keep the deep colour instead. */
html[data-theme="dark"] .mon-section.tone-green,
html[data-theme="dark"] .mark-green { background: #1d7a4c; }
html[data-theme="dark"] .mark-red,
html[data-theme="dark"] .bell-count,
html[data-theme="dark"] .flow-step.is-refused .flow-dot { background: #b8392a; border-color: #b8392a; }
html[data-theme="dark"] .flow-step.is-done .flow-dot { background: #1d7a4c; border-color: #1d7a4c; }
html[data-theme="dark"] .panel-head-green::before { background: #2e9d63; }
html[data-theme="dark"] .panel-head-red::before { background: #e0523f; }

/* the brand mark is drawn in dark lines: on the dark login page it turns white */
html[data-theme="dark"] .login-brand .brand-mark { filter: brightness(0) invert(1); opacity: 0.92; }

/* images and the logo keep their own colours; a photo is not dimmed */
html[data-theme="dark"] img { color-scheme: normal; }
html[data-theme="dark"] .req { color: #ff8f7f; }

/* ── on a phone: the switch is a menu row, not a fourth control in the bar ── */
.side-theme { display: none; width: 100%; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.side-theme .theme-sun { display: none; }
html[data-theme="dark"] .side-theme .theme-moon { display: none; }
html[data-theme="dark"] .side-theme .theme-sun { display: inline-flex; }
@media (max-width: 900px) {
    .topbar-theme { display: none; }
    .side-theme { display: flex; margin-top: 0.4rem; border-top: 1px solid var(--border-soft); padding-top: 0.6rem; }
}

/* «هنوز ارزیابی نشده» — the grey of the performance bar and its dot. As a
   light ground it was darkened to the page's own colour and vanished into
   the card; it is a mark, so it stays a visible mid-grey (3.7:1 on a card). */
html[data-theme="dark"] .band-grey { background: #73738a; }

/* A date field's calendar mark, once. The generated twin sets the button's
   ground with the `background` shorthand, which put the repeat, size and place
   back to their defaults — so the mark tiled across the button three times.
   They are set again here, with a stroke light enough to read on the dark. */
html[data-theme="dark"] .jalali-picker .jp-display {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b5' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.6' width='17' height='15.9' rx='2.6'/%3E%3Cpath d='M8 3v3.2M16 3v3.2M3.5 9.6h17'/%3E%3Cpath d='M8 13.4h.01M12 13.4h.01M16 13.4h.01M8 16.9h.01M12 16.9h.01'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.15rem;
    background-position: left 0.8rem center;
}

/* The flowchart on the dark card: the navy box is lifted a step (white lettering 7:1), the outlines and
   lines become light so they read against the dark surface, and each colour's outline is lifted too. */
html[data-theme="dark"] { --fl-navy: #2b5797; --fl-navy-line: #8fb0e8; --fl-line: #cbd5e1; --fl-ink: #e5e7eb; }
html[data-theme="dark"] .fl-c-purple { --fl-c-line: #a5a1f5; }
html[data-theme="dark"] .fl-c-green  { --fl-c-line: #3fb37a; }
html[data-theme="dark"] .fl-c-blue   { --fl-c-line: #6f95f2; }
html[data-theme="dark"] .fl-c-red    { --fl-c-line: #f0806f; }
html[data-theme="dark"] .fl-c-gray   { --fl-c-line: #9aa3b0; }
