:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --panel-tint: #eef7f6;
    --line: #d9e0e7;
    --line-strong: #c7d1dc;
    --text: #17202a;
    --muted: #6a7480;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-ink: #0f3f73;
    --accent: #0f766e;
    --accent-2: #b45309;
    --success: #15803d;
    --danger: #b42318;
    --blue: #1d4ed8;
    --amber: #b45309;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, .06);
    --shadow-md: 0 16px 38px rgba(15, 23, 42, .10);
    --shadow-lg: 0 26px 70px rgba(15, 23, 42, .16);
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, .18);
    --scrollbar-track: #e5eaf0;
    --scrollbar-thumb: #94a3b8;
    --scrollbar-thumb-hover: #64748b;
}

.audit-feed {
    display: grid;
    gap: 12px;
}

.audit-entry {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
}

.audit-entry-main {
    min-width: 0;
}

.audit-entry-head,
.audit-entry-meta,
.audit-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.audit-entry-head {
    justify-content: space-between;
}

.audit-entry-head strong {
    font-size: 1rem;
}

.audit-entry-meta,
.audit-entry p,
.audit-field-list,
.audit-change-list {
    color: var(--muted);
}

.audit-entry p {
    margin: 8px 0 0;
}

.audit-change-list,
.audit-field-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.audit-change {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.audit-change span,
.audit-field-list dt {
    color: var(--text);
    font-weight: 700;
}

.audit-change b,
.audit-field-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 500;
}

.audit-change i {
    color: var(--muted);
    font-style: normal;
}

.audit-field-list div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 10px;
}

.audit-comment-preview {
    padding: 8px 10px;
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.audit-related-note {
    margin: 0;
    color: var(--muted);
}

.settings-logging-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-logging-card {
    align-content: start;
}

.settings-presence-list,
.settings-login-list {
    display: grid;
    gap: 8px;
}

.settings-presence-item,
.settings-login-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 8px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--panel-soft);
    color: var(--text);
    text-decoration: none;
}

.settings-presence-item small,
.settings-login-item small {
    grid-column: 2;
    color: var(--muted);
}

.settings-login-item {
    grid-template-columns: auto auto minmax(0, 1fr);
}

.settings-login-item small {
    grid-column: 1 / -1;
}

.settings-logging-feed {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .settings-logging-grid {
        grid-template-columns: 1fr;
    }

    .audit-change,
    .audit-field-list div {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] {
    --bg: #0f172a;
    --panel: #182235;
    --panel-soft: #111827;
    --panel-tint: #10201f;
    --line: #334155;
    --line-strong: #475569;
    --text: #e5edf6;
    --muted: #9fb0c3;
    --brand: #60a5fa;
    --brand-dark: #93c5fd;
    --brand-ink: #bfdbfe;
    --accent: #2dd4bf;
    --accent-2: #fbbf24;
    --success: #86efac;
    --danger: #f87171;
    --blue: #60a5fa;
    --amber: #f59e0b;
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, .20);
    --shadow-md: 0 16px 38px rgba(0, 0, 0, .26);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, .34);
    --focus-ring: 0 0 0 3px rgba(96, 165, 250, .24);
    --scrollbar-track: #111827;
    --scrollbar-thumb: #475569;
    --scrollbar-thumb-hover: #64748b;
}

* { box-sizing: border-box; }
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
    border: 2px solid var(--scrollbar-track);
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}
*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
}
.is-hidden { display: none !important; }
[hidden] { display: none !important; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 86%, white) 0%, var(--bg) 360px),
        var(--bg);
    color: var(--text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .btn {
    min-height: 40px;
    border: 1px solid color-mix(in srgb, var(--brand) 72%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, white), var(--brand));
    color: white;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 760;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 20%, transparent);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn.secondary {
    border-color: var(--line);
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.btn.secondary.is-active { background: var(--brand-dark); color: white; }
.btn.create-action {
    border-color: color-mix(in srgb, var(--accent) 78%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent));
}
.btn.create-action:hover { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 88%, black)); }
button:hover, .btn:hover {
    background: linear-gradient(180deg, var(--brand-dark), color-mix(in srgb, var(--brand-dark) 84%, black));
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn.secondary:hover {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--brand)), var(--panel-soft));
    color: var(--brand-dark);
}
.btn.secondary.is-active:hover { background: #1e40af; }
input, select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    padding: 10px 11px;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { min-height: 92px; resize: vertical; }
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
.btn:focus-visible {
    outline: 0;
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
}
small { color: var(--muted); }

.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; transition: grid-template-columns .18s ease; }
.shell.sidebar-collapsed,
.sidebar-collapsed-init .shell { grid-template-columns: 76px 1fr; }
.sidebar {
    background: #10201f;
    color: white;
    padding: 20px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 22px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: var(--brand);
    border-radius: 6px;
    font-weight: 700;
    flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand small { display: block; color: #b7c5c3; margin-top: 3px; }
.sidebar-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: white;
}
.nav { display: grid; gap: 4px; }
.nav a,
.logout-form button,
.theme-form button {
    display: grid;
    align-items: center;
    gap: 8px;
    color: #d7e1df;
    padding: 10px 12px;
    border-radius: 6px;
    min-height: 42px;
    text-align: left;
}
.nav a {
    grid-template-columns: 28px 1fr auto;
}
.logout-form button,
.theme-form button {
    grid-template-columns: 28px 1fr;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.is-current {
    background: rgba(96, 165, 250, .18);
    color: white;
    box-shadow: inset 3px 0 0 var(--brand);
}
.nav a.is-current .nav-icon {
    color: #93c5fd;
}
.nav-icon {
    width: 28px;
    min-width: 28px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 17px;
    line-height: 1;
}
.nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-badge {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 800;
}
.sidebar-bottom {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
}
.sidebar-session-row {
    display: flex;
    justify-content: center;
    align-items: center;
}
.logout-form { margin-top: 0; }
.logout-form button, .theme-form button { width: 100%; background: #334155; }
.logout-form button {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    justify-content: center;
}
.logout-form button:hover {
    background: rgba(248, 113, 113, .18);
}
.theme-form { margin-top: 8px; }
.theme-switch-form {
    display: flex;
    justify-content: center;
}
.theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 136px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #f8fafc;
}
.theme-switch:hover { background: rgba(255,255,255,.14); }
.theme-switch-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 15px;
}
.theme-current-icon { display: none; }
.theme-switch-track {
    position: relative;
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .5);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transition: transform .16s ease;
}
[data-theme="dark"] .theme-switch-thumb { transform: translateX(20px); }
.sidebar-collapsed .sidebar,
.sidebar-collapsed-init .sidebar { padding-inline: 12px; }
.sidebar-collapsed .sidebar-top,
.sidebar-collapsed-init .sidebar-top { justify-content: center; }
.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav-text,
.sidebar-collapsed-init .brand-text,
.sidebar-collapsed-init .nav-text { display: none; }
.sidebar-collapsed .brand,
.sidebar-collapsed-init .brand { justify-content: center; }
.sidebar-collapsed .brand-mark,
.sidebar-collapsed-init .brand-mark { width: 48px; height: 48px; }
.sidebar-collapsed .sidebar-toggle,
.sidebar-collapsed-init .sidebar-toggle {
    position: absolute;
    top: 74px;
    left: 22px;
}
.sidebar-collapsed .nav,
.sidebar-collapsed-init .nav { margin-top: 34px; }
.sidebar-collapsed .nav a,
.sidebar-collapsed .logout-form button,
.sidebar-collapsed .theme-form button,
.sidebar-collapsed-init .nav a,
.sidebar-collapsed-init .logout-form button,
.sidebar-collapsed-init .theme-form button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 8px;
}
.sidebar-collapsed .theme-switch,
.sidebar-collapsed-init .theme-switch {
    min-width: 48px;
    width: 48px;
    padding-inline: 4px;
}
.sidebar-collapsed .sidebar-session-row,
.sidebar-collapsed-init .sidebar-session-row {
    grid-template-columns: 1fr;
}
.sidebar-collapsed .theme-current-icon,
.sidebar-collapsed-init .theme-current-icon {
    display: grid;
    place-items: center;
    font-size: 18px;
}
.sidebar-collapsed .theme-switch-track,
.sidebar-collapsed .theme-switch-icon,
.sidebar-collapsed-init .theme-switch-track,
.sidebar-collapsed-init .theme-switch-icon { display: none; }
[data-theme="dark"] .sidebar { background: #08111f; }
[data-theme="dark"] .nav a.is-current {
    background: rgba(96, 165, 250, .16);
}
[data-theme="dark"] .brand-mark { background: #0f766e; color: white; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0f172a;
    color: var(--text);
    border-color: #3f4f64;
}
[data-theme="dark"] th { background: #111827; }
[data-theme="dark"] .comment,
[data-theme="dark"] .scroll-list { background: #111827; }
.main { padding: 22px; min-width: 0; }
.main-messages {
    height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}
.main-messages .topbar {
    flex: 0 0 auto;
}
.main-messages .messages-workspace {
    height: 100%;
    min-height: 0;
    margin-bottom: 0;
}
.main.is-loading {
    cursor: progress;
}
.main.is-loading .panel,
.main.is-loading .filter-panel {
    opacity: .72;
    transition: opacity .16s ease;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.topbar h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.quick-jump-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}
.quick-jump-bar:empty {
    display: none;
}
.task-id-jump {
    display: grid;
    grid-template-columns: auto 76px 38px;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
.task-id-jump label {
    padding-left: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.task-id-jump input {
    height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f8fafc;
    text-align: center;
    font-weight: 800;
}
.task-id-jump button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    line-height: 1;
}
.task-id-jump .icon-svg,
.notification-trigger .icon-svg,
.topbar-logout-form .icon-svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.identity {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 48px;
    min-width: 0;
    color: var(--text);
    white-space: nowrap;
}
.identity-name {
    overflow: hidden;
    padding: 8px 10px;
    color: var(--text);
    font-weight: 700;
    text-overflow: ellipsis;
}
.identity-name.pill {
    border-radius: 999px;
    background: rgba(37, 99, 235, .1);
    color: var(--brand-dark);
}
.identity-user {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    max-width: min(320px, 36vw);
    min-height: 42px;
    padding: 4px 12px 4px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
.identity-user:hover {
    border-color: #bfdbfe;
    background: #fbfdff;
    text-decoration: none;
}
.identity-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}
.identity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.identity-user-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}
.identity-user-text b,
.identity-user-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.identity-user-text b {
    font-size: 13px;
}
.identity-user-text small {
    max-width: 100%;
    color: var(--muted);
    font-size: 10px;
    font-weight: 720;
    line-height: 1.15;
}
.topbar-logout-form {
    margin: 0;
}
.topbar-logout-form button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
.topbar-logout-form button:hover {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.panel, .mini-card, .stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.panel { padding: 16px; margin-bottom: 16px; }
.panel > button[data-open-modal]:only-child,
.panel > button[data-toggle-panel]:only-child {
    display: block;
    margin-left: auto;
}
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.action-bar details { min-width: min(100%, 360px); }
.summary-button {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #475569;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.summary-button.primary { background: var(--brand); }
.summary-button::-webkit-details-marker { display: none; }
.top-gap { margin-top: 14px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.inline-toolbar-form { margin: 0; }
.icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}
.icon-btn .icon-glyph {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 1;
    position: relative;
}
.icon-btn .icon-svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}
.round-icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
}
.comment-fullscreen-toggle .icon-collapse,
.comment-thread-panel.is-fullscreen .comment-fullscreen-toggle .icon-expand {
    display: none;
}
.comment-thread-panel.is-fullscreen .comment-fullscreen-toggle .icon-collapse {
    display: block;
}
.icon-columns {
    border: 2px solid currentColor;
    border-radius: 3px;
}
.icon-columns::before,
.icon-columns::after {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    width: 2px;
    border-radius: 2px;
    background: currentColor;
}
.icon-columns::before { left: 5px; }
.icon-columns::after { right: 5px; }
.list-view-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.task-sort-panel {
    max-width: 560px;
    margin-left: auto;
}
.sort-panel-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 12px;
    align-items: center;
}
.sort-panel-title {
    display: grid;
    gap: 2px;
}
.sort-panel-title h2 {
    margin: 0;
    font-size: 15px;
}
.sort-panel-title small {
    color: var(--muted);
}
.sort-panel-body select {
    min-height: 40px;
}
.task-view-switch .mode-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.list-view-switch .mode-button {
    min-width: 92px;
}
.dashboard-view-tools { gap: 8px; }
.card-column-switch {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #e8eef7;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
}
.card-column-switch .mode-button {
    min-width: 38px;
    padding-inline: 10px;
}
.status-mode-bar {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 3px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #e8eef7;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
}
.mode-button {
    min-width: 106px;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-weight: 600;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.mode-button:hover { background: rgba(255, 255, 255, .7); color: #334155; }
.mode-button.is-selected {
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .24);
}
.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
    cursor: pointer;
}
.table-sort-link:hover {
    color: var(--brand-dark);
    text-decoration: none;
}
.table-sort-link.is-active {
    color: var(--brand-dark);
}
.sort-indicator {
    font-size: 12px;
    line-height: 1;
}
[data-theme="dark"] .status-mode-bar { background: #111827; }
[data-theme="dark"] .card-column-switch { background: #111827; }
[data-theme="dark"] .table-sort-link { background: transparent; color: inherit; }
[data-theme="dark"] .mode-button { color: var(--muted); }
[data-theme="dark"] .mode-button:hover { background: #1f2937; color: var(--text); }
[data-theme="dark"] .mode-button.is-selected { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .status-choice-button {
    background: #111827;
    color: var(--muted);
}
[data-theme="dark"] .status-choice-button:hover {
    background: #1f2937;
    color: var(--text);
}
[data-theme="dark"] .status-choice-button.is-selected {
    background: var(--brand);
    color: #0f172a;
}
.filter-panel {
    display: none;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.filter-panel.is-open {
    display: block;
    margin-bottom: 12px;
}
.inline-create-panel {
    display: none;
    background: #f8fafc;
}
.inline-create-panel.is-open { display: block; }
.create-form-panel {
    margin-bottom: 16px;
}
.inline-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}
.inline-panel-head h2 {
    margin: 0;
    font-size: 18px;
}
.inline-panel-body {
    padding: 0;
}
.column-panel {
    background: #f8fafc;
}
.task-column-panel-section.is-hidden {
    display: none;
}
.modal {
    width: min(860px, calc(100vw - 28px));
    max-height: 88vh;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .32);
}
.modal::backdrop { background: rgba(2, 6, 23, .76); }
.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 16px; overflow: auto; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 1 / -1;
}
.modal-close { background: transparent; color: var(--muted); padding: 4px 8px; font-size: 20px; }
.modal-close:hover { background: transparent; color: var(--text); }
.dashboard-page {
    --dashboard-gap: 12px;
    display: grid;
    gap: var(--dashboard-gap);
}
.dashboard-page > *,
.dashboard-page .panel {
    margin-bottom: 0;
}
.dashboard-summary {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.6fr);
    gap: var(--dashboard-gap);
}
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .8fr) minmax(260px, .85fr);
    gap: var(--dashboard-gap);
}
.analytics-card {
    display: grid;
    gap: 14px;
    min-height: 260px;
}
.premium-dashboard-grid {
    align-items: stretch;
    gap: var(--dashboard-gap);
}
.premium-dashboard-grid > .panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}
.premium-dashboard-grid .dashboard-group-cards,
.premium-dashboard-grid .activity-feed {
    height: 100%;
}
.sparkline-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(24px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 170px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.sparkline-bar {
    display: grid;
    gap: 8px;
    align-items: end;
    height: 100%;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.sparkline-bar span {
    display: block;
    min-height: 18px;
    height: var(--bar-value);
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    box-shadow: 0 12px 22px rgba(37, 99, 235, .18);
}
.donut-chart {
    width: 178px;
    height: 178px;
    display: grid;
    place-items: center;
    justify-self: center;
    align-self: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--panel) 0 58%, transparent 59%),
        conic-gradient(#16a34a calc(var(--donut-value) * 1%), #f59e0b 0 84%, #ef4444 0);
}
.donut-chart strong {
    font-size: 34px;
    line-height: 1;
}
.donut-chart span {
    margin-top: 46px;
    color: var(--muted);
    font-size: 12px;
    position: absolute;
}
.analytics-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
}
.legend-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 50%;
}
.legend-dot.ok { background: #16a34a; }
.legend-dot.warn { background: #f59e0b; }
.legend-dot.danger { background: #ef4444; }
.rank-chart {
    display: grid;
    gap: 12px;
}
.rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: center;
}
.rank-row span { font-weight: 700; }
.rank-row b { color: var(--brand-dark); }
.rank-row i {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6 var(--rank-value), #e2e8f0 0);
}
.summary-main,
.metric-tile {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.summary-main {
    padding: 18px;
    display: grid;
    gap: 7px;
}
.summary-main span {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.summary-main strong {
    font-size: 28px;
    line-height: 1.15;
}
.summary-main small { line-height: 1.45; }
.summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--dashboard-gap);
}
.dashboard-gis-sync-panel {
    display: grid;
    gap: 14px;
    border-color: rgba(37, 99, 235, .18);
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}
.dashboard-gis-sync-panel[hidden] {
    display: none;
}
.dashboard-gis-sync-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}
.dashboard-gis-sync-head > div:first-child {
    min-width: min(100%, 320px);
}
.dashboard-gis-sync-actions,
.dashboard-gis-sync-speed {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.dashboard-gis-sync-speed {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6f8fb;
}
.dashboard-gis-sync-speed .mode-button {
    min-height: 34px;
    padding: 6px 10px;
}
[data-theme="dark"] .dashboard-gis-sync-speed {
    border-color: var(--line);
    background: #111827;
}
.dashboard-gis-sync-head h2 {
    margin: 6px 0 0;
    font-size: 22px;
    letter-spacing: 0;
}
.dashboard-gis-sync-head p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.dashboard-gis-sync-panel .soft-badge[data-dashboard-gis-sync-state] {
    min-width: 76px;
    justify-content: center;
}
.dashboard-gis-sync-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
    gap: 12px;
    align-items: stretch;
}
.dashboard-gis-sync-current {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.dashboard-gis-sync-current::before {
    content: "Сейчас";
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dashboard-gis-sync-current a {
    font-weight: 800;
    color: var(--text);
    overflow-wrap: anywhere;
}
.dashboard-gis-sync-current span {
    color: var(--muted);
    line-height: 1.35;
}
.dashboard-gis-sync-progressbox {
    display: grid;
    align-content: center;
    gap: 9px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.dashboard-gis-sync-progressbox strong {
    color: var(--brand-dark);
    font-size: 24px;
    line-height: 1;
    text-align: right;
}
.dashboard-gis-sync-progressbox .house-passport-progress {
    height: 10px;
}
.dashboard-gis-sync-panel .house-passport-sync-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(96px, 1fr));
    gap: 8px;
    align-items: stretch;
    justify-content: stretch;
}
.dashboard-gis-sync-panel .house-passport-sync-meta span {
    display: grid;
    align-content: center;
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}
.dashboard-gis-sync-panel .house-passport-sync-meta span b {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 15px;
    font-weight: 850;
}
.dashboard-gis-sync-panel .house-passport-sync-meta span:last-child {
    color: var(--muted);
}
.dashboard-gis-sync-panel [data-dashboard-gis-sync-error] {
    margin: 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 750;
}
.dashboard-gis-sync-panel [data-dashboard-gis-sync-error]:empty {
    display: none;
}
.dashboard-gis-sync-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    align-items: stretch;
    overflow: visible;
}
.dashboard-gis-sync-result {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    overflow-wrap: anywhere;
}
.dashboard-gis-sync-result:hover {
    border-color: var(--brand);
    text-decoration: none;
}
.dashboard-gis-sync-result[data-state="queued"],
.dashboard-gis-sync-result[data-state="paused"] {
    background: #f8fafc;
}
.dashboard-gis-sync-result[data-state="paused"] {
    border-color: rgba(217, 119, 6, .26);
}
.dashboard-gis-sync-result span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.dashboard-gis-sync-more {
    display: grid;
    align-content: center;
    min-height: 58px;
    padding: 10px 11px;
    border: 1px dashed rgba(100, 116, 139, .38);
    border-radius: 8px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 750;
}
.dashboard-gis-sync-panel[data-state="success"] {
    border-color: rgba(22, 163, 74, .24);
}
.dashboard-gis-sync-panel[data-state="paused"] {
    border-color: rgba(217, 119, 6, .28);
}
.dashboard-gis-sync-panel[data-state="error"] {
    border-color: rgba(239, 68, 68, .28);
}
.dashboard-gis-sync-panel[data-state="error"] [data-dashboard-gis-sync-error] {
    color: var(--danger);
}
@media (max-width: 860px) {
    .dashboard-gis-sync-stage,
    .dashboard-gis-sync-panel .house-passport-sync-meta {
        grid-template-columns: 1fr;
    }
    .dashboard-gis-sync-progressbox strong {
        text-align: left;
    }
}
.metric-tile {
    padding: 14px;
    color: var(--text);
    display: grid;
    gap: 7px;
    min-height: 96px;
}
.metric-tile:hover {
    border-color: var(--brand);
    text-decoration: none;
}
.metric-tile span { color: var(--muted); }
.metric-tile b {
    font-size: 30px;
    color: var(--brand-dark);
}
.metric-tile.danger b { color: var(--danger); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px; }
.stat span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat b { font-size: 30px; }
.stat.danger b { color: var(--danger); }
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: var(--dashboard-gap);
    align-items: start;
}
.premium-dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: var(--dashboard-gap);
    align-items: stretch;
}
.premium-dashboard-grid > .panel {
    align-self: stretch;
    min-height: 100%;
}
.group-list, .comment-feed { display: grid; gap: 8px; }
.group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: #fbfdff;
}
.group-row:hover { border-color: var(--brand); text-decoration: none; }
.group-row strong {
    display: block;
    overflow-wrap: anywhere;
}
.group-row b {
    font-size: 18px;
    color: var(--brand-dark);
}
.feed-item {
    padding: 10px 0 10px 12px;
    border-left: 3px solid var(--line);
}
.feed-item a { font-weight: 700; }
.feed-item p {
    margin: 5px 0;
    line-height: 1.42;
    max-height: 42px;
    overflow: hidden;
}
[data-theme="dark"] .group-row { background: #111827; }
.dashboard-group-cards {
    display: grid;
    gap: var(--dashboard-gap);
}
.dashboard-group-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--text);
}
.dashboard-group-card:hover {
    border-color: var(--brand);
    text-decoration: none;
}
.card-topline {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 2px;
}
.card-topline b {
    font-size: 26px;
    color: var(--brand-dark);
    line-height: 1;
}
.card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.card-main strong,
.task-card-title {
    overflow-wrap: anywhere;
}
.card-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 13px;
}
.danger-text { color: var(--danger); font-weight: 700; }
.activity-feed {
    display: grid;
    gap: var(--dashboard-gap);
}
.activity-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: var(--dashboard-gap);
    padding: var(--dashboard-gap);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.activity-marker {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: var(--brand-dark);
    font-weight: 700;
}
.activity-body { min-width: 0; }
.activity-body a { font-weight: 700; }
.activity-body p {
    margin: 5px 0;
    line-height: 1.42;
    max-height: 42px;
    overflow: hidden;
    overflow-wrap: anywhere;
}
[data-theme="dark"] .dashboard-group-card,
[data-theme="dark"] .activity-item,
[data-theme="dark"] .dashboard-gis-sync-panel,
[data-theme="dark"] .dashboard-gis-sync-current,
[data-theme="dark"] .dashboard-gis-sync-result,
[data-theme="dark"] .dashboard-gis-sync-progressbox,
[data-theme="dark"] .dashboard-gis-sync-panel .house-passport-sync-meta span,
[data-theme="dark"] .dashboard-gis-sync-more,
[data-theme="dark"] .metric-tile,
[data-theme="dark"] .summary-main { background: var(--panel); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mini-card { padding: 14px; display: grid; gap: 8px; color: var(--text); }
.mini-card:hover { text-decoration: none; border-color: var(--brand); }
.mini-card span { color: var(--muted); }
.mini-card.muted { opacity: .72; }
.mini-card .inline-edit {
    margin-top: 4px;
}
.premium-card-grid {
    grid-template-columns: repeat(var(--list-card-columns, 2), minmax(0, 1fr));
}
.list-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 9px;
    min-height: 178px;
    padding: 16px 16px 14px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
    overflow: hidden;
}
.list-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
}
.list-card:hover {
    border-color: var(--brand);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, .12);
}
.list-card-kicker {
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-card-title {
    color: var(--text);
    font-size: 17px;
    line-height: 1.28;
    overflow-wrap: anywhere;
}
.list-card-primary {
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
}
.list-card-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.list-card-footer-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}
.list-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.soft-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}
.soft-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}
.soft-badge.muted {
    border: 1px solid var(--line);
    background: #f8fafc;
    color: var(--muted);
}
.presence-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    background: #94a3b8;
    vertical-align: middle;
}
.presence-dot.online {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.row-details {
    min-width: 220px;
}
.row-details summary {
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 700;
}
.row-action-summary {
    width: fit-content;
    list-style: none;
    padding: 7px 10px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #0f172a !important;
}
.row-action-summary::-webkit-details-marker { display: none; }
.row-details[open] .row-action-summary {
    background: var(--brand);
    color: white !important;
}
.admin-users-command .section-head small {
    display: block;
    margin-top: 4px;
}
.admin-users-table [data-col="name"] {
    min-width: 240px;
}
.admin-users-table [data-col="seen"] {
    min-width: 190px;
}
.user-table-person {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.user-table-person a {
    font-size: 13px;
    font-weight: 760;
    line-height: 1.2;
}
.user-table-person small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.user-table-avatar,
.user-card-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}
.user-table-avatar {
    width: 42px;
    height: 42px;
    font-size: 18px;
}
.user-card-avatar {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    font-size: 24px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
}
.user-table-avatar img,
.user-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-contact-stack {
    display: grid;
    gap: 3px;
}
.user-contact-stack small {
    overflow-wrap: anywhere;
}
.user-affiliations-editor {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #f8fafc;
}
.user-basic-fields,
.user-role-choice {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #f8fafc;
}
.user-onboarding-choice {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #f8fafc;
}
.user-basic-fields > label,
.user-role-choice > label,
.user-onboarding-choice > label {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}
.user-basic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.user-basic-grid label {
    min-width: 0;
    margin: 0;
    font-size: 13px;
}
.user-basic-grid input {
    margin-top: 2px;
    background: var(--panel);
}
.user-onboarding-choice .segmented-control {
    width: 100%;
    background: #e8eef7;
}
.user-onboarding-choice .segmented-control label {
    min-height: 36px;
    font-weight: 750;
}
.user-onboarding-choice .segmented-control label.is-selected {
    color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .12);
}
.user-onboarding-choice .onboarding-panel {
    padding-top: 2px;
}
.user-onboarding-choice .onboarding-panel label {
    margin: 0;
    font-size: 13px;
}
.user-onboarding-choice .onboarding-panel input {
    margin-top: 6px;
    background: var(--panel);
}
.user-affiliations-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}
.user-affiliations-head strong,
.user-affiliations-head small {
    display: block;
}
.user-affiliations-head strong {
    font-size: 13px;
}
.user-affiliations-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}
.user-affiliations-head a {
    color: #0369a1;
    font-size: 12px;
    font-weight: 820;
    text-decoration: none;
    white-space: nowrap;
}
.user-affiliations-head a:hover {
    text-decoration: underline;
}
.user-affiliations-list {
    display: grid;
    gap: 8px;
}
.user-affiliation-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.1fr) minmax(190px, .9fr) auto auto;
    gap: 8px;
    align-items: end;
    min-width: 0;
}
.user-affiliation-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}
.user-affiliation-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    align-self: end;
    min-height: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text) !important;
    white-space: nowrap;
    box-sizing: border-box;
}
.user-affiliation-primary input {
    margin: 0;
}
.user-affiliation-remove {
    min-height: 42px;
}
.user-affiliation-add {
    width: fit-content;
}
.user-org-summary {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.user-org-summary > a {
    min-width: 0;
    overflow-wrap: anywhere;
}
.user-org-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid rgba(14, 165, 233, .20);
    border-radius: 999px;
    background: #f0f9ff;
    color: #0369a1;
    cursor: default;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}
.user-org-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 20;
    display: none;
    width: max-content;
    max-width: min(340px, calc(100vw - 40px));
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
}
.user-org-more:hover .user-org-popover,
.user-org-more:focus .user-org-popover,
.user-org-more:focus-within .user-org-popover {
    display: grid;
    gap: 6px;
}
.user-org-popover span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.user-org-popover b {
    font-size: 12px;
    overflow-wrap: anywhere;
}
.user-org-popover small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.user-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.user-row-actions .btn,
.user-row-actions .message-action-link {
    width: auto;
    white-space: nowrap;
}
.user-list-card {
    min-height: 0;
    gap: 12px;
}
.user-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}
.user-card-head .list-card-kicker {
    margin-bottom: 6px;
}
.user-card-head .list-card-title,
.user-card-head .list-card-meta {
    display: block;
    min-width: 0;
}
.user-card-head .list-card-title {
    font-size: 15px;
    line-height: 1.25;
}
.user-card-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.user-card-contact-grid span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.user-card-contact-grid small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.user-card-contact-grid b {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.user-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}
.user-card-actions .btn {
    flex: 0 1 auto;
    text-align: center;
}
.user-role-badges .pill,
.user-role-badges .soft-badge {
    border: 1px solid rgba(37, 99, 235, .10);
    background: #f1f5f9;
    color: #334155;
    font-weight: 760;
}
[data-theme="dark"] .user-role-badges .pill,
[data-theme="dark"] .user-role-badges .soft-badge {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(30, 41, 59, .58);
    color: #cbd5e1;
}
[data-theme="dark"] .user-role-badges .soft-badge.muted {
    border-color: rgba(148, 163, 184, .14);
    background: rgba(15, 23, 42, .42);
    color: #94a3b8;
}
[data-theme="dark"] .user-affiliations-editor {
    border-color: rgba(96, 165, 250, .16);
    background: #111827;
}
[data-theme="dark"] .user-basic-fields,
[data-theme="dark"] .user-role-choice {
    border-color: rgba(96, 165, 250, .16);
    background: #111827;
}
[data-theme="dark"] .user-onboarding-choice {
    border-color: rgba(96, 165, 250, .16);
    background: #111827;
}
[data-theme="dark"] .user-onboarding-choice .segmented-control {
    background: #0f172a;
}
[data-theme="dark"] .user-onboarding-choice .segmented-control label.is-selected {
    background: #172554;
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .20);
}
[data-theme="dark"] .user-affiliations-head a {
    color: #7dd3fc;
}
[data-theme="dark"] .user-affiliation-primary {
    border-color: #334155;
    background: #0f172a;
    color: #e5edf6 !important;
}
[data-theme="dark"] .user-org-more {
    border-color: rgba(125, 211, 252, .22);
    background: rgba(12, 74, 110, .30);
    color: #bae6fd;
}
[data-theme="dark"] .user-org-popover {
    border-color: #334155;
    background: #111827;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .32);
}
[data-theme="dark"] .row-action-summary {
    background: #243244;
    color: #e5edf6 !important;
}
.compact-user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    min-width: 420px;
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-line input {
    width: auto;
}
.message-action-link {
    width: fit-content;
    white-space: nowrap;
    text-align: center;
}
.list-card-meter {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.list-card-meter span {
    display: block;
    height: 100%;
    min-width: 7px;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #0f766e);
}
.list-card-action {
    width: fit-content;
    margin-top: auto;
}
.inspection-list-card::before { background: #0f766e; }
.group-list-card::before { background: #7c3aed; }
.organization-list-card::before { background: #0369a1; }
.report-list-card::before { background: #475569; }
.user-list-card::before { background: #0f766e; }
.list-card.muted {
    opacity: .72;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #f8fafc;
    color: var(--text);
}
.removable-chip {
    position: relative;
    justify-content: flex-start;
    max-width: min(100%, 360px);
    overflow: visible;
}
.removable-chip .chip-label {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.removable-chip .chip-label:hover {
    text-decoration: none;
}
.chip-remove-button {
    position: absolute !important;
    top: 50% !important;
    right: 4px !important;
    display: inline-grid !important;
    place-items: center !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent) !important;
    border-radius: 50% !important;
    background: color-mix(in srgb, var(--panel) 92%, white) !important;
    color: var(--muted) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 7px 16px rgba(15, 23, 42, .16) !important;
    opacity: 0;
    transform: translateY(-50%) scale(.94) !important;
    transition: opacity .14s ease, transform .14s ease, color .14s ease, border-color .14s ease, background .14s ease;
    z-index: 2;
}
.removable-chip:hover .chip-remove-button,
.removable-chip:focus-within .chip-remove-button {
    opacity: 1;
    transform: translateY(-50%) scale(1) !important;
}
.chip-remove-button:hover,
.chip-remove-button:focus-visible {
    border-color: color-mix(in srgb, var(--danger) 52%, var(--line)) !important;
    background: color-mix(in srgb, var(--danger) 10%, var(--panel)) !important;
    color: var(--danger) !important;
    text-decoration: none !important;
}
@media (hover: none), (pointer: coarse) {
    .chip-remove-button {
        opacity: 1;
        transform: translateY(-50%) scale(1) !important;
    }
}
.chip-add-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-color: rgba(37, 99, 235, .28);
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    color: var(--brand);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
}
.chip-add-button:hover,
.chip-add-button.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: white;
    text-decoration: none;
}
.task-group-tree-panel {
    display: grid;
    gap: 12px;
}
.gis-gkh-result-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.gis-gkh-sync-panel {
    scroll-margin-top: 18px;
}
.dashboard-gis-sync-panel.gis-gkh-sync-panel {
    display: block;
    padding: 10px;
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 46%),
        var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.dashboard-gis-sync-panel.gis-gkh-sync-panel[hidden] {
    display: none;
}
.gis-gkh-sync-compact {
    display: grid;
    grid-template-columns: minmax(220px, .92fr) minmax(210px, 1.15fr) minmax(190px, .72fr) minmax(250px, 1fr) auto;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}
.gis-gkh-sync-panel .dashboard-gis-sync-titlebox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 88%, #eff6ff);
}
.gis-gkh-sync-panel .dashboard-gis-sync-titlebox > div {
    min-width: 0;
}
.gis-gkh-sync-panel .dashboard-gis-sync-titlebox h2 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.15;
}
.gis-gkh-sync-panel .dashboard-gis-sync-titlebox p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gis-gkh-sync-panel .soft-badge[data-dashboard-gis-sync-state] {
    flex: 0 0 auto;
    min-width: 74px;
    justify-content: center;
}
.gis-gkh-sync-panel .dashboard-gis-sync-current,
.gis-gkh-sync-panel .dashboard-gis-sync-progressbox {
    min-height: 56px;
    padding: 9px 10px;
    border-color: color-mix(in srgb, var(--line) 86%, transparent);
    background: color-mix(in srgb, var(--panel) 86%, #f8fafc);
}
.gis-gkh-sync-panel .dashboard-gis-sync-current {
    align-content: center;
    gap: 3px;
}
.gis-gkh-sync-panel .dashboard-gis-sync-current::before {
    content: none;
}
.gis-gkh-sync-panel .dashboard-gis-sync-current a,
.gis-gkh-sync-panel .dashboard-gis-sync-current span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gis-gkh-sync-panel .dashboard-gis-sync-current a {
    font-size: 13px;
}
.gis-gkh-sync-panel .dashboard-gis-sync-current span {
    font-size: 12px;
}
.gis-gkh-sync-panel .dashboard-gis-sync-progressbox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    align-content: center;
}
.gis-gkh-sync-panel .dashboard-gis-sync-progressbox strong {
    min-width: 44px;
    color: var(--brand-dark);
    font-size: 18px;
    text-align: left;
}
.gis-gkh-sync-panel .dashboard-gis-sync-progressbox .house-passport-progress {
    height: 15px;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, .32);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(226, 232, 240, .78)),
        #e2e8f0;
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, .12),
        0 8px 18px rgba(15, 23, 42, .06);
}
.gis-gkh-sync-panel .dashboard-gis-sync-progressbox .house-passport-progress span {
    background:
        linear-gradient(90deg, var(--brand), var(--accent));
    box-shadow: 0 4px 10px color-mix(in srgb, var(--brand) 28%, transparent);
}
.gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics,
.gis-gkh-sync-panel .dashboard-gis-sync-metrics {
    display: grid;
    gap: 6px;
    align-items: stretch;
}
.gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gis-gkh-sync-panel .dashboard-gis-sync-metrics {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
}
.gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics span,
.gis-gkh-sync-panel .dashboard-gis-sync-metrics span {
    display: grid;
    align-content: center;
    min-height: 56px;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 88%, #f8fafc);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
}
.gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics span b,
.gis-gkh-sync-panel .dashboard-gis-sync-metrics span b {
    display: block;
    max-width: 100%;
    margin-top: 3px;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details {
    align-self: stretch;
    justify-self: stretch;
    min-width: 0;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 88%, #eef2ff);
    color: var(--brand-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    list-style: none;
    text-align: center;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details summary::-webkit-details-marker {
    display: none;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details summary span::after {
    content: "v";
    display: inline-block;
    margin-left: 7px;
    font-size: 14px;
    line-height: 1;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details[open] {
    grid-column: 1 / -1;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details[open] summary {
    width: auto;
    margin-left: auto;
    padding-inline: 14px;
}
.gis-gkh-sync-panel .dashboard-gis-sync-details[open] summary span::after {
    transform: rotate(180deg);
}
.gis-gkh-sync-panel .dashboard-gis-sync-details-body {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}
.gis-gkh-sync-panel .dashboard-gis-sync-actions {
    justify-content: flex-start;
}
.gis-gkh-sync-panel .dashboard-gis-sync-results {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.gis-gkh-sync-panel[data-state="idle"] .soft-badge[data-dashboard-gis-sync-state],
.gis-gkh-sync-panel[data-state="success"] .soft-badge[data-dashboard-gis-sync-state] {
    border-color: rgba(20, 184, 166, .24);
    background: rgba(20, 184, 166, .10);
    color: #0f766e;
}
.gis-gkh-sync-panel[data-state="loading"] .soft-badge[data-dashboard-gis-sync-state] {
    border-color: rgba(37, 99, 235, .24);
    background: rgba(37, 99, 235, .10);
    color: #1d4ed8;
}
.gis-gkh-sync-panel[data-state="paused"] .soft-badge[data-dashboard-gis-sync-state] {
    border-color: rgba(245, 158, 11, .30);
    background: rgba(245, 158, 11, .13);
    color: #b45309;
}
.gis-gkh-sync-panel[data-state="error"] .soft-badge[data-dashboard-gis-sync-state] {
    border-color: rgba(239, 68, 68, .30);
    background: rgba(239, 68, 68, .10);
    color: #b91c1c;
}
.gis-gkh-tabs-panel {
    padding: 10px;
}
.gis-gkh-section-panel {
    display: none;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.gis-gkh-section-panel.is-active {
    display: block;
}
.gis-gkh-workspace {
    display: grid;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}
.gis-gkh-section-panel .section-head {
    min-width: 0;
}
.gis-gkh-toolbar-actions {
    min-width: 0;
    max-width: 100%;
}
.gis-gkh-selected-sync-form {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
}
.gis-gkh-selected-sync-form select {
    min-width: 180px;
}
.gis-gkh-selected-sync-form .btn {
    flex: 0 0 auto;
}
.gis-gkh-select-button,
.gis-gkh-bulk-button {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}
.gis-gkh-select-button {
    border: 1px solid var(--line);
    background: #f8fafc;
    color: #334155;
}
.gis-gkh-select-button:hover,
.gis-gkh-select-button.is-active {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}
.gis-gkh-bulk-button {
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(29, 78, 216, .14);
}
.gis-gkh-bulk-button:hover {
    background: #1e40af;
}
.gis-gkh-table-wrap {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    max-height: calc(100vh - 260px);
    overflow-x: auto;
}
.gis-gkh-table {
    min-width: 1320px;
    table-layout: auto;
}
.gis-gkh-table [data-col="address"] {
    min-width: 280px;
}
.gis-gkh-table [data-col="common"],
.gis-gkh-table [data-col="constructives"],
.gis-gkh-table [data-col="engineering"],
.gis-gkh-table [data-col="meters"],
.gis-gkh-table [data-col="premises"] {
    min-width: 150px;
    vertical-align: top;
}
.gis-gkh-section-cell {
    display: grid;
    gap: 6px;
    align-items: start;
    min-height: 58px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.gis-gkh-section-cell.is-fresh {
    border-color: rgba(5, 150, 105, .28);
    background: #f0fdf4;
    box-shadow: inset 3px 0 0 rgba(5, 150, 105, .28);
}
.gis-gkh-section-cell.is-stale {
    border-color: rgba(217, 119, 6, .30);
    background: #fffbeb;
    box-shadow: inset 3px 0 0 rgba(217, 119, 6, .30);
}
.gis-gkh-section-cell.is-old {
    border-color: rgba(220, 38, 38, .28);
    background: #fef2f2;
    box-shadow: inset 3px 0 0 rgba(220, 38, 38, .30);
}
.gis-gkh-section-cell.is-syncing {
    border-color: rgba(37, 99, 235, .32);
    background: #eff6ff;
    box-shadow: inset 3px 0 0 rgba(37, 99, 235, .42);
}
.gis-gkh-section-cell.is-updated {
    border-color: rgba(5, 150, 105, .32);
    background: #ecfdf5;
    box-shadow: inset 3px 0 0 rgba(5, 150, 105, .42);
}
.gis-gkh-section-cell.is-error {
    border-color: rgba(220, 38, 38, .28);
    background: #fef2f2;
    box-shadow: inset 3px 0 0 rgba(220, 38, 38, .38);
}
.gis-gkh-section-date {
    display: block;
    color: var(--text);
    line-height: 1.2;
}
.gis-gkh-section-date b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.gis-gkh-section-date.is-empty {
    color: var(--muted);
}
.gis-gkh-section-date.is-empty b {
    color: #94a3b8;
    font-weight: 750;
}
.gis-gkh-section-date.is-pending b {
    color: var(--brand-dark);
}
.gis-gkh-section-date.is-error b {
    color: #b91c1c;
}
.gis-gkh-section-action {
    margin: 0;
}
.gis-gkh-sync-inline-status {
    display: block;
    min-height: 14px;
    max-width: 180px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gis-gkh-selected-sync-form .gis-gkh-sync-inline-status {
    max-width: 220px;
}
.gis-gkh-sync-inline-status[data-state="loading"] {
    color: var(--brand-dark);
}
.gis-gkh-sync-inline-status[data-state="success"] {
    color: #047857;
}
.gis-gkh-sync-inline-status[data-state="error"] {
    color: #b91c1c;
}
.gis-gkh-table .table-sort-link {
    color: inherit;
}
.gis-gkh-refresh-button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: #1d4ed8;
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
    font-weight: 800;
}
.gis-gkh-refresh-button:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1e40af;
}
.gis-gkh-section-action .gis-gkh-refresh-button {
    width: 100%;
}
.gis-gkh-refresh-button i,
.gis-gkh-select-button i,
.gis-gkh-bulk-button i {
    font-size: 12px;
}
.gis-gkh-license-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.gis-gkh-license-summary span {
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 7px;
    align-items: baseline;
    padding: 7px 10px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #f8fafc;
}
.gis-gkh-license-summary b {
    font-size: 18px;
    line-height: 1;
}
.gis-gkh-license-summary small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.gis-gkh-license-summary span.is-warning {
    border-color: rgba(217, 119, 6, .24);
    background: #fffbeb;
}
.gis-gkh-license-summary span.is-warning b {
    color: #b45309;
}
.gis-gkh-license-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: -2px 0 14px;
    padding: 8px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 8px 20px rgba(15, 23, 42, .035);
}
.gis-gkh-license-toggle {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 54px;
    min-width: 0;
    padding: 8px 12px 8px 8px;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease;
}
.gis-gkh-license-toggle:hover {
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
}
.gis-gkh-license-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.gis-gkh-license-switch {
    position: relative;
    width: 54px;
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e2e8f0;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .16);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.gis-gkh-license-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .22);
    transition: transform .18s ease;
}
.gis-gkh-license-toggle-input:checked + .gis-gkh-license-switch {
    border-color: #1d4ed8;
    background: #1d4ed8;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .10), 0 0 0 4px rgba(37, 99, 235, .10);
}
.gis-gkh-license-toggle-input:checked + .gis-gkh-license-switch::after {
    transform: translateX(24px);
}
.gis-gkh-license-toggle-input:focus-visible + .gis-gkh-license-switch {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}
.gis-gkh-license-toggle-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.gis-gkh-license-toggle-text b {
    color: var(--text);
    font-size: 14px;
    line-height: 1.2;
}
.gis-gkh-license-toggle-text small {
    max-width: 100%;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.gis-gkh-license-filter-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}
.gis-gkh-license-filter-count {
    min-height: 28px;
    border-color: rgba(37, 99, 235, .12);
    background: #ffffff;
}
.gis-gkh-license-grid,
.gis-gkh-license-list {
    display: grid;
    gap: 12px;
}
.gis-gkh-license-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
}
.gis-gkh-license-card.is-missing {
    border-color: rgba(217, 119, 6, .24);
    background: #fffdf7;
}
.gis-gkh-license-card.needs-attention {
    border-color: rgba(217, 119, 6, .36);
    box-shadow: 0 10px 24px rgba(217, 119, 6, .08);
}
.gis-gkh-license-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}
.gis-gkh-license-card-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.gis-gkh-license-card-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 18px;
}
.gis-gkh-license-card-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}
.gis-gkh-license-card-head > .soft-badge {
    max-width: 180px;
    justify-content: center;
    text-align: center;
    white-space: normal;
}
.gis-gkh-license-attention {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, .24);
    border-radius: 8px;
    background: #fffbeb;
}
.gis-gkh-license-attention-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    font-size: 14px;
}
.gis-gkh-license-attention strong {
    display: block;
    color: #92400e;
    font-size: 13px;
    line-height: 1.25;
}
.gis-gkh-license-attention small {
    display: block;
    margin-top: 2px;
    color: #78350f;
    font-size: 12px;
    font-weight: 720;
    line-height: 1.3;
}
.gis-gkh-license-item {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}
.gis-gkh-license-item.is-active {
    border-color: rgba(22, 163, 74, .24);
}
.gis-gkh-license-item > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 17px;
}
.gis-gkh-license-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.gis-gkh-license-expiry.is-ok b {
    color: #047857;
}
.gis-gkh-license-expiry.is-warning {
    border-color: rgba(217, 119, 6, .24);
    background: #fffbeb;
}
.gis-gkh-license-expiry.is-warning b {
    color: #b45309;
}
.gis-gkh-license-expiry.is-danger {
    border-color: rgba(220, 38, 38, .22);
    background: #fef2f2;
}
.gis-gkh-license-expiry.is-danger b {
    color: #b91c1c;
}
.gis-gkh-license-expiry.is-empty b {
    color: var(--muted);
}
.gis-gkh-license-search-panel {
    margin: 0;
}
.soft-badge.is-live {
    border-color: rgba(37, 99, 235, .32);
    color: var(--brand-dark);
}
[data-theme="dark"] .gis-gkh-section-cell {
    border-color: var(--line);
    background: #111827;
}
[data-theme="dark"] .gis-gkh-section-cell.is-fresh {
    border-color: rgba(52, 211, 153, .32);
    background: #052e2b;
}
[data-theme="dark"] .gis-gkh-section-cell.is-stale {
    border-color: rgba(251, 191, 36, .34);
    background: #2f2208;
}
[data-theme="dark"] .gis-gkh-section-cell.is-old {
    border-color: rgba(248, 113, 113, .34);
    background: #3b1111;
}
[data-theme="dark"] .gis-gkh-section-cell.is-syncing {
    border-color: rgba(96, 165, 250, .42);
    background: #172554;
}
[data-theme="dark"] .gis-gkh-section-cell.is-updated {
    border-color: rgba(52, 211, 153, .38);
    background: #052e2b;
}
[data-theme="dark"] .gis-gkh-section-cell.is-error {
    border-color: rgba(248, 113, 113, .36);
    background: #3b1111;
}
[data-theme="dark"] .gis-gkh-license-filter {
    border-color: var(--line);
    background: linear-gradient(135deg, #111827, #0f172a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 22px rgba(0, 0, 0, .18);
}
[data-theme="dark"] .gis-gkh-license-toggle {
    color: #cbd5e1;
}
[data-theme="dark"] .gis-gkh-license-toggle:hover {
    background: rgba(30, 41, 59, .64);
}
[data-theme="dark"] .gis-gkh-license-switch {
    border-color: #475569;
    background: #1f2937;
}
[data-theme="dark"] .gis-gkh-license-toggle-input:checked + .gis-gkh-license-switch {
    border-color: #60a5fa;
    background: #2563eb;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .10), 0 0 0 4px rgba(96, 165, 250, .12);
}
[data-theme="dark"] .gis-gkh-license-filter-count {
    border-color: #334155;
    background: #0f172a;
}
[data-theme="dark"] .gis-gkh-license-summary span.is-warning,
[data-theme="dark"] .gis-gkh-license-attention {
    border-color: rgba(245, 158, 11, .28);
    background: #1f1710;
}
[data-theme="dark"] .gis-gkh-license-summary span.is-warning b,
[data-theme="dark"] .gis-gkh-license-attention strong {
    color: #fbbf24;
}
[data-theme="dark"] .gis-gkh-license-attention small {
    color: #fcd58a;
}
[data-theme="dark"] .gis-gkh-license-attention-icon {
    background: #d97706;
    color: #fff7ed;
}
[data-theme="dark"] .gis-gkh-license-summary span,
[data-theme="dark"] .gis-gkh-license-card,
[data-theme="dark"] .gis-gkh-license-item {
    border-color: var(--line);
    background: #111827;
}
[data-theme="dark"] .gis-gkh-license-card.is-missing {
    border-color: rgba(245, 158, 11, .28);
    background: #1f1710;
}
[data-theme="dark"] .gis-gkh-license-expiry.is-warning {
    border-color: rgba(245, 158, 11, .28);
    background: #1f1710;
}
[data-theme="dark"] .gis-gkh-license-expiry.is-danger {
    border-color: rgba(248, 113, 113, .28);
    background: #241313;
}
[data-theme="dark"] .gis-gkh-select-button {
    border-color: var(--line);
    background: #111827;
    color: #cbd5e1;
}
[data-theme="dark"] .gis-gkh-select-button:hover,
[data-theme="dark"] .gis-gkh-select-button.is-active {
    border-color: #3b82f6;
    background: #172554;
    color: #dbeafe;
}
[data-theme="dark"] .gis-gkh-refresh-button {
    border-color: #274472;
    background: #111827;
    color: #bfdbfe;
}
[data-theme="dark"] .gis-gkh-refresh-button:hover {
    border-color: #3b82f6;
    background: #172554;
    color: #dbeafe;
}
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-titlebox,
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-current,
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-progressbox,
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics span,
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-metrics span,
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-details summary {
    background: #111827;
}
[data-theme="dark"] .gis-gkh-sync-panel .dashboard-gis-sync-progressbox .house-passport-progress {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .95), rgba(15, 23, 42, .92)),
        #1f2937;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, .32),
        0 8px 18px rgba(0, 0, 0, .18);
}
@media (max-width: 720px) {
    .gis-gkh-sync-compact {
        grid-template-columns: 1fr;
    }
    .gis-gkh-sync-panel .dashboard-gis-sync-metrics {
        grid-template-columns: 1fr;
    }
    .gis-gkh-sync-panel .dashboard-gis-sync-compact-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .gis-gkh-sync-panel .dashboard-gis-sync-titlebox p,
    .gis-gkh-sync-panel .dashboard-gis-sync-current a,
    .gis-gkh-sync-panel .dashboard-gis-sync-current span {
        white-space: normal;
    }
    .gis-gkh-sync-panel .dashboard-gis-sync-details[open] summary {
        width: 100%;
    }
    .gis-gkh-license-filter {
        grid-template-columns: 1fr;
    }
    .gis-gkh-license-toggle {
        padding-right: 8px;
    }
    .gis-gkh-license-filter-meta {
        justify-content: flex-start;
        padding-inline: 8px;
    }
    .gis-gkh-selected-sync-form {
        flex-wrap: wrap;
        min-width: 0;
        width: 100%;
    }
    .gis-gkh-selected-sync-form select {
        flex: 1 1 180px;
        min-width: 0;
    }
    .gis-gkh-selected-sync-form .btn {
        flex: 1 1 auto;
    }
}
.task-tree-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.task-group-tree {
    display: grid;
    gap: 10px;
}
.inspection-task-tree {
    margin-bottom: 12px;
}
.task-tree-parent {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}
.task-tree-parent-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
}
.task-tree-title {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.task-tree-title a {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.task-tree-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.task-tree-state,
.task-tree-child-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.task-tree-status,
.task-tree-progress,
.task-tree-child-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.1;
}
.task-tree-status.status-done {
    color: #15803d;
    border-color: rgba(22, 163, 74, .32);
}
.task-tree-status.status-new,
.task-tree-status.status-in_work,
.task-tree-status.status-review {
    color: var(--brand-dark);
    border-color: rgba(37, 99, 235, .30);
}
.task-tree-children {
    display: grid;
    border-top: 1px solid var(--line);
}
.task-tree-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    color: var(--text);
}
.task-tree-child + .task-tree-child {
    border-top: 1px solid var(--line);
}
.task-tree-child:hover {
    background: rgba(37, 99, 235, .06);
    text-decoration: none;
}
.task-tree-child-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.task-tree-child-main strong,
.task-tree-child-main span {
    overflow-wrap: anywhere;
}
.task-tree-child-main span {
    color: var(--muted);
    font-size: 13px;
}
.task-tree-empty {
    padding: 14px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
[data-theme="dark"] .task-tree-parent {
    background: #111827;
}
[data-theme="dark"] .task-tree-child:hover {
    background: rgba(96, 165, 250, .10);
}
@media (max-width: 760px) {
    .task-tree-parent-head,
    .task-tree-child {
        grid-template-columns: 1fr;
    }
    .task-tree-state,
    .task-tree-child-meta {
        justify-content: flex-start;
    }
}
.inspection-tasks-panel .managed-table [data-col="id"],
.task-group-tasks-panel .managed-table [data-col="id"] {
    width: 96px;
}
.inspection-task-id-cell {
    white-space: nowrap;
    vertical-align: middle;
}
.inspection-task-id-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.inspection-task-toggle,
.inspection-task-toggle-spacer {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
}
.inspection-task-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 0;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--brand-dark);
    font-size: 16px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
}
.inspection-task-toggle:hover,
.inspection-task-toggle:focus-visible {
    border-color: var(--brand);
    background: rgba(37, 99, 235, .08);
    outline: none;
}
.inspection-task-parent-row.has-children.is-expanded > td {
    border-bottom-color: rgba(37, 99, 235, .24);
}
.inspection-task-child-row > td {
    background: #f8fafc;
}
.inspection-task-child-row:hover > td {
    background: rgba(37, 99, 235, .06);
}
.inspection-task-title-cell {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.inspection-task-title-cell a {
    font-weight: 750;
    overflow-wrap: anywhere;
}
.inspection-task-title-cell.is-child {
    padding-left: 22px;
    border-left: 2px solid var(--line);
}
.inspection-task-title-cell.is-child a {
    font-weight: 700;
}
.inspection-task-summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    overflow-wrap: anywhere;
}
[data-theme="dark"] .inspection-task-child-row > td {
    background: #111827;
}
[data-theme="dark"] .inspection-task-child-row:hover > td {
    background: rgba(96, 165, 250, .10);
}
@media (max-width: 760px) {
    .inspection-task-title-cell.is-child {
        padding-left: 12px;
    }
}
.list-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.list-card-metrics span,
.mini-metric {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
}
.list-card-metrics b,
.mini-metric b {
    display: block;
    color: var(--brand-dark);
    font-size: 22px;
    line-height: 1.05;
}
.mini-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.mini-metric {
    display: grid;
    gap: 5px;
}
.mini-metric:hover {
    border-color: var(--brand);
    text-decoration: none;
}
[data-theme="dark"] .chip { background: #111827; }
[data-theme="dark"] .chip-remove-button {
    border-color: #334155 !important;
    background: #0f172a !important;
    color: var(--muted) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .28) !important;
}
[data-theme="dark"] .chip-remove-button:hover,
[data-theme="dark"] .chip-remove-button:focus-visible {
    border-color: color-mix(in srgb, var(--danger) 48%, #334155) !important;
    background: color-mix(in srgb, var(--danger) 12%, #0f172a) !important;
    color: var(--danger) !important;
}
[data-theme="dark"] .chip-add-button {
    border-color: rgba(96, 165, 250, .36);
    background: #0f172a;
    color: #93c5fd;
}
[data-theme="dark"] .chip-add-button:hover,
[data-theme="dark"] .chip-add-button.is-active {
    background: var(--brand);
    color: white;
}
[data-theme="dark"] .list-card-metrics span,
[data-theme="dark"] .mini-metric { background: #111827; }
[data-theme="dark"] .task-id-jump {
    background: #182235;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
[data-theme="dark"] .task-id-jump input {
    background: #0f172a;
}
[data-theme="dark"] .identity-user,
[data-theme="dark"] .notification-trigger,
[data-theme="dark"] .topbar-logout-form button {
    background: #182235;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
[data-theme="dark"] .identity-user:hover,
[data-theme="dark"] .notification-trigger:hover,
[data-theme="dark"] .notification-trigger.is-open {
    background: #111827;
    border-color: #3f4f64;
}
[data-theme="dark"] .identity-name.pill {
    background: rgba(96, 165, 250, .14);
    color: var(--brand-dark);
}
.compact-stat { font-size: 20px !important; }

.dashboard-task-columns-init [data-dashboard-task-cards] { --task-card-columns: var(--dashboard-task-columns-init) !important; }
.task-card-grid {
    display: grid;
    grid-template-columns: repeat(var(--task-card-columns, 2), minmax(0, 1fr));
    gap: 12px;
}
.task-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.task-card.has-due-badge,
.list-card.has-due-badge {
    position: relative;
}
.task-card-due-badge {
    display: inline-grid;
    gap: 1px;
    min-width: 48px;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--brand-dark);
    text-align: center;
    box-shadow: none;
    justify-self: end;
    align-self: start;
    white-space: nowrap;
}
.task-card-due-badge b {
    font-size: 16px;
    line-height: 1;
}
.task-card-due-badge small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: lowercase;
}
.task-card-due-badge.due-today {
    color: #92400e;
}
.task-card-due-badge.due-today small { color: #b45309; }
.task-card-due-badge.due-overdue {
    color: var(--danger);
}
.task-card-due-badge.due-overdue small { color: var(--danger); }
.task-card:hover,
.task-list-card:hover {
    border-color: var(--brand);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .10);
}
.task-card-head,
.task-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: var(--muted);
}
.task-card-title {
    color: var(--text);
    font-weight: 800;
    line-height: 1.25;
    font-size: 17px;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, .35);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.task-card-title:hover {
    color: var(--brand-dark);
    text-decoration-color: var(--brand);
}
.task-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    min-height: 0;
}
.task-card-main-column {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.task-card-title-row small {
    color: var(--muted);
    font-size: 12px;
    padding-top: 2px;
}
.task-card-context {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.task-card-context a {
    color: var(--muted);
    font-weight: 700;
}
.task-card-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.priority-pill,
.task-card-date {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.priority-high,
.priority-critical { background: #fee2e2; color: #991b1b; }
.priority-low { background: #e0f2fe; color: #0369a1; }
.inline-task-field-form {
    margin: 0;
    min-width: 0;
}
.quick-select,
.quick-date-input {
    width: auto;
    max-width: 100%;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #eef2f7;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}
.quick-select {
    padding-right: 26px;
    cursor: pointer;
}
.quick-select.is-static,
.quick-date-input.is-static,
.status-select.is-static {
    display: inline-flex;
    align-items: center;
    cursor: default;
    padding-right: 9px;
}
.quick-date-input {
    min-width: 132px;
    color: var(--muted);
}
.priority-select.priority-low { background: #e0f2fe; color: #0369a1; }
.priority-select.priority-normal { background: #eef2f7; color: #475569; }
.priority-select.priority-high,
.priority-select.priority-critical { background: #fee2e2; color: #991b1b; }
.executor-field-form,
.executor-select {
    width: 100%;
}
.executor-select {
    min-width: 150px;
    border-radius: 7px;
}
.task-card-details {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}
.task-card-details span {
    display: block;
    overflow-wrap: anywhere;
}
.task-card-address a {
    color: var(--brand-dark);
    font-weight: 700;
}
.task-card-company {
    color: var(--muted);
}
.task-card-extra-fields {
    display: grid;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
}
.task-card-extra-fields > span {
    display: grid;
    grid-template-columns: minmax(92px, .35fr) minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.task-card-extra-fields b {
    color: var(--text);
    font-size: 12px;
}
.task-card-extra-fields a {
    color: var(--brand-dark);
    font-weight: 700;
}
.task-card-executor {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}
.task-card-executor-label {
    font-weight: 800;
}
.task-executor-summary {
    display: grid;
    gap: 1px;
    min-width: 0;
    line-height: 1.2;
}
.task-executor-summary-org,
.task-executor-summary-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-executor-summary .task-executor-summary-org {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.task-executor-summary .task-executor-summary-name {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}
.task-card-details span,
.task-card-footer span {
    overflow-wrap: anywhere;
}
.task-card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}
.task-list-card-grid { margin-top: 0; }
.task-view-cards-init [data-task-table-view] { display: none !important; }
.task-view-cards-init [data-task-card-view] { --task-card-columns: var(--task-card-columns-init, 2) !important; }
.task-view-cards-init [data-task-card-view].is-hidden { display: grid !important; }
.task-view-cards-init [data-task-card-controls].is-hidden { display: inline-flex !important; }
.task-list-card .task-card-footer {
    align-items: center;
}
.task-card-badges,
.task-inline-badges {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.task-card-badge-pack {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.task-card-id-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.task-card-footer-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
}
.task-card-badges {
    justify-content: flex-end;
}
.task-inline-badges {
    justify-content: flex-start;
    margin-top: 6px;
}
[data-card-field].is-hidden,
[data-card-field-group].is-hidden {
    display: none !important;
}
[data-theme="dark"] .task-card {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}
[data-theme="dark"] .task-card-due-badge {
    color: #bfdbfe;
}
[data-theme="dark"] .task-card-due-badge.due-today {
    color: #fde68a;
}
[data-theme="dark"] .task-card-due-badge.due-overdue {
    color: #fecaca;
}
[data-theme="dark"] .task-card-extra-fields {
    background: #111827;
}
[data-theme="dark"] .list-card {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}
[data-theme="dark"] .list-card-kicker {
    background: #172554;
    border-color: #1d4ed8;
    color: #93c5fd;
}
[data-theme="dark"] .soft-badge {
    background: #1f2937;
    color: var(--text);
}
[data-theme="dark"] .soft-badge.danger {
    background: #450a0a;
    color: #fecaca;
}
[data-theme="dark"] .list-card-meter { background: #1f2937; }

.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto; gap: 10px; align-items: end; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid label, .form-grid .form-field, .stack-form { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.form-grid .form-field > label { display: block; }
.task-create-form {
    display: grid;
    gap: 14px;
}
.task-create-mode-switch {
    display: flex;
    justify-content: flex-start;
}
.task-create-mode-switch .segmented-control {
    width: min(360px, 100%);
}
.task-create-mode-panel {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.task-create-quick-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, .98fr);
    gap: 14px;
    align-items: start;
}
.house-create-quick-grid {
    grid-template-columns: minmax(0, 1fr);
}
.task-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
    gap: 14px;
    align-items: start;
}
.task-create-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.task-create-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.task-create-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.25;
}
.inspection-create-form .task-create-mode-switch {
    margin-bottom: 2px;
}
.inspection-create-card {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, transparent), transparent 46%),
        var(--panel);
}
.inspection-create-card textarea {
    min-height: 104px;
}
.compact-address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.task-create-extra-layout {
    margin-top: 14px;
}
.task-create-column {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.task-form-section {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.task-form-section.task-create-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.task-form-section.is-primary {
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.task-form-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}
.task-form-section.is-primary:first-of-type {
    padding-top: 14px;
    border-top: 1px solid rgba(37, 99, 235, .18);
}
.task-form-section.task-create-card:first-of-type {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.task-form-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.task-form-section-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.25;
}
.task-form-section-lead {
    max-width: 520px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}
.task-form-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.task-create-card-body {
    display: grid;
    gap: 12px;
}
.task-create-card-body textarea[name="description"] {
    min-height: 132px;
}
.task-form-section-grid .span-2 {
    grid-column: 1 / -1;
}
.task-form-section-grid > .choice-tabs-field,
.task-form-section-grid > label,
.task-form-section-grid > .form-field {
    min-width: 0;
}
.span-2 { grid-column: span 2; }
.house-multi-picker {
    display: grid;
    gap: 10px;
    align-content: start;
}
.house-picker-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.task-create-card .house-picker-input-row {
    margin-bottom: 2px;
}
.task-create-card .selected-house-list {
    margin: 2px 0;
}
.selected-house-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 34px;
}
.selected-house-list.is-empty {
    display: none;
    min-height: 0;
    margin: 0;
}
.selected-house-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--text);
    font-size: 13px;
}
.selected-house-chip span {
    overflow-wrap: anywhere;
}
.selected-house-chip button {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--muted);
    line-height: 1;
}
.selected-house-chip button:hover { background: #cbd5e1; color: var(--text); }
.house-mode-control { justify-content: flex-start; }
.house-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    background: transparent;
}
.house-mode-cards label {
    display: grid;
    place-items: start;
    align-content: start;
    gap: 3px;
    min-height: 78px;
    padding: 9px 10px;
    border: 1px solid transparent;
    text-align: left;
}
.house-mode-cards label.is-selected {
    border-color: #bfdbfe;
}
.house-mode-cards span {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}
.house-mode-cards small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}
.gis-address-field { position: relative; }
.gis-address-suggest {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
.gis-address-suggest.is-open { display: grid; }
.gis-address-option {
    width: 100%;
    min-height: 38px;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
}
.gis-address-option:last-child { border-bottom: 0; }
.gis-address-option:not(.is-message) { cursor: pointer; }
.gis-address-option:not(.is-message):hover,
.gis-address-option:not(.is-message):focus {
    background: #eef2f6;
    outline: none;
}
.gis-address-option.is-message {
    display: block;
    color: var(--muted);
}
.gis-address-option.is-error { color: #b91c1c; }
.gis-address-debug {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.gis-house-preview {
    display: none;
    padding: 9px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
    line-height: 1.4;
}
.gis-house-preview.is-open { display: block; }
.gis-house-preview.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.filters .compact-actions {
    grid-column: auto;
    align-self: end;
}
.form-actions button { width: auto; }
.form-actions .btn { width: auto; }
.segmented-control {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f6;
}
.segmented-control label {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    text-align: center;
}
.segmented-control input { display: none; }
.segmented-control label.is-selected {
    background: var(--panel);
    color: var(--brand-dark);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
    font-weight: 700;
}
.segmented-control.two-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.segmented-control.house-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    background: transparent;
}
.segmented-control.house-mode-cards label {
    display: grid;
    place-items: start;
    align-content: start;
    gap: 3px;
    min-height: 78px;
    padding: 9px 10px;
    border: 1px solid transparent;
    text-align: left;
}
.segmented-control.house-mode-cards label.is-selected {
    border-color: #bfdbfe;
}
.segmented-control.house-mode-cards span {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}
.segmented-control.house-mode-cards small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}
.choice-tabs-field {
    display: grid;
    align-content: start;
    gap: 10px;
}
.choice-tabs-field .segmented-control,
.association-picker .segmented-control,
.executor-mode-control {
    width: 100%;
}
.choice-tabs-field select {
    width: 100%;
}
.task-access-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}
.task-create-card .task-access-form-grid {
    grid-template-columns: 1fr;
}
.task-access-form-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.task-access-form-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.task-access-form-card-head .field-label {
    margin-bottom: 2px;
    color: var(--text);
}
.task-access-form-card-head small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.create-association-grid {
    display: grid;
    gap: 14px;
}
.create-association-section .subhead {
    margin: 0;
}
.create-association-section .chips {
    min-height: 36px;
}
.create-choice-chip {
    cursor: default;
}
.create-choice-chip::after {
    content: "×";
    margin-left: 6px;
    color: var(--muted);
    font-weight: 800;
}
.create-choice-chip::after {
    content: none;
}
.entity-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.entity-choice-grid label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    align-items: start;
    min-height: 52px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.entity-choice-grid label:hover {
    border-color: rgba(37, 99, 235, .34);
    background: #f8fbff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
}
.entity-choice-grid label:focus-within {
    outline: 2px solid rgba(37, 99, 235, .22);
    outline-offset: 1px;
}
.entity-choice-grid label.is-implicit-participant {
    background: #f1f5f9;
}
.entity-choice-grid label.is-implicit-participant input {
    cursor: not-allowed;
}
.entity-choice-grid input {
    width: auto;
    grid-row: span 2;
    margin-top: 2px;
}
.entity-choice-grid span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}
.entity-choice-grid small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.create-checklist {
    display: grid;
    gap: 10px;
}
.create-checklist .checklist {
    min-height: 38px;
}
.create-checklist-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
}
.create-checklist-row .check-button {
    pointer-events: none;
}
.create-checklist-add {
    margin-top: 0;
}
.executor-picker {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.executor-picker.is-compact {
    padding: 10px;
    background: transparent;
}
.executor-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.executor-picker-head .field-label {
    margin-bottom: 0;
}
.executor-mode-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
}
.executor-main-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.executor-organization-field {
    margin: 0;
}
.executor-result-card {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}
.executor-result-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.executor-result-card b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 15px;
}
.executor-result-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px;
}
.executor-edit-toggle {
    align-self: end;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: white;
    color: var(--brand-dark);
    font-weight: 700;
    white-space: nowrap;
}
.executor-edit-toggle:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--brand-dark);
}
.executor-picker.has-missing-executor .executor-result-card {
    border-color: #fed7aa;
    background: #fffbeb;
}
.executor-picker.has-missing-executor [data-executor-summary-user] {
    color: var(--amber);
}
.executor-advanced {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}
.executor-advanced > label {
    margin: 0;
}
.executor-picker.is-compact .executor-main-row {
    grid-template-columns: minmax(0, 1fr) auto;
}
.executor-picker.is-compact .executor-organization-field {
    grid-column: 1 / -1;
    font-size: 0;
}
.executor-picker.is-compact .executor-organization-field select {
    font-size: 14px;
}
.executor-picker.is-compact .executor-result-card {
    align-content: center;
    min-height: 54px;
}
.executor-picker.is-compact .executor-edit-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    justify-self: end;
    min-height: 54px;
}
.executor-picker.is-compact .executor-advanced {
    gap: 8px;
}
.executor-picker.is-compact .executor-mode-control {
    grid-template-columns: 1fr;
}
.executor-picker.is-compact .executor-mode-control label {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}
[data-theme="dark"] .executor-picker,
[data-theme="dark"] .executor-result-card {
    background: #111827;
}
[data-theme="dark"] .executor-edit-toggle {
    border-color: #334155;
    background: #0f172a;
    color: var(--brand-dark);
}
[data-theme="dark"] .executor-edit-toggle:hover {
    border-color: #1d4ed8;
    background: #111827;
}
[data-theme="dark"] .executor-picker.has-missing-executor .executor-result-card {
    border-color: #92400e;
    background: #291a06;
}
[data-theme="dark"] .segmented-control { background: #111827; }
[data-theme="dark"] .segmented-control label { color: var(--muted); }
[data-theme="dark"] .segmented-control label.is-selected { background: #0f172a; color: var(--brand-dark); }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.checkbox-list label { display: flex; align-items: center; gap: 6px; }
.checkbox-list input { width: auto; }
.role-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 100%;
    overflow: visible;
}
.role-option {
    position: relative;
    min-height: 42px;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 24px max-content 16px;
    gap: 7px;
    align-items: center;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--text);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.role-option:hover {
    border-color: rgba(37, 99, 235, .36);
    background: #f8fbff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}
.role-option:focus-within {
    outline: 2px solid rgba(37, 99, 235, .24);
    outline-offset: 2px;
}
.role-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.role-option > span {
    position: relative;
    z-index: 1;
    pointer-events: none;
}
.role-option-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
}
.role-option-main {
    display: block;
    min-width: max-content;
    max-width: 100%;
}
.role-option-name {
    display: block;
    line-height: 1.18;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}
.role-option-main small {
    display: none;
}
.role-option-state {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
}
.role-option-state::after {
    content: "";
    width: 6px;
    height: 4px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg) translateY(-1px);
}
.role-option.is-selected {
    border-color: rgba(37, 99, 235, .52);
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .16);
}
.role-option.is-selected .role-option-icon {
    background: #dbeafe;
    color: #1d4ed8;
}
.role-option.is-selected .role-option-state {
    border-color: var(--brand);
    background: var(--brand);
}
.role-option.is-selected .role-option-state::after {
    border-color: white;
}
[data-theme="dark"] .role-option {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .role-option:hover {
    border-color: rgba(96, 165, 250, .42);
    background: #172033;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .20);
}
[data-theme="dark"] .role-option:focus-within {
    outline-color: rgba(96, 165, 250, .30);
}
[data-theme="dark"] .role-option-icon {
    background: #134e4a;
    color: #99f6e4;
}
[data-theme="dark"] .role-option-state {
    border-color: #475569;
    background: #0f172a;
}
[data-theme="dark"] .role-option.is-selected {
    border-color: #60a5fa;
    background: #172554;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .20);
}
[data-theme="dark"] .role-option.is-selected .role-option-icon {
    background: #1e3a8a;
    color: #bfdbfe;
}
.column-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.column-control-row {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fbfdff;
}
.column-control-row label { display: flex; align-items: center; gap: 7px; min-width: 0; }
.column-control-row input { width: auto; }
.column-control-row.is-required {
    background: #eef6ff;
    border-color: #bfdbfe;
}
.column-control-row.is-required label {
    font-weight: 800;
}
.column-order-actions { display: flex; gap: 4px; }
.icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}
.btn.secondary.icon-btn { background: #f8fafc; color: #475569; }
.icon-btn:hover,
.btn.secondary.icon-btn:hover {
    background: #e8eef7;
    color: var(--brand-dark);
}
.btn.secondary.icon-btn.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .inline-create-panel,
[data-theme="dark"] .column-panel,
[data-theme="dark"] .column-control-row { background: #111827; }
[data-theme="dark"] .column-control-row.is-required {
    background: #172554;
    border-color: #1d4ed8;
}
[data-theme="dark"] .selected-house-chip { background: #0f172a; }
[data-theme="dark"] .selected-house-chip button { background: #1f2937; color: var(--muted); }
[data-theme="dark"] .selected-house-chip button:hover { color: var(--text); }
[data-theme="dark"] .gis-address-option:not(.is-message):hover,
[data-theme="dark"] .gis-address-option:not(.is-message):focus { background: #1f2937; }
[data-theme="dark"] .gis-address-option.is-error { color: #fca5a5; }
[data-theme="dark"] .gis-house-preview {
    border-color: #14532d;
    background: #052e16;
    color: #bbf7d0;
}
[data-theme="dark"] .gis-house-preview.is-error {
    border-color: #7f1d1d;
    background: #450a0a;
    color: #fecaca;
}
[data-theme="dark"] .btn.secondary.icon-btn,
[data-theme="dark"] .icon-btn {
    background: #111827;
    border-color: #334155;
    color: var(--muted);
}
[data-theme="dark"] .btn.secondary.icon-btn:hover,
[data-theme="dark"] .icon-btn:hover {
    background: #1f2937;
    color: var(--text);
}
[data-theme="dark"] .btn.secondary.icon-btn.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #0f172a;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.permissions-grid label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 6px 8px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}
.permissions-grid input { width: auto; margin-top: 2px; }
.permissions-grid small { grid-column: 2; }
.scroll-list {
    max-height: 180px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdff;
}
.inline-edit { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }

.table-tools {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}
.table-tools-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    margin: 0 0 10px;
    background: #fbfdff;
}
[data-theme="dark"] .table-tools-panel { background: #111827; }
.table-wrap {
    overflow-x: hidden;
    max-width: 100%;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}
.table-wrap.has-horizontal-overflow { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 100%; table-layout: fixed; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); background: #f8fafc; }
td { line-height: 1.35; }
tbody tr {
    transition: background-color .16s ease, box-shadow .16s ease;
}
tbody tr:hover {
    background: #eff6ff;
    box-shadow: inset 3px 0 0 var(--brand);
}
[data-theme="dark"] tbody tr:hover { background: #111f33; }
.managed-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    user-select: none;
}
.managed-table th.is-draggable-column { cursor: grab; }
.managed-table th.is-dragging { opacity: .62; }
.managed-table th.is-drop-target { box-shadow: inset 3px 0 0 var(--brand); }
.managed-table.is-resizing-columns,
.managed-table.is-resizing-columns * { cursor: col-resize !important; user-select: none; }
.column-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
    touch-action: none;
}
.column-resize-handle::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 3px;
    width: 2px;
    border-radius: 2px;
    background: transparent;
}
.column-resize-handle:hover::after { background: var(--brand); }
.column-resize-handle.is-disabled { display: none; }
.managed-table th,
.managed-table td { max-width: none; }
.managed-table [data-col="id"] { width: 64px; white-space: nowrap; }
.managed-table [data-col="status"],
.managed-table [data-col="priority"] { width: 130px; }
.managed-table [data-col="due"] { width: 150px; }
.managed-table [data-col="due_days"] { width: 86px; white-space: nowrap; }
.managed-table [data-col="executor"] {
    width: 240px;
    min-width: 210px;
    overflow: visible;
}
#tasks-table [data-col="task"] {
    width: 260px;
    min-width: 220px;
}
#tasks-table [data-col="group"] {
    width: 150px;
    min-width: 120px;
}
#tasks-table [data-col="house"] {
    width: 220px;
    min-width: 160px;
}
#tasks-table [data-col="inspection"],
#tasks-table [data-col="organization"] {
    width: 210px;
    min-width: 160px;
}
#tasks-table [data-col="initiator"],
#tasks-table [data-col="responsible"] {
    width: 180px;
    min-width: 140px;
}
.managed-table [data-col="task"] { overflow-wrap: anywhere; }
.managed-table [data-col="house"],
.managed-table [data-col="group"],
.managed-table [data-col="inspection"],
.managed-table [data-col="organization"] { overflow-wrap: anywhere; }
.managed-table [data-col].is-hidden { display: none; }
.empty { color: var(--muted); text-align: center; padding: 20px; }
.task-table-due-days {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid rgba(37, 99, 235, .12);
    border-radius: 999px;
    background: rgba(37, 99, 235, .045);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
}
.task-table-due-days small {
    color: inherit;
    font-size: 10px;
}
.task-table-due-days.is-empty {
    display: none;
}
.task-table-due-days.due-today {
    border-color: rgba(180, 83, 9, .14);
    background: rgba(245, 158, 11, .07);
    color: #92400e;
}
.task-table-due-days.due-overdue {
    border-color: rgba(180, 35, 24, .14);
    background: rgba(180, 35, 24, .055);
    color: var(--danger);
}
.task-title-cell { max-width: 260px; }
.task-title-cell a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-weight: 700;
}
.task-title-with-preview {
    position: relative;
    display: block;
    max-width: 100%;
    min-width: 0;
    line-height: 1.25;
}
.task-hover-preview {
    position: absolute;
    z-index: 30;
    left: 0;
    top: calc(100% + 8px);
    display: grid;
    gap: 6px;
    width: min(420px, 72vw);
    max-height: 240px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .14s ease 2s, transform .14s ease 2s, visibility 0s linear 2.14s;
}
.task-hover-preview strong {
    font-size: 14px;
    white-space: normal;
}
.task-title-with-preview:hover .task-hover-preview,
.task-title-with-preview:focus-within .task-hover-preview {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2s;
}
.checklist-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.checklist-popover-wrap,
.comments-popover-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}
.checklist-popover-wrap::after,
.comments-popover-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}
.checklist-summary-text { overflow-wrap: anywhere; }
.comments-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.checklist-hover-popover,
.comments-hover-popover {
    position: absolute;
    z-index: 35;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    gap: 8px;
    width: min(360px, 78vw);
    max-height: 300px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .14s ease 2s, transform .14s ease 2s, visibility 0s linear 2.14s;
}
.task-inline-badges .checklist-hover-popover,
.task-inline-badges .comments-hover-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 160px));
}
.checklist-hover-popover strong,
.comments-hover-popover strong {
    font-size: 14px;
}
.checklist-popover-wrap:hover .checklist-hover-popover,
.checklist-popover-wrap:focus-within .checklist-hover-popover,
.checklist-popover-wrap.is-open .checklist-hover-popover,
.comments-popover-wrap:hover .comments-hover-popover,
.comments-popover-wrap:focus-within .comments-hover-popover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 2s;
}
.checklist-popover-wrap.is-open .checklist-hover-popover {
    transition-delay: 0s;
}
.checklist-mini-list {
    display: grid;
    gap: 6px;
}
.checklist-mini-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdff;
}
.checklist-mini-item span,
.checklist-mini-item a {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.35;
}
.checklist-mini-item .done {
    color: var(--muted);
    text-decoration: line-through;
}
.similar-groups {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}
.similar-groups strong {
    color: var(--brand-dark);
}
.similar-group-list {
    display: grid;
    gap: 7px;
}
.similar-group-item {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: white;
    color: var(--text);
    text-align: left;
}
.similar-group-item:hover {
    background: #f8fbff;
    border-color: var(--brand);
}
.similar-group-item span {
    font-weight: 800;
    overflow-wrap: anywhere;
}
.similar-group-item small {
    line-height: 1.35;
}
.mini-empty {
    padding: 10px;
    text-align: left;
}
.comments-mini-list {
    display: grid;
    gap: 8px;
}
.comment-mini-item {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdff;
}
.comment-mini-item b {
    color: var(--text);
    font-size: 13px;
}
.comment-mini-item small {
    color: var(--muted);
    font-size: 11px;
}
.comment-mini-item span {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.inline-status-form { margin: 0; }
.status-select {
    width: auto;
    min-width: 128px;
    max-width: 100%;
    padding: 4px 26px 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.status-select.new { background: #dbeafe; color: #1d4ed8; }
.status-select.in_work { background: #ccfbf1; color: #0f766e; }
.status-select.waiting { background: #fef3c7; color: #92400e; }
.status-select.review { background: #e0e7ff; color: #3730a3; }
.status-select.waiting_rosreestr { background: #ffedd5; color: #9a3412; }
.status-select.done { background: #dcfce7; color: #166534; }
.status-select.rejected { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .task-hover-preview { background: #0f172a; }
[data-theme="dark"] .similar-groups {
    border-color: #1d4ed8;
    background: #0f172a;
}
[data-theme="dark"] .similar-group-item {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .quick-select,
[data-theme="dark"] .quick-date-input { background: #1f2937; color: var(--text); }
[data-theme="dark"] .priority-select.priority-low { background: #082f49; color: #7dd3fc; }
[data-theme="dark"] .priority-select.priority-normal { background: #1f2937; color: #cbd5e1; }
[data-theme="dark"] .priority-select.priority-high,
[data-theme="dark"] .priority-select.priority-critical { background: #450a0a; color: #fecaca; }
[data-theme="dark"] .checklist-count-badge { background: #172554; color: #93c5fd; }
[data-theme="dark"] .comments-count-badge { background: #172554; color: #93c5fd; }
[data-theme="dark"] .checklist-hover-popover,
[data-theme="dark"] .comments-hover-popover,
[data-theme="dark"] .checklist-mini-item,
[data-theme="dark"] .comment-mini-item { background: #0f172a; }
.pill, .status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    margin: 2px;
}
.status.new { background: #dbeafe; color: #1d4ed8; }
.status.in_work { background: #ccfbf1; color: #0f766e; }
.status.waiting { background: #fef3c7; color: #92400e; }
.status.review { background: #e0e7ff; color: #3730a3; }
.status.waiting_rosreestr { background: #ffedd5; color: #9a3412; }
.status.done { background: #dcfce7; color: #166534; }
.status.rejected { background: #fee2e2; color: #991b1b; }
.task-status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.status-choice-button {
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.status-choice-button:hover {
    background: #dbeafe;
    color: var(--brand-dark);
}
.status-choice-button.is-selected {
    border-color: var(--brand);
    background: var(--brand);
    color: white;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .20);
}

.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
dl { display: grid; grid-template-columns: 160px 1fr; gap: 9px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.task-command-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
}
.task-command-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}
.inspection-command-panel {
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, transparent), transparent 48%),
        var(--panel);
}
.inspection-command-main {
    align-items: stretch;
}
.inspection-command-panel .task-command-actions {
    align-content: start;
    justify-content: flex-end;
}
.inspection-command-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.inspection-command-metrics > span {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 74px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .54);
}
.inspection-command-metrics small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.inspection-command-metrics b {
    color: var(--text);
    font-size: 22px;
    line-height: 1;
}
.inspection-status-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
.inspection-edit-panel {
    align-self: start;
}
.inspection-edit-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
}
.inspection-edit-form .task-form-section.task-create-card {
    align-content: start;
}
.inspection-edit-association {
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-soft) 52%, var(--panel));
}
.inspection-edit-association .chips {
    min-height: 38px;
}
.task-title-stack {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.task-title-stack h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.task-title-stack p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.task-kicker-row,
.task-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.task-command-actions form {
    margin: 0;
}
.task-deleted-alert {
    margin-bottom: 14px;
}
.task-deleted-alert small {
    display: block;
    margin-top: 4px;
}
.task-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.task-quick-tile {
    display: grid;
    gap: 8px;
    min-height: 84px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.task-quick-tile span {
    color: var(--muted);
    font-size: 13px;
}
.task-due-tile {
    align-content: stretch;
}
.task-due-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 1fr);
    gap: 10px;
    align-items: stretch;
    min-height: 60px;
}
.task-due-date-column {
    display: grid;
    align-content: center;
    gap: 8px;
    min-width: 0;
}
.task-due-row .inline-task-field-form {
    min-width: 0;
}
.task-due-date-static {
    min-width: 0;
    overflow-wrap: anywhere;
}
.task-due-summary {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-height: 60px;
    padding: 4px 6px;
    border-left: 1px solid var(--line);
    text-align: center;
    white-space: nowrap;
}
.task-due-summary b {
    color: var(--brand-dark);
    font-size: 30px;
    line-height: .9;
}
.task-due-summary small {
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
}
.task-due-summary.due-none {
    border-left-color: transparent;
}
.task-due-summary.due-none b {
    color: var(--muted);
    font-size: 26px;
}
.task-due-summary.due-today b,
.task-due-summary.due-today small {
    color: var(--amber);
}
.task-due-summary.due-overdue b,
.task-due-summary.due-overdue small {
    color: var(--danger);
}
.task-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.task-detail-layout > .panel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
}
.task-detail-layout > .panel > h2,
.task-access-summary-panel > h2 {
    margin: 0;
}
.task-detail-layout dl {
    gap: 12px 16px;
}
.task-parent-context-card {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    color: var(--text);
    text-decoration: none;
}
.task-parent-context-card:hover {
    border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--panel));
    text-decoration: none;
}
.task-parent-context-card span {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.task-parent-context-card strong,
.task-parent-context-card em {
    overflow-wrap: anywhere;
}
.task-parent-context-card strong {
    font-size: 15px;
}
.task-parent-context-card small,
.task-parent-context-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}
.task-control-panel .task-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.task-executor-tile {
    grid-column: 1 / -1;
}
.task-executor-card-form {
    display: grid;
    gap: 10px;
}
.task-executor-card-form .executor-picker {
    border-color: transparent;
    padding: 0;
}
.task-create-executor-field .executor-picker {
    border-color: transparent;
    padding: 0;
    background: transparent;
}
.task-list-executor-form {
    width: 100%;
    min-width: 210px;
    gap: 0;
    position: relative;
}
.task-list-executor-menu {
    position: relative;
}
.task-list-executor-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    cursor: pointer;
    list-style: none;
}
.task-list-executor-trigger::-webkit-details-marker {
    display: none;
}
.task-list-executor-trigger:hover {
    border-color: rgba(14, 165, 163, .45);
}
.task-list-executor-caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .16s ease, border-color .16s ease;
}
.task-list-executor-menu[open] .task-list-executor-caret {
    border-color: var(--brand-dark);
    transform: translateY(2px) rotate(225deg);
}
.task-list-executor-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    width: min(360px, calc(100vw - 32px));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.task-list-executor-form .executor-picker {
    border-color: transparent;
    padding: 0;
    background: transparent;
}
.task-list-executor-form .executor-picker.is-compact .executor-main-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}
.task-list-executor-form .executor-picker.is-compact .executor-organization-field select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}
.task-list-executor-form .executor-picker.is-compact .executor-result-card {
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 7px;
}
.task-list-executor-form .executor-picker.is-compact .executor-result-card b {
    font-size: 13px;
}
.task-list-executor-form .executor-picker.is-compact .executor-result-card span {
    font-size: 11px;
}
.task-list-executor-form .executor-picker.is-compact .executor-edit-toggle {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 12px;
}
.task-list-executor-form .executor-picker.is-compact .executor-advanced {
    gap: 6px;
}
.task-list-executor-form .executor-card-actions {
    justify-content: flex-start;
}
.task-list-executor-form .executor-card-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
}
.executor-card-actions {
    display: flex;
    justify-content: flex-end;
}
.executor-card-actions .btn {
    width: auto;
}
.task-quick-tile .executor-mode-badge {
    color: var(--brand-dark);
}
.task-quick-tile .executor-result-card small,
.task-quick-tile .executor-result-card b,
.task-quick-tile .executor-result-card span {
    color: inherit;
}
.task-quick-tile .executor-result-card small,
.task-quick-tile .executor-result-card span {
    color: var(--muted);
}
.task-work-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    margin-bottom: 16px;
}
.task-work-grid > .panel {
    margin-bottom: 0;
}
.inspection-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: 16px;
    align-items: start;
}
.inspection-context-column {
    display: grid;
    gap: 16px;
}
.inspection-context-panel {
    margin-bottom: 0;
}
.task-work-panel,
.task-access-summary-panel {
    height: 100%;
}
.task-access-summary-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
}
.task-access-summary-panel > .association-section {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.task-access-summary-panel > .association-section + .association-section {
    margin-top: 0;
}
.task-access-summary-panel .chips {
    row-gap: 8px;
}
.inspection-access-panel {
    align-self: start;
}
.inspection-tasks-panel {
    margin-top: 18px;
}
.association-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.association-section-head > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.association-section-head strong {
    color: var(--text);
    line-height: 1.2;
}
.association-section-head small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}
@media (max-width: 900px) {
    .status-directory-create-form,
    .status-directory-create-form.has-color,
    .inspection-command-metrics,
    .inspection-main-grid,
    .inspection-edit-grid,
    .inspection-detail-grid {
        grid-template-columns: 1fr;
    }
}
.subhead {
    margin: 16px 0 10px;
    font-size: 15px;
}
.association-section {
    display: grid;
    gap: 10px;
}
.association-section + .association-section {
    margin-top: 16px;
}
.association-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.association-head .subhead {
    margin: 0;
}
.association-title-with-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
}
.association-info-button {
    position: relative !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent) !important;
    border-radius: 50% !important;
    background: color-mix(in srgb, var(--brand) 10%, var(--panel)) !important;
    color: color-mix(in srgb, var(--brand-dark) 82%, var(--muted)) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: help;
    opacity: .84;
    overflow: visible !important;
    transform: none !important;
}
.association-info-button::before,
.association-info-button::after {
    position: absolute;
    left: 0;
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.association-info-button::before {
    content: "";
    top: calc(100% + 3px);
    width: 9px;
    height: 9px;
    margin-left: 4px;
    border-left: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    background: var(--panel);
    transform: translateY(-2px) rotate(45deg);
}
.association-info-button::after {
    content: attr(data-tooltip);
    top: calc(100% + 8px);
    width: max-content;
    max-width: min(330px, calc(100vw - 44px));
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    transform: translateY(-3px);
}
.association-info-button:hover,
.association-info-button:focus,
.association-info-button:focus-visible {
    border-color: color-mix(in srgb, var(--brand) 48%, transparent) !important;
    background: color-mix(in srgb, var(--brand) 14%, var(--panel)) !important;
    color: var(--brand-dark) !important;
    opacity: 1;
    transform: none !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent) !important;
}
.association-info-button:hover::before,
.association-info-button:hover::after,
.association-info-button:focus::before,
.association-info-button:focus::after,
.association-info-button:focus-visible::before,
.association-info-button:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.association-info-button:hover::before,
.association-info-button:focus::before,
.association-info-button:focus-visible::before {
    transform: translateY(0) rotate(45deg);
}
.round-add-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.association-picker {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.association-picker-panel {
    display: grid;
    gap: 10px;
}
.association-picker-list {
    display: grid;
    gap: 7px;
    max-height: 260px;
    overflow: auto;
    padding-right: 2px;
}
.association-picker-list label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    align-items: start;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}
.association-picker-list label.is-implicit-participant,
.participant-choice-grid label.is-implicit-participant {
    background: #f1f5f9;
}
.association-picker-list label.is-implicit-participant input,
.participant-choice-grid label.is-implicit-participant input {
    cursor: not-allowed;
}
.association-picker-list input {
    width: auto;
    grid-row: span 2;
    margin-top: 2px;
}
.association-picker-list span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}
.association-picker-list small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.association-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.access-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.access-chip-grid label {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.access-chip-grid input {
    width: auto;
}
.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.participant-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.participant-choice-grid label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    align-items: start;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}
.participant-choice-grid input { width: auto; grid-row: span 2; margin-top: 2px; }
.participant-choice-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    margin-top: 10px;
}
.participant-add-form button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}
.task-checklist-meter {
    width: min(240px, 100%);
}
.compact-checklist {
    grid-template-columns: 1fr;
}
.premium-comments .comment {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.task-comments-panel {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    row-gap: 12px;
}
.comment-thread-panel.is-fullscreen {
    position: fixed;
    inset: 18px;
    z-index: 120;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .34);
}
.has-comment-fullscreen {
    overflow: hidden;
}
.comment-thread-panel.is-fullscreen .comments {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding-right: 18px;
}
.task-comments-panel .comments {
    position: relative;
    align-content: start;
    min-height: clamp(320px, 44vh, 520px);
    max-height: clamp(280px, 52vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 14px 18px 18px 14px;
    scroll-padding: 14px 18px 18px 14px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .78), rgba(255, 255, 255, .92));
}
.task-comments-panel .comments::-webkit-scrollbar {
    width: 10px;
}
.task-comments-panel .comments::-webkit-scrollbar-thumb {
    border: 2px solid var(--scrollbar-track);
    border-radius: 999px;
    background: var(--scrollbar-thumb);
}
.task-comments-panel .comments::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--scrollbar-track);
}
.comment-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--brand-dark);
    font-weight: 800;
    text-transform: uppercase;
}
.comment-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-body {
    min-width: 0;
    position: relative;
    padding: 11px 12px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
}
.comment.is-system .comment-avatar {
    border: 1px solid rgba(20, 184, 166, .28);
    background: #ccfbf1;
    color: #0f766e;
}
.comment.is-system .comment-body {
    border-color: rgba(20, 184, 166, .34);
    background: linear-gradient(180deg, #f0fdfa, #fbfeff);
}
.comment.is-system .comment-meta strong {
    color: #0f766e;
}
.premium-comments .comment.is-reply-target .comment-body {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10), 0 10px 26px rgba(15, 23, 42, .08);
}
.premium-comments .comment.is-jump-highlight .comment-body {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, .13), 0 10px 26px rgba(180, 83, 9, .12);
}
.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}
.comment-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
}
.comment-meta strong,
.comment-meta a {
    display: inline-flex;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comment-meta small {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    margin: 0;
}
.comment-body > p {
    margin: 7px 0 0;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.comment-menu {
    position: static;
}
.comment-menu-trigger {
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 17px;
    font-weight: 800;
    line-height: 24px;
    opacity: .34;
    text-align: center;
    transition: opacity .16s ease, background .16s ease, color .16s ease;
}
.comment:hover .comment-menu-trigger,
.comment:focus-within .comment-menu-trigger,
.comment-menu-trigger[aria-expanded="true"] {
    opacity: 1;
}
.comment-menu-trigger:hover,
.comment-menu-trigger[aria-expanded="true"] {
    background: rgba(15, 23, 42, .08);
    color: var(--text);
}
.comment-menu-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 140;
    display: grid;
    gap: 2px;
    width: max-content;
    min-width: 184px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
}
.comment-menu-popover form {
    margin: 0;
}
.comment-menu-popover button {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}
.comment-menu-popover button:hover {
    background: #eff6ff;
    color: var(--brand-dark);
}
.comment-menu-popover button.danger {
    color: var(--danger);
}
.comment-menu-popover button.danger:hover {
    background: #fee2e2;
    color: #991b1b;
}
.comment-reply-context {
    display: grid;
    width: 100%;
    text-align: left;
    margin-top: 8px;
    padding: 7px 9px;
    border-left: 3px solid var(--brand);
    border-radius: 6px;
    background: #eef6ff;
    color: var(--muted);
    font-size: 13px;
}
.comment-reply-context:hover {
    background: #dbeafe;
    text-decoration: none;
}
.comment-reply-context span {
    color: var(--brand-dark);
    font-weight: 700;
}
.comment-reply-context small {
    margin-top: 3px;
    display: block;
    overflow-wrap: anywhere;
}
.comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.comment-actions form {
    margin: 0;
}
.comment-action-button {
    padding: 0;
    background: transparent;
    color: var(--brand-dark);
    font-size: 13px;
}
.comment-action-button:hover { background: transparent; text-decoration: underline; }
.comment-action-button.danger {
    color: var(--danger);
}
.comment-reply-preview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--brand-dark);
    cursor: pointer;
}
.comment-reply-preview:hover {
    background: #dbeafe;
}
.comment-reply-preview span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.comment-reply-preview b,
.comment-reply-preview small {
    display: block;
}
.comment-reply-preview small {
    margin-top: 2px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-reply-preview button {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
}
.comments-view-modern .comment {
    width: 90%;
    max-width: none;
    justify-self: start;
}
.comments-view-modern .comment.is-own {
    justify-self: end;
    background: transparent;
    grid-template-columns: minmax(0, 1fr) 40px;
}
.comments-view-modern .comment.is-own .comment-body {
    border-color: #bfdbfe;
    background: #f0f9ff;
}
.comments-view-modern .comment.is-own .comment-avatar,
.comments-view-modern .comment.is-own .comment-avatar-img {
    grid-column: 2;
    grid-row: 1;
}
.comments-view-modern .comment.is-own .comment-body {
    grid-column: 1;
    grid-row: 1;
}
.premium-comment-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -16px -16px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .05);
}
.premium-comment-form textarea {
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    resize: none;
    overflow-y: auto;
}
.comment-thread-panel.is-fullscreen .premium-comment-form {
    position: static;
    margin: 0 -18px -18px;
}
[data-theme="dark"] .task-quick-tile,
[data-theme="dark"] .task-form-section.task-create-card,
[data-theme="dark"] .task-form-section.is-primary,
[data-theme="dark"] .task-access-form-card,
[data-theme="dark"] .entity-choice-grid,
[data-theme="dark"] .entity-choice-grid label,
[data-theme="dark"] .access-chip-grid label,
[data-theme="dark"] .association-picker,
[data-theme="dark"] .association-picker-list label,
[data-theme="dark"] .participant-choice-grid,
[data-theme="dark"] .participant-choice-grid label {
    background: #111827;
}
[data-theme="dark"] .task-access-summary-panel > .association-section {
    border-color: color-mix(in srgb, var(--line) 88%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 60%, var(--panel)), var(--panel));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
[data-theme="dark"] .task-parent-context-card {
    border-color: rgba(96, 165, 250, .35);
    border-left-color: #60a5fa;
    background: color-mix(in srgb, #60a5fa 9%, #111827);
}
[data-theme="dark"] .task-parent-context-card:hover {
    border-color: rgba(96, 165, 250, .55);
    background: color-mix(in srgb, #60a5fa 13%, #111827);
}
[data-theme="dark"] .task-parent-context-card span {
    color: #93c5fd;
}
[data-theme="dark"] .task-access-summary-panel > .association-section .subhead {
    color: var(--text);
}
[data-theme="dark"] .association-info-button {
    border-color: rgba(96, 165, 250, .28) !important;
    background: color-mix(in srgb, #60a5fa 10%, #111827) !important;
    color: #93c5fd !important;
}
[data-theme="dark"] .association-info-button::before {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .association-info-button::after {
    border-color: #334155;
    background: #111827;
    color: var(--text);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .36);
}
[data-theme="dark"] .association-info-button:hover,
[data-theme="dark"] .association-info-button:focus,
[data-theme="dark"] .association-info-button:focus-visible {
    border-color: rgba(147, 197, 253, .52) !important;
    background: color-mix(in srgb, #60a5fa 16%, #111827) !important;
    color: #bfdbfe !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .13) !important;
}
[data-theme="dark"] .task-access-summary-panel > .association-section .empty {
    border-color: color-mix(in srgb, var(--line) 78%, transparent);
    background: #111827;
    color: var(--muted);
}
[data-theme="dark"] .entity-choice-grid label:hover {
    border-color: #1d4ed8;
    background: #0f172a;
}
[data-theme="dark"] .entity-choice-grid label.is-implicit-participant {
    background: #1f2937;
}
[data-theme="dark"] .comment-avatar {
    background: #172554;
    color: #93c5fd;
}
[data-theme="dark"] .comment.is-system .comment-avatar {
    border-color: rgba(45, 212, 191, .26);
    background: rgba(20, 184, 166, .16);
    color: #5eead4;
}
[data-theme="dark"] .comment.is-system .comment-body {
    border-color: rgba(45, 212, 191, .28);
    background: linear-gradient(180deg, rgba(20, 184, 166, .08), #111827);
}
[data-theme="dark"] .comment.is-system .comment-meta strong {
    color: #5eead4;
}
[data-theme="dark"] .task-comments-panel .comments {
    border-color: color-mix(in srgb, var(--line) 84%, transparent);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .58), rgba(17, 24, 39, .88));
}
[data-theme="dark"] .comment-reply-context,
[data-theme="dark"] .comment-reply-preview,
[data-theme="dark"] .comments-view-modern .comment.is-own .comment-body {
    background: #0f1f35;
}
[data-theme="dark"] .comment-reply-preview:hover {
    background: rgba(96, 165, 250, .16);
}
[data-theme="dark"] .comment-body {
    background: #111827;
}
[data-theme="dark"] .comment-menu-popover {
    background: #182235;
}
[data-theme="dark"] .comment-menu-trigger:hover,
[data-theme="dark"] .comment-menu-trigger[aria-expanded="true"],
[data-theme="dark"] .comment-reply-preview button:hover {
    background: rgba(255, 255, 255, .09);
    color: #ffffff;
}
[data-theme="dark"] .comment-menu-popover button:hover {
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
}
[data-theme="dark"] .comment-menu-popover button.danger:hover {
    background: rgba(248, 113, 113, .16);
    color: #fecaca;
}
[data-theme="dark"] .sparkline-chart,
[data-theme="dark"] .settings-action-strip,
[data-theme="dark"] .settings-action-card,
[data-theme="dark"] .org-requisite-main,
[data-theme="dark"] .org-requisite-pair,
[data-theme="dark"] .org-contact-strip,
[data-theme="dark"] .org-address-line,
[data-theme="dark"] .profile-hero-metrics span {
    background: #111827;
}
[data-theme="dark"] .rank-row i {
    background: linear-gradient(90deg, #2dd4bf var(--rank-value), #1f2937 0);
}
[data-theme="dark"] .management-responsibility-note {
    border-color: #1d4ed8;
    background: #0f1f35;
    color: #bfdbfe;
}
[data-theme="dark"] .premium-profile-hero {
    background:
        linear-gradient(90deg, rgba(96, 165, 250, .14), transparent 54%),
        #182235;
}
[data-theme="dark"] .profile-avatar {
    border-color: #3f4f64;
    background: #0f1f35;
    color: #bfdbfe;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .24);
}
[data-theme="dark"] .profile-identity h2 {
    color: #f8fafc;
}
[data-theme="dark"] .profile-contact-panel dd,
[data-theme="dark"] .profile-chat-card,
[data-theme="dark"] .legacy-message-list article,
[data-theme="dark"] .profile-upload-card,
[data-theme="dark"] .profile-edit-section,
[data-theme="dark"] .profile-status-card,
[data-theme="dark"] .user-card-contact-grid span,
[data-theme="dark"] .org-employee-add-panel,
[data-theme="dark"] .org-employee-contact-row span,
[data-theme="dark"] .org-employee-copy-field,
[data-theme="dark"] .profile-active-toggle {
    background: #111827;
}
[data-theme="dark"] .profile-chat-card,
[data-theme="dark"] .legacy-message-list article,
[data-theme="dark"] .profile-upload-card,
[data-theme="dark"] .profile-contact-panel dd,
[data-theme="dark"] .profile-edit-section,
[data-theme="dark"] .profile-status-card,
[data-theme="dark"] .user-card-contact-grid span,
[data-theme="dark"] .org-employee-add-panel,
[data-theme="dark"] .org-employee-contact-row span,
[data-theme="dark"] .org-employee-copy-field,
[data-theme="dark"] .profile-active-toggle {
    border-color: #334155;
}
[data-theme="dark"] .org-employee-total {
    border-color: rgba(125, 211, 252, .18);
    background: linear-gradient(135deg, rgba(12, 74, 110, .30), rgba(15, 23, 42, .36));
    color: #bae6fd;
}
[data-theme="dark"] .org-license-total {
    border-color: rgba(134, 239, 172, .18);
    background: linear-gradient(135deg, rgba(20, 83, 45, .30), rgba(15, 23, 42, .36));
    color: #bbf7d0;
}
[data-theme="dark"] .org-employee-total small {
    color: #94a3b8;
}
[data-theme="dark"] .org-license-total small {
    color: #94a3b8;
}
[data-theme="dark"] .org-employee-card {
    border-color: rgba(56, 189, 248, .16);
}
[data-theme="dark"] .org-license-search-panel,
[data-theme="dark"] .org-license-card,
[data-theme="dark"] .org-license-result,
[data-theme="dark"] .org-license-meta-grid span {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .org-license-message.is-success {
    border-color: rgba(134, 239, 172, .24);
    background: rgba(20, 83, 45, .28);
    color: #bbf7d0;
}
[data-theme="dark"] .org-license-message.is-error {
    border-color: rgba(248, 113, 113, .24);
    background: rgba(127, 29, 29, .24);
    color: #fecaca;
}
[data-theme="dark"] .org-license-message.is-warning {
    border-color: rgba(251, 191, 36, .24);
    background: rgba(120, 53, 15, .24);
    color: #fde68a;
}
[data-theme="dark"] .org-license-card.is-active,
[data-theme="dark"] .org-license-result.is-active {
    border-color: rgba(134, 239, 172, .24);
}
[data-theme="dark"] .org-license-house-count {
    background: rgba(14, 116, 144, .22);
    color: #a5f3fc;
}
[data-theme="dark"] .org-license-contact-line button {
    background: #1f2937;
    color: #e5edf6;
}
[data-theme="dark"] .org-license-houses-summary {
    border-color: rgba(96, 165, 250, .22);
    background: linear-gradient(135deg, rgba(30, 64, 175, .24), rgba(15, 23, 42, .58));
}
[data-theme="dark"] .org-license-houses-icon,
[data-theme="dark"] .org-license-house-date {
    background: rgba(37, 99, 235, .18);
    color: #bfdbfe;
}
[data-theme="dark"] .org-license-house-date.is-excluded {
    background: rgba(244, 63, 94, .16);
    color: #fecdd3;
}
[data-theme="dark"] .org-license-houses-total b {
    background: rgba(37, 99, 235, .16);
    color: #bfdbfe;
}
[data-theme="dark"] .org-license-house-summary span,
[data-theme="dark"] .org-license-house-item {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .org-license-import-progress,
[data-theme="dark"] .org-license-import-log li {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .org-license-import-bar {
    background: rgba(37, 99, 235, .22);
}
[data-theme="dark"] .org-license-import-bar span {
    background: #60a5fa;
}
[data-theme="dark"] .org-license-import-log li[data-state="success"] {
    border-color: rgba(134, 239, 172, .22);
    color: #86efac;
}
[data-theme="dark"] .org-license-import-log li[data-state="warning"] {
    border-color: rgba(251, 191, 36, .22);
    color: #fde68a;
}
[data-theme="dark"] .org-license-import-log li[data-state="error"] {
    border-color: rgba(248, 113, 113, .22);
    color: #fecaca;
}
[data-theme="dark"] .org-license-house-item.is-importing {
    border-color: rgba(96, 165, 250, .38);
    background: rgba(30, 64, 175, .18);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .10);
}
[data-theme="dark"] .org-employee-position {
    border-color: rgba(125, 211, 252, .20);
    background: rgba(12, 74, 110, .34);
    color: #bae6fd;
}
[data-theme="dark"] .org-employee-contact-row b {
    color: #e5edf6;
}
[data-theme="dark"] .org-employee-copy-field:hover {
    border-color: rgba(125, 211, 252, .22);
    background: rgba(12, 74, 110, .26);
}
[data-theme="dark"] .org-employee-directory-link {
    color: #7dd3fc;
}
[data-theme="dark"] .org-employee-directory-link:hover {
    color: #bae6fd;
}
[data-theme="dark"] .profile-admin-form .user-affiliations-editor,
[data-theme="dark"] .profile-access-choice {
    border-color: #334155;
    background: #111827;
}
[data-theme="dark"] .profile-status-toggle {
    background: #475569;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .22);
}
[data-theme="dark"] .profile-status-copy strong {
    color: #e5edf6;
}
[data-theme="dark"] .profile-editor-panel,
[data-theme="dark"] .profile-admin-panel,
[data-theme="dark"] .profile-password-panel,
[data-theme="dark"] .profile-messenger-panel,
[data-theme="dark"] .profile-chat-panel,
[data-theme="dark"] .profile-contact-panel {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}
.house-command-panel {
    padding: 0;
    overflow: hidden;
}
.house-command-head {
    margin: 0;
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    background: #fbfdff;
}
.house-command-head p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.house-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: 16px;
    padding: 20px 18px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .08), transparent 48%),
        var(--panel);
}
.house-identity {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
}
.house-identity span {
    width: fit-content;
    padding: 4px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
}
.house-identity strong {
    font-size: 30px;
    line-height: 1.14;
    overflow-wrap: anywhere;
}
.house-identity small {
    font-size: 14px;
    line-height: 1.4;
}
.house-management-line {
    color: var(--text);
    font-size: 16px !important;
    font-weight: 700;
}
.house-location-line {
    color: var(--muted);
}
.house-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.house-metrics div {
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}
.house-metrics span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}
.house-metrics b {
    display: block;
    color: var(--brand-dark);
    font-size: 26px;
    line-height: 1.05;
    overflow-wrap: anywhere;
}
.house-detail-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
}
.house-data-panel {
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}
.house-data-list {
    grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
}
.house-data-list dd {
    overflow-wrap: anywhere;
}
.house-data-list.compact {
    margin-top: 16px;
}
.house-passport-panel {
    display: grid;
    gap: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}
.house-passport-head {
    margin-bottom: 0;
}
.house-passport-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.house-passport-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.house-passport-summary-item {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.house-passport-summary-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.house-passport-summary-item b {
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.house-passport-summary-item.accent-registry b {
    font-size: 16px;
}
.house-passport-sections,
.house-passport-mini {
    display: grid;
    gap: 12px;
}
.house-passport-section {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.house-passport-section h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}
.house-passport-section h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), #38bdf8);
}
.house-passport-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.house-passport-list div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 7px;
    background: #f8fafc;
}
.house-passport-list div.is-wide {
    grid-column: 1 / -1;
}
.house-passport-list dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.house-passport-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.house-passport-list dd.is-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 700;
}
.house-passport-list dd.is-empty {
    color: var(--muted);
    font-weight: 600;
}
.house-passport-sync-panel {
    display: grid;
    gap: 10px;
    border-color: rgba(37, 99, 235, .18);
}
.house-passport-sync-main,
.house-passport-sync-meta,
.house-passport-category-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.house-passport-sync-main h2,
.house-passport-category-head h3 {
    margin: 0;
}
.house-passport-sync-main p,
.house-passport-category-head small {
    margin: 4px 0 0;
    color: var(--muted);
}
.house-passport-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}
.house-passport-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition: width .2s ease;
}
.house-passport-sync-meta {
    justify-content: flex-start;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.house-passport-sync-meta span:last-child {
    color: #b91c1c;
}
.house-passport-category {
    display: grid;
    gap: 12px;
}
.house-passport-category-head {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.house-passport-tree-list div.is-group {
    padding: 13px 14px;
    border: 1px solid rgba(37, 99, 235, .18);
    background: linear-gradient(90deg, #eff6ff, #f8fafc);
}
.house-passport-tree-list div.is-group dt {
    color: #1d4ed8;
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.3;
}
.house-passport-group-value {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.house-passport-group-value > span:not(.meter-due-badge) {
    min-width: 0;
    font-size: 17px;
    line-height: 1.25;
}
.meter-due-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid rgba(14, 165, 163, .22);
    border-radius: 999px;
    background: linear-gradient(180deg, #ecfeff 0%, #dbeafe 100%);
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}
.house-passport-compact-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.house-passport-compact-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 14px;
}
.house-passport-compact-table th,
.house-passport-compact-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.house-passport-compact-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    background: #f8fafc;
}
.house-passport-compact-table tr:last-child td {
    border-bottom: 0;
}
.house-passport-tree-list div.level-3:not(.is-wide) {
    margin-left: 8px;
}
.house-passport-tree-list div.level-4:not(.is-wide),
.house-passport-tree-list div.level-5:not(.is-wide) {
    margin-left: 16px;
}
.house-side-panel {
    align-self: start;
}
.house-source-note {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
}
.house-source-note strong {
    display: block;
    margin-bottom: 5px;
}
.house-source-note p {
    margin: 0;
    color: #1d4ed8;
    line-height: 1.45;
}
.house-work-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.house-workspace {
    padding: 18px;
}
.house-workspace-shell {
    display: grid;
    gap: 12px;
}
.house-section-tabs-panel {
    padding: 12px;
}
.house-workspace .section-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.house-section-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f6;
}
.house-section-tab {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font-weight: 700;
    text-align: center;
}
.house-section-tab:hover {
    background: rgba(255, 255, 255, .7);
    color: #334155;
}
.house-section-tab.is-selected {
    background: var(--panel);
    color: var(--brand-dark);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}
.house-section-panel {
    display: none;
}
.house-section-panel.is-active {
    display: block;
}
.house-placeholder {
    display: grid;
    gap: 8px;
    min-height: 220px;
    align-content: center;
    padding: 24px;
    border: 1px dashed #b8c4d2;
    border-radius: 8px;
    background: #fbfdff;
    text-align: center;
}
.house-placeholder strong {
    font-size: 20px;
}
.house-placeholder p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.5;
}
.house-task-empty.is-hidden {
    display: none;
}
.timeline-list {
    display: grid;
    gap: 10px;
}
.timeline-item {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: #fbfdff;
}
.timeline-item span {
    color: var(--muted);
    font-size: 13px;
}
.timeline-item p {
    margin: 0;
    line-height: 1.45;
}
.timeline-main-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.soft-badge.is-current {
    background: #dcfce7;
    color: #166534;
}
.management-responsibility-note {
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    line-height: 1.4;
}
.inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.compact-checkbox {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.compact-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}
.org-house-passport-sync-status {
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 750;
}
.org-house-passport-sync-status[data-state="success"] {
    border-color: rgba(22, 163, 74, .22);
    background: #f0fdf4;
    color: #166534;
}
.org-house-passport-sync-status[data-state="error"] {
    border-color: rgba(220, 38, 38, .22);
    background: #fef2f2;
    color: #b91c1c;
}
.org-house-passport-sync-status[data-state="loading"] {
    border-color: rgba(37, 99, 235, .18);
    background: #eff6ff;
    color: #1d4ed8;
}
.org-house-select-line {
    margin-top: 4px;
}
[data-theme="dark"] .house-command-head,
[data-theme="dark"] .house-placeholder,
[data-theme="dark"] .timeline-item {
    background: #111827;
}
[data-theme="dark"] .house-hero {
    background:
        linear-gradient(90deg, rgba(96, 165, 250, .10), transparent 48%),
        var(--panel);
}
[data-theme="dark"] .house-identity span {
    border-color: #1d4ed8;
    background: #0f172a;
}
[data-theme="dark"] .house-metrics div {
    background: #111827;
}
[data-theme="dark"] .house-passport-summary-item,
[data-theme="dark"] .house-passport-section,
[data-theme="dark"] .house-passport-list div {
    background: #111827;
}
[data-theme="dark"] .house-passport-category-head,
[data-theme="dark"] .house-passport-sync-panel {
    background: #111827;
}
[data-theme="dark"] .house-passport-tree-list div.is-group,
[data-theme="dark"] .org-house-passport-sync-status {
    background: rgba(37, 99, 235, .12);
}
[data-theme="dark"] .house-passport-tree-list div.is-group dt {
    color: #93c5fd;
}
[data-theme="dark"] .meter-due-badge {
    border-color: rgba(45, 212, 191, .26);
    background: linear-gradient(180deg, rgba(20, 184, 166, .16), rgba(37, 99, 235, .14));
    color: #ccfbf1;
    box-shadow: none;
}
[data-theme="dark"] .house-passport-compact-table-wrap {
    border-color: var(--line);
}
[data-theme="dark"] .house-passport-compact-table th {
    background: #111827;
    color: var(--muted);
}
[data-theme="dark"] .house-passport-compact-table td {
    color: var(--text);
}
[data-theme="dark"] .house-source-note {
    border-color: #1d4ed8;
    background: #0f172a;
    color: #bfdbfe;
}
[data-theme="dark"] .house-source-note p {
    color: #bfdbfe;
}
[data-theme="dark"] .house-section-tabs {
    background: #111827;
}
[data-theme="dark"] .house-section-tab {
    color: var(--muted);
}
[data-theme="dark"] .house-section-tab:hover {
    background: #1f2937;
    color: var(--text);
}
[data-theme="dark"] .house-section-tab.is-selected {
    background: #0f172a;
    color: var(--brand-dark);
}
.text-block { white-space: pre-wrap; line-height: 1.5; }
.checklist { display: grid; gap: 8px; }
.checklist label { display: flex; gap: 8px; align-items: center; }
.checklist input { width: auto; }
.checklist-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdff;
}
.icon-danger {
    background: transparent;
    color: var(--danger);
    padding: 0;
    font-size: 13px;
}
.icon-danger:hover { background: transparent; color: var(--danger); text-decoration: underline; }
.icon-action {
    background: transparent;
    color: var(--brand);
    padding: 0;
    font-size: 13px;
}
.icon-action:hover { background: transparent; color: var(--brand-dark); text-decoration: underline; }
.check-button {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: white;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.check-button.checked { background: var(--brand); border-color: var(--brand); }
.checklist-row .done { color: var(--muted); text-decoration: line-through; }
[data-theme="dark"] .checklist-row { background: #111827; }
[data-theme="dark"] .check-button { background: #0f172a; color: #0f172a; }
[data-theme="dark"] .check-button.checked { background: var(--brand); color: #071512; }
.comments { display: grid; gap: 10px; margin-bottom: 12px; }
.comment {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfdff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .03);
}
.comment.is-new {
    border-color: var(--brand);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .10);
}
.comment strong { display: block; }
.comment small { display: block; margin-top: 2px; }
.comment p {
    white-space: pre-wrap;
    margin: 9px 0 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.comment-form { display: grid; gap: 10px; }
.comment-form button {
    width: auto;
    justify-self: end;
}
.compact-comments .comment p {
    max-height: 42px;
    overflow: hidden;
}

.settings-form {
    align-items: start;
}
.settings-page {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.settings-page > .panel {
    min-width: 0;
}
.settings-workspace {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.settings-tabs {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.settings-tab-panel,
.settings-tab-extra {
    display: none;
}
.settings-tab-panel.is-active,
.settings-tab-extra.is-active {
    display: block;
}
.settings-tab-extra.is-active[data-directory-panel] {
    display: none;
}
.settings-tab-extra.is-active[data-directory-panel].is-directory-active {
    display: block;
}
.settings-directory-nav-panel .section-head {
    margin-bottom: 0;
}
.settings-directory-subtabs {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.settings-placeholder {
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.settings-placeholder p {
    margin: 6px 0 0;
    color: var(--muted);
}
.settings-notification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.settings-history-link {
    color: var(--text);
}
.settings-history-link:hover {
    border-color: #bfdbfe;
    text-decoration: none;
}
.settings-placeholder button {
    margin-top: 12px;
}
.settings-debug-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}
.settings-state-pill {
    display: inline-grid;
    place-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--panel);
    font-size: 13px;
    white-space: nowrap;
}
.settings-state-pill.is-on {
    border-color: rgba(22, 163, 74, .28);
    color: #166534;
    background: #dcfce7;
}
.dev-log-page {
    display: grid;
    gap: 14px;
}
.dev-log-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border-left: 4px solid var(--brand);
}
.dev-log-hero-main h2 {
    margin: 10px 0 8px;
    font-size: 28px;
}
.dev-log-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
}
.dev-log-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.dev-log-actions form {
    margin: 0;
}
.dev-log-actions button,
.dev-log-actions .btn,
.dev-log-safety .btn,
.dev-log-locked .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.dev-log-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.dev-log-metrics article {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.dev-log-metrics span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}
.dev-log-metrics strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dev-log-console-panel {
    display: grid;
    gap: 12px;
}
.dev-log-console {
    height: min(62vh, 680px);
    min-height: 420px;
    overflow: auto;
    padding: 12px 0;
    border: 1px solid #1f2937;
    border-radius: 8px;
    background: #0b1120;
    color: #d1d5db;
    font: 13px/1.55 Consolas, "Courier New", monospace;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.dev-log-line {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 2px 14px;
    white-space: pre-wrap;
    word-break: break-word;
}
.dev-log-line:hover {
    background: rgba(148, 163, 184, .08);
}
.dev-log-line-number {
    color: #64748b;
    text-align: right;
    user-select: none;
}
.dev-log-line-text {
    min-width: 0;
}
.dev-log-line.is-error {
    color: #fecaca;
    background: rgba(127, 29, 29, .22);
}
.dev-log-line.is-slow {
    color: #fde68a;
}
.dev-log-line.is-control {
    color: #bfdbfe;
}
.dev-log-line.is-trace {
    color: #fca5a5;
}
.dev-log-empty {
    padding: 26px;
    color: #94a3b8;
    text-align: center;
}
.dev-log-alert {
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}
.dev-log-alert.is-error {
    border-color: rgba(180, 35, 24, .24);
    background: #fef2f2;
    color: #991b1b;
}
.dev-log-safety {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}
.dev-log-safety div {
    display: grid;
    gap: 4px;
}
.dev-log-safety span {
    color: var(--muted);
}
.dev-log-locked {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    max-width: 980px;
}
.dev-log-locked-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 28px;
}
.dev-log-locked h2 {
    margin: 0 0 8px;
}
.dev-log-locked p {
    margin: 0 0 14px;
    color: var(--muted);
}
.dev-log-lock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.dev-log-lock-grid article {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.dev-log-lock-grid span,
.dev-log-lock-grid small {
    display: block;
    color: var(--muted);
}
.dev-log-lock-grid strong,
.dev-log-lock-grid small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.settings-save-actions {
    margin-top: 14px;
}
.settings-actions-panel {
    display: grid;
    gap: 12px;
}
.settings-actions-head {
    margin-bottom: 0;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
}
.settings-actions-head .settings-tabs {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}
.settings-actions-head .toolbar-actions {
    flex: 0 0 auto;
}
.settings-form[aria-busy="true"],
.settings-tab-extra form[aria-busy="true"] {
    opacity: .72;
}
.settings-directory-card {
    align-content: start;
}
.settings-directory-counter {
    min-width: 34px;
    justify-content: center;
}
.position-directory-list {
    display: grid;
    gap: 8px;
}
.menu-directory-list {
    display: grid;
    gap: 8px;
}
.position-directory-item .soft-badge {
    border: 1px solid rgba(14, 165, 233, .16);
    background: #f0f9ff;
    color: #0369a1;
}
.settings-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.settings-bottom-actions .section-head {
    margin-bottom: 0;
}
.settings-action-strip {
    display: flex;
    justify-content: flex-end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.settings-action-strip-top {
    margin-bottom: 12px;
}
.settings-action-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.settings-secret-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}
.settings-secret-clear {
    width: fit-content;
}
.status-directory-list {
    display: grid;
    gap: 10px;
}
.status-directory-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.status-directory-item.is-dragging {
    opacity: .58;
    border-style: dashed;
}
.directory-drag-handle {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    cursor: grab;
    touch-action: none;
}
.directory-drag-handle:active {
    cursor: grabbing;
}
.directory-drag-handle:hover,
.directory-drag-handle:focus-visible {
    color: var(--brand);
    border-color: rgba(37, 99, 235, .28);
    background: #eff6ff;
}
.status-directory-item .inline-edit {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}
.status-directory-create-form {
    display: grid;
    grid-template-columns: minmax(190px, .8fr) minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.status-directory-create-form.has-color {
    grid-template-columns: minmax(190px, .8fr) minmax(240px, 1fr) minmax(78px, 92px) auto;
}
.status-directory-create-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 14px;
}
.status-directory-create-form .modal-actions {
    grid-column: auto;
    margin: 0;
    align-self: end;
    justify-content: flex-start;
}
.status-directory-create-form button {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
}
.menu-directory-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.menu-directory-main strong,
.menu-directory-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-icon-form {
    position: relative;
    justify-self: end;
}
.menu-svg-icon {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.menu-svg-icon path,
.menu-svg-icon circle,
.menu-svg-icon rect,
.menu-svg-icon ellipse {
    vector-effect: non-scaling-stroke;
}
.menu-fa-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}
.menu-icon-trigger {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
}
.menu-icon-trigger span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
}
.menu-icon-picker {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    width: min(430px, calc(100vw - 40px));
    max-height: min(430px, calc(100vh - 150px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
    overflow: hidden;
}
.menu-icon-picker-tools {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.menu-icon-picker-search {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
}
.icon-catalog-link {
    white-space: nowrap;
}
.menu-icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
    max-height: 330px;
    overflow: auto;
    padding-right: 2px;
}
.menu-icon-choice {
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    color: var(--text);
    font-size: 16px;
    justify-self: center;
}
.menu-icon-choice[hidden] {
    display: none;
}
.menu-icon-choice.is-custom-fa-choice {
    width: 36px;
    grid-column: auto;
    padding: 0;
}
.menu-icon-choice:hover,
.menu-icon-choice:focus-visible,
.menu-icon-choice.is-selected {
    border-color: rgba(37, 99, 235, .36);
    background: #dbeafe;
    color: #1d4ed8;
}
button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .65;
    background: #e5e7eb;
}
.settings-color-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.settings-color-grid h3 {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 15px;
}
.color-field span {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}
.color-field input[type="color"] {
    width: 44px;
    height: 40px;
    padding: 2px;
}
[data-theme="dark"] .settings-color-grid { background: #111827; }
[data-theme="dark"] .settings-placeholder,
[data-theme="dark"] .status-directory-item,
[data-theme="dark"] .notification-history-item { background: #111827; }
[data-theme="dark"] .menu-icon-trigger,
[data-theme="dark"] .menu-icon-choice {
    border-color: rgba(148, 163, 184, .22);
    background: #182235;
    color: #e5edf6;
}
[data-theme="dark"] .menu-icon-picker {
    border-color: rgba(148, 163, 184, .24);
    background: #111827;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .42);
}
[data-theme="dark"] .menu-icon-picker-search {
    border-color: rgba(148, 163, 184, .24);
    background: #0f172a;
    color: #e5edf6;
}
[data-theme="dark"] .menu-icon-picker-search::placeholder {
    color: #9fb0c3;
}
[data-theme="dark"] .directory-drag-handle:hover,
[data-theme="dark"] .directory-drag-handle:focus-visible,
[data-theme="dark"] .menu-icon-choice:hover,
[data-theme="dark"] .menu-icon-choice:focus-visible,
[data-theme="dark"] .menu-icon-choice.is-selected {
    background: rgba(96, 165, 250, .18);
    color: #bfdbfe;
}
[data-theme="dark"] .position-directory-item .soft-badge {
    border-color: rgba(125, 211, 252, .18);
    background: rgba(12, 74, 110, .30);
    color: #bae6fd;
}
[data-theme="dark"] .settings-state-pill.is-on {
    color: #bbf7d0;
    background: rgba(22, 163, 74, .18);
}
[data-theme="dark"] .dev-log-alert {
    border-color: rgba(96, 165, 250, .22);
    background: rgba(30, 58, 138, .24);
    color: #bfdbfe;
}
[data-theme="dark"] .dev-log-alert.is-error,
[data-theme="dark"] .dev-log-locked-mark {
    background: rgba(127, 29, 29, .35);
    color: #fecaca;
}

.organization-editor-form {
    display: grid;
    gap: 14px;
}
.organization-dadata-card {
    position: relative;
}
.organization-dadata-workspace {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(360px, 1.28fr);
    gap: 14px;
    align-items: stretch;
}
.organization-dadata-left,
.organization-dadata-right {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.organization-dadata-left {
    align-content: start;
}
.organization-dadata-right {
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background: #f8fafc;
}
.organization-dadata-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.organization-dadata-results-head strong {
    color: var(--text);
    font-size: 15px;
}
.organization-dadata-results-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
    text-align: right;
}
.organization-query-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 780;
}
.organization-dadata-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.organization-dadata-search-row input {
    min-height: 42px;
    font-size: 16px;
    font-weight: 780;
    letter-spacing: 0;
}
.organization-type-quick {
    display: grid;
    gap: 6px;
    width: 100%;
    color: var(--muted);
    font-size: 13px;
    font-weight: 780;
}
.organization-type-quick select {
    min-height: 40px;
}
.organization-dadata-status {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}
.organization-dadata-status[data-state="success"] { color: #047857; }
.organization-dadata-status[data-state="error"] { color: #b91c1c; }
.organization-dadata-status[data-state="loading"] { color: #1d4ed8; }
.organization-dadata-results {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 176px;
    max-height: 330px;
    overflow: auto;
    padding: 0;
}
.organization-dadata-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    align-items: start;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.organization-dadata-option:hover,
.organization-dadata-option:focus-visible {
    border-color: rgba(37, 99, 235, .32);
    background: #eff6ff;
}
.organization-dadata-option.is-selected {
    border-color: rgba(22, 163, 74, .34);
    background: #f0fdf4;
}
.organization-dadata-option > strong,
.organization-dadata-option > span,
.organization-dadata-option > small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.organization-dadata-option > strong,
.organization-dadata-option > span,
.organization-dadata-option > small {
    grid-column: 1;
}
.organization-dadata-option > span {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 820;
}
.organization-dadata-select {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}
.organization-dadata-option.is-selected .organization-dadata-select {
    background: #dcfce7;
    color: #15803d;
}
.organization-dadata-director {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid rgba(100, 116, 139, .16);
}
.organization-dadata-director > span {
    grid-row: 1 / span 2;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.organization-dadata-director > strong,
.organization-dadata-director > small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.organization-dadata-director > strong {
    color: var(--text);
    font-size: 13px;
}
.organization-dadata-director > small {
    color: var(--muted);
    font-size: 12px;
}
.director-user-toggle {
    position: relative;
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}
.director-user-toggle input {
    position: absolute;
    left: 10px;
    top: 9px;
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.director-user-check {
    position: relative;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 2px solid rgba(37, 99, 235, .34);
    border-radius: 6px;
    background: #eff6ff;
    pointer-events: none;
    transition: background .15s ease, border-color .15s ease;
}
.director-user-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transform: rotate(45deg) scale(.8);
    transition: opacity .15s ease, transform .15s ease;
}
.director-user-toggle input:checked + .director-user-check {
    border-color: #16a34a;
    background: #16a34a;
}
.director-user-toggle input:checked + .director-user-check::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}
.director-user-toggle input:focus-visible + .director-user-check {
    outline: 2px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}
.director-user-toggle input:disabled + .director-user-check {
    border-color: rgba(148, 163, 184, .42);
    background: #f1f5f9;
}
.director-user-toggle:has(input:disabled) {
    cursor: default;
    opacity: .72;
}
.director-user-toggle > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.director-user-toggle b,
.director-user-toggle small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.director-user-toggle b {
    color: var(--text);
    font-size: 13px;
}
.director-user-toggle small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.organization-dadata-option small,
.organization-dadata-empty {
    color: var(--muted);
    font-size: 13px;
}
.organization-dadata-empty {
    display: grid;
    place-items: center;
    min-height: 156px;
    padding: 16px;
    border: 1px dashed rgba(100, 116, 139, .34);
    border-radius: 8px;
    background: rgba(255, 255, 255, .62);
    text-align: center;
}
.organization-editor-top-actions {
    justify-content: flex-end;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}
.organization-manual-toggle {
    width: fit-content;
}
.organization-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
    gap: 14px;
    align-items: start;
}
.organization-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.organization-code-grid label,
.organization-editor-form label {
    min-width: 0;
}
.organization-editor-form textarea {
    min-height: 82px;
}
.organization-editor-note-card {
    margin-top: 0;
}
.organization-logo-editor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.organization-logo-editor .checkbox-line {
    grid-column: 1 / -1;
}
.organization-logo-preview,
.org-logo-mark {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #eff6ff;
    color: var(--brand-dark);
    font-weight: 850;
}
.organization-logo-preview {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    font-size: 30px;
}
.organization-logo-preview img,
.org-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}
.organization-list-card {
    position: relative;
    padding-left: 72px;
}
.organization-card-logo {
    position: absolute;
    top: 14px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-weight: 850;
}
.organization-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}
.org-command-panel { padding: 0; overflow: hidden; }
.org-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 16px;
    align-items: center;
    padding: 20px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .08), transparent 48%),
        var(--panel);
}
.org-logo-mark {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    font-size: 34px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
}
.org-identity {
    display: grid;
    gap: 8px;
    align-content: center;
}
.org-identity > span {
    width: fit-content;
    padding: 4px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
}
.org-identity strong {
    font-size: 30px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.org-identity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.org-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.org-metrics {
    align-self: center;
}
.org-context-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 88%, var(--panel-soft));
}
.org-context-row > span {
    padding-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.org-context-chips {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    gap: 7px;
}
.org-context-group-link {
    max-width: min(100%, 360px);
    gap: 6px;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.25;
    text-decoration: none;
}
.org-context-group-link:hover {
    background: color-mix(in srgb, var(--brand) 12%, #eef2f7);
    color: var(--brand-dark);
    text-decoration: none;
}
.org-context-group-link small {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 12%, white);
    color: var(--brand-dark);
    font-size: 11px;
    line-height: 1;
}
.org-detail-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
}
.org-requisites-panel .copy-button {
    width: fit-content;
}
.org-requisites-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, .55fr) minmax(160px, .55fr);
    gap: 12px;
}
.org-requisite-main,
.org-requisite-pair,
.org-contact-strip,
.org-address-line {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.org-requisite-main {
    display: grid;
    gap: 6px;
}
.org-requisite-main span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.org-requisite-main strong {
    font-size: 18px;
    overflow-wrap: anywhere;
}
.org-contact-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.org-address-stack,
.org-info-grid,
.org-info-list {
    display: grid;
    gap: 10px;
}
.org-address-stack {
    margin-top: 12px;
}
.org-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.org-info-field {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.org-info-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.org-info-field b {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.org-dadata-summary-panel {
    align-content: start;
}
.org-address-line {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}
.org-address-line span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.org-license-panel {
    scroll-margin-top: 18px;
}
.org-license-total {
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 7px;
    align-items: baseline;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid rgba(22, 163, 74, .18);
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdf4, #f8fafc);
    color: #166534;
}
.org-license-total b {
    font-size: 20px;
    line-height: 1;
}
.org-license-total small {
    color: #64748b;
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.org-license-message {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 750;
}
.org-license-message.is-success {
    border-color: rgba(22, 163, 74, .22);
    background: #f0fdf4;
    color: #166534;
}
.org-license-message.is-error {
    border-color: rgba(220, 38, 38, .22);
    background: #fef2f2;
    color: #b91c1c;
}
.org-license-message.is-warning {
    border-color: rgba(217, 119, 6, .24);
    background: #fffbeb;
    color: #92400e;
}
.org-license-search-panel {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .07), transparent 58%),
        #f8fafc;
}
.org-license-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.org-license-inactive-toggle {
    width: fit-content;
    margin: 0;
}
.org-license-search-status {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.org-license-search-status[data-state="success"] { color: #047857; }
.org-license-search-status[data-state="error"] { color: #b91c1c; }
.org-license-search-status[data-state="loading"] { color: #1d4ed8; }
.org-license-results,
.org-license-grid {
    display: grid;
    gap: 12px;
}
.org-license-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
}
.org-license-card,
.org-license-result {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.org-license-card.is-active,
.org-license-result.is-active {
    border-color: rgba(22, 163, 74, .26);
}
.org-license-result.is-inactive {
    opacity: .86;
}
.org-license-card > strong,
.org-license-result > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 18px;
}
.org-license-card-head,
.org-license-result-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}
.org-license-house-count {
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 5px;
    align-items: baseline;
    padding: 5px 8px;
    border-radius: 8px;
    background: #ecfeff;
    color: #0e7490;
}
.org-license-house-count b {
    font-size: 18px;
    line-height: 1;
}
.org-license-house-count small {
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.org-license-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.org-license-meta-grid span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.org-license-meta-grid small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.org-license-meta-grid b {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.org-license-result form {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}
.org-license-contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.org-license-contact-line button {
    padding: 6px 8px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 12px;
}
.org-license-house-check-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.org-license-house-check-status {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.org-license-house-check-status[data-state="success"] { color: #047857; }
.org-license-house-check-status[data-state="error"] { color: #b91c1c; }
.org-license-house-check-status[data-state="loading"] { color: #1d4ed8; }
.org-license-house-check-status[data-state="empty"] { color: var(--muted); }
.org-license-houses {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.org-license-houses-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc 70%);
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 850;
    list-style: none;
}
.org-license-houses summary::-webkit-details-marker {
    display: none;
}
.org-license-houses-title {
    display: flex;
    gap: 9px;
    align-items: center;
    min-width: 0;
}
.org-license-houses-title > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.org-license-houses-title b {
    display: block;
    font-size: 14px;
}
.org-license-houses-title small,
.org-license-houses-total small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.org-license-houses-icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
}
.org-license-houses-total {
    display: grid;
    justify-items: end;
    gap: 2px;
}
.org-license-houses-total b {
    min-width: 36px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand-dark);
    text-align: center;
    font-size: 12px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
.org-license-house-panel {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.org-license-house-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.org-license-house-summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.org-license-house-summary b {
    font-size: 18px;
    line-height: 1;
}
.org-license-house-summary small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.org-license-house-switch {
    width: fit-content;
}
.org-license-house-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.org-license-house-import-all-form,
.org-license-house-import-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.org-license-house-import-form .btn,
.org-license-house-import-all-form .btn {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
}
.org-license-house-import-status {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.org-license-house-import-status[data-state="success"] { color: #047857; }
.org-license-house-import-status[data-state="error"] { color: #b91c1c; }
.org-license-house-import-status[data-state="loading"] { color: #1d4ed8; }
.org-license-house-import-status[data-state="warning"] { color: #b45309; }
.org-license-import-progress {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background: #f8fafc;
}
.org-license-import-progress[hidden] {
    display: none;
}
.org-license-import-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.org-license-import-progress-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.org-license-import-progress-head span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.org-license-import-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}
.org-license-import-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition: width .24s ease;
}
.org-license-import-stats {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}
.org-license-import-log {
    display: grid;
    gap: 4px;
    max-height: 140px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
    color: var(--muted);
    font-size: 12px;
}
.org-license-import-log li {
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow-wrap: anywhere;
}
.org-license-import-log li[data-state="success"] {
    border-color: rgba(22, 163, 74, .18);
    color: #047857;
}
.org-license-import-log li[data-state="warning"] {
    border-color: rgba(217, 119, 6, .22);
    color: #b45309;
}
.org-license-import-log li[data-state="error"] {
    border-color: rgba(220, 38, 38, .20);
    color: #b91c1c;
}
.org-license-house-system-link {
    text-decoration: none;
}
.org-license-house-list {
    display: grid;
    gap: 8px;
}
.org-license-house-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.org-license-house-dates {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}
.org-license-house-item.is-importing {
    border-color: rgba(37, 99, 235, .34);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.org-license-house-date {
    display: grid;
    gap: 2px;
    align-content: center;
    min-width: 86px;
    min-height: 46px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #eef6ff;
    color: #1e40af;
}
.org-license-house-date.is-excluded {
    background: #fff1f2;
    color: #be123c;
}
.org-license-house-date b {
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}
.org-license-house-date small {
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}
.org-license-house-main strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}
.org-license-house-main strong {
    font-size: 14px;
}
.org-license-house-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.employee-card {
    gap: 10px;
}
.org-employees-panel {
    scroll-margin-top: 18px;
}
.org-employees-panel .section-head {
    align-items: start;
}
.org-employee-total {
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 7px;
    align-items: baseline;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid rgba(14, 165, 233, .18);
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f9ff, #f8fafc);
    color: #075985;
}
.org-employee-total b {
    font-size: 20px;
    line-height: 1;
}
.org-employee-total small {
    color: #64748b;
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
}
.org-employee-add-panel {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .08), transparent 58%),
        #f8fafc;
}
.org-employee-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(240px, .9fr) auto;
    gap: 12px;
    align-items: end;
}
.org-employee-form label,
.org-employee-form-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.org-employee-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 16px;
}
.org-employee-directory-link {
    flex: 0 0 auto;
    width: fit-content;
    color: #0369a1;
    font-size: 12px;
    font-weight: 820;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.org-employee-directory-link:hover {
    color: #075985;
    text-decoration: underline;
}
.org-employee-card {
    border-color: rgba(14, 165, 233, .18);
}
.org-employee-card::before {
    background: #0ea5e9;
}
.employee-identity {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}
.employee-identity .list-card-title,
.employee-identity .list-card-meta {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}
.employee-avatar {
    width: 44px;
    height: 44px;
}
.org-employee-position {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(14, 165, 233, .18);
    border-radius: 999px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 12px;
    font-weight: 820;
    overflow-wrap: anywhere;
}
.org-employee-contact-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.org-employee-contact-row span,
.org-employee-copy-field {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: inherit;
    text-align: left;
}
.org-employee-copy-field {
    cursor: pointer;
}
.org-employee-copy-field:hover {
    border-color: rgba(14, 165, 233, .28);
    background: #f0f9ff;
}
.org-employee-contact-row small,
.org-employee-copy-field small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.org-employee-contact-row b,
.org-employee-copy-field b {
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.employee-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.employee-card-actions form {
    display: flex;
    margin: 0;
}
.employee-card-actions .btn {
    flex: 1 1 120px;
    text-align: center;
}
.employee-card-actions .soft-badge {
    align-self: center;
}
.premium-profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
    gap: 18px;
    padding: 20px;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, .10), transparent 52%),
        var(--panel);
}
.profile-avatar {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 38px;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .12);
}
.profile-avatar.small {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    font-size: 26px;
    box-shadow: none;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-identity h2 {
    margin: 0 0 4px;
    font-size: 28px;
}
.profile-identity p {
    margin: 0;
    color: var(--muted);
}
.profile-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.profile-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.profile-hero-metrics span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.profile-hero-metrics b {
    overflow-wrap: anywhere;
}
.profile-hero-metrics small {
    color: var(--muted);
}
.profile-detail-grid {
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
}
.profile-contact-panel dl {
    grid-template-columns: 1fr;
    gap: 8px;
}
.profile-contact-panel dt {
    font-size: 12px;
    font-weight: 800;
}
.profile-contact-panel dd {
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    overflow-wrap: anywhere;
}
.profile-chat-panel,
.profile-messenger-panel {
    align-content: start;
}
.profile-chat-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.profile-chat-card strong,
.profile-chat-card small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-chat-avatar {
    width: 48px;
    height: 48px;
}
.legacy-message-list {
    display: grid;
    gap: 8px;
}
.legacy-message-list article {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.legacy-message-list p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.profile-editor-panel {
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
.profile-admin-panel,
.profile-password-panel {
    align-content: start;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
.profile-admin-form,
.profile-password-form {
    display: grid;
    gap: 14px;
}
.profile-admin-form {
    gap: 12px;
}
.profile-edit-section {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 8px;
    background: #f8fafc;
}
.profile-edit-section-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}
.profile-user-basic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-admin-form .user-affiliations-editor {
    background: #f8fafc;
}
.profile-access-choice {
    background: linear-gradient(180deg, #f8fafc, #f3f7fc);
}
.profile-status-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    cursor: pointer;
}
.profile-status-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.profile-status-toggle {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, .24);
    transition: background .16s ease, box-shadow .16s ease;
}
.profile-status-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .24);
    transition: transform .16s ease;
}
.profile-status-card input:checked + .profile-status-toggle {
    background: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
}
.profile-status-card input:checked + .profile-status-toggle::after {
    transform: translateX(16px);
}
.profile-status-card input:focus-visible + .profile-status-toggle {
    outline: 2px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}
.profile-status-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.profile-status-copy strong {
    font-size: 13px;
}
.profile-status-copy small {
    color: var(--muted);
    font-weight: 700;
}
.profile-edit-actions {
    padding-top: 2px;
}
.profile-password-alert {
    margin-bottom: 14px;
}
.profile-invite-tools {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.profile-invite-form {
    display: flex;
    justify-content: flex-end;
}
.profile-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}
.profile-active-toggle {
    align-self: end;
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.profile-edit-form {
    display: grid;
    gap: 14px;
}
.profile-upload-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.profile-upload-card label {
    min-width: 0;
}
.profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.copy-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.user-create-alert {
    margin-top: 12px;
}
.user-invite-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}
.user-invite-result.compact {
    margin-top: 0;
}
.user-invite-result strong,
.user-invite-result small {
    display: block;
}
.onboarding-panel {
    display: grid;
    gap: 8px;
}
.invite-note {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.invite-note small,
.password-tools small {
    color: var(--muted);
}
.password-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}
.password-manager-username {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.user-seen-status {
    display: inline-grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: 100%;
    max-width: 230px;
    min-width: 0;
}
.user-seen-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.user-seen-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}
.user-seen-status b {
    color: #172033;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.1;
}
.user-seen-status small {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-seen-status em {
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
    line-height: 1.1;
}
.user-seen-status.is-online b {
    color: #047857;
}
.user-seen-status.is-online small,
.user-seen-status.is-online em {
    color: #15803d;
}
[data-theme="dark"] .user-seen-status b {
    color: #f8fafc;
}
[data-theme="dark"] .user-seen-status small,
[data-theme="dark"] .user-seen-status em {
    color: #a7b3c3;
}
[data-theme="dark"] .user-seen-status.is-online b,
[data-theme="dark"] .user-seen-status.is-online small,
[data-theme="dark"] .user-seen-status.is-online em {
    color: #86efac;
}
.user-card-seen {
    display: block;
}
.user-edit-modal {
    width: min(780px, calc(100vw - 28px));
}
.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.copy-field span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.copy-field b {
    min-width: 0;
    overflow-wrap: anywhere;
}
.copy-button {
    align-self: center;
    padding: 6px 8px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 12px;
}
.copy-button.is-copied,
[data-copy-value].is-copied {
    background: #16a34a;
    color: white;
}
.org-note {
    margin: 12px 0 0;
    color: var(--muted);
}
.org-gis-placeholder p {
    color: var(--muted);
    line-height: 1.5;
}
[data-theme="dark"] .org-hero {
    background:
        linear-gradient(90deg, rgba(96, 165, 250, .10), transparent 48%),
        var(--panel);
}
[data-theme="dark"] .org-context-row {
    background: color-mix(in srgb, var(--panel) 92%, #111827);
}
[data-theme="dark"] .org-context-group-link:hover {
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
}
[data-theme="dark"] .org-context-group-link small {
    background: rgba(96, 165, 250, .16);
    color: #bfdbfe;
}
[data-theme="dark"] .copy-field,
[data-theme="dark"] .invite-note,
[data-theme="dark"] .organization-dadata-right,
[data-theme="dark"] .org-info-field { background: #111827; }
[data-theme="dark"] .organization-dadata-empty {
    background: rgba(15, 23, 42, .62);
}
[data-theme="dark"] .organization-dadata-option {
    background: #162033;
}
[data-theme="dark"] .organization-dadata-option:hover,
[data-theme="dark"] .organization-dadata-option:focus-visible {
    background: #1e293b;
}
[data-theme="dark"] .organization-dadata-option.is-selected {
    border-color: rgba(34, 197, 94, .36);
    background: rgba(22, 101, 52, .24);
}
[data-theme="dark"] .organization-dadata-select {
    background: rgba(59, 130, 246, .18);
    color: #bfdbfe;
}
[data-theme="dark"] .organization-dadata-option.is-selected .organization-dadata-select {
    background: rgba(34, 197, 94, .18);
    color: #bbf7d0;
}
[data-theme="dark"] .organization-dadata-director,
[data-theme="dark"] .director-user-toggle {
    background: rgba(15, 23, 42, .62);
    border-color: rgba(148, 163, 184, .18);
}
[data-theme="dark"] .director-user-check {
    background: rgba(37, 99, 235, .16);
}
[data-theme="dark"] .director-user-toggle input:disabled + .director-user-check {
    background: rgba(15, 23, 42, .78);
}
[data-theme="dark"] .organization-logo-preview,
[data-theme="dark"] .org-logo-mark {
    background: #111827;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(140deg, #10201f, #243b39 56%, #f4f6f8 56%);
}
.login-card {
    width: min(420px, 100%);
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    display: grid;
    gap: 12px;
}
.login-card h1 { margin: 0; }
.login-card p { margin: 0 0 8px; color: var(--muted); }
.invite-card {
    width: min(560px, 100%);
}
.invite-accept-form {
    display: grid;
    gap: 12px;
}
.login-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: white;
    font-weight: 700;
}
.login-mark.root { background: #334155; }
.alert { padding: 10px 12px; border-radius: 6px; }
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
[data-theme="dark"] .alert.error {
    background: #450a0a;
    color: #fecaca;
    border-color: #7f1d1d;
}
[data-theme="dark"] .alert.info {
    background: #172554;
    color: #bfdbfe;
    border-color: #1d4ed8;
}
[data-theme="dark"] .alert.info small {
    color: #93c5fd;
}
.task-lookup-alert { margin-bottom: 14px; }

.notification-center {
    position: relative;
    flex: 0 0 auto;
}
.notification-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
.notification-trigger:hover,
.notification-trigger.is-open {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--brand-dark);
}
.notification-trigger b {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--bg);
}
.notification-popover {
    position: fixed;
    z-index: 60;
    top: 68px;
    right: 22px;
    width: min(430px, calc(100vw - 28px));
    max-height: calc(100vh - 92px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.notification-popover-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.notification-popover-head span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.notification-popover-head strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}
.notification-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.notification-close {
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}
.notification-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.notification-list {
    display: grid;
    gap: 7px;
    max-height: min(68vh, 520px);
    overflow: auto;
    padding: 9px;
}
.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) 52px;
    gap: 9px;
    align-items: stretch;
    padding: 9px 8px 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--text);
}
.notification-item::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #cbd5e1;
}
.notification-item:hover {
    text-decoration: none;
    border-color: #bfdbfe;
    background: #f8fafc;
}
.notification-item.is-unread {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.notification-item.is-unread::before {
    background: var(--brand);
}
.notification-item-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    color: inherit;
}
.notification-item-main:hover {
    text-decoration: none;
}
.notification-item b {
    min-width: 0;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.notification-item span {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.notification-item b {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notification-item span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notification-item small {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.2;
}
.notification-read-button {
    align-self: stretch;
    width: 52px;
    min-height: 42px;
    padding: 0 0 0 10px;
    display: grid;
    place-items: center;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
}
.notification-read-button .icon-svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.notification-read-button:hover {
    border-left-color: #bfdbfe;
    background: rgba(37, 99, 235, .08);
    color: var(--brand-dark);
}
.notification-read-button:disabled {
    opacity: .55;
    cursor: progress;
}
.notification-popover-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 9px 12px 11px;
    border-top: 1px solid var(--line);
}
.notification-popover-actions .btn,
.notification-popover-actions button {
    padding: 7px 10px;
    font-size: 12px;
}
.notification-toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 8px;
    width: min(340px, calc(100vw - 28px));
}
.notification-toast {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}
.notification-toast::before {
    content: "";
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand);
}
.notification-toast:hover {
    text-decoration: none;
}
.notification-toast b {
    font-size: 12.5px;
    line-height: 1.25;
}
.notification-toast span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.notifications-history-list {
    display: grid;
    gap: 8px;
}
.notification-history-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) 54px;
    gap: 10px;
    align-items: stretch;
    padding: 11px 10px 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--text);
}
.notification-history-link {
    min-width: 0;
    color: inherit;
}
.notification-history-link:hover,
.notification-history-item:hover .notification-history-link {
    text-decoration: none;
}
.notification-history-item:hover {
    border-color: #bfdbfe;
}
.notification-read-marker {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}
.notification-history-item.is-unread .notification-read-marker {
    background: var(--brand);
}
.notification-history-item p {
    margin: 4px 0;
    overflow-wrap: anywhere;
}
.messages-workspace {
    display: grid;
    grid-template-columns: var(--messages-left, 350px) 7px minmax(0, 1fr) 7px var(--messages-right, 300px);
    gap: 0;
    height: calc(100vh - 150px);
    min-height: 0;
    padding: 0;
    overflow: hidden;
}
.messenger-shell {
    background: var(--panel);
}
.messenger-shell.contacts-collapsed {
    grid-template-columns: var(--messages-left, 350px) 7px minmax(0, 1fr) 0 0;
}
.messenger-shell.contacts-collapsed [data-messages-resizer="right"],
.messenger-shell.contacts-collapsed .messages-profile-panel {
    display: none;
}
.messages-sidebar {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border-right: 1px solid var(--line);
    background: #f8fafc;
}
.messages-resizer {
    position: relative;
    cursor: col-resize;
    background: #edf2f7;
}
.messages-resizer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 1px;
    background: var(--line);
}
.messages-resizer:hover,
body.is-resizing-messages .messages-resizer {
    background: #dbeafe;
}
.messenger-head,
.messenger-subhead {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.messenger-brandline {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.messenger-status-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.messenger-head h2 {
    margin: 0;
}
.messenger-head small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.messenger-contact-switch {
    flex: 0 0 auto;
    padding: 7px 9px;
    background: #e2e8f0;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}
.messenger-contact-switch:hover {
    background: #dbeafe;
}
.messenger-search {
    display: grid;
}
.messenger-search input {
    height: 40px;
    background: var(--panel);
}
.messenger-inbox-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.messenger-inbox-stats span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.messenger-inbox-stats b {
    font-size: 18px;
    color: var(--brand-dark);
}
.messenger-inbox-stats small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.messenger-subhead {
    color: var(--muted);
    font-size: 13px;
}
.messenger-subhead strong {
    color: var(--text);
}
.messenger-section-title {
    padding-top: 2px;
}
.conversation-list {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}
.conversation-people {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}
.conversation-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
}
.conversation-item:hover {
    border-color: var(--line);
    background: var(--panel);
    text-decoration: none;
}
.conversation-item.is-current {
    border-color: #bfdbfe;
    background: var(--panel);
    box-shadow: inset 3px 0 0 var(--brand);
    text-decoration: none;
}
.conversation-item.has-unread {
    background: #eff6ff;
}
.conversation-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: visible;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}
.conversation-avatar-large {
    width: 46px;
    height: 46px;
}
.conversation-avatar img,
.person-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}
.messages-workspace .avatar-crop {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: inherit;
    background: inherit;
    color: inherit;
}
.messages-workspace .avatar-crop img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}
.conversation-avatar i {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--panel);
    border-radius: 50%;
    background: #94a3b8;
    z-index: 2;
}
.conversation-avatar i.online {
    background: #16a34a;
}
.conversation-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.conversation-main b,
.conversation-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conversation-unread {
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand);
    color: white;
    font-size: 12px;
    font-weight: 800;
}
.person-row {
    margin: 0;
}
.person-row.person-link,
.person-row.contact-open,
.person-row.readonly {
    width: 100%;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
}
.person-row.person-link:hover,
.person-row.contact-open:hover,
.person-row.readonly:hover {
    border-color: var(--line);
    background: var(--panel);
    text-decoration: none;
}
.person-row.readonly {
    grid-template-columns: 40px minmax(0, 1fr);
}
.contact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0;
    align-items: center;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 8px;
}
.contact-row:hover,
.contact-row:focus-within {
    border-color: var(--line);
    background: var(--panel);
}
.contact-row .person-row.contact-open {
    border: 0;
    border-radius: 0;
}
.contact-row .person-row.contact-open:hover,
.contact-row .person-row.contact-open:focus {
    border-color: transparent;
    background: transparent;
}
.contact-profile-link {
    width: 42px;
    height: 100%;
    min-height: 58px;
    display: grid;
    place-items: center;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--brand-dark);
}
.contact-profile-link:hover {
    background: #eff6ff;
    text-decoration: none;
}
.contact-profile-link .icon-svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.person-open-mark {
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}
.person-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #ccfbf1;
    color: #0f766e;
    font-weight: 800;
}
.messages-workspace .person-avatar {
    overflow: visible;
}
.person-avatar i {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    border: 2px solid var(--panel);
    border-radius: 50%;
    background: #94a3b8;
    z-index: 2;
}
.person-avatar i.online {
    background: #16a34a;
}
.person-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.person-main b,
.person-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.messages-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    background: var(--panel);
}
.messages-profile-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border-left: 1px solid var(--line);
    background: #f8fafc;
}
.messages-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.messages-head-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}
.messages-head-actions > form {
    flex: 0 0 auto;
}
.messages-head-actions .btn {
    white-space: nowrap;
}
.messages-head-menu {
    position: relative;
}
.messages-head-menu-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--muted);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.messages-head-menu-toggle:hover,
.messages-head-menu-toggle[aria-expanded="true"] {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--brand-dark);
}
.messages-head-menu-toggle .icon-svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.messages-head-menu-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 35;
    display: grid;
    gap: 2px;
    min-width: 190px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}
.messages-head-menu-popover form {
    margin: 0;
}
.chat-head-menu-item {
    width: 100%;
    min-height: 36px;
    display: block;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}
.chat-head-menu-item:hover {
    background: #eff6ff;
    color: var(--brand-dark);
    text-decoration: none;
}
.chat-head-menu-item.danger {
    color: var(--danger);
}
.chat-head-menu-item.danger:hover {
    background: #fee2e2;
    color: #991b1b;
}
.btn.secondary.danger-soft {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #991b1b;
}
.btn.secondary.danger-soft:hover {
    background: #fecaca;
    color: #7f1d1d;
}
.messages-contacts-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}
.chat-peer {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}
.messages-head h2 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.messages-head small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-messages {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}
.chat-message {
    display: flex;
}
.chat-message.is-last-focus .chat-bubble {
    animation: chat-last-focus 1.45s ease;
}
.chat-message.is-own {
    justify-content: flex-end;
}
.chat-bubble {
    max-width: min(680px, 82%);
    display: grid;
    gap: 2px;
    position: relative;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.chat-message.is-own .chat-bubble {
    border-color: var(--brand);
    background: var(--brand);
    color: white;
}
.chat-bubble-head {
    display: block;
    min-height: 14px;
}
.chat-bubble strong {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-message-menu {
    position: static;
    margin: 0;
}
.chat-menu-trigger {
    display: none;
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
    line-height: 26px;
    text-align: center;
}
.chat-menu-trigger:hover,
.chat-menu-trigger[aria-expanded="true"] {
    background: rgba(15, 23, 42, .08);
    color: var(--text);
}
.chat-message.is-own .chat-menu-trigger {
    color: rgba(255, 255, 255, .82);
}
.chat-message.is-own .chat-menu-trigger:hover,
.chat-message.is-own .chat-menu-trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}
.chat-menu-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    display: grid;
    gap: 2px;
    width: max-content;
    min-width: 168px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
}
.chat-message:focus-visible .chat-bubble {
    outline: 2px solid rgba(37, 99, 235, .32);
    outline-offset: 2px;
}
.chat-menu-popover form {
    margin: 0;
}
.chat-menu-popover button {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}
.chat-menu-popover button:hover {
    background: #eff6ff;
    color: var(--brand-dark);
}
.chat-menu-popover button.danger {
    color: var(--danger);
}
.chat-menu-popover button.danger:hover {
    background: #fee2e2;
    color: #991b1b;
}
.chat-bubble small {
    justify-self: end;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    text-align: right;
}
.chat-message.is-own .chat-bubble strong,
.chat-message.is-own .chat-bubble small {
    color: rgba(255, 255, 255, .86);
}
.chat-reply-context,
.chat-reply-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    border: 1px solid rgba(37, 99, 235, .18);
    border-left: 3px solid var(--brand);
    border-radius: 7px;
    background: rgba(37, 99, 235, .08);
}
.chat-reply-context {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin: 1px 0 3px;
    padding: 7px 9px;
    color: var(--text);
    text-align: left;
}
.chat-reply-context:hover {
    background: rgba(37, 99, 235, .12);
    color: var(--text);
}
.chat-reply-context span,
.chat-reply-preview b {
    overflow: hidden;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-reply-context small,
.chat-reply-preview small {
    justify-self: stretch;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-message.is-own .chat-reply-context {
    border-color: rgba(255, 255, 255, .24);
    border-left-color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .14);
    color: white;
}
.chat-message.is-own .chat-reply-context:hover {
    background: rgba(255, 255, 255, .2);
    color: white;
}
.chat-message.is-own .chat-reply-context span,
.chat-message.is-own .chat-reply-context small {
    color: rgba(255, 255, 255, .88);
}
.chat-bubble p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}
@keyframes chat-last-focus {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .38), 0 8px 22px rgba(15, 23, 42, .06); }
    45% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .14), 0 12px 28px rgba(15, 23, 42, .12); }
    100% { box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
}
.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}
.chat-reply-preview {
    grid-column: 1 / -1;
    padding: 8px 10px;
}
.chat-reply-preview span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.chat-reply-preview button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
}
.chat-reply-preview button:hover {
    background: rgba(15, 23, 42, .08);
    color: var(--text);
}
.chat-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(4px);
}
.chat-confirm-modal {
    width: min(420px, 100%);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.chat-confirm-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 900;
}
.chat-confirm-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.chat-confirm-copy h2 {
    margin: 0;
    font-size: 17px;
}
.chat-confirm-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}
.chat-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}
.chat-compose textarea {
    min-height: 54px;
    max-height: 160px;
}
.chat-compose button {
    min-height: 54px;
}
.messages-empty-state {
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}
.messages-empty-state h2 {
    color: var(--text);
}
[data-theme="dark"] .notification-popover,
[data-theme="dark"] .notification-item,
[data-theme="dark"] .messages-sidebar,
[data-theme="dark"] .messages-profile-panel,
[data-theme="dark"] .messenger-inbox-stats span,
[data-theme="dark"] .chat-bubble {
    background: #111827;
}
[data-theme="dark"] .notification-popover-head {
    background: #182235;
}
[data-theme="dark"] .notification-close {
    background: #111827;
    color: var(--muted);
}
[data-theme="dark"] .notification-read-button {
    color: #e5edf6;
}
[data-theme="dark"] .notification-read-button:hover {
    border-left-color: #60a5fa;
    background: rgba(96, 165, 250, .14);
    color: #ffffff;
}
[data-theme="dark"] .notification-item:hover {
    background: #182235;
}
[data-theme="dark"] .notification-item.is-unread {
    background: rgba(96, 165, 250, .14);
}
[data-theme="dark"] .messages-resizer {
    background: #111827;
}
[data-theme="dark"] .messages-resizer:hover,
[data-theme="dark"] body.is-resizing-messages .messages-resizer {
    background: #1f2937;
}
[data-theme="dark"] .contact-profile-link,
[data-theme="dark"] .messenger-contact-switch,
[data-theme="dark"] .messenger-search input,
[data-theme="dark"] .conversation-item.is-current,
[data-theme="dark"] .conversation-item:hover,
[data-theme="dark"] .person-row.contact-open:hover,
[data-theme="dark"] .person-row.person-link:hover,
[data-theme="dark"] .person-row.readonly:hover {
    background: #182235;
}
[data-theme="dark"] .messenger-contact-switch:hover {
    background: #1f2937;
}
[data-theme="dark"] .contact-row:hover,
[data-theme="dark"] .contact-row:focus-within {
    background: #182235;
}
[data-theme="dark"] .contact-row .person-row.contact-open:hover,
[data-theme="dark"] .contact-row .person-row.contact-open:focus,
[data-theme="dark"] .contact-profile-link {
    background: transparent;
}
[data-theme="dark"] .contact-profile-link:hover {
    background: rgba(96, 165, 250, .14);
}
[data-theme="dark"] .conversation-item.has-unread {
    background: rgba(96, 165, 250, .14);
}
[data-theme="dark"] .chat-message.is-own .chat-bubble {
    background: #2563eb;
    color: white;
}
[data-theme="dark"] .chat-messages {
    background: linear-gradient(180deg, #111827, var(--panel));
}
[data-theme="dark"] .btn.secondary.danger-soft {
    border-color: rgba(248, 113, 113, .35);
    background: rgba(248, 113, 113, .15);
    color: #fecaca;
}
[data-theme="dark"] .btn.secondary.danger-soft:hover {
    background: rgba(248, 113, 113, .24);
    color: #ffffff;
}
[data-theme="dark"] .messages-head-menu-toggle,
[data-theme="dark"] .messages-head-menu-popover {
    background: #182235;
}
[data-theme="dark"] .messages-head-menu-toggle:hover,
[data-theme="dark"] .messages-head-menu-toggle[aria-expanded="true"] {
    border-color: rgba(96, 165, 250, .45);
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
}
[data-theme="dark"] .chat-head-menu-item:hover {
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
}
[data-theme="dark"] .chat-head-menu-item.danger:hover {
    background: rgba(248, 113, 113, .16);
    color: #fecaca;
}
[data-theme="dark"] .chat-menu-popover {
    background: #182235;
}
[data-theme="dark"] .chat-menu-trigger:hover,
[data-theme="dark"] .chat-menu-trigger[aria-expanded="true"],
[data-theme="dark"] .chat-reply-preview button:hover {
    background: rgba(255, 255, 255, .09);
    color: #ffffff;
}
[data-theme="dark"] .chat-menu-popover button:hover {
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
}
[data-theme="dark"] .chat-menu-popover button.danger:hover {
    background: rgba(248, 113, 113, .16);
    color: #fecaca;
}
[data-theme="dark"] .chat-reply-context,
[data-theme="dark"] .chat-reply-preview {
    border-color: rgba(96, 165, 250, .22);
    border-left-color: var(--brand);
    background: rgba(96, 165, 250, .11);
}
[data-theme="dark"] .chat-reply-context:hover {
    background: rgba(96, 165, 250, .16);
}
[data-theme="dark"] .chat-confirm-overlay {
    background: rgba(2, 6, 23, .62);
}
[data-theme="dark"] .chat-confirm-modal {
    background: #182235;
}
[data-theme="dark"] .chat-confirm-mark {
    background: rgba(248, 113, 113, .18);
    color: #fecaca;
}

.dashboard-premium-page {
    --dashboard-gap: 14px;
    gap: var(--dashboard-gap);
}
.dashboard-command {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: var(--dashboard-gap);
    align-items: stretch;
}
.dashboard-command-main,
.dashboard-quick-card,
.dashboard-kpi-card,
.dashboard-chart-card,
.dashboard-focus-task,
.dashboard-status-row,
.dashboard-load-row,
.dashboard-scope-card,
.dashboard-scope-line,
.dashboard-empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.dashboard-command-main {
    display: grid;
    align-content: space-between;
    gap: 22px;
    min-height: 246px;
    padding: 24px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .12), transparent 42%),
        linear-gradient(145deg, #ffffff 0%, #eef8f6 52%, #fff8ed 100%);
}
.dashboard-command-copy {
    display: grid;
    gap: 10px;
    max-width: 780px;
}
.dashboard-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid rgba(20, 184, 166, .25);
    border-radius: 999px;
    background: rgba(20, 184, 166, .10);
    color: #0f766e;
    font-size: 12px;
    font-weight: 850;
}
.dashboard-command-copy strong {
    max-width: 720px;
    color: var(--text);
    font-size: 34px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.dashboard-command-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}
.dashboard-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}
.dashboard-command-actions .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.dashboard-action-primary {
    background: #0f766e;
}
.dashboard-action-primary:hover {
    background: #115e59;
}
.dashboard-command-aside {
    display: grid;
    gap: var(--dashboard-gap);
}
.dashboard-quick-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-content: center;
    min-height: 72px;
    padding: 13px 14px;
    background: var(--panel);
    color: var(--text);
}
.dashboard-quick-card:hover,
.dashboard-kpi-card:hover,
.dashboard-focus-task:hover,
.dashboard-status-row:hover,
.dashboard-load-row:hover,
.dashboard-scope-line:hover,
.dashboard-group-card:hover,
.activity-item:hover {
    border-color: var(--brand);
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .10);
}
.dashboard-quick-card span,
.dashboard-kpi-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.dashboard-quick-card b {
    grid-row: span 2;
    align-self: center;
    color: var(--brand-dark);
    font-size: 30px;
    line-height: 1;
}
.dashboard-quick-card small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.dashboard-quick-card.is-alert b {
    color: var(--danger);
}
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--dashboard-gap);
}
.dashboard-kpi-card {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 16px;
    background: var(--panel);
    color: var(--text);
}
.dashboard-kpi-card b {
    color: var(--brand-dark);
    font-size: 34px;
    line-height: 1;
}
.dashboard-kpi-card small {
    line-height: 1.35;
}
.dashboard-kpi-card.is-danger b { color: var(--danger); }
.dashboard-kpi-card.is-warn b { color: var(--amber); }
.dashboard-kpi-card.is-success b { color: #15803d; }
.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .75fr) minmax(250px, .85fr);
    gap: var(--dashboard-gap);
}
.dashboard-chart-card {
    display: grid;
    gap: 14px;
    min-height: 266px;
    overflow: hidden;
}
.dashboard-chart-card .section-head {
    margin-bottom: 0;
}
.dashboard-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(24px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 172px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.dashboard-bar {
    display: grid;
    gap: 8px;
    align-items: end;
    height: 100%;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.dashboard-bar span {
    display: block;
    min-height: 18px;
    height: var(--bar-value);
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #14b8a6, #0f766e);
    box-shadow: 0 12px 24px rgba(15, 118, 110, .20);
}
.dashboard-donut {
    position: relative;
    width: 178px;
    height: 178px;
    display: grid;
    place-items: center;
    justify-self: center;
    align-self: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--panel) 0 58%, transparent 59%),
        conic-gradient(#16a34a calc(var(--donut-value) * 1%), #f59e0b 0 86%, #ef4444 0);
}
.dashboard-donut strong {
    font-size: 34px;
    line-height: 1;
}
.dashboard-donut span {
    position: absolute;
    top: calc(50% + 24px);
    color: var(--muted);
    font-size: 12px;
}
.dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
}
.dashboard-rank-chart {
    display: grid;
    gap: 12px;
    align-self: center;
}
.dashboard-rank-row,
.dashboard-status-row,
.dashboard-load-row {
    min-width: 0;
}
.dashboard-rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: center;
}
.dashboard-rank-row span {
    font-weight: 800;
    overflow-wrap: anywhere;
}
.dashboard-rank-row b {
    color: var(--brand-dark);
}
.dashboard-rank-row i,
.dashboard-status-row i,
.dashboard-load-row i {
    grid-column: 1 / -1;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6 var(--rank-value), #e2e8f0 0);
}
.dashboard-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: var(--dashboard-gap);
    align-items: stretch;
}
.dashboard-focus-panel,
.dashboard-status-panel,
.dashboard-groups-panel,
.dashboard-load-panel,
.dashboard-activity-panel,
.dashboard-scope-panel,
.dashboard-task-panel {
    min-width: 0;
}
.dashboard-focus-list,
.dashboard-status-list,
.dashboard-load-list,
.dashboard-scope-lines,
.dashboard-group-cards,
.activity-feed {
    display: grid;
    gap: 10px;
}
.dashboard-focus-task {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 12px;
    background: #fbfdff;
    color: var(--text);
}
.dashboard-focus-date {
    display: grid;
    place-items: center;
}
.dashboard-focus-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.dashboard-focus-body strong {
    overflow-wrap: anywhere;
}
.dashboard-focus-body small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-status-row,
.dashboard-load-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px;
    background: #fbfdff;
    color: var(--text);
}
.dashboard-status-row span,
.dashboard-load-row span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.dashboard-status-row b,
.dashboard-load-row strong {
    overflow-wrap: anywhere;
}
.dashboard-status-row small,
.dashboard-load-row small {
    color: var(--muted);
}
.dashboard-status-row > span > small {
    font-size: 20px;
    font-weight: 850;
    color: var(--brand-dark);
}
.dashboard-status-row i {
    background: linear-gradient(90deg, #2563eb var(--row-value), #e2e8f0 0);
}
.dashboard-load-row > b {
    color: var(--brand-dark);
    font-size: 24px;
    line-height: 1;
}
.dashboard-load-row i {
    background: linear-gradient(90deg, #f59e0b var(--load-value), #e2e8f0 0);
}
.dashboard-mini-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.dashboard-mini-strip span {
    display: grid;
    gap: 2px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.dashboard-mini-strip b {
    color: var(--text);
    font-size: 22px;
    line-height: 1;
}
.dashboard-groups-panel,
.dashboard-scope-panel {
    align-self: start !important;
    min-height: 0 !important;
}
.dashboard-groups-panel .dashboard-group-cards,
.dashboard-scope-panel .dashboard-scope-lines {
    height: auto;
    align-content: start;
}
.dashboard-group-card {
    position: relative;
    overflow: hidden;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    min-height: 104px;
    padding: 12px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .10) var(--group-weight), transparent 0),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.dashboard-group-count,
.dashboard-group-main,
.dashboard-group-progress,
.dashboard-group-meta {
    position: relative;
}
.dashboard-group-count {
    display: grid;
    place-items: center;
    gap: 2px;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 8px;
    background: #eef6ff;
    color: var(--brand-dark);
}
.dashboard-group-count b {
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
}
.dashboard-group-count small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.dashboard-group-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.dashboard-group-main strong {
    line-height: 1.22;
    overflow-wrap: anywhere;
}
.dashboard-group-main small {
    color: var(--muted);
}
.dashboard-group-progress {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}
.dashboard-group-progress i {
    display: block;
    width: var(--group-open);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}
.dashboard-group-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dashboard-group-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.dashboard-group-card.is-critical {
    background:
        linear-gradient(90deg, rgba(220, 38, 38, .10) var(--group-weight), transparent 0),
        linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
}
.dashboard-group-card.is-critical .dashboard-group-count {
    border-color: rgba(220, 38, 38, .22);
    background: #fff1f2;
    color: var(--danger);
}
.dashboard-group-card.is-critical .dashboard-group-progress i {
    background: linear-gradient(90deg, #dc2626, #f59e0b);
}
.dashboard-group-card.is-done {
    background: linear-gradient(135deg, #ffffff 0%, #f3fbf7 100%);
}
.dashboard-group-card.is-done .dashboard-group-count {
    border-color: rgba(22, 163, 74, .22);
    background: #ecfdf3;
    color: #15803d;
}
.dashboard-group-card.is-done .dashboard-group-progress i {
    background: #16a34a;
}
.dashboard-load-panel .section-head,
.dashboard-scope-panel .section-head,
.dashboard-activity-panel .section-head,
.dashboard-groups-panel .section-head {
    margin-bottom: 12px;
}
.dashboard-scope-panel {
    display: grid !important;
    grid-template-rows: auto auto !important;
}
.dashboard-scope-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.dashboard-scope-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 14px;
    align-items: end;
    padding: 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #113a5c 0%, #0f766e 100%);
    color: #ffffff;
}
.dashboard-scope-total span {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.dashboard-scope-total strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-size: 44px;
    font-weight: 900;
    line-height: .9;
}
.dashboard-scope-total small {
    color: rgba(255, 255, 255, .82);
    font-weight: 700;
}
.dashboard-scope-lines {
    gap: 8px;
}
.dashboard-scope-line {
    --scope-accent: #2563eb;
    --scope-soft: rgba(37, 99, 235, .12);
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    min-height: 58px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--text);
}
.dashboard-scope-line.is-orgs {
    --scope-accent: #0f766e;
    --scope-soft: rgba(15, 118, 110, .12);
}
.dashboard-scope-line.is-inspections {
    --scope-accent: #f59e0b;
    --scope-soft: rgba(245, 158, 11, .16);
}
.dashboard-scope-line.is-tasks {
    --scope-accent: #7c3aed;
    --scope-soft: rgba(124, 58, 237, .12);
}
.dashboard-scope-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--scope-accent);
    box-shadow: 0 0 0 5px var(--scope-soft);
}
.dashboard-scope-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.dashboard-scope-text b {
    overflow-wrap: anywhere;
}
.dashboard-scope-text small {
    color: var(--muted);
}
.dashboard-scope-line > strong {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}
.dashboard-scope-line > i {
    grid-column: 2 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--scope-accent) var(--scope-value), #e2e8f0 0);
}
.dashboard-empty-state {
    display: grid;
    align-content: center;
    min-height: 72px;
    padding: 14px;
    background: #fbfdff;
    color: var(--muted);
    font-weight: 750;
}
.dashboard-task-panel .section-head {
    align-items: flex-start;
}
.dashboard-task-panel .task-card-grid {
    margin-top: 12px;
}
.dashboard-task-panel .task-card {
    min-height: 190px;
}
.dashboard-task-panel .filter-panel {
    margin-top: 10px;
}
[data-theme="dark"] .dashboard-command-main {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, .16), transparent 42%),
        linear-gradient(145deg, #182235 0%, #10201f 52%, #241c16 100%);
}
[data-theme="dark"] .dashboard-eyebrow {
    border-color: rgba(45, 212, 191, .25);
    background: rgba(45, 212, 191, .10);
    color: #5eead4;
}
[data-theme="dark"] .dashboard-quick-card,
[data-theme="dark"] .dashboard-kpi-card,
[data-theme="dark"] .dashboard-bars,
[data-theme="dark"] .dashboard-focus-task,
[data-theme="dark"] .dashboard-status-row,
[data-theme="dark"] .dashboard-load-row,
[data-theme="dark"] .dashboard-scope-card,
[data-theme="dark"] .dashboard-scope-line,
[data-theme="dark"] .dashboard-empty-state,
[data-theme="dark"] .dashboard-mini-strip span,
[data-theme="dark"] .dashboard-group-card,
[data-theme="dark"] .dashboard-group-meta span {
    background: var(--panel);
}
[data-theme="dark"] .dashboard-group-card.is-critical,
[data-theme="dark"] .dashboard-group-card.is-active,
[data-theme="dark"] .dashboard-group-card.is-done {
    background: var(--panel);
}
[data-theme="dark"] .dashboard-group-count {
    background: #172033;
}
[data-theme="dark"] .dashboard-group-card.is-critical .dashboard-group-count {
    background: #2a1720;
}
[data-theme="dark"] .dashboard-group-card.is-done .dashboard-group-count {
    background: #11251b;
}
[data-theme="dark"] .dashboard-group-progress {
    background: #334155;
}
[data-theme="dark"] .dashboard-scope-line > i {
    background: linear-gradient(90deg, var(--scope-accent) var(--scope-value), #334155 0);
}
[data-theme="dark"] .dashboard-scope-total {
    background: linear-gradient(135deg, #1e3a5f 0%, #115e59 100%);
}
[data-theme="dark"] .dashboard-rank-row i,
[data-theme="dark"] .dashboard-status-row i,
[data-theme="dark"] .dashboard-load-row i {
    background: linear-gradient(90deg, #60a5fa var(--rank-value), #334155 0);
}
[data-theme="dark"] .dashboard-status-row i {
    background: linear-gradient(90deg, #60a5fa var(--row-value), #334155 0);
}
[data-theme="dark"] .dashboard-load-row i {
    background: linear-gradient(90deg, #f59e0b var(--load-value), #334155 0);
}

@media (max-width: 1180px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-analytics-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
    }
    .dashboard-chart-card-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .dashboard-command,
    .dashboard-work-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-command-main {
        min-height: 0;
    }
    .dashboard-command-aside {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-command-main {
        padding: 18px;
    }
    .dashboard-command-copy strong {
        font-size: 28px;
    }
    .dashboard-command-actions,
    .dashboard-command-actions .btn {
        width: 100%;
    }
    .dashboard-command-aside,
    .dashboard-kpi-grid,
    .dashboard-mini-strip {
        grid-template-columns: 1fr;
    }
    .dashboard-focus-task {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-focus-date {
        place-items: start;
    }
    .dashboard-focus-body small {
        white-space: normal;
    }
}

.updates-command {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}
.updates-command-main,
.updates-suggestion-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.updates-command-main {
    display: grid;
    align-content: space-between;
    gap: 22px;
    min-height: 260px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .10), transparent 38%),
        linear-gradient(145deg, #ffffff 0%, #f0fdfa 52%, #fff7ed 100%);
}
.updates-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid rgba(20, 184, 166, .24);
    border-radius: 999px;
    background: rgba(20, 184, 166, .10);
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
}
.updates-command-main strong {
    display: block;
    max-width: 680px;
    color: var(--text);
    font-size: 32px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.updates-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.updates-stat-strip span {
    display: grid;
    gap: 3px;
    min-height: 74px;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.updates-stat-strip b {
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}
.updates-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.updates-jump-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}
.updates-jump-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}
.updates-jump-button.is-current {
    border-color: rgba(20, 184, 166, .34);
    color: #0f766e;
}
.updates-jump-button.is-planned {
    border-color: rgba(245, 158, 11, .36);
    color: #92400e;
}
.updates-jump-button.is-ideas {
    border-color: rgba(37, 99, 235, .32);
    color: #1d4ed8;
}
.updates-jump-button.is-released {
    border-color: rgba(34, 197, 94, .34);
    color: #15803d;
}
.updates-suggestion-form {
    display: grid;
    gap: 11px;
    padding: 16px;
}
.updates-suggestion-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.updates-suggestion-form textarea {
    min-height: 118px;
}
.updates-alert {
    margin-bottom: 16px;
}
.updates-section {
    --updates-section-accent: #14b8a6;
    --updates-section-bg: rgba(20, 184, 166, .07);
    scroll-margin-top: 18px;
    margin-bottom: 22px;
    padding: 14px;
    border-left: 4px solid var(--updates-section-accent);
    border-radius: 8px;
    background:
        linear-gradient(90deg, var(--updates-section-bg), transparent 42%),
        color-mix(in srgb, var(--panel) 86%, transparent);
}
.updates-section.is-current {
    --updates-section-accent: #14b8a6;
    --updates-section-bg: rgba(20, 184, 166, .09);
}
.updates-section.is-planned {
    --updates-section-accent: #f59e0b;
    --updates-section-bg: rgba(245, 158, 11, .10);
}
.updates-section.is-ideas {
    --updates-section-accent: #2563eb;
    --updates-section-bg: rgba(37, 99, 235, .08);
}
.updates-section.is-released {
    --updates-section-accent: #22c55e;
    --updates-section-bg: rgba(34, 197, 94, .08);
}
.updates-section .section-head small {
    color: var(--muted);
}
.updates-release-disclosure {
    padding: 0 0 14px;
}
.updates-release-summary {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.updates-release-summary::-webkit-details-marker {
    display: none;
}
.updates-release-summary h2 {
    margin: 0;
}
.updates-release-summary small {
    color: var(--muted);
}
.updates-release-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid rgba(34, 197, 94, .24);
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
}
.updates-release-summary > span::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
.updates-release-disclosure[open] .updates-release-summary {
    border-color: rgba(34, 197, 94, .28);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.updates-release-disclosure[open] .updates-release-summary > span::after {
    transform: rotate(225deg) translate(-1px, -1px);
}
.updates-release-disclosure .updates-release-grid {
    margin: 10px 14px 0;
}
.updates-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.updates-current-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.updates-planned-grid {
    grid-template-columns: 1fr;
}
.updates-release-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.update-card,
.update-idea-row,
.updates-empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.update-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
    border-top: 4px solid #14b8a6;
}
.update-card.is-planned {
    border-top-color: #f59e0b;
}
.update-card.is-released {
    border-top-color: #22c55e;
}
.update-card-head {
    display: block;
    min-height: 0;
    padding-right: 178px;
}
.update-card-top-aside {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}
.update-card-progress-row {
    position: static;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .22);
}
.update-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.update-card h3,
.update-idea-body h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.update-task-title-link {
    color: var(--brand-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.update-task-title-link:hover,
.update-task-title-link:focus-visible {
    color: var(--brand);
    text-decoration-thickness: 2px;
}
.update-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.update-progress-meter {
    --progress-fill: #14b8a6;
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}
.update-card.is-planned .update-progress-meter {
    --progress-fill: #f59e0b;
}
.update-card.is-released .update-progress-meter {
    --progress-fill: #22c55e;
}
.update-progress-caption {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}
.update-progress-caption span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.update-progress-caption b {
    color: var(--text);
    font-size: 18px;
    line-height: 1;
}
.update-progress-foot {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}
.update-progress-line {
    position: relative;
    height: 15px;
    padding: 3px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .32);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(226, 232, 240, .78)),
        #e2e8f0;
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, .12),
        0 8px 18px rgba(15, 23, 42, .06);
}
.update-progress-line::after {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: 2;
    border-radius: inherit;
    background: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent calc(10% - 1px),
        rgba(255, 255, 255, .62) calc(10% - 1px),
        rgba(255, 255, 255, .62) 10%
    );
    pointer-events: none;
}
.update-progress-line span {
    position: relative;
    z-index: 1;
    display: block;
    width: var(--progress-width, calc(var(--progress) * 1%));
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--progress-fill), #5eead4);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 24%),
        linear-gradient(90deg, var(--progress-fill), color-mix(in srgb, var(--progress-fill) 78%, white));
    box-shadow: 0 4px 10px color-mix(in srgb, var(--progress-fill) 30%, transparent);
}
.update-progress-scale {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.update-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.update-date-chip,
.update-vote-static {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.update-date-chip {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    min-width: 156px;
    min-height: 50px;
    padding: 7px 10px 7px 9px;
    overflow: hidden;
    border-color: rgba(20, 184, 166, .24);
    background: linear-gradient(135deg, #ecfeff 0%, #f0fdf4 100%);
    box-shadow: inset 3px 0 0 #14b8a6;
}
.update-date-chip::before {
    content: "";
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    align-self: center;
    border-radius: 8px;
    background:
        linear-gradient(#14b8a6 0 8px, transparent 8px),
        linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(34, 197, 94, .18));
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .28);
}
.update-date-chip::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 28px;
    width: 12px;
    height: 8px;
    border-top: 2px solid #0f766e;
    border-bottom: 2px solid #0f766e;
    opacity: .72;
}
.update-date-chip span {
    grid-column: 2;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.update-date-chip b {
    grid-column: 2;
    color: var(--text);
    font-size: 13px;
    line-height: 1.18;
    white-space: nowrap;
}
.update-date-chip.is-due b {
    color: #0f766e;
}
.update-date-chip.is-done b {
    color: #15803d;
}
.update-date-chip.is-done {
    border-color: rgba(34, 197, 94, .28);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: inset 3px 0 0 #22c55e;
}
.update-date-chip.is-done::before {
    background:
        linear-gradient(#22c55e 0 8px, transparent 8px),
        linear-gradient(135deg, rgba(34, 197, 94, .18), rgba(20, 184, 166, .14));
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .28);
}
.update-date-chip.is-done::after {
    border-color: #15803d;
}
.update-date-chip.is-empty {
    border-color: var(--line);
    background: #f8fafc;
    box-shadow: inset 3px 0 0 #94a3b8;
}
.update-date-chip.is-empty::before {
    background:
        linear-gradient(#94a3b8 0 8px, transparent 8px),
        linear-gradient(135deg, rgba(148, 163, 184, .18), rgba(203, 213, 225, .18));
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .28);
}
.update-date-chip.is-empty::after {
    border-color: #64748b;
}
.update-checklist {
    display: grid;
    gap: 6px;
    margin-top: 2px;
}
.update-checklist-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.update-checklist-item span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: 900;
}
.update-checklist-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.update-checklist-item.is-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.update-checklist-item.is-done span {
    border-color: #22c55e;
    background: #22c55e;
}
.update-checklist-item.is-done p {
    color: #166534;
}
.update-checklist-empty,
.updates-empty {
    color: var(--muted);
    text-align: center;
}
.update-checklist-empty {
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
}
.updates-empty {
    padding: 24px;
    grid-column: 1 / -1;
}
.updates-ideas-list {
    display: grid;
    gap: 10px;
}
.update-idea-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
}
.update-vote-form {
    width: fit-content;
    margin: 0;
    align-self: start;
    justify-self: start;
}
.update-vote-button {
    display: inline-grid;
    place-items: center;
    gap: 4px;
    width: 64px;
    min-width: 64px;
    min-height: 78px;
    padding: 8px;
    align-self: start;
    justify-self: start;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}
.update-vote-button:hover,
.update-vote-button.is-voted {
    border-color: #14b8a6;
    background: #ccfbf1;
    color: #0f766e;
}
.update-vote-button.is-static:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}
.update-vote-button .icon-svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}
.update-vote-button b {
    font-size: 20px;
    line-height: 1;
}
.update-idea-body {
    position: relative;
    display: grid;
    gap: 7px;
    min-width: 0;
    min-height: 0;
}
.update-idea-body > .update-kicker,
.update-idea-body > h3,
.update-idea-body > .update-description {
    padding-right: 178px;
}
.update-idea-date {
    position: absolute;
    top: 0;
    right: 0;
}
.update-idea-progress {
    width: 100%;
    max-width: none;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .22);
}
.update-idea-progress .update-progress-caption b {
    font-size: 16px;
}
.update-idea-progress .update-progress-foot {
    font-size: 10px;
}
[data-theme="dark"] .updates-command-main {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, .15), transparent 42%),
        linear-gradient(145deg, #111827 0%, #12312f 50%, #2a2114 100%);
}
[data-theme="dark"] .updates-eyebrow {
    border-color: rgba(45, 212, 191, .26);
    background: rgba(45, 212, 191, .12);
    color: #99f6e4;
}
[data-theme="dark"] .updates-stat-strip span,
[data-theme="dark"] .updates-jump-button,
[data-theme="dark"] .update-date-chip,
[data-theme="dark"] .update-vote-static,
[data-theme="dark"] .update-checklist-item,
[data-theme="dark"] .update-vote-button {
    background: #111827;
}
[data-theme="dark"] .updates-section {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--updates-section-accent) 16%, transparent), transparent 46%),
        rgba(17, 24, 39, .72);
}
[data-theme="dark"] .updates-jump-button.is-current {
    color: #99f6e4;
}
[data-theme="dark"] .updates-jump-button.is-planned {
    color: #fcd34d;
}
[data-theme="dark"] .updates-jump-button.is-ideas {
    color: #93c5fd;
}
[data-theme="dark"] .updates-jump-button.is-released {
    color: #86efac;
}
[data-theme="dark"] .updates-release-summary {
    background: #111827;
}
[data-theme="dark"] .updates-release-summary > span {
    border-color: rgba(34, 197, 94, .28);
    background: rgba(34, 197, 94, .12);
    color: #bbf7d0;
}
[data-theme="dark"] .update-date-chip {
    background: linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(34, 197, 94, .08));
}
[data-theme="dark"] .update-date-chip.is-done {
    background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(20, 184, 166, .08));
}
[data-theme="dark"] .update-date-chip.is-empty {
    background: #111827;
}
[data-theme="dark"] .update-progress-line {
    border-color: rgba(148, 163, 184, .24);
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .95), rgba(15, 23, 42, .92)),
        #1f2937;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, .32),
        0 8px 18px rgba(0, 0, 0, .18);
}
[data-theme="dark"] .update-checklist-item.is-done {
    background: rgba(34, 197, 94, .10);
    border-color: rgba(34, 197, 94, .28);
}
[data-theme="dark"] .update-checklist-item.is-done p {
    color: #bbf7d0;
}
[data-theme="dark"] .update-vote-button:hover,
[data-theme="dark"] .update-vote-button.is-voted {
    background: rgba(20, 184, 166, .16);
    color: #99f6e4;
}

@media (max-width: 900px) {
    .shell,
    .shell.sidebar-collapsed,
    .sidebar-collapsed-init .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .sidebar-bottom { margin-top: 12px; }
    .sidebar-collapsed .brand-text,
    .sidebar-collapsed .nav-text,
    .sidebar-collapsed-init .brand-text,
    .sidebar-collapsed-init .nav-text { display: block; }
    .sidebar-collapsed .sidebar-toggle,
    .sidebar-collapsed-init .sidebar-toggle { position: static; }
    .sidebar-collapsed .nav,
    .sidebar-collapsed-init .nav { margin-top: 0; }
    .sidebar-collapsed .nav a,
    .sidebar-collapsed-init .nav a {
        grid-template-columns: 28px 1fr auto;
        justify-items: start;
        padding-inline: 12px;
    }
    .sidebar-collapsed .logout-form button,
    .sidebar-collapsed .theme-form button,
    .sidebar-collapsed-init .logout-form button,
    .sidebar-collapsed-init .theme-form button {
        grid-template-columns: 28px 1fr;
        justify-items: start;
        padding-inline: 12px;
    }
    .sidebar-collapsed .theme-switch,
    .sidebar-collapsed-init .theme-switch {
        min-width: 136px;
        width: auto;
    }
    .sidebar-collapsed .theme-switch-track,
    .sidebar-collapsed .theme-switch-icon,
    .sidebar-collapsed-init .theme-switch-track,
    .sidebar-collapsed-init .theme-switch-icon { display: grid; }
    .topbar {
        display: grid;
        grid-template-columns: 1fr;
    }
    .quick-jump-bar {
        width: 100%;
        margin-left: 0;
        order: 2;
    }
    .task-id-jump {
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr) 38px;
    }
    .identity {
        width: 100%;
        order: 3;
    }
    .identity-user {
        flex: 1 1 auto;
        max-width: none;
    }
    .notification-popover {
        position: fixed;
        top: 82px;
        right: 14px;
        left: 14px;
        width: auto;
    }
    .identity-name {
        min-width: 0;
        max-width: none;
        flex: 1;
    }
    .topbar-logout-form {
        flex: 0 0 auto;
    }
    .main { padding: 14px; }
    .main-messages {
        height: auto;
        display: block;
        overflow: visible;
    }
    .stats-grid, .detail-grid, .form-grid, .filters, .dashboard-grid, .dashboard-summary, .summary-metrics, .mini-metrics-grid, .task-command-main, .task-quick-grid, .task-detail-layout, .task-create-layout, .task-create-columns, .task-create-quick-grid, .task-form-section-grid, .task-access-form-grid, .compact-address-grid, .executor-main-row, .premium-comment-form, .org-hero, .org-detail-grid, .org-employee-form, .org-employee-contact-row, .organization-dadata-workspace, .organization-dadata-search-row, .organization-editor-grid, .organization-code-grid, .organization-logo-editor, .org-info-grid, .org-requisites-grid, .org-contact-strip, .org-license-house-summary, .org-license-house-item, .house-passport-summary, .house-passport-list, .user-affiliation-row, .status-directory-item, .status-directory-item .inline-edit, .settings-debug-card, .dashboard-charts-grid, .premium-profile-hero, .profile-hero-metrics, .messages-workspace, .chat-compose, .user-invite-result { grid-template-columns: 1fr; }
    .messages-workspace,
    .main-messages .messages-workspace {
        height: auto;
        min-height: auto;
    }
    .messenger-shell.contacts-collapsed { grid-template-columns: 1fr; }
    .messages-resizer { display: none; }
    .messages-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .messages-profile-panel { border-left: 0; border-top: 1px solid var(--line); }
    .messages-head {
        align-items: stretch;
        flex-wrap: wrap;
    }
    .messages-head-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .messages-head-actions > .btn,
    .messages-head-actions > form {
        flex: 1 1 auto;
    }
    .messages-head-actions > .btn {
        width: 100%;
        text-align: center;
    }
    .chat-messages { min-height: 380px; align-content: start; }
    .chat-bubble { max-width: 100%; }
    .settings-color-grid { grid-template-columns: 1fr; }
    .comments-view-modern .comment { width: 100%; }
    .span-2 { grid-column: span 1; }
    .user-basic-grid { grid-template-columns: 1fr; }
    .house-picker-input-row { grid-template-columns: 1fr; }
    .topbar { display: grid; }
    .section-head { align-items: stretch; flex-direction: column; }
    .task-form-section-head { align-items: flex-start; flex-direction: column; }
    .task-form-section-lead { text-align: left; }
    .house-mode-cards { grid-template-columns: 1fr; }
    .toolbar-actions { justify-content: flex-start; }
    .profile-invite-form,
    .password-tools { align-items: stretch; flex-direction: column; }
    .toolbar-actions .icon-btn { flex: 0 0 40px; }
    .list-view-toolbar { justify-content: flex-start; }
    .status-mode-bar { width: 100%; }
    .mode-button { min-width: 0; flex: 1; }
    .task-sort-panel { max-width: none; margin-left: 0; }
    .sort-panel-body { grid-template-columns: 1fr; }
    .dashboard-group-card { grid-template-columns: 1fr; }
    .task-card-grid { grid-template-columns: 1fr !important; }
    .premium-card-grid { grid-template-columns: 1fr !important; }
    .dashboard-view-tools { align-items: stretch; }
    .card-column-switch { width: 100%; }
    .table-wrap { max-height: calc(100vh - 220px); }
    .house-hero,
    .house-detail-grid,
    .house-section-tabs { grid-template-columns: 1fr; }
    .house-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .house-identity strong { font-size: 24px; }
    .house-command-head .toolbar-actions { width: 100%; }
    .house-command-head .btn,
    .house-work-actions .btn { flex: 1; text-align: center; }
    .house-workspace .status-mode-bar { order: -1; }
    .comment-thread-panel.is-fullscreen { inset: 8px; padding: 12px; }
    .sparkline-chart { min-height: 140px; }
    .settings-action-strip { justify-content: stretch; }
    .settings-action-strip button { width: 100%; }
    .updates-command,
    .updates-grid,
    .update-card-head,
    .updates-stat-strip,
    .update-idea-row {
        grid-template-columns: 1fr;
    }
    .updates-command-main {
        min-height: 0;
    }
    .updates-command-main strong {
        font-size: 26px;
    }
    .updates-jump-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .updates-jump-button {
        width: 100%;
    }
    .updates-release-summary {
        align-items: stretch;
        flex-direction: column;
    }
    .updates-release-summary > span {
        justify-content: space-between;
        width: 100%;
    }
    .update-card {
        min-height: 0;
        padding: 12px;
    }
    .update-card-head {
        min-height: 0;
        padding-right: 166px;
    }
    .update-progress-meter {
        width: 100%;
    }
    .update-card-top-aside {
        top: 12px;
        right: 12px;
    }
    .update-card-progress-row {
        margin-top: 6px;
        padding-top: 12px;
    }
    .update-idea-body {
        min-height: 0;
    }
    .update-idea-body > .update-kicker,
    .update-idea-body > h3,
    .update-idea-body > .update-description {
        padding-right: 166px;
    }
    .update-idea-date {
        right: 0;
    }
    .update-idea-progress {
        max-width: none;
    }
    .update-date-chip {
        min-width: 0;
        width: 156px;
    }
    .update-vote-button {
        width: 64px;
        min-width: 64px;
        min-height: 48px;
        grid-template-columns: auto auto;
        justify-content: center;
    }
    .dev-log-hero,
    .dev-log-locked,
    .dev-log-lock-grid,
    .dev-log-metrics {
        grid-template-columns: 1fr;
    }
    .dev-log-actions,
    .dev-log-safety {
        align-items: stretch;
        flex-direction: column;
    }
    .dev-log-actions button,
    .dev-log-safety .btn {
        justify-content: center;
        width: 100%;
    }
    .dev-log-console {
        min-height: 360px;
    }
    .dev-log-line {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 8px;
        padding-inline: 8px;
    }
}

/* Premium refresh: one visual language across the working cabinet. */
html {
    accent-color: var(--brand);
}

.shell {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 28%, transparent), transparent 420px),
        var(--bg);
}

.sidebar {
    border-right: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(180deg, #132b2a 0%, #101b20 48%, #0c1218 100%);
    box-shadow: 10px 0 32px rgba(2, 6, 23, .16);
}

.brand-mark {
    background:
        linear-gradient(135deg, #38bdf8 0%, var(--accent) 100%);
    box-shadow: 0 12px 26px rgba(20, 184, 166, .24);
}

.brand-text b {
    letter-spacing: .01em;
}

.nav {
    gap: 6px;
}

.nav a {
    border: 1px solid transparent;
    color: rgba(248, 250, 252, .78);
    font-weight: 720;
}

.nav a:hover {
    border-color: rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .075);
    color: #fff;
}

.nav a.is-current {
    border-color: rgba(125, 211, 252, .22);
    background:
        linear-gradient(90deg, rgba(45, 212, 191, .18), rgba(96, 165, 250, .10));
    box-shadow: inset 3px 0 0 #5eead4, 0 10px 24px rgba(0, 0, 0, .16);
}

.sidebar-toggle,
.theme-switch {
    box-shadow: none;
}

.main {
    padding: 26px 28px;
}

.topbar {
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.topbar h1 {
    color: var(--text);
    font-size: 30px;
    font-weight: 850;
    line-height: 1.08;
}

.topbar p {
    max-width: 840px;
    font-size: 14px;
    line-height: 1.45;
}

.identity-user,
.task-id-jump,
.topbar-logout-form button,
.notification-trigger {
    border-color: color-mix(in srgb, var(--line) 78%, transparent);
    box-shadow: var(--shadow-sm);
}

.panel,
.mini-card,
.stat,
.list-card,
.task-card,
.update-card,
.update-idea-row,
.updates-empty {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 18px;
}

.section-head {
    gap: 14px;
}

.section-head h2,
.panel h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.18;
}

.section-head small,
.section-head p {
    color: var(--muted);
    line-height: 1.45;
}

.btn,
button:not(.mode-button):not(.icon-btn):not(.sidebar-toggle):not(.theme-switch):not(.modal-close):not(.notification-close):not(.table-sort-link):not(.comment-action-button):not(.comment-menu-trigger):not(.comment-menu-item):not(.check-button):not(.chip):not(.house-section-tab):not(.copy-button):not(.update-vote-button):not(.messages-head-menu-toggle):not(.chat-menu-trigger):not(.notification-read-button):not(.summary-button):not(.icon-action):not(.icon-danger):not(.inspection-task-toggle) {
    letter-spacing: 0;
}

.btn:not(.icon-btn),
button:not(.mode-button):not(.icon-btn):not(.sidebar-toggle):not(.theme-switch):not(.modal-close):not(.notification-close):not(.table-sort-link):not(.comment-action-button):not(.comment-menu-trigger):not(.comment-menu-item):not(.check-button):not(.chip):not(.house-section-tab):not(.copy-button):not(.update-vote-button):not(.messages-head-menu-toggle):not(.chat-menu-trigger):not(.notification-read-button):not(.summary-button):not(.icon-action):not(.icon-danger):not(.inspection-task-toggle) {
    min-height: 42px;
    padding-inline: 15px;
}

.btn.secondary,
.summary-button,
.copy-button {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn.secondary:hover,
.summary-button:hover,
.copy-button:hover {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--brand)), var(--panel-soft));
    color: var(--brand-dark);
}

.btn.create-action,
.dashboard-action-primary,
.gis-gkh-bulk-button {
    border-color: color-mix(in srgb, var(--accent) 72%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent));
    color: #fff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 22%, transparent);
}

.btn.create-action:hover,
.dashboard-action-primary:hover,
.gis-gkh-bulk-button:hover {
    background:
        linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 86%, black));
    color: #fff;
}

.btn.secondary.danger-soft {
    border-color: color-mix(in srgb, var(--danger) 26%, var(--line));
    background: color-mix(in srgb, var(--danger) 8%, var(--panel));
    color: var(--danger);
}

.btn:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none !important;
    box-shadow: none !important;
}

.icon-btn,
.btn.secondary.icon-btn,
.round-icon-btn {
    border-color: var(--line);
    background: var(--panel);
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover,
.btn.secondary.icon-btn:hover {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.mode-button,
.mode-button:hover,
.table-sort-link,
.table-sort-link:hover,
.check-button,
.check-button:hover,
.house-section-tab,
.house-section-tab:hover,
.notification-close,
.notification-close:hover,
.modal-close,
.modal-close:hover,
.comment-action-button,
.comment-action-button:hover,
.icon-action,
.icon-action:hover,
.icon-danger,
.icon-danger:hover {
    box-shadow: none;
    transform: none;
}

.status-mode-bar,
.card-column-switch,
.segmented-control,
.house-section-tabs {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--panel));
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .055);
}

.mode-button {
    border: 0;
    color: color-mix(in srgb, var(--text) 70%, var(--muted));
    font-weight: 780;
}

.mode-button:hover,
.segmented-control label:hover,
.house-section-tab:hover {
    background: color-mix(in srgb, var(--panel) 90%, var(--brand));
    color: var(--brand-dark);
}

.mode-button.is-selected,
.segmented-control label.is-selected,
.house-section-tab.is-selected {
    background: var(--panel);
    color: var(--brand-dark);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .10);
}

input,
select,
textarea {
    background: color-mix(in srgb, var(--panel) 96%, white);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
}

.form-grid label,
.form-grid .form-field,
.stack-form,
.filters label,
.profile-password-form label,
.profile-edit-form label,
.updates-suggestion-form label {
    font-weight: 760;
}

.filter-panel,
.inline-create-panel,
.column-panel,
.table-tools-panel {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 82%, var(--panel)), var(--panel-soft));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
}

.column-control-row,
.permissions-grid label,
.role-option,
.user-affiliations-editor,
.user-basic-fields,
.user-role-choice,
.user-onboarding-choice,
.association-section,
.association-picker,
.profile-edit-section,
.settings-action-card,
.settings-placeholder {
    border-radius: var(--radius);
}

.table-wrap {
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.table-wrap table {
    border-radius: inherit;
}

th {
    background: color-mix(in srgb, var(--panel-soft) 88%, var(--panel));
    color: color-mix(in srgb, var(--text) 46%, var(--muted));
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
#tasks-table th {
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.1;
    text-transform: none;
    vertical-align: middle;
}
#tasks-table thead .table-sort-link {
    min-height: 18px;
    gap: 4px;
    line-height: 1.1;
}
#tasks-table thead .sort-indicator {
    font-size: 10px;
}

td {
    color: color-mix(in srgb, var(--text) 92%, var(--muted));
}

tbody tr:hover {
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    box-shadow: inset 3px 0 0 var(--brand);
}

.empty,
.mini-empty,
.dashboard-empty-state,
.updates-empty,
.update-checklist-empty,
.messages-empty-state {
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel-soft) 74%, var(--panel));
}

.pill,
.status,
.soft-badge,
.status-select,
.quick-select,
.task-table-due-days {
    border: 1px solid color-mix(in srgb, currentColor 13%, transparent);
    font-weight: 850;
    letter-spacing: 0;
}

.status,
.pill {
    min-height: 24px;
    padding: 4px 9px;
}

.status.new,
.status-select.new { background: #eaf3ff; color: #1d4ed8; }
.status.in_work,
.status-select.in_work { background: #e8faf7; color: #0f766e; }
.status.waiting,
.status.waiting_management_company,
.status-select.waiting,
.status-select.waiting_management_company { background: #fff7df; color: #9a5a08; }
.status.review,
.status-select.review { background: #edf0ff; color: #3730a3; }
.status.done,
.status-select.done { background: #e9fbeF; color: #166534; }
.status.rejected,
.status-select.rejected { background: #fff0f0; color: #991b1b; }

.list-card,
.task-card,
.dashboard-kpi-card,
.dashboard-quick-card,
.dashboard-focus-task,
.dashboard-status-row,
.dashboard-load-row,
.dashboard-scope-line,
.update-card,
.update-idea-row,
.gis-gkh-license-card,
.org-license-card,
.org-employee-card,
.notification-item {
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.list-card:hover,
.task-card:hover,
.dashboard-kpi-card:hover,
.dashboard-quick-card:hover,
.dashboard-focus-task:hover,
.dashboard-status-row:hover,
.dashboard-load-row:hover,
.dashboard-scope-line:hover,
.update-card:hover,
.update-idea-row:hover,
.gis-gkh-license-card:hover,
.org-license-card:hover,
.org-employee-card:hover,
.notification-item:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    box-shadow: var(--shadow-md);
}

.list-card,
.task-card {
    background:
        linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel-soft) 64%, var(--panel)));
}

.list-card::before {
    width: 3px;
}

.list-card-kicker,
.dashboard-eyebrow,
.updates-eyebrow {
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, var(--panel));
    color: var(--accent);
    letter-spacing: .03em;
}

.list-card-title,
.task-card-title {
    font-weight: 850;
}

.list-card-footer-line,
.task-card-footer {
    border-top-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.stats-grid {
    gap: 14px;
}

.stat,
.mini-metric,
.profile-hero-metrics span,
.house-metrics div,
.dashboard-mini-strip span,
.updates-stat-strip span,
.org-license-meta-grid span,
.org-requisite-main,
.org-requisite-pair,
.org-contact-strip,
.org-info-field,
.profile-contact-panel dd {
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56);
}

.stat span,
.mini-metric span,
.house-metrics span,
.dashboard-kpi-card span,
.dashboard-quick-card span,
.updates-stat-strip span,
.org-license-meta-grid small,
.profile-contact-panel dt {
    letter-spacing: .03em;
}

.dashboard-premium-page,
.updates-section,
.settings-page,
.gis-gkh-workspace,
.house-workspace-shell {
    gap: 16px;
}

.dashboard-command-main,
.updates-command-main,
.house-hero,
.org-hero,
.premium-profile-hero {
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 42%),
        linear-gradient(145deg, var(--panel) 0%, color-mix(in srgb, var(--accent) 8%, var(--panel)) 55%, color-mix(in srgb, var(--accent-2) 7%, var(--panel)) 100%);
}

.dashboard-command-main,
.updates-command-main {
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    box-shadow: var(--shadow-md);
}

.dashboard-command-copy strong,
.updates-command-main strong {
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-command-copy p {
    font-size: 15px;
}

.dashboard-kpi-grid {
    gap: 14px;
}

.dashboard-kpi-card {
    min-height: 126px;
    padding: 17px;
}

.dashboard-kpi-card b,
.dashboard-quick-card b,
.dashboard-scope-total strong {
    font-weight: 900;
}

.dashboard-bars,
.dashboard-rank-row i,
.dashboard-status-row i,
.dashboard-load-row i,
.dashboard-group-progress,
.update-progress-line,
.house-passport-progress,
.org-license-import-bar {
    background: color-mix(in srgb, var(--line) 72%, var(--panel));
}

.dashboard-bar span {
    background: linear-gradient(180deg, #38bdf8, var(--accent));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.dashboard-donut {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 62%, transparent), var(--shadow-sm);
}

.dashboard-group-count {
    border-radius: var(--radius);
}

.dashboard-scope-total {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand-ink) 92%, #0f766e), var(--accent));
}

.dashboard-task-panel .task-card {
    min-height: 198px;
}

.dashboard-gis-sync-panel {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 42%),
        var(--panel);
}

.updates-command {
    gap: 18px;
}

.updates-suggestion-form {
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.updates-suggestion-form button[type="submit"] {
    justify-self: start;
}

.update-card {
    border-top-width: 0;
    box-shadow: var(--shadow-md);
}

.update-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
}

.update-card.is-planned::before {
    background: linear-gradient(90deg, var(--amber), #fbbf24);
}

.update-card.is-released::before {
    background: linear-gradient(90deg, #16a34a, #5eead4);
}

.update-card-head {
    display: grid;
    gap: 8px;
}

.update-date-chip {
    border-radius: var(--radius);
}

.update-checklist-item,
.update-vote-button {
    border-radius: var(--radius);
}

.house-command-panel,
.org-command-panel,
.profile-hero {
    box-shadow: var(--shadow-md);
}

.house-command-head,
.house-passport-category-head {
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.house-identity strong,
.org-identity strong,
.profile-identity h2,
.task-title-stack h2 {
    font-weight: 900;
    letter-spacing: 0;
}

.house-metrics b,
.mini-metric b,
.profile-hero-metrics b {
    color: var(--brand-dark);
}

.house-passport-section,
.org-license-card,
.org-license-result,
.org-employee-add-panel,
.profile-upload-card,
.profile-status-card,
.comment-body,
.comment,
.legacy-message-list article,
.gis-gkh-section-cell,
.gis-gkh-license-card,
.gis-gkh-license-item,
.settings-action-card,
.settings-placeholder {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.house-section-tabs {
    padding: 5px;
}

.task-command-panel {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 44%),
        var(--panel);
    box-shadow: var(--shadow-md);
}

.task-quick-tile,
.task-form-section.task-create-card,
.task-access-form-card,
.executor-result-card,
.association-section,
.association-picker-list label,
.checklist-row {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.executor-edit-toggle {
    border-color: var(--line);
    background: var(--panel);
    color: var(--brand-dark);
    box-shadow: var(--shadow-sm);
}

.executor-edit-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.comment-thread-panel {
    overflow: hidden;
}

.comment {
    box-shadow: var(--shadow-sm);
}

.comment-body {
    border-radius: var(--radius);
}

.premium-comment-form {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 86%, transparent), var(--panel));
}

.settings-actions-panel {
    position: sticky;
    top: 12px;
    z-index: 12;
}

.settings-tabs.status-mode-bar {
    max-width: 100%;
    overflow-x: auto;
}

.settings-action-card {
    box-shadow: var(--shadow-sm);
}

.settings-state-pill,
.gis-gkh-license-summary span,
.org-license-total,
.org-employee-total {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.gis-gkh-section-cell {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .54);
}

.gis-gkh-section-cell.is-fresh {
    border-color: rgba(22, 163, 74, .24);
    background: color-mix(in srgb, #dcfce7 52%, var(--panel));
}

.gis-gkh-section-cell.is-stale {
    border-color: rgba(245, 158, 11, .28);
    background: color-mix(in srgb, #fef3c7 54%, var(--panel));
}

.gis-gkh-section-cell.is-old {
    border-color: rgba(180, 35, 24, .24);
    background: color-mix(in srgb, #fee2e2 52%, var(--panel));
}

.alert {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] body {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 84%, #1f2937) 0%, var(--bg) 380px),
        var(--bg);
}

[data-theme="dark"] .sidebar {
    background:
        linear-gradient(180deg, #0e2424 0%, #0b1520 52%, #080d14 100%);
}

[data-theme="dark"] .panel,
[data-theme="dark"] .list-card,
[data-theme="dark"] .task-card,
[data-theme="dark"] .update-card,
[data-theme="dark"] .update-idea-row,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .inline-create-panel,
[data-theme="dark"] .column-panel {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
}
[data-theme="dark"] .inspection-command-metrics > span,
[data-theme="dark"] .inspection-edit-association {
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 62%, var(--panel));
}

[data-theme="dark"] .btn.secondary,
[data-theme="dark"] .summary-button,
[data-theme="dark"] .copy-button,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .btn.secondary.icon-btn {
    background: linear-gradient(180deg, #172033, #111827);
    color: var(--text);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0f172a;
}

[data-theme="dark"] .dashboard-command-main,
[data-theme="dark"] .updates-command-main,
[data-theme="dark"] .house-hero,
[data-theme="dark"] .org-hero,
[data-theme="dark"] .premium-profile-hero {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 13%, transparent), transparent 44%),
        linear-gradient(145deg, var(--panel) 0%, color-mix(in srgb, var(--accent) 10%, var(--panel)) 56%, color-mix(in srgb, var(--accent-2) 8%, var(--panel)) 100%);
}

[data-theme="dark"] .stat,
[data-theme="dark"] .mini-metric,
[data-theme="dark"] .profile-hero-metrics span,
[data-theme="dark"] .house-metrics div,
[data-theme="dark"] .dashboard-mini-strip span,
[data-theme="dark"] .updates-stat-strip span,
[data-theme="dark"] .org-license-meta-grid span,
[data-theme="dark"] .org-requisite-main,
[data-theme="dark"] .org-requisite-pair,
[data-theme="dark"] .org-contact-strip,
[data-theme="dark"] .org-info-field,
[data-theme="dark"] .profile-contact-panel dd,
[data-theme="dark"] .house-passport-section,
[data-theme="dark"] .org-license-card,
[data-theme="dark"] .org-license-result,
[data-theme="dark"] .org-employee-add-panel,
[data-theme="dark"] .profile-upload-card,
[data-theme="dark"] .profile-status-card,
[data-theme="dark"] .comment-body,
[data-theme="dark"] .comment,
[data-theme="dark"] .legacy-message-list article,
[data-theme="dark"] .gis-gkh-section-cell,
[data-theme="dark"] .gis-gkh-license-card,
[data-theme="dark"] .gis-gkh-license-item,
[data-theme="dark"] .settings-action-card,
[data-theme="dark"] .settings-placeholder {
    background: #111827;
}

[data-theme="dark"] .table-wrap,
[data-theme="dark"] th {
    background: #111827;
}

[data-theme="dark"] tbody tr:hover {
    background: color-mix(in srgb, var(--brand) 11%, #111827);
}

[data-theme="dark"] .mode-button.is-selected,
[data-theme="dark"] .segmented-control label.is-selected,
[data-theme="dark"] .house-section-tab.is-selected {
    background: #0f172a;
    color: var(--brand-dark);
}

[data-theme="dark"] .gis-gkh-section-cell.is-fresh {
    background: rgba(22, 163, 74, .11);
}

[data-theme="dark"] .gis-gkh-section-cell.is-stale {
    background: rgba(245, 158, 11, .12);
}

[data-theme="dark"] .gis-gkh-section-cell.is-old {
    background: rgba(248, 113, 113, .10);
}

@media (max-width: 1180px) {
    .main {
        padding: 22px;
    }
}

@media (max-width: 900px) {
    .main {
        padding: 16px;
    }

    .sidebar {
        border-right: 0;
        box-shadow: none;
    }

    .topbar {
        align-items: stretch;
    }

    .settings-actions-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .topbar h1 {
        font-size: 26px;
    }

    .panel {
        padding: 14px;
    }

    .btn:not(.icon-btn),
    button:not(.mode-button):not(.icon-btn):not(.sidebar-toggle):not(.theme-switch):not(.modal-close):not(.notification-close):not(.table-sort-link):not(.comment-action-button):not(.comment-menu-trigger):not(.comment-menu-item):not(.check-button):not(.chip):not(.house-section-tab):not(.copy-button):not(.update-vote-button):not(.messages-head-menu-toggle):not(.chat-menu-trigger):not(.notification-read-button):not(.summary-button):not(.icon-action):not(.icon-danger):not(.inspection-task-toggle) {
        width: 100%;
    }

    .toolbar-actions .btn,
    .form-actions .btn,
    .form-actions button {
        flex: 1 1 auto;
    }

    .topbar-logout-form button,
    .notification-trigger,
    .task-id-jump button {
        width: 42px;
        flex: 0 0 auto;
    }

    .task-id-jump button {
        width: 34px;
    }

    .executor-main-row,
    .executor-picker.is-compact .executor-main-row,
    .task-list-executor-form .executor-picker.is-compact .executor-main-row {
        grid-template-columns: 1fr;
    }

    .executor-edit-toggle {
        width: 100%;
    }

    .executor-result-card b,
    .executor-result-card span {
        white-space: normal;
    }

    .task-list-executor-popover {
        right: 0;
        left: auto;
        width: min(320px, calc(100vw - 48px));
    }
}

/* Task-detail refinements: compact action links, square checks, colored status controls. */
.status,
.pill,
.status-select,
.status-choice-button {
    --status-color: var(--brand);
}

.status:not(.soft-badge),
.status-select {
    border-color: color-mix(in srgb, var(--status-color) 22%, transparent);
    background: color-mix(in srgb, var(--status-color) 12%, var(--panel));
    color: color-mix(in srgb, var(--status-color) 82%, #0f172a);
}

.status-select {
    min-height: 34px;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.task-status-buttons {
    gap: 7px;
}

.status-choice-button {
    min-height: 34px;
    padding: 7px 11px;
    border-color: color-mix(in srgb, var(--status-color) 22%, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--status-color) 10%, var(--panel)), color-mix(in srgb, var(--status-color) 7%, var(--panel-soft)));
    color: color-mix(in srgb, var(--status-color) 82%, #0f172a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
}

.status-choice-button:hover {
    border-color: color-mix(in srgb, var(--status-color) 42%, var(--line));
    background: color-mix(in srgb, var(--status-color) 15%, var(--panel));
    color: color-mix(in srgb, var(--status-color) 90%, #0f172a);
}

.status-choice-button.is-selected {
    border-color: color-mix(in srgb, var(--status-color) 72%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--status-color) 90%, white), var(--status-color));
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--status-color) 24%, transparent);
}

.task-responsible-tile b {
    color: var(--text);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.checklist-row,
.task-edit-checklist-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
}

.checklist-row form[data-checklist-toggle],
.task-edit-checklist-row form[data-checklist-toggle],
.checklist-row form[data-checklist-convert],
.task-edit-checklist-row form[data-checklist-convert],
.checklist-row form[data-checklist-delete],
.task-edit-checklist-row form[data-checklist-delete] {
    width: auto;
    margin: 0;
}
.checklist-row form[data-checklist-convert],
.task-edit-checklist-row form[data-checklist-convert],
.checklist-row form[data-checklist-delete],
.task-edit-checklist-row form[data-checklist-delete],
.create-checklist-row .icon-danger {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .14s ease, visibility .14s ease;
}
.checklist-row:hover form[data-checklist-convert],
.task-edit-checklist-row:hover form[data-checklist-convert],
.checklist-row:hover form[data-checklist-delete],
.task-edit-checklist-row:hover form[data-checklist-delete],
.checklist-row:focus-within form[data-checklist-convert],
.task-edit-checklist-row:focus-within form[data-checklist-convert],
.checklist-row:focus-within form[data-checklist-delete],
.task-edit-checklist-row:focus-within form[data-checklist-delete],
.create-checklist-row:hover .icon-danger,
.create-checklist-row:focus-within .icon-danger {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}
@media (hover: none), (pointer: coarse) {
    .checklist-row form[data-checklist-convert],
    .task-edit-checklist-row form[data-checklist-convert],
    .checklist-row form[data-checklist-delete],
    .task-edit-checklist-row form[data-checklist-delete],
    .create-checklist-row .icon-danger {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
}

.check-button,
button.check-button,
span.check-button {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    line-height: 1 !important;
    transform: none !important;
    flex: 0 0 22px;
}

.icon-action,
.icon-danger,
button.icon-action,
button.icon-danger {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    transform: none !important;
}

.icon-action:hover,
.icon-danger:hover {
    background: transparent !important;
    text-decoration: underline;
}

.association-picker-list label,
.participant-choice-grid label,
.access-chip-grid label {
    border-radius: 6px;
}

.association-picker-list label.is-selected,
.participant-choice-grid label.is-selected,
.access-chip-grid label.is-selected {
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--brand) 82%, transparent);
}

.association-picker-list input[type="checkbox"],
.association-picker-list input[type="radio"],
.participant-choice-grid input[type="checkbox"],
.participant-choice-grid input[type="radio"],
.access-chip-grid input[type="checkbox"],
.access-chip-grid input[type="radio"] {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 2px 0 0;
    padding: 0 !important;
    border-radius: 4px;
    box-shadow: none;
    align-self: start;
}

.association-picker-list input[type="checkbox"]:focus,
.association-picker-list input[type="radio"]:focus,
.participant-choice-grid input[type="checkbox"]:focus,
.participant-choice-grid input[type="radio"]:focus,
.access-chip-grid input[type="checkbox"]:focus,
.access-chip-grid input[type="radio"]:focus {
    outline: 2px solid color-mix(in srgb, var(--brand) 24%, transparent);
    outline-offset: 2px;
    box-shadow: none;
}

.status-directory-item .inline-edit {
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
}

.status-color-control {
    display: inline-grid;
    grid-template-columns: 32px auto;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-color-control input[type="color"] {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 2px;
    border-radius: 6px;
}

[data-theme="dark"] .status:not(.soft-badge),
[data-theme="dark"] .status-select,
[data-theme="dark"] .status-choice-button {
    color: color-mix(in srgb, var(--status-color) 36%, #f8fafc);
    background: color-mix(in srgb, var(--status-color) 18%, #111827);
}

[data-theme="dark"] .status-choice-button.is-selected {
    color: #fff;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--status-color) 88%, white), var(--status-color));
}

@media (max-width: 720px) {
    .status-directory-item .inline-edit {
        grid-template-columns: 1fr;
    }

    .status-color-control {
        justify-self: start;
    }

    .checklist-row,
    .task-edit-checklist-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .checklist-row form[data-checklist-convert],
    .task-edit-checklist-row form[data-checklist-convert],
    .checklist-row form[data-checklist-delete],
    .task-edit-checklist-row form[data-checklist-delete] {
        grid-column: 2;
    }
}

.task-id-jump button,
button.task-id-jump-button {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center;
    flex: 0 0 34px;
    aspect-ratio: 1 / 1;
}

/* Premium auth screens. */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(115deg, rgba(14, 116, 144, .20) 0%, transparent 36%),
        linear-gradient(142deg, #081619 0%, #102227 42%, #e8eef4 42%, #f5f7fa 100%);
    color: var(--text);
}

.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 78px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 78px);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .72) 46%, transparent 76%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    min-height: min(700px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .40);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 30px 90px rgba(6, 20, 28, .30);
}

.auth-visual {
    position: relative;
    display: grid;
    align-content: space-between;
    min-height: 100%;
    padding: clamp(28px, 5vw, 54px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, .20), transparent 44%),
        linear-gradient(160deg, #0d2a2a 0%, #10212a 54%, #101720 100%);
    color: #f8fafc;
}

.auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: .32;
}

.auth-visual > * {
    position: relative;
    z-index: 1;
}

.auth-brand-row,
.auth-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.auth-brand-row b,
.auth-brand-row small,
.auth-card-head h1,
.auth-card-head p {
    display: block;
}

.auth-brand-row b {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.auth-brand-row small {
    margin-top: 3px;
    color: rgba(226, 232, 240, .72);
    font-size: 13px;
    font-weight: 760;
}

.auth-visual-copy {
    display: grid;
    gap: 12px;
    max-width: 520px;
}

.auth-visual-copy span {
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #a7f3d0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-visual-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 78px);
    font-weight: 950;
    line-height: .95;
}

.auth-visual-copy p {
    max-width: 440px;
    margin: 0;
    color: rgba(226, 232, 240, .82);
    font-size: 16px;
    line-height: 1.55;
}

.auth-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-signal-grid span {
    min-height: 68px;
    display: grid;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    color: rgba(248, 250, 252, .86);
    font-size: 13px;
    font-weight: 860;
}

.auth-card,
.login-card.auth-card {
    width: min(440px, calc(100% - 44px));
    align-self: center;
    justify-self: center;
    margin: 22px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .70);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .90));
    box-shadow: 0 22px 58px rgba(15, 23, 42, .16);
    gap: 16px;
}

.invite-card,
.login-card.invite-card {
    width: min(560px, calc(100% - 44px));
}

.auth-card-head h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    font-weight: 920;
    line-height: 1.05;
}

.auth-card-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.login-mark {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .22);
    background:
        linear-gradient(135deg, #38bdf8 0%, #14b8a6 100%);
    box-shadow: 0 14px 28px rgba(20, 184, 166, .24);
    font-weight: 950;
}

.login-mark.root {
    background:
        linear-gradient(135deg, #475569 0%, #111827 100%);
    color: #f8fafc;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .26);
}

.auth-password-field,
.invite-accept-form label {
    display: grid;
    gap: 7px;
    margin: 0;
    color: color-mix(in srgb, var(--text) 78%, var(--muted));
    font-size: 13px;
    font-weight: 850;
}

.auth-card input,
.auth-card textarea,
.auth-card select {
    border-color: color-mix(in srgb, var(--line) 80%, transparent);
    background: rgba(255, 255, 255, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="email"] {
    min-height: 46px;
    border-radius: 8px;
}

.auth-card input:focus,
.auth-card textarea:focus,
.auth-card select:focus {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.auth-card > button,
.auth-card form > button[type="submit"] {
    min-height: 46px;
    border-radius: 8px;
    border-color: color-mix(in srgb, var(--accent) 68%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, white), var(--accent));
    color: #fff;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 24%, transparent);
    font-weight: 900;
}

.auth-card > button:hover,
.auth-card form > button[type="submit"]:hover {
    background:
        linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 86%, #0f172a));
    color: #fff;
}

.root-auth-visual {
    background:
        linear-gradient(135deg, rgba(148, 163, 184, .18), transparent 44%),
        linear-gradient(160deg, #0f172a 0%, #111827 58%, #151f2e 100%);
}

.root-auth-visual .auth-visual-copy span {
    color: #cbd5e1;
}

.root-auth-card button[type="submit"] {
    border-color: rgba(71, 85, 105, .36);
    background:
        linear-gradient(180deg, #475569, #111827);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .24);
}

.root-auth-card button[type="submit"]:hover {
    background:
        linear-gradient(180deg, #334155, #020617);
}

.invite-accept-form {
    gap: 13px;
}

.password-tools {
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.password-tools .btn.secondary {
    min-height: 38px;
}

@media (max-width: 860px) {
    .login-body {
        padding: 14px;
        place-items: stretch;
        background:
            linear-gradient(180deg, #0d2a2a 0%, #10212a 38%, #f5f7fa 38%, #f5f7fa 100%);
    }

    .login-body::before {
        opacity: .65;
        mask-image: linear-gradient(180deg, #000 0%, transparent 58%);
    }

    .auth-shell {
        min-height: calc(100vh - 28px);
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 290px;
        padding: 24px;
    }

    .auth-visual-copy h1 {
        font-size: clamp(36px, 12vw, 52px);
    }

    .auth-signal-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .auth-signal-grid span {
        min-height: 46px;
        padding: 9px;
        font-size: 12px;
    }

    .auth-card,
    .login-card.auth-card,
    .invite-card,
    .login-card.invite-card {
        width: auto;
        margin: 0;
        border-radius: 0;
        border-inline: 0;
        border-bottom: 0;
        box-shadow: none;
    }
}

/* Organization detail: keep requisites readable and hide technical bulk from the main view. */
.org-passport-panel {
    display: grid;
    gap: 16px;
    overflow: hidden;
}

.org-passport-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: 12px;
    align-items: stretch;
}

.org-passport-main {
    min-width: 0;
    min-height: 0;
    padding: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 54%),
        color-mix(in srgb, var(--panel-soft) 64%, var(--panel));
}

.org-passport-main strong {
    font-size: clamp(19px, 2vw, 24px);
    line-height: 1.22;
}

.org-passport-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 4px;
}

.org-number-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.org-number-grid .copy-field {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    min-width: 0;
    min-height: 100%;
    padding: 12px;
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.org-number-grid .copy-field span,
.org-number-grid .copy-field b,
.org-number-grid .copy-field .copy-button {
    grid-column: 1;
}

.org-number-grid .copy-field b {
    font-size: 15px;
    line-height: 1.28;
    white-space: nowrap;
    overflow-wrap: normal;
}

.org-number-grid .copy-field .copy-button {
    justify-self: start;
    margin-top: 4px;
}

.org-passport-section {
    display: grid;
    gap: 10px;
}

.org-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.org-block-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
}

.org-contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.org-contact-list .copy-field {
    grid-template-columns: minmax(118px, .34fr) minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    min-width: 0;
    padding: 11px 12px;
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.org-contact-list .copy-field span {
    grid-column: auto;
}

.org-contact-list .copy-field b {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    font-size: 14px;
    line-height: 1.36;
}

.org-contact-list .copy-field.is-wide {
    grid-column: 1 / -1;
    grid-template-columns: minmax(150px, .22fr) minmax(0, 1fr) auto;
    align-items: start;
}

.org-contact-list .copy-field.is-wide b {
    max-width: 78ch;
    font-size: 15px;
}

.org-passport-panel .copy-button {
    justify-self: end;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}

.org-address-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.org-address-stack .org-info-field {
    grid-template-columns: minmax(140px, .28fr) minmax(0, 1fr);
    align-items: start;
    padding: 11px 12px;
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.org-address-stack .org-info-field span {
    align-self: start;
}

.org-address-stack .org-info-field b {
    font-size: 14px;
    line-height: 1.36;
}

.org-technical-panel {
    padding: 0;
    overflow: hidden;
}

.org-technical-panel details {
    display: grid;
    gap: 0;
}

.org-technical-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    background: color-mix(in srgb, var(--panel-soft) 70%, var(--panel));
}

.org-technical-panel summary::-webkit-details-marker {
    display: none;
}

.org-technical-panel summary span {
    display: grid;
    gap: 2px;
}

.org-technical-panel summary b {
    font-size: 16px;
}

.org-technical-panel summary small {
    color: var(--muted);
}

.org-technical-panel summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--brand-dark);
    font-weight: 850;
}

.org-technical-panel details[open] summary::after {
    content: "-";
}

.org-technical-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    padding: 0 16px 16px;
}

[data-theme="dark"] .org-passport-main,
[data-theme="dark"] .org-number-grid .copy-field,
[data-theme="dark"] .org-contact-list .copy-field,
[data-theme="dark"] .org-address-stack .org-info-field,
[data-theme="dark"] .org-technical-panel summary {
    background: #111827;
}

[data-theme="dark"] .org-passport-main {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 56%),
        #111827;
}

[data-theme="dark"] .org-technical-panel summary::after {
    background: #0f172a;
}

@media (max-width: 980px) {
    .org-passport-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .org-number-grid,
    .org-contact-list,
    .org-address-stack {
        grid-template-columns: 1fr;
    }

    .org-contact-list .copy-field,
    .org-contact-list .copy-field.is-wide,
    .org-address-stack .org-info-field {
        grid-template-columns: 1fr;
    }

    .org-passport-panel .copy-button {
        justify-self: start;
    }
}

/* Messenger scroll safety: keep side columns usable with many contacts. */
@media (min-width: 721px) {
    .main-messages {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .main-messages .messages-workspace,
    .messages-workspace.messenger-shell {
        height: 100%;
        max-height: calc(100dvh - 118px);
        min-height: 0;
        overflow: hidden;
    }

    .messages-sidebar,
    .messages-main,
    .messages-profile-panel {
        min-width: 0;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
    }

    .messages-profile-panel {
        align-content: stretch;
    }

    .conversation-list,
    .conversation-people,
    .chat-messages {
        min-height: 0;
        max-height: 100%;
        overflow-x: hidden;
        overflow-y: scroll;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .conversation-people,
    .conversation-list {
        padding-right: 6px;
    }
}

.conversation-list::-webkit-scrollbar,
.conversation-people::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.conversation-list::-webkit-scrollbar-thumb,
.conversation-people::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 28%, #cbd5e1);
    background-clip: padding-box;
}

.conversation-list::-webkit-scrollbar-track,
.conversation-people::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.conversation-list,
.conversation-people,
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--brand) 32%, #cbd5e1) transparent;
}

.messages-profile-panel .contact-row,
.messages-profile-panel .person-row.contact-open,
.messages-profile-panel .person-main,
.messages-sidebar .conversation-item,
.messages-sidebar .conversation-main {
    min-width: 0;
}

.messages-profile-panel .contact-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    min-height: 56px;
    height: 56px;
    overflow: hidden;
}

.messages-profile-panel .person-row.contact-open {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
    height: 54px;
    padding: 7px 8px;
    overflow: hidden;
}

.messages-profile-panel .person-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.messages-profile-panel .person-main {
    align-content: center;
    gap: 2px;
}

.messages-profile-panel .person-main b,
.messages-profile-panel .person-main small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messages-profile-panel .person-main b {
    font-size: 13px;
    line-height: 1.2;
}

.messages-profile-panel .person-main small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.messages-profile-panel .contact-profile-link {
    width: 36px;
    min-height: 54px;
    height: 54px;
}

.messages-profile-panel .contact-profile-link .icon-svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 720px) {
    .conversation-list,
    .conversation-people {
        max-height: min(440px, 62dvh);
        overflow-y: auto;
        overflow-x: hidden;
    }
}
