:root {
    --ink: #1b2430;
    --muted: #687583;
    --line: #cfd6dc;
    --line-strong: #aeb7bf;
    --soft: #f4f5f6;
    --panel: #ffffff;
    --primary: #247db6;
    --primary-dark: #1d6c9f;
    --primary-soft: #e6f2fa;
    --primary-ink: #10415f;
    --danger: #c95f54;
    --danger-soft: #f8e8e6;
    --warning: #b97818;
    --warning-soft: #fff3d8;
    --success: #247a57;
    --success-soft: #e4f3ec;
    --teal: var(--primary);
    --teal-dark: var(--primary-dark);
    --coral: var(--danger);
    --amber: var(--warning);
    --green: var(--success);
    --blue: var(--primary);
    --shadow: 0 14px 34px rgba(27, 36, 48, .08);
    --shadow-lg: 0 24px 70px rgba(27, 36, 48, .18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    background: var(--soft);
}

.auth-brand {
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: var(--primary);
}

.brand-mark,
.nav-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--primary-ink);
}

.logo-mark {
    overflow: hidden;
    padding: 5px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .34);
}

.logo-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.auth-logo-mark {
    width: 58px;
    height: 58px;
    padding: 7px;
}

.auth-brand h1 {
    max-width: 420px;
    margin: 34px 0 16px;
    font-size: 42px;
    line-height: 1.03;
}

.auth-brand p {
    max-width: 430px;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
    line-height: 1.6;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-box {
    width: min(100%, 420px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 264px 1fr;
    transition: grid-template-columns .18s ease;
}

.sidebar-collapsed .app-shell {
    grid-template-columns: 88px 1fr;
}

.sidebar {
    padding: 24px;
    background: var(--primary);
    color: #d8ecf7;
    transition: padding .18s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.sidebar-title {
    display: grid;
    gap: 2px;
}

.sidebar-title strong {
    color: #fff;
}

.sidebar-title span {
    color: #c5dfef;
    font-size: 12px;
}

.sidebar-toggle {
    width: 38px;
    flex: 0 0 38px;
    padding: 0;
    margin-left: auto;
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.sidebar-toggle .icon {
    transition: transform .18s ease;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-group {
    display: grid;
    gap: 8px;
}

.nav-group-toggle {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #d9edf7;
    font-size: 13px;
    font-weight: 900;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.nav-group-toggle::-webkit-details-marker {
    display: none;
}

.nav-group-toggle::marker {
    content: "";
}

.nav-group-toggle:hover,
.nav-group[open] > .nav-group-toggle {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.nav-group-title {
    flex: 1 1 auto;
    min-width: 0;
}

.nav-group-chevron {
    display: inline-flex;
    margin-left: auto;
    transition: transform .16s ease;
}

.nav-group[open] > .nav-group-toggle .nav-group-chevron {
    transform: rotate(90deg);
}

.nav-group-items {
    display: grid;
    gap: 8px;
}

.nav-group:not(.nav-group-plain) .nav-group-items {
    margin-left: 20px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, .18);
}

.nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #d9edf7;
    font-size: 14px;
    font-weight: 700;
}

.nav a:hover,
.nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.sidebar-footer {
    position: sticky;
    top: calc(100vh - 130px);
    margin-top: 44px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    color: #c5dfef;
    font-size: 13px;
}

.logout-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 7px;
    color: #fff;
    font-weight: 700;
}

.sidebar-collapsed .sidebar {
    padding: 20px 14px;
}

.sidebar-collapsed .sidebar-header {
    flex-direction: column;
    gap: 12px;
}

.sidebar-collapsed .sidebar-title,
.sidebar-collapsed .nav-group-title,
.sidebar-collapsed .nav-group-chevron,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-user,
.sidebar-collapsed .footer-label {
    display: none;
}

.sidebar-collapsed .sidebar-toggle {
    margin-left: 0;
}

.sidebar-collapsed .sidebar-toggle .icon {
    transform: rotate(180deg);
}

.sidebar-collapsed .nav a,
.sidebar-collapsed .nav-group-toggle,
.sidebar-collapsed .logout-link {
    justify-content: center;
}

.sidebar-collapsed .nav {
    gap: 14px;
}

.sidebar-collapsed .nav-group-items {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}

.sidebar-collapsed .sidebar-footer {
    text-align: center;
}

.main {
    min-width: 0;
    padding: 30px 36px 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.scan-context-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.scan-context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid #c8d9e8;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #f2f8fd;
    box-shadow: 0 8px 22px rgba(27, 36, 48, .04);
}

.scan-context-item .icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.scan-context-item.is-scan-start {
    background: #f2f8fd;
}

.scan-context-item.is-threshold {
    border-color: #ead29c;
    border-left-color: #b97818;
    background: #fff8ec;
}

.scan-context-item.is-threshold .icon {
    color: #b97818;
}

.scan-context-item.is-ok {
    border-left-color: var(--success);
    background: #f4fbf7;
}

.scan-context-item.is-ok .icon {
    color: var(--success);
}

.scan-context-item.is-warning {
    border-color: #e7c57d;
    border-left-color: var(--warning);
    background: #fff9ec;
}

.scan-context-item.is-warning .icon {
    color: var(--warning);
}

.scan-context-item.is-danger {
    border-color: #e7b5af;
    border-left-color: var(--danger);
    background: #fff5f3;
}

.scan-context-item.is-danger .icon {
    color: var(--danger);
}

.scan-context-item.is-practice {
    border-color: #c9d4ea;
    border-left-color: #5b6fb0;
    background: #f6f7fc;
}

.scan-context-item.is-practice .icon {
    color: #5b6fb0;
}

.scan-context-copy {
    min-width: 0;
}

.scan-context-copy span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.scan-context-copy strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.2;
}

.scan-context-copy em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 650;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.topbar h1 {
    margin-bottom: 0;
    font-size: 30px;
    line-height: 1.15;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.title-period {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #e9f4fd;
    color: var(--primary-ink);
    font-size: 13px;
    font-weight: 800;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    justify-content: flex-end;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-ink);
    font-weight: 800;
}

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

.help-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.help-text.warning-text {
    color: #8a5a16;
    font-weight: 760;
}

.grid {
    display: grid;
    gap: 18px;
}

.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.invoice-kpis {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.invoice-kpis-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.invoice-kpis-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.recovery-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.assignee-kpi-section,
.lawyer-kpi-section {
    margin-top: 20px;
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title-row h2 {
    margin-bottom: 4px;
    color: var(--primary-ink);
    font-size: 18px;
}

.section-title-row p {
    margin-bottom: 0;
}

.section-title-row.compact {
    margin-bottom: 10px;
}

.filter-panel {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-group > span {
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 840;
    text-transform: uppercase;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 760;
}

.filter-pill:hover,
.filter-pill.is-active {
    border-color: var(--primary);
    color: var(--primary-ink);
    background: var(--primary-soft);
}

.active-filter-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.active-filter-summary a {
    color: var(--primary-ink);
    font-weight: 820;
}

.project-visibility-panel {
    margin-bottom: 20px;
}

.project-toggle-form {
    display: grid;
    gap: 6px;
}

.project-toggle-group {
    gap: 14px;
}

.compact-toggle {
    grid-template-columns: 46px auto;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.compact-toggle.flowcollect-toggle {
    background: #f4fbf8;
}

.compact-toggle.recovery-toggle {
    background: #f6f9fd;
}

.project-toggle-note {
    margin: 0;
    font-size: 13px;
}

.customer-search-panel {
    margin-top: 0;
    margin-bottom: 20px;
}

.customer-search-form {
    display: grid;
    gap: 8px;
}

.customer-search-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.customer-search-field {
    margin: 0;
}

.customer-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.stage-kpi-section {
    margin-top: 20px;
}

.stage-kpi-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.stage-kpi {
    flex: 1 0 158px;
    min-width: 158px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.stage-kpi span {
    display: block;
    min-height: 34px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}

.stage-kpi strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 24px;
    font-weight: 840;
    line-height: 1;
}

.stage-kpi.is-closed {
    border-left-color: var(--success);
    background: linear-gradient(0deg, rgba(36, 122, 87, 0.04), rgba(36, 122, 87, 0.04)), var(--panel);
}

.stage-kpi.project-flowcollect {
    border-left-color: #248f72;
    background: linear-gradient(0deg, rgba(36, 143, 114, .055), rgba(36, 143, 114, .055)), var(--panel);
}

.assignee-kpis,
.lawyer-kpis {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.assignee-kpi-card,
.lawyer-kpi-card {
    border-left: 4px solid var(--assignee-color, var(--primary));
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.assignee-kpi-card {
    cursor: pointer;
}

.lawyer-kpi-card {
    border-left-color: #247a57;
}

.lawyer-kpi-card.is-pending {
    border-left-color: var(--warning);
    background: linear-gradient(0deg, rgba(185, 120, 24, 0.06), rgba(185, 120, 24, 0.06)), var(--panel);
}

.assignee-kpi-card:hover,
.assignee-kpi-card:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(27, 36, 48, .1);
    outline: none;
}

.assignee-kpi-card.is-active {
    background: linear-gradient(0deg, rgba(36, 125, 182, 0.06), rgba(36, 125, 182, 0.06)), var(--panel);
}

.assignee-year-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    color: var(--muted);
    font-size: 12px;
}

.assignee-year-table th,
.assignee-year-table td {
    padding: 5px 0;
    border-bottom: 1px solid rgba(93, 113, 135, 0.16);
    text-align: left;
}

.assignee-year-table th {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.assignee-year-table th:last-child,
.assignee-year-table td:last-child {
    text-align: right;
}

.assignee-year-table tbody tr:last-child td {
    border-bottom: 0;
}

.card,
.panel,
.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.card {
    padding: 20px;
}

.card .label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric {
    margin-top: 12px;
    font-size: 28px;
    font-weight: 820;
}

.metric.green {
    color: var(--green);
}

.metric.coral {
    color: var(--coral);
}

.kpi-link {
    color: inherit;
    transition: border-color .18s ease, transform .18s ease;
}

.kpi-link:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.kpi-amount-excluded {
    border-color: rgba(154, 91, 18, .38);
    border-left: 5px solid #9a5b12;
    background: linear-gradient(0deg, rgba(154, 91, 18, .12), rgba(154, 91, 18, .12)), var(--panel);
}

.kpi-amount-excluded .label,
.kpi-amount-excluded .kpi-amount-lines strong {
    color: #7a4a11;
}

.kpi-amount-excluded .metric {
    color: #9a5b12 !important;
}

.kpi-within-grace {
    border-color: rgba(36, 143, 114, .34);
    border-left: 5px solid #248f72;
    background: linear-gradient(0deg, rgba(36, 143, 114, .1), rgba(36, 143, 114, .1)), var(--panel);
}

.control-kpi.kpi-within-grace {
    border-left: 1px solid rgba(36, 143, 114, .34);
}

.control-kpi.kpi-within-grace::before {
    background: #248f72;
}

.kpi-within-grace .label,
.kpi-within-grace .kpi-amount-lines strong {
    color: #1f725f;
}

.kpi-within-grace .metric {
    color: #248f72 !important;
}

.kpi-vip-excluded {
    border-color: rgba(111, 106, 168, .38);
    border-left: 5px solid #6f6aa8;
    background: linear-gradient(0deg, rgba(111, 106, 168, .1), rgba(111, 106, 168, .1)), var(--panel);
}

.kpi-vip-excluded .label,
.kpi-vip-excluded .kpi-amount-lines strong {
    color: #57528f;
}

.kpi-vip-excluded .metric {
    color: #6f6aa8 !important;
}

.kpi-amount-excluded:hover,
.kpi-amount-excluded:focus-visible {
    border-color: #8f5a3c;
    outline: none;
}

.kpi-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.42;
}

.kpi-note b {
    color: var(--ink);
}

.kpi-amount-lines {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.kpi-amount-lines span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.kpi-amount-lines strong {
    color: var(--ink);
    font-size: 11px;
    letter-spacing: .04em;
}

.control-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(77, 128, 184, .11), rgba(36, 143, 114, .07)),
        var(--panel);
    box-shadow: var(--shadow);
}

.control-hero .eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.control-hero h2 {
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 24px;
}

.control-hero p {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.45;
}

.dashboard-period-highlight {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 0 3px;
    padding: 2px 10px;
    border: 1px solid rgba(193, 18, 31, .2);
    border-radius: 999px;
    color: var(--coral);
    background: rgba(193, 18, 31, .08);
    font-weight: 850;
}

.control-hero .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.control-hero .button {
    white-space: nowrap;
}

.dashboard-overdue-summary {
    display: grid;
    grid-template-columns: minmax(180px, .45fr) minmax(180px, .45fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid rgba(75, 127, 184, .25);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(75, 127, 184, .09), rgba(255, 255, 255, .94)),
        var(--panel);
    box-shadow: var(--shadow);
}

.dashboard-overdue-summary div {
    display: grid;
    gap: 6px;
}

.dashboard-overdue-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-overdue-summary strong {
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.dashboard-overdue-summary div:nth-child(2) strong {
    color: var(--coral);
}

.dashboard-overdue-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.dashboard-kpi-guide {
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin: 14px 0;
    padding: 14px 18px;
    border: 1px solid rgba(75, 127, 184, .24);
    border-radius: 8px;
    background: rgba(75, 127, 184, .06);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-kpi-guide > strong,
.dashboard-kpi-guide b {
    color: var(--ink);
}

.control-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.control-kpi {
    position: relative;
    overflow: hidden;
}

.control-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary);
}

.control-kpi.kpi-exposure::before {
    background: var(--coral);
}

.control-kpi.kpi-warning {
    background: linear-gradient(0deg, rgba(185, 120, 24, .07), rgba(185, 120, 24, .07)), var(--panel);
}

.control-kpi.kpi-warning::before {
    background: var(--warning);
}

.control-kpi.kpi-ok::before {
    background: var(--success);
}

.control-kpi.project-flowcollect-kpi::before {
    background: #248f72;
}

.control-kpi.project-recovery-kpi::before {
    background: var(--primary);
}

.control-kpi.exclusion-vip-kpi::before {
    background: #6f6aa8;
}

.control-kpi.exclusion-amount-kpi::before {
    background: #9a5b12;
}

.control-kpi.exclusion-vip-kpi {
    border-color: rgba(111, 106, 168, .38);
    background: linear-gradient(0deg, rgba(111, 106, 168, .1), rgba(111, 106, 168, .1)), var(--panel);
}

.control-kpi.exclusion-vip-kpi .label,
.control-kpi.exclusion-vip-kpi .kpi-amount-lines strong {
    color: #57528f;
}

.control-kpi.exclusion-vip-kpi .metric,
.metric.exclusion-vip-metric {
    color: #6f6aa8 !important;
}

.control-kpi.exclusion-amount-kpi {
    border-color: rgba(154, 91, 18, .38);
    background: linear-gradient(0deg, rgba(154, 91, 18, .12), rgba(154, 91, 18, .12)), var(--panel);
}

.control-kpi.exclusion-amount-kpi .label,
.control-kpi.exclusion-amount-kpi .kpi-amount-lines strong {
    color: #7a4a11;
}

.control-kpi.exclusion-amount-kpi .metric {
    color: #9a5b12 !important;
}

.kpi-practice-coverage {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(124, 143, 164, .22);
}

.kpi-practice-coverage span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.kpi-practice-coverage strong {
    color: #1f725f;
    font-size: 12px;
    line-height: 1.35;
}

.kpi-practice-coverage.is-empty strong,
.kpi-practice-coverage.is-unavailable strong {
    color: var(--muted);
}

.metric.amount-excluded-metric {
    color: #9a5b12 !important;
}

.kpi-stage-list {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.kpi-stage-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.kpi-stage-list em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}

.kpi-stage-list strong {
    color: var(--ink);
    font-size: 12px;
}

.kpi-stage-empty {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.quick-filter-card {
    display: flex;
    flex-direction: column;
    row-gap: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.quick-filter-card .metric,
.quick-filter-card .kpi-amount-lines,
.quick-filter-card .kpi-note,
.quick-filter-card .kpi-stage-list,
.quick-filter-card .kpi-stage-empty {
    margin-top: 0;
}

.quick-filter-card:hover,
.quick-filter-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(75, 127, 184, .48);
    box-shadow: 0 14px 30px rgba(35, 55, 82, .12);
    outline: none;
}

.quick-filter-card.is-active {
    border-color: var(--primary);
    background: linear-gradient(0deg, rgba(75, 127, 184, .08), rgba(75, 127, 184, .08)), var(--panel);
}

.quick-filter-action {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding: 8px 11px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

.quick-filter-card.kpi-warning .quick-filter-action {
    background: #9a6414;
}

.quick-filter-card.kpi-ok .quick-filter-action {
    background: var(--success);
}

.quick-filter-card.exclusion-vip-kpi .quick-filter-action {
    background: #6f6aa8;
}

.quick-filter-card.exclusion-amount-kpi .quick-filter-action {
    background: #9a5b12;
}

.quick-filter-action svg {
    width: 15px;
    height: 15px;
}

.quick-filter-panel {
    scroll-margin-top: 20px;
}

.recovery-dashboard-filter {
    margin: 16px 0;
}

.recovery-filter-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px 28px;
}

.recovery-filter-copy {
    min-width: 0;
}

.recovery-dashboard-filter .recovery-filter-copy h2 {
    font-size: 18px;
    line-height: 1.35;
}

.recovery-filter-copy .muted {
    max-width: 1120px;
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
}

.recovery-dashboard-filter .alert {
    font-size: 13px;
    line-height: 1.55;
}

.recovery-dashboard-filter .alert code {
    font-size: 1em;
}

.recovery-filter-header .recovery-filter-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.recovery-filter-actions .button {
    min-width: 146px;
    height: 40px;
    padding: 0 13px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

.recovery-filter-actions .recovery-filter-clear {
    min-width: 142px;
    color: var(--muted);
    background: #f8fafc;
}

@media (max-width: 1240px) {
    .recovery-filter-header {
        grid-template-columns: 1fr;
    }

    .recovery-filter-header .recovery-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .recovery-filter-header .recovery-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        min-width: 0;
    }

    .recovery-filter-actions .button {
        width: 100%;
    }
}

.quick-filter-table {
    margin-top: 14px;
    box-shadow: none;
}

.inline-invoice-list {
    display: grid;
    gap: 6px;
    min-width: 460px;
}

.inline-invoice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
}

.inline-invoice-row strong {
    color: var(--primary-dark);
}

.inline-invoice-row span {
    color: var(--muted);
}

.compact-action {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}

.project-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
}

.project-summary-card {
    display: grid;
    grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr);
    gap: 18px;
    border-left: 4px solid var(--primary);
}

.project-summary-card.project-flowcollect {
    border-left-color: #248f72;
    background: linear-gradient(0deg, rgba(36, 143, 114, .055), rgba(36, 143, 114, .055)), var(--panel);
}

.project-summary-card.project-recovery {
    border-left-color: var(--primary);
    background: linear-gradient(0deg, rgba(77, 128, 184, .055), rgba(77, 128, 184, .055)), var(--panel);
}

.project-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-summary-metrics span {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(93, 113, 135, .18);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .68);
    font-size: 12px;
    font-weight: 750;
}

.project-summary-metrics strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
}

.project-top-stages {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-top-stages span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 760;
}

.project-top-stages strong {
    color: var(--ink);
}

.dashboard-control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 20px;
    margin-top: 20px;
}

.control-panel {
    margin-top: 0;
}

.coverage-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 40px;
    border-radius: 999px;
    color: var(--primary-ink);
    background: var(--primary-soft);
    font-size: 18px;
}

.coverage-bar {
    height: 12px;
    margin-top: 14px;
    border-radius: 999px;
    background: #e7edf3;
    overflow: hidden;
}

.coverage-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--primary));
}

.coverage-split {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.coverage-split strong {
    color: var(--ink);
}

.priority-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.priority-list h3 {
    margin-bottom: 2px;
    color: var(--primary-ink);
    font-size: 14px;
}

.priority-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(93, 113, 135, .2);
    border-radius: 8px;
    background: #fff;
}

.priority-row span {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.priority-row strong,
.priority-row b {
    color: var(--ink);
}

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

.mini-kpi {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.mini-kpi span {
    display: block;
    min-height: 32px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
}

.mini-kpi strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
}

.oldest-ticket {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(185, 120, 24, .24);
    border-radius: 8px;
    background: rgba(185, 120, 24, .06);
}

.oldest-ticket span,
.oldest-ticket small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.oldest-ticket strong {
    color: var(--ink);
    font-size: 15px;
}

.dashboard-stage-bars {
    display: grid;
    gap: 10px;
}

.stage-bar-row {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(160px, 1fr) 46px;
    gap: 12px;
    align-items: center;
}

.stage-bar-label {
    display: grid;
    gap: 2px;
}

.stage-bar-label strong {
    color: var(--ink);
    font-size: 13px;
}

.stage-bar-label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.stage-bar-track {
    height: 12px;
    border-radius: 999px;
    background: #e8edf2;
    overflow: hidden;
}

.stage-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.stage-bar-row.project-flowcollect .stage-bar-track span {
    background: #248f72;
}

.stage-bar-row.is-empty {
    opacity: .72;
}

.stage-bar-row.is-empty .stage-bar-track {
    background: repeating-linear-gradient(
        90deg,
        #edf2f7 0,
        #edf2f7 8px,
        #f7fafc 8px,
        #f7fafc 16px
    );
}

.stage-bar-row b {
    text-align: right;
    color: var(--ink);
}

.assignee-load-table {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.assignee-load-head,
.assignee-load-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(80px, .55fr)) minmax(140px, .8fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
}

.assignee-load-head {
    color: var(--muted);
    background: var(--soft);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.assignee-load-row {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.assignee-load-row strong {
    color: var(--ink);
}

.compact-empty {
    margin-top: 12px;
    padding: 16px;
}

.panel {
    margin-top: 20px;
    padding: 22px;
}

.detail-panel {
    scroll-margin-top: 18px;
}

.detail-panel:target {
    border-color: var(--primary);
}

.detail-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

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

.detail-panel summary span {
    display: grid;
    gap: 4px;
}

.detail-panel summary::after {
    content: "+";
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-ink);
    background: var(--primary-soft);
    font-size: 20px;
    font-weight: 700;
}

.detail-panel[open] summary {
    margin-bottom: 18px;
}

.detail-panel[open] summary::after {
    content: "-";
}

.issue-kanban {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(308px, 340px);
    gap: 12px;
    align-items: start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
}

.issue-column {
    min-width: 0;
    max-height: 72vh;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    overflow: hidden;
    scroll-snap-align: start;
}

.issue-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #f3f7fb;
}

.issue-column.project-recovery {
    border-color: rgba(77, 128, 184, .32);
    background: #f6f9fd;
}

.issue-column.project-recovery .issue-column-head {
    border-bottom-color: rgba(77, 128, 184, .28);
    background: linear-gradient(0deg, rgba(77, 128, 184, .12), rgba(77, 128, 184, .12)), #f7fbff;
}

.issue-column.project-recovery .issue-column-head h3 {
    color: #173a5e;
}

.issue-column.project-recovery .issue-column-head small {
    color: #4e6580;
}

.issue-column.project-recovery .issue-column-head span {
    color: #173a5e;
    background: #dcebf8;
}

.issue-column-head h3 {
    margin-bottom: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.issue-column-head small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.issue-column-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0eef8;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 800;
}

.issue-column.project-flowcollect {
    border-color: rgba(36, 143, 114, .32);
    background: #f5fbf8;
}

.issue-column.project-flowcollect .issue-column-head {
    border-bottom-color: rgba(36, 143, 114, .28);
    background: linear-gradient(0deg, rgba(36, 143, 114, .14), rgba(36, 143, 114, .14)), #f4fbf7;
}

.issue-column.project-flowcollect .issue-column-head h3 {
    color: #145c49;
}

.issue-column.project-flowcollect .issue-column-head small {
    color: #4f7467;
}

.issue-column.project-flowcollect .issue-column-head span {
    color: #145c49;
    background: #d1ebdf;
}

.issue-card.project-flowcollect {
    background: #fbfffd;
}

.issue-list {
    display: grid;
    gap: 12px;
    max-height: calc(72vh - 56px);
    overflow-y: auto;
    padding: 12px;
}

.issue-empty {
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .68);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.issue-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--assignee-color, var(--primary));
    border-radius: 8px;
    background: var(--panel);
}

.is-clickable {
    cursor: pointer;
}

.issue-card.is-clickable,
tr.is-clickable {
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.issue-card.is-clickable:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: 0 10px 22px rgba(27, 36, 48, .08);
}

tr.is-clickable:hover td {
    background: #f7fbfe;
}

.issue-card.is-overdue {
    border-left-color: var(--assignee-color, var(--coral));
    background: #fff8f5;
}

tr.assignee-row td:first-child {
    border-left: 4px solid var(--assignee-color, var(--primary));
}

.issue-card-head,
.issue-card-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.issue-card-head strong {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.issue-meta {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.lawyer-hint {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e9f5ef;
    color: #1f6f52;
    font-size: 12px;
    font-weight: 780;
    line-height: 1.2;
}

.lawyer-hint.is-pending {
    background: #fff4d8;
    color: #986516;
}

.lawyer-source-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.issue-card p {
    margin-bottom: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
}

.issue-activity {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #d7e4ed;
    border-radius: 8px;
    background: #edf6fc;
    font-size: 12px;
}

.issue-activity strong {
    color: var(--primary-ink);
}

.issue-activity span {
    color: var(--muted);
    font-weight: 720;
}

.issue-activity p {
    font-size: 12px;
}

.issue-card-actions a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.table-link {
    color: var(--primary-ink);
}

.table-link:hover {
    color: var(--primary);
}

.issue-detail-hero {
    display: grid;
    gap: 24px;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-actions .button {
    height: 38px;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 720;
}

.detail-actions form {
    display: inline-flex;
}

.detail-actions button {
    height: 38px;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 720;
}

.issue-detail-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.issue-detail-title .eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0;
}

.issue-detail-title h2 {
    margin-bottom: 0;
    max-width: 980px;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 840;
    line-height: 1.12;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.issue-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.issue-detail-grid dl {
    display: grid;
    gap: 11px;
    margin: 0;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.issue-detail-grid dl div {
    display: grid;
    grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
}

.issue-detail-grid dt {
    color: var(--ink);
    font-size: 14px;
    font-weight: 780;
    line-height: 1.25;
}

.issue-detail-grid dd {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 620;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.detail-stage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--primary-ink);
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 800;
}

.detail-stage-badge + small {
    margin-left: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.stage-timeline-panel {
    margin-top: 18px;
}

.stage-timeline-panel .panel-head {
    margin-bottom: 10px;
}

.stage-timeline-track {
    overflow-x: auto;
    padding: 4px 2px 8px;
}

.stage-timeline {
    display: flex;
    min-width: max-content;
    margin: 0;
    padding: 20px 0 0;
    list-style: none;
}

.stage-timeline-item {
    position: relative;
    width: 184px;
    padding: 16px 14px 0 0;
}

.stage-timeline-item::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line);
}

.stage-timeline-item:first-child::before {
    left: 8px;
}

.stage-timeline-item:last-child::before {
    right: calc(100% - 8px);
}

.stage-timeline-item:only-child::before {
    display: none;
}

.stage-timeline-dot {
    position: absolute;
    top: 1px;
    left: 0;
    z-index: 1;
    width: 16px;
    height: 16px;
    border: 3px solid var(--panel);
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-soft);
}

.stage-timeline-card {
    min-height: 112px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(31, 42, 55, 0.06);
}

.stage-timeline-card strong,
.stage-timeline-card small,
.stage-timeline-date {
    display: block;
}

.stage-timeline-date {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.stage-timeline-card strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.25;
}

.stage-timeline-card small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.stage-timeline-item.is-current .stage-timeline-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-soft);
}

.stage-timeline-item.is-current .stage-timeline-card {
    border-color: rgba(193, 91, 78, 0.35);
    background: #fffaf6;
}

.priority-stars {
    color: #f1c40f !important;
    font-size: 20px;
    letter-spacing: 0;
}

.detail-section {
    scroll-margin-top: 18px;
}

.timesheet-create-form {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 240px) minmax(120px, 150px) minmax(150px, auto);
    gap: 14px;
    align-items: end;
    margin: 18px 0 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.timesheet-create-form .full {
    grid-column: 1 / -2;
}

.timesheet-create-form textarea,
.timesheet-edit-grid textarea {
    min-height: 76px;
}

.timesheet-create-actions {
    display: flex;
    justify-content: flex-end;
}

.timesheet-actions {
    min-width: 190px;
}

.timesheet-actions,
.timesheet-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timesheet-editor {
    position: relative;
}

.timesheet-editor summary {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--panel);
    font-weight: 760;
    cursor: pointer;
    list-style: none;
}

.timesheet-editor summary::-webkit-details-marker {
    display: none;
}

.timesheet-editor[open] {
    width: min(720px, 80vw);
}

.timesheet-editor[open] summary {
    margin-bottom: 10px;
}

.timesheet-editor form {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.timesheet-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.timesheet-edit-grid .full {
    grid-column: 1 / -1;
}

.timesheet-actions button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    padding: 0;
    font-size: 13px;
}

.detail-columns {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.35fr);
    margin-top: 18px;
    gap: 18px;
    align-items: stretch;
}

.detail-columns .panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-columns .panel-head {
    margin-bottom: 14px;
}

.detail-columns .panel-head h2 {
    color: var(--primary-ink);
    font-size: 18px;
    letter-spacing: 0;
}

.detail-columns .panel-head .muted {
    font-size: 13px;
    line-height: 1.35;
}

.description-box {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #f7fbfe;
    font-size: 14px;
    line-height: 1.6;
}

.detail-columns .table-wrap {
    flex: 1;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 0;
    font-size: 20px;
}

.panel-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.panel-badges .badge {
    margin-left: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actions form {
    margin: 0;
}

.button,
button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 760;
    cursor: pointer;
}

.secondary-button {
    color: var(--ink);
    border-color: var(--line);
    background: var(--panel);
}

.button.secondary {
    color: var(--ink);
    border-color: var(--line);
    background: var(--panel);
}

.button.danger,
button.danger {
    background: var(--danger);
}

.icon-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-button .icon,
.timesheet-editor summary .icon {
    width: 18px;
    height: 18px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.button:hover,
button:hover {
    filter: brightness(.96);
}

.button:focus-visible,
button:focus-visible,
.nav a:focus-visible,
.nav-group-toggle:focus-visible,
.logout-link:focus-visible {
    outline: 3px solid rgba(36, 125, 182, .22);
    outline-offset: 2px;
}

.sidebar .nav a:focus-visible,
.sidebar .nav-group-toggle:focus-visible,
.sidebar-toggle:focus-visible,
.sidebar .logout-link:focus-visible {
    outline-color: rgba(255, 255, 255, .78);
}

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

.form-grid.single {
    grid-template-columns: 1fr;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.mail2wa-form .channel-divider {
    border-top: 1px solid var(--line);
    margin: 4px 0;
}

.mail2wa-actions button {
    flex: 1 1 180px;
}

.notification-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.notification-card {
    margin-top: 0;
}

.notification-preflight {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.notification-preflight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.notification-preflight-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
}

.notification-preflight-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

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

.notification-preflight-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px;
    border: 1px solid #dbe3ea;
    border-left: 4px solid #b9c8d7;
    border-radius: 8px;
    background: #fff;
}

.notification-preflight-check.is-ok {
    border-left-color: var(--success);
}

.notification-preflight-check.is-warning {
    border-left-color: var(--warning);
}

.notification-preflight-check.is-blocked {
    border-left-color: var(--danger);
}

.notification-preflight-check strong,
.notification-preflight-check small {
    display: block;
    min-width: 0;
}

.notification-preflight-check strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.25;
}

.notification-preflight-check small {
    margin-top: 3px;
    color: var(--primary-ink);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.notification-preflight-check p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.inline-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.grow {
    flex: 1 1 360px;
}

.field {
    display: grid;
    gap: 7px;
}

.autocomplete {
    position: relative;
}

.autocomplete:focus-within {
    z-index: 80;
}

.field.full {
    grid-column: 1 / -1;
}

.info-box {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.info-box strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.info-box p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.compact-info {
    min-height: 91px;
}

.settings-section {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.settings-section h3 {
    margin: 0;
    color: var(--primary-ink);
    font-size: 18px;
    font-weight: 850;
}

.settings-section p {
    max-width: 880px;
    margin: 6px 0 0;
}

label {
    color: #344150;
    font-size: 13px;
    font-weight: 760;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--panel);
    font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="search"],
input[type="url"],
select {
    height: 44px;
    padding: 0 12px;
}

textarea {
    min-height: 118px;
    padding: 12px;
    resize: vertical;
}

textarea.compact {
    min-height: 88px;
}

.code-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(36, 125, 182, .14);
}

.secret-field {
    position: relative;
    width: 100%;
}

.secret-field input {
    padding-right: 46px;
}

.secret-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

.secret-toggle:hover,
.secret-toggle[aria-pressed="true"] {
    color: var(--primary);
    background: var(--primary-soft);
    filter: none;
}

.secret-toggle .icon {
    width: 18px;
    height: 18px;
}

.secret-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.35;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.toggle-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
}

.toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.toggle-control {
    position: relative;
    width: 46px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #dfe6ec;
    transition: background .18s ease, border-color .18s ease;
}

.toggle-control::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    content: "";
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(24, 39, 58, .2);
    transition: transform .18s ease;
}

.toggle-input:checked + .toggle-control {
    border-color: var(--primary);
    background: var(--primary);
}

.toggle-input:checked + .toggle-control::after {
    transform: translateX(20px);
}

.toggle-input:focus-visible + .toggle-control {
    outline: 3px solid rgba(36, 125, 182, .18);
    outline-offset: 2px;
}

.suggestions {
    position: absolute;
    z-index: 90;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.suggestion-item {
    width: 100%;
    height: auto;
    display: grid;
    justify-content: stretch;
    gap: 3px;
    padding: 11px 12px;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: var(--panel);
    text-align: left;
}

.suggestion-item:hover {
    filter: none;
    background: var(--primary-soft);
}

.suggestion-item span,
.suggestion-empty {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.suggestion-empty {
    padding: 12px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--primary-ink);
    background: var(--primary-soft);
}

.alert.error {
    color: #8f2d26;
    background: var(--danger-soft);
}

.table-wrap {
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.invoice-table {
    table-layout: fixed;
}

.invoice-table .col-invoice {
    width: 10%;
}

.invoice-table .col-customer {
    width: 18%;
}

.invoice-table .col-contacts {
    width: 22%;
}

.invoice-table .col-date {
    width: 10%;
}

.invoice-table .col-amount {
    width: 9%;
}

.invoice-table .col-source {
    width: 8%;
}

.invoice-table .col-action {
    width: 5%;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #52606b;
    background: #f0f2f4;
    font-size: 12px;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #8b4b10;
    background: var(--warning-soft);
    font-size: 12px;
    font-weight: 760;
}

.badge-neutral {
    color: #28313d;
    background: #e8ecef;
}

.badge-stage {
    color: var(--primary-ink);
    background: var(--primary-soft);
}

.badge-success {
    color: var(--success);
    background: var(--success-soft);
}

.badge-warning {
    margin-left: 8px;
    color: #8b4b10;
    background: var(--warning-soft);
}

.badge-error {
    color: #8f2d26;
    background: var(--danger-soft);
}

.badge-danger {
    color: #8f2d26;
    background: var(--danger-soft);
}

.invoice-group-row td {
    padding: 14px 16px;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line);
    background: #eaf5fb;
}

.invoice-group-row td:first-child {
    border-left: 5px solid var(--primary);
}

.invoice-group-detail-row td {
    padding: 0;
    background: #eaf5fb;
}

.expand-cell {
    text-align: center;
}

.expand-button {
    width: 34px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.invoice-group-body {
    padding: 12px 0 16px;
}

.nested-table {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.nested-table th,
.nested-table td {
    padding: 11px 12px;
}

.nested-table th {
    background: #f7f9fb;
}

.button.small {
    height: 34px;
    padding: 0 11px;
    font-size: 13px;
}

button.small {
    height: 34px;
    padding: 0 11px;
    font-size: 13px;
}

.row-actions {
    text-align: right;
    white-space: nowrap;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.user-actions {
    text-align: right;
    min-width: 154px;
}

.user-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.user-actions .inline-form {
    margin: 0;
}

.user-action-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
}

.user-action-button .icon {
    width: 20px;
    height: 20px;
}

.permission-table th,
.permission-table td {
    vertical-align: top;
}

.permission-table th:not(:first-child),
.permission-table td:not(:first-child) {
    min-width: 170px;
}

.permission-code {
    margin-top: 4px;
    font-size: 12px;
}

.permission-check {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 760;
}

.permission-check + .permission-check {
    margin-top: 7px;
}

.permission-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.amount,
.money-nowrap {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.amount {
    font-weight: 800;
}

.empty {
    padding: 42px 22px;
    text-align: center;
    color: var(--muted);
}

.workflow-overview .panel-head {
    align-items: flex-start;
}

.workflow-overview .panel-head .muted {
    max-width: 860px;
    margin: 6px 0 0;
}

.workflow-cron-note {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #cdddeb;
    border-radius: 8px;
    background: #f4f9fd;
    color: var(--ink);
}

.workflow-cron-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e4f0fa;
    color: var(--primary);
}

.workflow-cron-note strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--ink);
}

.workflow-cron-note p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.workflow-cron-note code {
    color: #183b56;
    font-weight: 760;
}

.cron-token-form {
    margin: 0 0 18px;
}

.workflow-cron-token {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.cron-token-command {
    display: grid;
    gap: 7px;
    align-content: start;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.workflow-cron-token > .field,
.workflow-cron-token > .cron-token-command {
    min-width: 0;
}

.workflow-cron-token > .actions {
    align-self: end;
}

.cron-token-command strong {
    color: var(--ink);
    font-size: 14px;
}

.cron-token-command code {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7e2ec;
    border-radius: 8px;
    background: #f4f9fd;
    color: #183b56;
    font-size: 12px;
    line-height: 1.45;
    overflow-x: auto;
    white-space: nowrap;
}

.cron-token-command span code {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    white-space: normal;
}

.workflow-flow {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 8px;
}

.workflow-flow-step {
    position: relative;
    flex: 1 0 190px;
    min-height: 92px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #f8fbfd;
}

.workflow-flow-step.is-manual {
    border-left-color: var(--warning);
    background: #fffaf0;
}

.workflow-flow-step.is-disabled {
    opacity: .58;
    border-left-color: var(--muted);
    background: #f4f6f8;
}

.workflow-flow-step span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 820;
}

.workflow-flow-step.is-manual span {
    background: var(--warning);
}

.workflow-flow-step strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
}

.workflow-flow-step small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.workflow-step-manager {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.workflow-add-step-form,
.workflow-order-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.workflow-add-step-form {
    display: grid;
    align-content: start;
    gap: 12px;
}

.workflow-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.workflow-order-head strong,
.workflow-order-head span {
    display: block;
}

.workflow-order-head strong {
    color: var(--ink);
    font-size: 15px;
}

.workflow-order-head span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.workflow-order-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.workflow-order-item {
    display: grid;
    grid-template-columns: 34px minmax(180px, 1fr) minmax(120px, 180px) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.workflow-order-index {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 820;
}

.workflow-order-item strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
}

.workflow-order-item small {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.workflow-order-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.workflow-order-actions .icon-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

@media (max-width: 1100px) {
    .workflow-step-manager {
        grid-template-columns: 1fr;
    }

    .workflow-order-item {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .workflow-order-item small {
        display: none;
    }
}

.workflow-table-wrap {
    overflow-x: auto;
}

.workflow-table {
    min-width: 2040px;
}

.workflow-settlement-table {
    min-width: 1700px;
}

.workflow-settlement-table th:nth-child(3),
.workflow-settlement-table td:nth-child(3) {
    min-width: 220px;
}

.workflow-settlement-table th:nth-child(7),
.workflow-settlement-table td:nth-child(7),
.workflow-settlement-table th:nth-child(8),
.workflow-settlement-table td:nth-child(8) {
    min-width: 280px;
}

.reminder-workflow-table {
    min-width: 1120px;
}

.reminder-workflow-table th:nth-child(1),
.reminder-workflow-table td:nth-child(1) {
    width: 72px;
}

.reminder-workflow-table th:nth-child(2),
.reminder-workflow-table td:nth-child(2) {
    width: 260px;
}

.reminder-workflow-table th:nth-child(3),
.reminder-workflow-table td:nth-child(3),
.reminder-workflow-table th:nth-child(5),
.reminder-workflow-table td:nth-child(5) {
    width: 118px;
}

.reminder-workflow-table th:nth-child(4),
.reminder-workflow-table td:nth-child(4) {
    width: 190px;
}

.reminder-workflow-table th:nth-child(6),
.reminder-workflow-table td:nth-child(6) {
    min-width: 360px;
}

.reminder-workflow-table th:nth-child(7),
.reminder-workflow-table td:nth-child(7) {
    width: 96px;
}

.reminder-workflow-table .workflow-note {
    width: 100%;
    min-height: 74px;
}

.workflow-table th,
.workflow-table td {
    vertical-align: top;
}

.workflow-table th:first-child,
.workflow-table td:first-child {
    width: 72px;
    text-align: center;
}

.workflow-table th:nth-child(7),
.workflow-table td:nth-child(7) {
    width: 96px;
}

.workflow-table th:nth-child(3),
.workflow-table td:nth-child(3),
.workflow-table th:nth-child(4),
.workflow-table td:nth-child(4) {
    min-width: 260px;
}

.workflow-table th:nth-child(10),
.workflow-table td:nth-child(10),
.workflow-table th:nth-child(11),
.workflow-table td:nth-child(11) {
    min-width: 260px;
}

.workflow-table input[type="text"],
.workflow-table input[type="number"],
.workflow-table select {
    height: 40px;
    font-size: 13px;
}

.workflow-table textarea {
    min-height: 64px;
    font-size: 13px;
    line-height: 1.35;
}

.workflow-cell-note {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
}

.compact-number {
    max-width: 78px;
}

.switch-only {
    min-height: 40px;
    display: inline-grid;
    place-items: center;
}

.switch-only .toggle-control {
    display: block;
}

.channel-checks {
    display: grid;
    gap: 8px;
}

.mini-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 720;
}

.mini-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.workflow-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.hidden-form {
    display: none;
}

.danger-soft-button {
    color: #9b3c35;
    border-color: #e7c2bd;
    background: var(--danger-soft);
}

.horizontal-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.toggle-field {
    align-content: start;
}

.toggle-field .toggle-row {
    width: fit-content;
    margin-top: 10px;
    grid-template-columns: 46px auto;
}

.toggle-field .help-text {
    margin-top: 10px;
}

.reminder-settings-layout {
    display: grid;
    gap: 18px;
}

.reminder-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.reminder-mode-grid > .field {
    min-width: 0;
    min-height: 126px;
}

.reminder-attachment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.reminder-attachment-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.attachment-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.attachment-card-head strong {
    color: var(--ink);
    font-size: 15px;
}

.reminder-attachment-card .toggle-row {
    margin-top: 0;
}

.compact-field {
    display: grid;
    gap: 6px;
}

.compact-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.compact-field select {
    width: 100%;
    min-height: 42px;
}

.simulation-toggle-field {
    padding: 14px;
    border: 1px solid #ecd9bd;
    border-radius: 8px;
    background: #fffaf0;
}

.simulation-toggle-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
}

.simulation-toggle-hero > div {
    min-width: 0;
}

.simulation-toggle-hero .toggle-row {
    flex: 0 0 auto;
    margin-top: 0;
}

.simulation-status-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.simulation-status-card > span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.simulation-status-card strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 18px;
}

.reminder-template-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.reminder-template-fields > .field,
.postal-slip-test-grid > .field {
    min-width: 0;
}

.postal-slip-test-panel {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    background: #f7fbff;
}

.postal-slip-test-panel > div:first-child p {
    margin-top: 4px;
    color: var(--muted);
}

.document-generation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.document-generation-grid .postal-slip-test-panel {
    margin-top: 0;
}

.document-generation-grid .postal-slip-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.python-worker-panel {
    display: grid;
    gap: 18px;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    background: #fbfdff;
}

.document-worker-settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr minmax(160px, 0.6fr);
    gap: 18px;
    align-items: start;
}

.document-generation-plan-panel {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid #d8e7dd;
    border-left: 4px solid #4f9b7a;
    border-radius: 8px;
    background: linear-gradient(135deg, #f6fbf8 0%, #ffffff 100%);
}

.document-generation-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.document-generation-plan-head h4 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 18px;
}

.document-generation-plan-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(128px, 1fr));
    gap: 12px;
    align-items: start;
}

.document-generation-plan-grid > .field {
    min-height: 132px;
    padding: 12px;
    border: 1px solid #dbe5ed;
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
}

.document-generation-plan-grid label {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.document-generation-plan-grid input[type="number"],
.document-generation-plan-grid input[type="time"] {
    width: auto;
    max-width: 126px;
    height: 40px;
    font-weight: 780;
}

.document-generation-plan-grid input[type="time"] {
    max-width: 142px;
}

.document-generation-plan-grid .input-with-suffix {
    display: inline-flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.document-generation-plan-grid .input-with-suffix input {
    width: 76px;
    max-width: 76px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.document-generation-plan-grid .input-with-suffix span {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-left: 1px solid var(--line);
    color: var(--muted);
    background: #f5f8fb;
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
}

.document-generation-plan-grid .help-text {
    margin: 0;
    font-size: 12px;
    line-height: 1.38;
}

@media (max-width: 1440px) {
    .document-generation-plan-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .document-generation-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.document-generation-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    background: #f4f8fd;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;
}

.document-generation-rule-note svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.document-worker-checkbox {
    margin-top: 12px;
}

.document-cache-warm-panel {
    background: #fff;
}

.document-cache-warm-grid {
    grid-template-columns: 1fr minmax(150px, 0.45fr) 1fr;
}

.document-cache-warm-options {
    display: grid;
    gap: 10px;
}

.document-cache-warm-note {
    margin-top: 0;
}

.document-worker-maintenance-panel {
    background: #fff;
}

.document-worker-maintenance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.document-worker-maintenance-form {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.python-shadow-scan-panel {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    background: #fbfdff;
}

.python-shadow-scan-grid {
    display: grid;
    grid-template-columns: 1.4fr minmax(170px, 0.55fr) 1fr;
    gap: 18px;
    align-items: start;
}

.python-shadow-scan-checkbox {
    align-self: center;
}

.python-shadow-scan-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.python-shadow-scan-note {
    margin-top: 0;
}

.document-worker-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.document-worker-kpis > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.document-worker-kpis span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.document-worker-kpis strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 22px;
}

.document-worker-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    align-items: start;
}

.document-worker-table small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.postal-slip-test-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.postal-slip-test-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.postal-slip-test-result.is-ok {
    border-color: #b8d7c1;
    background: #f4fbf6;
}

.postal-slip-test-result.is-ko {
    border-color: #e7c2bd;
    background: #fff8f7;
}

.postal-slip-test-result strong {
    display: block;
    margin-top: 8px;
}

.placeholder-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 18px;
}

.placeholder-strip code {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-ink);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 760;
}

.template-global-form {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.template-grid {
    display: grid;
    gap: 18px;
}

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #f8fafc;
    font-weight: 720;
    text-align: center;
}

.template-group {
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.template-group-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    color: var(--primary-ink);
    background: #edf5fb;
    font-size: 13px;
    font-weight: 840;
    text-transform: uppercase;
}

.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 14px;
    padding: 14px;
}

.template-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.template-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.template-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-card h3 {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.25;
}

.template-card textarea {
    min-height: 122px;
    line-height: 1.45;
}

.template-attachment-box {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.template-attachment-title {
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.template-attachment-options {
    display: grid;
    gap: 10px;
}

.template-attachment-box .toggle-row {
    min-height: 34px;
    font-size: 13px;
    line-height: 1.35;
}

.template-subject-toggle {
    margin-top: 10px;
}

.template-subject-toggle + .help-text {
    margin-top: 6px;
}

.template-attachment-box .help-text {
    margin: 0;
}

.template-preview-modal[hidden] {
    display: none;
}

.template-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
}

.template-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}

.template-preview-dialog {
    position: relative;
    width: min(980px, 100%);
    max-height: min(860px, 92vh);
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr);
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow-lg);
}

.issue-create-dialog {
    width: min(1180px, 100%);
    max-height: min(900px, 94vh);
    grid-template-rows: auto minmax(0, 1fr);
}

.issue-create-body,
.issue-remote-body {
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.issue-remote-dialog {
    width: min(1280px, 100%);
    max-height: min(920px, 94vh);
    grid-template-rows: auto minmax(0, 1fr);
}

.issue-remote-body > .panel:first-child {
    margin-top: 0;
}

.issue-remote-body > .panel:last-child,
.issue-remote-body > .detail-columns:last-child {
    margin-bottom: 0;
}

.issue-remote-loading {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

.issue-create-panel {
    margin: 0;
    border: 0;
    box-shadow: none;
}

.issue-create-panel .panel-head {
    padding-top: 0;
}

.template-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.template-preview-head h2 {
    margin: 2px 0 4px;
    font-size: 22px;
}

.template-preview-frame {
    width: 100%;
    height: min(620px, 68vh);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.log-message-text {
    width: 100%;
    height: min(620px, 68vh);
    overflow: auto;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.operator-notification-note {
    margin: 16px 0 18px;
}

.operator-cron-form,
.operator-force-send-form,
.operator-uncovered-form {
    margin: 18px 0;
}

.operator-force-send-form {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid #b9d7c5;
    border-radius: 8px;
    background: #f1fbf5;
}

.operator-force-send-form h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.operator-force-send-form .actions {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .operator-force-send-form {
        align-items: stretch;
        flex-direction: column;
    }
}

.recovery-canary-form {
    display: grid;
    gap: 16px;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #efc16d;
    border-radius: 8px;
    background: #fff8e8;
}

.recovery-canary-form h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.recovery-canary-active {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #efc16d;
    border-radius: 8px;
    background: #fffdf7;
}

.recovery-canary-active h4 {
    margin: 8px 0 2px;
    font-size: 18px;
}

.recovery-canary-active-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.recovery-canary-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.recovery-canary-controls > button {
    align-self: start;
    margin-top: 31px;
}

@media (max-width: 760px) {
    .recovery-canary-controls {
        grid-template-columns: 1fr;
    }

    .recovery-canary-controls > button {
        margin-top: 0;
        width: 100%;
    }

    .recovery-canary-active {
        grid-template-columns: 1fr;
    }

    .recovery-canary-active-actions {
        justify-content: stretch;
    }

    .recovery-canary-active-actions .inline-form,
    .recovery-canary-active-actions button {
        width: 100%;
    }
}

.recovery-canary-log {
    display: grid;
    gap: 12px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #efc16d;
}

.panel-head.compact {
    margin-bottom: 0;
}

.recovery-canary-log-list {
    display: grid;
    gap: 10px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.recovery-canary-log-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.recovery-canary-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.recovery-canary-log-item h4 {
    margin: 0;
    font-size: 15px;
}

.recovery-canary-log-item p {
    margin: 0;
}

.recovery-canary-log-item details {
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.recovery-canary-log-item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent);
}

.recovery-canary-log-item pre {
    max-height: 260px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 6px;
    background: #f6f8fb;
    color: var(--ink);
    font-size: 12px;
    white-space: pre-wrap;
}

.error-text {
    color: var(--danger);
    font-weight: 700;
}

.operator-uncovered-form {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.operator-uncovered-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
    gap: 18px;
    align-items: start;
}

.operator-uncovered-grid h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.operator-uncovered-fields {
    display: grid;
    gap: 14px;
}

.operator-notification-table th:first-child,
.operator-notification-table td:first-child {
    width: 76px;
}

.operator-notification-table th:nth-child(4),
.operator-notification-table td:nth-child(4),
.operator-notification-table th:nth-child(8),
.operator-notification-table td:nth-child(8),
.operator-notification-table th:nth-child(10),
.operator-notification-table td:nth-child(10) {
    text-align: center;
}

.operator-notification-table th:nth-child(5),
.operator-notification-table td:nth-child(5) {
    text-align: right;
}

.operator-year-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.operator-digest-count {
    color: var(--ink);
    font-size: 24px;
    font-weight: 860;
}

.operator-digest-dialog {
    width: min(1120px, 100%);
}

body.modal-open {
    overflow: hidden;
}

.template-test-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.template-test-box .help-text {
    grid-column: 1 / -1;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.customer-log-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.audit-filter-grid .field:first-of-type {
    grid-column: span 2;
}

.customer-log-filter-grid .field:first-of-type {
    grid-column: span 2;
}

.audit-filter-actions {
    grid-column: span 2;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.customer-log-filter-actions {
    grid-column: span 2;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.audit-table-wrap {
    overflow-x: auto;
}

.audit-table {
    min-width: 1180px;
}

.customer-log-table {
    min-width: 1320px;
}

.audit-table td {
    vertical-align: top;
}

.customer-log-table td {
    vertical-align: top;
}

.audit-date {
    min-width: 122px;
    font-weight: 780;
}

.audit-context summary {
    cursor: pointer;
    color: var(--primary-ink);
    font-weight: 760;
}

.audit-context pre {
    max-width: 420px;
    max-height: 260px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.empty-cell {
    padding: 36px 18px;
    color: var(--muted);
    text-align: center;
}

.alert-threshold-form {
    margin-top: 18px;
}

.alert-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.alert-kpi {
    position: relative;
    overflow: hidden;
}

.alert-kpi-link {
    color: inherit;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.alert-kpi-link:hover {
    border-color: var(--primary);
    box-shadow: 0 14px 30px rgba(36, 125, 182, .16);
    transform: translateY(-1px);
}

.alert-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--primary);
    opacity: .85;
}

.alert-kpi-warning::before {
    background: var(--warning);
}

.alert-kpi-danger::before {
    background: var(--danger);
}

.alert-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.alert-table td {
    vertical-align: top;
}

.alert-ticket-meta {
    margin-top: 8px;
    font-size: .85rem;
    line-height: 1.35;
}

.alert-stage-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.alert-problem-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.alert-problem-tags .badge-warning {
    margin-left: 0;
}

.recidivist-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 20px;
}

.recidivist-mini-kpi {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.recidivist-mini-kpi span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 820;
    line-height: 1.25;
    text-transform: uppercase;
}

.recidivist-mini-kpi strong {
    display: block;
    margin-top: 7px;
    color: var(--primary-ink);
    font-size: 24px;
    line-height: 1;
}

.recidivist-period-list {
    display: grid;
    gap: 5px;
    min-width: 130px;
}

.recidivist-period-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recidivist-period-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.recidivist-period-list strong {
    color: var(--primary-ink);
    font-weight: 860;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    color: var(--muted);
    font-weight: 760;
}

.button.disabled {
    pointer-events: none;
    opacity: .45;
}

.doc-intro p,
.doc-section p {
    max-width: 980px;
    color: var(--muted);
    line-height: 1.65;
}

.doc-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.doc-section {
    margin-top: 0;
}

.doc-section h2,
.changelog-entry h2 {
    margin: 0 0 12px;
    color: var(--primary-ink);
    font-size: 20px;
}

.doc-list,
.doc-numbered {
    margin: 14px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.65;
}

.doc-list li + li,
.doc-numbered li + li {
    margin-top: 8px;
}

.doc-table-wrap {
    margin-top: 16px;
    box-shadow: none;
}

.doc-table-wrap td:first-child {
    color: var(--primary-ink);
    font-weight: 820;
}

.platform-workflow-hero {
    overflow: hidden;
}

.platform-workflow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 2px 0 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 820;
}

.platform-workflow-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.platform-workflow-legend i {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 4px;
    background: #fff;
}

.platform-workflow-legend .is-data {
    color: #2f7fc0;
}

.platform-workflow-legend .is-automation {
    color: #2f8b68;
}

.platform-workflow-legend .is-policy {
    color: #7d63d8;
}

.platform-workflow-legend .is-control {
    color: #c95f78;
}

.platform-workflow-legend .is-document {
    color: #bf7a14;
}

.platform-workflow-legend .is-channel {
    color: #2b8f9e;
}

.platform-workflow-legend .is-memory {
    color: #577189;
}

.platform-workflow-legend .is-external {
    color: #7357c8;
}

.platform-map-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
}

.platform-map {
    min-width: 1560px;
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid #c9d6e1;
    border-radius: 16px;
    background: #f6fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.platform-map-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
}

.platform-lane {
    display: grid;
    gap: 12px;
}

.platform-lane h3 {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.platform-node-row,
.platform-chain {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.platform-node-row-three .platform-node {
    flex-basis: 0;
}

.platform-chain {
    align-items: center;
}

.platform-node {
    flex: 1 0 214px;
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 16px 18px;
    border: 2px solid #bfd1de;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 12px 24px rgba(27, 36, 48, .05);
}

.platform-node.is-large {
    min-height: 150px;
}

.platform-node strong {
    color: #172033;
    font-size: 16px;
    line-height: 1.2;
}

.platform-node span {
    color: #546273;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.platform-node small {
    color: #667386;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.platform-node.is-data {
    border-color: #80bcec;
    background: #eef7ff;
}

.platform-node.is-automation {
    border-color: #70c193;
    background: #effaf4;
}

.platform-node.is-policy {
    border-color: #a894ff;
    background: #f6f1ff;
}

.platform-node.is-control {
    border-color: #f19aac;
    background: #fff3f6;
}

.platform-node.is-document {
    border-color: #e7a949;
    background: #fff8e9;
}

.platform-node.is-channel {
    border-color: #6fc9d5;
    background: #eefbfc;
}

.platform-node.is-memory {
    border-color: #b5c5d5;
    background: #f7fafc;
}

.platform-node.is-external {
    border-color: #a98cff;
    background: #f7f2ff;
}

.platform-arrow {
    position: relative;
    flex: 0 0 34px;
    height: 2px;
    align-self: center;
    background: #4ca2b1;
}

.platform-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 9px solid #4ca2b1;
    transform: translateY(-50%);
}

.platform-flow-caption {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    color: #5f7386;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.platform-flow-caption span {
    position: relative;
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 8px 10px;
    border: 1px dashed #a8cbd5;
    border-radius: 8px;
    background: rgba(255, 255, 255, .65);
}

.platform-dashed-relations {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding-top: 4px;
}

.platform-dashed-relations span {
    min-height: 54px;
    display: grid;
    align-items: center;
    padding: 10px 12px;
    border: 1px dashed #99c9d5;
    border-radius: 10px;
    color: #607287;
    background: rgba(239, 248, 251, .72);
    font-size: 12px;
    font-weight: 780;
    line-height: 1.35;
}

.platform-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.platform-detail-card {
    margin-top: 0;
}

.platform-detail-card h2,
.platform-rules-panel h2 {
    margin: 0 0 12px;
    color: var(--primary-ink);
    font-size: 20px;
}

.platform-detail-card p,
.platform-rules-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.platform-rules-panel {
    margin-top: 18px;
}

.platform-attachment-matrix {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.platform-attachment-matrix article {
    min-height: 158px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d3dde7;
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background: #fff;
}

.platform-attachment-matrix article:nth-child(1) {
    border-top-color: #c95f78;
}

.platform-attachment-matrix article:nth-child(2) {
    border-top-color: #2f8b68;
}

.platform-attachment-matrix article:nth-child(3) {
    border-top-color: #bf7a14;
}

.platform-attachment-matrix article:nth-child(4) {
    border-top-color: #7d63d8;
}

.platform-attachment-matrix strong {
    color: var(--ink);
    font-size: 16px;
}

.platform-attachment-matrix span {
    color: var(--primary-ink);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}

.platform-attachment-matrix p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.changelog-list {
    position: relative;
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.changelog-entry {
    position: relative;
    margin-top: 0;
    padding-left: 30px;
}

.changelog-marker {
    position: absolute;
    top: 26px;
    left: 16px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 5px var(--primary-soft);
}

.changelog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.changelog-head .badge + .badge {
    margin-left: 6px;
}

.operations-hero {
    margin-bottom: 14px;
}

.operations-status-strip,
.operations-toggle-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.operations-status-strip span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-ink);
    background: #fff;
    font-size: 13px;
    font-weight: 850;
}

.operations-toggle-strip {
    margin: 0 0 18px;
}

.operations-saga-preflight {
    margin-bottom: 18px;
    border-left: 4px solid var(--primary);
}

.operations-settlement-panel {
    margin-bottom: 18px;
    border-left: 4px solid var(--success);
}

.operations-cutover-panel {
    margin-bottom: 18px;
    border-left: 4px solid var(--primary);
}

.operations-cutover-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.operations-cutover-card {
    min-height: 164px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 3px solid #a6b4c2;
    border-radius: 7px;
    background: #fbfcfd;
}

.operations-cutover-card.is-passed,
.operations-cutover-card.is-ready,
.operations-cutover-card.is-guarded {
    border-top-color: var(--success);
}

.operations-cutover-card.is-blocked,
.operations-cutover-card.is-attention {
    border-top-color: var(--danger);
}

.operations-cutover-card.is-running,
.operations-cutover-card.is-pending,
.operations-cutover-card.is-planned {
    border-top-color: var(--warning);
}

.operations-cutover-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.operations-cutover-head > div {
    min-width: 0;
    display: grid;
    gap: 7px;
    justify-items: start;
}

.operations-cutover-head strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.25;
}

.operations-cutover-number {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-ink);
    font-size: 14px;
    font-weight: 900;
}

.operations-cutover-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.operations-cutover-card small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.operations-cutover-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid #f0d8a5;
    border-radius: 7px;
    background: #fff9ec;
    color: #6f4b08;
}

.operations-cutover-notice p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.operations-settlement-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    padding: 11px 12px;
    border: 1px solid #cfe0ec;
    border-radius: 7px;
    background: #f3f8fc;
    color: var(--primary-ink);
}

.operations-settlement-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.operations-settlement-gates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 18px;
}

.operations-settlement-gate {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-left: 3px solid #b8c7d5;
    border-radius: 7px;
    background: #fff;
}

.operations-settlement-gate.is-effect {
    border-left-color: var(--warning);
}

.operations-settlement-gate.is-observer {
    border-left-color: var(--primary);
}

.operations-settlement-gate > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.operations-settlement-gate strong {
    color: var(--ink);
    font-size: 13px;
}

.operations-settlement-gate small {
    color: var(--muted);
    font-size: 11px;
}

.operations-settlement-executions {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.operations-subhead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.operations-subhead h3,
.operations-subhead p {
    margin: 0;
}

.operations-subhead h3 {
    color: var(--ink);
    font-size: 16px;
}

.operations-settlement-table td {
    white-space: nowrap;
}

.operations-saga-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--line);
}

.operations-saga-summary > span {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 13px 14px;
    background: #fff;
}

.operations-saga-summary small,
.operations-saga-summary em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.operations-saga-summary strong {
    color: var(--ink);
    font-size: 15px;
}

.operations-saga-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.operations-saga-check {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid #d8e0e8;
    border-radius: 7px;
    background: #fff;
}

.operations-saga-check.is-ok {
    border-left-color: var(--success);
}

.operations-saga-check.is-warning {
    border-left-color: var(--warning);
}

.operations-saga-check.is-blocked {
    border-left-color: var(--danger);
}

.operations-saga-check > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.operations-saga-check strong,
.operations-saga-check small,
.operations-saga-check p {
    margin: 0;
}

.operations-saga-check small {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.operations-saga-check p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.operations-saga-sequence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.operations-saga-sequence > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 800;
}

.operations-saga-sequence b {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
}

.operations-saga-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.operations-saga-actions form {
    min-width: 0;
    display: grid;
    align-content: end;
    gap: 7px;
}

.operations-saga-actions small {
    color: var(--muted);
    font-size: 12px;
}

.operations-saga-execute-form {
    grid-template-columns: minmax(180px, 1fr) auto;
}

.operations-saga-execute-form label,
.operations-saga-execute-form small {
    grid-column: 1 / -1;
}

.operations-saga-actions button:disabled,
.operations-saga-actions input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.operations-runtime-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 12px;
}

.operations-runtime-card {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.operations-runtime-card > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.operations-runtime-card p,
.operations-runtime-card small {
    margin: 0;
}

.operations-runtime-card small {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--muted);
}

.operations-runtime-card small .icon {
    flex: 0 0 auto;
}

.operations-automation-panel {
    margin-bottom: 18px;
}

.operations-scheduler-migration-panel {
    margin-bottom: 18px;
}

.operations-attention-panel {
    margin-bottom: 18px;
}

.operations-legacy-panel {
    margin-bottom: 18px;
}

.operations-scheduler-coverage-panel {
    margin-bottom: 18px;
}

.operations-automation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-attention-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-attention-card {
    min-height: 190px;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-attention-card.is-warning {
    border-top-color: var(--warning);
}

.operations-attention-card.is-danger {
    border-top-color: var(--danger);
}

.operations-attention-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.operations-attention-head span:first-child {
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.operations-attention-card strong {
    min-width: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.operations-attention-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
}

.operations-attention-card small {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.operations-attention-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.operations-legacy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-legacy-card {
    min-height: 220px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--danger);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-legacy-card.is-ready {
    border-top-color: var(--success);
}

.operations-legacy-card.is-guarded {
    border-top-color: var(--warning);
}

.operations-legacy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.operations-legacy-head strong {
    min-width: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.operations-legacy-card p {
    min-height: 34px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
}

.operations-legacy-body {
    display: grid;
    gap: 8px;
}

.operations-legacy-body span {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.operations-legacy-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.operations-scheduler-coverage-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.operations-scheduler-coverage-card {
    min-height: 170px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-scheduler-coverage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.operations-scheduler-coverage-head strong {
    min-width: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.operations-scheduler-coverage-body {
    display: grid;
    gap: 7px;
}

.operations-scheduler-coverage-body span {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.operations-scheduler-coverage-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.operations-automation-card {
    min-height: 190px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-automation-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.operations-automation-head strong {
    min-width: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.operations-automation-card p {
    min-height: 38px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.operations-automation-meta {
    display: grid;
    gap: 6px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
}

.operations-automation-meta span,
.operations-automation-meta small {
    min-width: 0;
}

.operations-automation-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.operations-automation-meta small {
    color: var(--muted);
    font-weight: 750;
    line-height: 1.35;
}

.operations-scheduler-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-scheduler-roadmap-card {
    min-height: 210px;
    display: grid;
    align-content: start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-scheduler-roadmap-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.operations-scheduler-roadmap-head strong,
.operations-scheduler-roadmap-head small {
    display: block;
    min-width: 0;
}

.operations-scheduler-roadmap-head strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.operations-scheduler-roadmap-head small {
    margin-top: 4px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.operations-scheduler-roadmap-card p {
    min-height: 46px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.operations-scheduler-roadmap-next {
    display: grid;
    gap: 7px;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
}

.operations-scheduler-roadmap-next span {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.35;
}

.operations-scheduler-roadmap-next small {
    color: var(--muted);
    font-weight: 750;
    line-height: 1.35;
}

.operations-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.operations-kpi {
    min-height: 118px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    border-top: 4px solid var(--primary);
}

.operations-kpi.is-attention {
    border-top-color: var(--warning);
}

.operations-kpi.is-danger {
    border-top-color: var(--danger);
}

.operations-kpi span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.operations-kpi strong {
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
}

.operations-kpi em {
    color: var(--primary-ink);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr);
    gap: 18px;
    align-items: start;
}

.operations-panel {
    min-width: 0;
}

.operations-panel-wide {
    grid-column: 1 / -1;
}

.operations-queue-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.operations-queue-card {
    min-height: 148px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-queue-head,
.operations-queue-foot,
.operations-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.operations-queue-head strong {
    color: var(--ink);
    font-size: 15px;
}

.operations-queue-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.operations-queue-stats span,
.operations-doc-summary span,
.operations-channel-grid span {
    display: grid;
    gap: 3px;
    padding: 9px;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.operations-queue-stats b,
.operations-doc-summary strong,
.operations-channel-grid strong {
    color: var(--primary-ink);
    font-size: 18px;
    line-height: 1;
}

.operations-queue-foot {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.operations-table-wrap {
    overflow-x: auto;
}

.operations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.operations-table th,
.operations-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.operations-table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.operations-table td {
    color: var(--ink);
}

.operations-list {
    display: grid;
    gap: 10px;
}

.operations-list-row {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.operations-list-row span {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.42;
}

.operations-list-row strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

.operations-list-row small {
    flex: 0 0 auto;
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.operations-doc-summary,
.operations-channel-grid,
.operations-schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.operations-channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operations-channel-grid em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.operations-schedule-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
}

.operations-schedule-grid div {
    min-height: 120px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.operations-schedule-grid strong {
    color: var(--ink);
    font-size: 14px;
}

.operations-schedule-grid span {
    color: var(--primary-ink);
    font-size: 13px;
    font-weight: 850;
}

.operations-schedule-grid small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 980px) {
    .dashboard-kpi-guide {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .app-shell,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .stats,
    .invoice-kpis-main,
    .invoice-kpis-secondary,
    .recovery-kpis,
    .control-kpis,
    .project-summary-grid,
    .project-summary-card,
    .project-summary-metrics,
    .dashboard-control-grid,
    .mini-kpi-grid,
    .assignee-kpis,
    .alert-kpis,
    .alert-two-columns,
    .notification-grid,
    .notification-preflight-grid,
    .detail-columns,
    .issue-detail-grid,
    .doc-layout,
    .form-grid,
    .workflow-cron-token,
    .reminder-mode-grid,
    .reminder-attachment-grid,
    .reminder-template-fields,
    .document-generation-grid,
    .document-worker-settings-grid,
    .document-generation-plan-grid,
    .document-worker-kpis,
    .document-worker-grid,
    .document-worker-maintenance-grid,
    .python-shadow-scan-grid,
    .python-shadow-scan-kpis,
    .postal-slip-test-grid,
    .platform-detail-grid,
    .platform-attachment-matrix,
    .operations-kpis,
    .operations-grid,
    .operations-queue-grid,
    .operations-automation-grid,
    .operations-attention-grid,
    .operations-runtime-grid,
    .operations-legacy-grid,
    .operations-scheduler-coverage-grid,
    .operations-scheduler-roadmap-grid,
    .operations-cutover-grid,
    .operations-saga-summary,
    .operations-settlement-gates,
    .operations-saga-checks,
    .operations-saga-actions,
    .operations-doc-summary,
    .operations-channel-grid,
    .operations-schedule-grid,
    .customer-search-row,
    .scan-context-strip {
        grid-template-columns: 1fr;
    }

    .operations-saga-check,
    .operations-saga-execute-form {
        grid-template-columns: 1fr;
    }

    .operations-subhead {
        display: grid;
    }

    .operations-saga-execute-form label,
    .operations-saga-execute-form small {
        grid-column: auto;
    }

    .notification-preflight-head {
        display: grid;
    }

    .audit-filter-grid,
    .customer-log-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-grid .field:first-of-type,
    .customer-log-filter-grid .field:first-of-type,
    .audit-filter-actions,
    .customer-log-filter-actions {
        grid-column: auto;
    }

    .audit-filter-actions,
    .customer-log-filter-actions,
    .customer-search-actions {
        flex-wrap: wrap;
    }

    .control-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .control-hero .actions {
        justify-content: flex-start;
    }

    .stage-bar-row,
    .assignee-load-head,
    .assignee-load-row,
    .recidivist-summary-grid {
        grid-template-columns: 1fr;
    }

    .assignee-load-head {
        display: none;
    }

    .assignee-load-row {
        gap: 6px;
    }

    .simulation-toggle-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .postal-slip-test-result {
        align-items: flex-start;
        flex-direction: column;
    }

    .template-test-box {
        grid-template-columns: 1fr;
    }

    .issue-detail-title,
    .detail-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .issue-detail-grid dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .main {
        padding: 24px 18px 36px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .scan-context-item {
        align-items: flex-start;
    }

    .user-pill {
        justify-content: flex-start;
    }
}
