:root {
    --ink: #14324a;
    --blue: #0d5f93;
    --blue-soft: #e8f4fb;
    --gold: #b98b45;
    --cream: #faf8f3;
    --line: #dfe8ee;
    --muted: #647889;
    --danger: #b84040;
    --ok: #2d8a62;
    --warn: #c47b2b;
    --radius: 8px;
}

/* Offres société : poste de travail commercial */
.company-offers-page { --offer-navy: #102f46; --offer-gold: #b98b43; --offer-border: #dbe7ec; }
.company-offers-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 30px 34px; border-radius: 22px; background: linear-gradient(125deg, #10354e, #0d283c 76%); color: #fff; box-shadow: 0 20px 50px rgba(8, 43, 66, .15); }
.company-offers-hero .eyebrow { color: #d5ad69; margin: 0 0 8px; }
.company-offers-hero h1 { color: #fff; margin: 0 0 8px; font-size: clamp(30px, 3vw, 46px); line-height: 1.08; }
.company-offers-hero p:not(.eyebrow) { color: #d5e3e9; margin: 0; max-width: 660px; }
.company-offers-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.company-offers-hero-actions .btn:not(.primary) { border-color: #7290a1; color: #fff; background: rgba(255,255,255,.07); }
.company-offers-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.company-offers-stats > div { display: grid; gap: 4px; padding: 18px 22px; border: 1px solid var(--offer-border); border-radius: 17px; background: #fff; box-shadow: 0 12px 30px rgba(13, 45, 65, .04); }
.company-offers-stats span { color: #536e80; font-weight: 750; }
.company-offers-stats strong { color: var(--offer-navy); font-size: 34px; line-height: 1.1; }
.company-offers-stats small { color: #78909f; }
.company-offers-create { padding: 0; margin-bottom: 18px; border-color: #d9e7ec; border-radius: 17px; overflow: hidden; }
.company-offers-create summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; color: var(--offer-navy); font-weight: 800; list-style-position: inside; background: #f6fafb; }
.company-offers-create summary small { color: #718897; font-weight: 600; }
.company-offers-create-form { display: grid; gap: 16px; padding: 22px; border-top: 1px solid var(--offer-border); }
.company-offers-create-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.company-offers-create-footer p { color: #688191; margin: 0; }
.company-offers-workspace { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(0, 1.45fr); align-items: start; gap: 18px; }
.company-offers-workspace > .panel { border: 1px solid var(--offer-border); border-radius: 20px; box-shadow: 0 16px 42px rgba(15, 51, 72, .06); }
.company-offers-inbox { padding: 18px; }
.company-offers-inbox-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; padding: 3px 4px 16px; }
.company-offers-inbox-head .eyebrow { margin: 0 0 4px; }
.company-offers-inbox-head h2 { margin: 0; font-size: 22px; color: var(--offer-navy); }
.company-offers-inbox-head > span { color: #78909f; white-space: nowrap; font-size: 13px; }
.company-offers-search input { width: 100%; border-radius: 11px; background: #f8fbfc; }
.company-offers-filters { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; }
.company-offers-filters button { flex: none; border: 1px solid transparent; border-radius: 999px; background: #f0f5f7; color: #536c7c; padding: 7px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.company-offers-filters button.active { background: var(--offer-navy); color: #fff; }
.company-offers-filters button span { opacity: .7; margin-left: 2px; }
.company-offers-items { display: grid; gap: 8px; max-height: 720px; overflow-y: auto; }
.company-offers-item { display: grid; gap: 9px; padding: 15px; border: 1px solid #e1e9ed; border-radius: 14px; text-decoration: none; background: #fff; transition: background .15s, border-color .15s, transform .15s; }
.company-offers-item:hover, .company-offers-item.active { border-color: #b7cdd9; background: #f4fafc; transform: translateY(-1px); }
.company-offers-item.active { box-shadow: inset 3px 0 0 var(--offer-gold); }
.company-offers-item[hidden] { display: none; }
.company-offers-item-top, .company-offers-item-bottom { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.company-offers-item-top strong { color: var(--offer-navy); font-size: 15px; line-height: 1.3; }
.company-offers-item-contact { color: #617c8b; font-size: 13px; overflow-wrap: anywhere; }
.company-offers-item-bottom { color: #688192; font-size: 12px; }
.company-offers-item-bottom span:first-child { color: var(--offer-navy); font-weight: 800; }
.company-offers-badge { display: inline-flex; align-items: center; width: fit-content; white-space: nowrap; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 850; background: #edf3f7; color: #486376; }
.company-offers-badge.is-todo { background: #fff3de; color: #8f6124; }
.company-offers-badge.is-sent { background: #e9f3fa; color: #245b82; }
.company-offers-badge.is-accepted { background: #e8f7ef; color: #23734d; }
.company-offers-inbox-empty { display: grid; gap: 9px; padding: 26px 10px 32px; text-align: center; color: #6c8492; }
.company-offers-inbox-empty > span { color: var(--offer-gold); font-size: 36px; }
.company-offers-inbox-empty strong { color: var(--offer-navy); font-size: 18px; }
.company-offers-inbox-empty p { margin: 0; }
.company-offers-inbox-empty a { color: #07628b; font-weight: 800; }
.company-offers-no-results { color: #6c8492; text-align: center; padding: 20px; }
.company-offers-detail { padding: 28px; }
.company-offers-detail-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--offer-border); }
.company-offers-detail-head .eyebrow { margin: 0 0 7px; }
.company-offers-detail-head h2 { margin: 0 0 5px; color: var(--offer-navy); font-size: clamp(25px, 2vw, 34px); }
.company-offers-detail-head p:last-child { margin: 0; color: #627d8b; overflow-wrap: anywhere; }
.company-offers-detail-head a { color: inherit; }
.company-offers-section { padding: 24px 0; border-bottom: 1px solid var(--offer-border); }
.company-offers-section-title { display: flex; align-items: start; gap: 13px; margin-bottom: 17px; }
.company-offers-section-title > span { display: grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 10px; background: #e8f0f3; color: #407087; font-size: 12px; font-weight: 900; }
.company-offers-section-title h3 { margin: 0; color: var(--offer-navy); font-size: 19px; }
.company-offers-section-title p { margin: 3px 0 0; color: #738b99; font-size: 13px; }
.company-offers-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.company-offers-facts > div { display: grid; gap: 4px; padding: 11px; border: 1px solid #e3ebee; border-radius: 11px; background: #f9fbfc; }
.company-offers-facts span, .company-offers-sent-values span { color: #78909d; font-size: 12px; }
.company-offers-facts strong { color: var(--offer-navy); font-size: 13px; overflow-wrap: anywhere; }
.company-offers-request-text { margin: 15px 0 0; padding: 14px; border-left: 3px solid #c7dbe4; border-radius: 0 10px 10px 0; background: #f7fafb; color: #536f7f; }
.company-offers-request-text strong { color: var(--offer-navy); }
.company-offer-form { padding-top: 24px; }
.company-offers-lines-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 5px; }
.company-offers-lines-head h4 { margin: 0; color: var(--offer-navy); font-size: 15px; }
.company-offers-lines-head span { color: #78909d; font-size: 12px; }
.company-offers-lines { display: grid; gap: 8px; }
.company-offers-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px 110px 100px 28px; align-items: end; gap: 8px; }
.company-offers-line label { min-width: 0; font-size: 12px; }
.company-offers-line input { width: 100%; }
.company-offers-line output { padding-bottom: 11px; text-align: right; white-space: nowrap; color: var(--offer-navy); font-size: 12px; font-weight: 800; }
.company-offers-remove-line { margin-bottom: 7px; border: 0; background: transparent; color: #78909d; font-size: 24px; line-height: 1; cursor: pointer; }
.company-offers-remove-line:hover { color: #af4545; }
.company-offers-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; border-radius: 12px; background: var(--offer-navy); color: #fff; }
.company-offers-total strong { color: #fff; font-size: 22px; }
.company-offers-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 17px; border-top: 1px solid var(--offer-border); }
.company-offers-form-actions p { max-width: 390px; margin: 0; color: #718895; font-size: 13px; }
.company-offers-form-actions > div, .company-offers-sent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.company-offers-sent-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.company-offers-sent-values > div { display: grid; gap: 5px; border: 1px solid var(--offer-border); border-radius: 11px; padding: 15px; }
.company-offers-sent-values strong { color: var(--offer-navy); }
.company-offers-sent-actions { margin-top: 18px; }
.company-offers-mandate { margin-top: 18px; padding: 16px; border: 1px solid #b9dccd; border-radius: 12px; background: #f1faf5; color: #1d6342; }
.company-offers-mandate p { margin: 5px 0 0; }
.company-offers-detail-empty { display: grid; justify-items: start; align-content: center; gap: 10px; min-height: 380px; max-width: 550px; margin: auto; }
.company-offers-empty-mark { font-size: 44px; color: var(--offer-gold); }
.company-offers-detail-empty h2 { margin: 0; color: var(--offer-navy); font-size: 28px; }
.company-offers-detail-empty p:not(.eyebrow) { color: #6f8794; line-height: 1.6; }
@media (max-width: 1100px) { .company-offers-workspace { grid-template-columns: minmax(270px, .8fr) minmax(0, 1.3fr); } .company-offers-facts { grid-template-columns: repeat(2, 1fr); } .company-offers-line { grid-template-columns: minmax(0, 1fr) 65px 90px 65px 22px; } }
@media (max-width: 850px) { .company-offers-hero, .company-offers-create-footer, .company-offers-form-actions { align-items: start; flex-direction: column; } .company-offers-workspace { grid-template-columns: 1fr; } .company-offers-stats { grid-template-columns: repeat(2, 1fr); } .company-offers-create summary { align-items: start; flex-direction: column; } }
@media (max-width: 600px) { .company-offers-hero { padding: 24px; } .company-offers-hero-actions { width: 100%; } .company-offers-hero-actions .btn { flex: 1; text-align: center; } .company-offers-detail { padding: 18px; } .company-offers-detail-head { flex-direction: column; } .company-offers-line { grid-template-columns: minmax(0, 1fr) 70px 22px; } .company-offers-line label:first-child { grid-column: 1 / -1; } .company-offers-line label:nth-child(3) { grid-column: 1; } .company-offers-line output { grid-column: 2; } .company-offers-line button { grid-column: 3; } .company-offers-sent-values { grid-template-columns: 1fr; } }

.existing-case-guard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #f0c36a;
    border-radius: 8px;
    background: #fff8e8;
}

.existing-case-guard p {
    margin: 6px 0;
    color: var(--muted);
}

.existing-case-guard small {
    display: block;
    color: #7a5a18;
}

.existing-case-guard-actions {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.existing-case-guard-actions span {
    color: var(--muted);
    font-size: 12px;
}

.existing-case-choice {
    display: grid;
    gap: 18px;
    margin-top: 22px;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid #d8bd83;
    border-left: 5px solid #bb8733;
    border-radius: 14px;
    background: #fffbf1;
    box-shadow: 0 8px 24px rgba(72, 54, 23, .07);
}

.existing-case-choice h3 {
    margin: 7px 0 8px;
    color: #173f53;
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.3;
}

.existing-case-choice p {
    margin: 0;
    color: #405765;
    line-height: 1.6;
}

.existing-case-choice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 760px) {
    .existing-case-guard {
        grid-template-columns: 1fr;
    }

    .existing-case-guard-actions {
        justify-items: stretch;
    }

    .existing-case-choice-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Cabinet setup on the Tax dashboard. */
.cabinet-start {
    display: grid; grid-template-columns: minmax(240px, .88fr) minmax(360px, 1.45fr);
    gap: 26px 38px; margin: 2px 0 28px; padding: clamp(22px, 3vw, 34px);
    border: 1px solid #cbdfe6; border-radius: 22px;
    background: linear-gradient(125deg, #eff8fa 0%, #fff 55%, #fdfaf3 100%);
    box-shadow: 0 16px 40px rgba(19, 61, 78, .09);
}
.cabinet-start-intro { align-self: center; }
.cabinet-start-kicker { color: #987344; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.cabinet-start h2 { margin: 11px 0 12px; color: #123b4d; font-size: clamp(23px, 2.3vw, 32px); line-height: 1.15; }
.cabinet-start-intro p { max-width: 36ch; margin: 0 0 21px; color: #4b6c7b; line-height: 1.55; }
.cabinet-start-steps { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.cabinet-start-steps li { display: flex; align-items: flex-start; gap: 14px; padding: 15px 17px; border: 1px solid #e0e9e9; border-radius: 14px; background: rgba(255,255,255,.88); }
.cabinet-start-number { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 50%; background: #e4edf0; color: #174558; font-weight: 800; }
.cabinet-start-steps li.is-done .cabinet-start-number { background: #e1f4ea; color: #18754b; }
.cabinet-start-steps strong { color: #173e50; font-size: 14px; }
.cabinet-start-steps p { margin: 5px 0 7px; color: #607783; font-size: 13px; line-height: 1.45; }
.cabinet-start-steps a, .cabinet-start-foot a { color: #116e8a; font-size: 13px; font-weight: 750; text-underline-offset: 3px; }
.cabinet-start-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid #dfe9e9; color: #526e7c; font-size: 13px; }
@media (max-width: 840px) {
    .cabinet-start { grid-template-columns: minmax(0, 1fr); gap: 23px; }
    .cabinet-start-foot { grid-column: 1; }
}

.cabinet-pricing-review { scroll-margin-top: 90px; }
.cabinet-pricing-review details { margin: 13px 0; padding: 12px 15px; border: 1px solid #e2d3b9; border-radius: 12px; background: rgba(255,255,255,.78); }
.cabinet-pricing-review summary { cursor: pointer; color: #294c59; font-weight: 800; }
.cabinet-pricing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 12px 0 0; }
.cabinet-pricing-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e5e9e8; }
.cabinet-pricing-list dt { color: #526b77; }
.cabinet-pricing-list dd { margin: 0; color: #143b50; font-weight: 800; white-space: nowrap; }
.cabinet-pricing-cantons { display: grid; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2e8e6; }
.cabinet-pricing-cantons > div { display: flex; flex-wrap: wrap; gap: 7px; }
.cabinet-pricing-cantons span { padding: 6px 9px; border-radius: 999px; background: #edf5f3; color: #245261; font-size: 12px; font-weight: 700; }
@media (max-width: 700px) { .cabinet-pricing-list { grid-template-columns: minmax(0, 1fr); } }

.fiscal-worksheet-panel,
.final-checklist-panel {
    display: grid;
    gap: 18px;
}

.fiscal-worksheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.fiscal-worksheet-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    min-height: 128px;
}

.fiscal-worksheet-row.warning {
    border-color: #f4b73f;
    background: #fff9ed;
}

.fiscal-worksheet-row span,
.fiscal-worksheet-row small,
.final-checklist-list small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.fiscal-worksheet-row strong {
    display: block;
    margin: 4px 0 6px;
}

.fiscal-worksheet-row p {
    margin: 0 0 8px;
}

.ocr-status-box {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.ocr-status-box.enabled {
    border-color: #68b984;
    background: #f1fbf5;
}

.ocr-status-box p {
    margin: 4px 0 0;
    color: var(--muted);
}

.ocr-status-box code,
.ocr-server-diagnostic code {
    border-radius: 5px;
    padding: 2px 5px;
    background: rgba(12, 54, 78, .07);
    color: var(--ink);
    font-size: .9em;
}

.ocr-server-diagnostic {
    border: 1px solid #edcf9f;
    border-left: 4px solid #c18c37;
    border-radius: 8px;
    padding: 13px 15px;
    background: #fffaf1;
}

.ocr-server-diagnostic.ready {
    border-color: #bfe2cd;
    border-left-color: #2f8d61;
    background: #f1faf5;
}

.ocr-server-diagnostic p {
    margin: 5px 0 0;
    color: var(--muted);
}

.final-checklist-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.final-checklist-list article {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.final-checklist-list article > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-weight: 700;
}

.final-checklist-list article.done > span {
    color: #126b36;
    background: #e8f7ee;
}

.final-checklist-list article.open > span {
    color: #8a4d00;
    background: #fff1d6;
}

.final-checklist-list strong {
    display: block;
    margin-bottom: 3px;
}

.company-offer-request {
    border-color: rgba(31, 146, 102, 0.28);
    background: linear-gradient(135deg, rgba(31, 146, 102, 0.08), rgba(255, 255, 255, 0.96));
}

.company-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}

.module-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.module-section {
    display: grid;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.module-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.intake-builder-shell {
    gap: 18px;
}
.intake-builder-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.intake-builder-hero article,
.intake-preview-list article {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f8fbfd);
}
.intake-builder-hero span,
.intake-preview-list span {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
}
.intake-builder-hero strong,
.intake-preview-list strong {
    color: var(--ink);
    font-size: 20px;
}
.intake-builder-hero small,
.intake-preview-list small {
    color: var(--muted);
    font-weight: 750;
}
.intake-builder-form {
    display: grid;
    gap: 18px;
}
.intake-identity-settings {
    display: grid;
    gap: 16px;
    padding: clamp(18px, 2vw, 26px);
    border: 1px solid #cddfea;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5fafc, #fff 65%);
    box-shadow: 0 14px 34px rgba(20, 61, 83, .055);
    scroll-margin-top: 32px;
}
.intake-identity-settings-head h3 { margin: 5px 0; color: var(--ink); font-size: clamp(20px, 2vw, 25px); }
.intake-identity-settings-head p,
.intake-identity-settings-note { margin: 0; color: var(--muted); line-height: 1.5; }
.intake-identity-settings-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intake-identity-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 17px;
    border: 1px solid #d7e7ee;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}
.intake-identity-option:has(input:checked) { border-color: #80bdc8; background: #f2fbfa; }
.intake-identity-option input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #15818a; }
.intake-identity-option span { display: grid; gap: 4px; min-width: 0; }
.intake-identity-option strong { color: var(--ink); line-height: 1.3; }
.intake-identity-option small { color: var(--muted); font-size: 12px; line-height: 1.45; }
@media (max-width: 720px) { .intake-identity-settings-options { grid-template-columns: 1fr; } }
.intake-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.intake-builder-actions.bottom {
    justify-content: flex-start;
    padding-top: 4px;
}
.intake-add-item-button {
    border-color: rgba(13, 95, 147, 0.28);
    background: linear-gradient(135deg, #f7fbfd, #fff);
    color: var(--blue);
}
.intake-add-item-button::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-right: 7px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 950;
}
.intake-builder-list {
    display: grid;
    gap: 14px;
}
[data-intake-sortable] [data-intake-sortable-card].is-dragging {
    opacity: .62;
    transform: scale(.995);
}
.drag-handle {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 950;
    cursor: grab;
    user-select: none;
}
.intake-sort-order-field {
    display: none;
}
[draggable="true"]:active .drag-handle {
    cursor: grabbing;
}
.intake-builder-card {
    position: relative;
    display: grid;
    gap: 0;
    padding: 0;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background:
        radial-gradient(circle at 0% 0%, rgba(13,95,147,.06), transparent 30%),
        linear-gradient(145deg, #fff, #fbfdfe);
    box-shadow: 0 14px 34px rgba(16,43,66,.06);
    overflow: hidden;
}
.intake-builder-card-summary {
    display: grid;
    grid-template-columns: 30px 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 16px 132px 16px 18px;
    cursor: pointer;
    list-style: none;
}
.intake-builder-card-summary::-webkit-details-marker {
    display: none;
}
.intake-builder-card-summary .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 950;
    transition: transform .18s ease;
}
.intake-builder-card[open] .intake-builder-card-summary .collapse-arrow {
    transform: rotate(90deg);
}
.intake-builder-card-summary strong {
    display: block;
    color: var(--ink);
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.15;
}
.intake-builder-card-summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 780;
}
.intake-builder-card-summary em {
    border: 1px solid #cfe8da;
    border-radius: 999px;
    padding: 8px 11px;
    background: #f4fbf7;
    color: var(--ok);
    font-style: normal;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}
.intake-builder-card:not([open]) .intake-builder-card-summary {
    background: linear-gradient(135deg, rgba(247,251,253,.78), rgba(255,255,255,.98));
}
.intake-builder-card.is-new-item {
    border-style: dashed;
    border-color: rgba(13,95,147,.34);
    background:
        radial-gradient(circle at 100% 0%, rgba(45,138,98,.10), transparent 34%),
        linear-gradient(145deg, #fff, #f5fbf8);
}
.intake-builder-card.is-new-item .intake-builder-card-summary em {
    border-color: #d8e8ef;
    background: var(--blue-soft);
    color: var(--blue);
}
.intake-builder-card-body {
    display: grid;
    gap: 13px;
    padding: 0 18px 18px;
    border-top: 1px solid #e4eef4;
}
.intake-builder-empty {
    display: grid;
    gap: 4px;
    margin: 0;
    border-style: dashed;
    text-align: center;
}
.intake-builder-empty strong {
    color: var(--ink);
}
.intake-builder-empty span {
    color: var(--muted);
    font-weight: 760;
}
.intake-client-type-modules {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}

.intake-client-type-modules strong {
    color: var(--ink);
}

.intake-client-type-modules p {
    margin: 4px 0 0;
}
.intake-pricing-block {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(185, 130, 47, .28);
    border-radius: 14px;
    background: linear-gradient(135deg, #fffaf2, #ffffff);
}
.intake-pricing-block > div:first-child strong {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .02em;
}
.intake-pricing-block input[type="number"] {
    max-width: 240px;
}
.intake-express-settings {
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) repeat(2, minmax(145px, .8fr));
    gap: 14px;
    align-items: center;
    padding: 17px;
    border: 1px solid #cfe4df;
    border-radius: 13px;
    background: #fff;
}
.intake-express-settings > label { min-width: 0; }
.intake-express-settings .intake-express-switch { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.intake-express-switch input[type="checkbox"] { flex: 0 0 auto; width: 21px; height: 21px; margin: 2px 0 0; accent-color: #168b82; }
.intake-express-switch > span { display: grid; gap: 4px; }
.intake-express-switch strong { color: #143b54; font-size: 14px; }
.intake-express-switch small { color: #6d8392; font-size: 12px; font-weight: 500; line-height: 1.4; }
.intake-express-settings > p { grid-column: 1 / -1; margin: 0; padding-top: 11px; border-top: 1px solid #e6f0ee; color: #66808a; font-size: 12px; line-height: 1.45; }
@media (max-width: 960px) {
    .intake-express-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .intake-express-switch { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .intake-express-settings { grid-template-columns: 1fr; }
    .intake-express-switch { grid-column: auto; }
}
.intake-standard-item-section {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfdfe, #fff);
}

.intake-standard-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.intake-standard-item-head strong {
    color: var(--ink);
    font-size: 17px;
}

.intake-standard-item-head p {
    margin: 4px 0 0;
}

.intake-standard-item-head span {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.intake-standard-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.intake-standard-item-actions .intake-add-item-button {
    white-space: nowrap;
}

.intake-step-custom-items {
    display: grid;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #e4eef4;
}

.intake-step-custom-items > strong {
    color: var(--ink);
}

.intake-step-custom-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #dbe9f0;
    border-radius: 10px;
    background: #fff;
}

.intake-step-custom-row > span {
    flex: 1;
    min-width: 0;
    color: var(--ink);
    font-weight: 800;
}

.intake-step-custom-row > small {
    color: var(--muted);
    font-weight: 800;
}

.intake-inline-add-host:not(:empty) {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e4eef4;
}

.intake-standard-item-list {
    display: grid;
    gap: 10px;
}

.intake-standard-item-card {
    position: relative;
    border: 1px solid #dbe9f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.intake-standard-item-card summary {
    display: grid;
    grid-template-columns: 30px 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 124px 12px 12px;
    cursor: pointer;
    list-style: none;
}

.intake-standard-item-card summary::-webkit-details-marker {
    display: none;
}

.intake-standard-item-card .collapse-arrow {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 950;
    transition: transform .18s ease;
}

.intake-standard-item-card[open] .collapse-arrow {
    transform: rotate(90deg);
}

.intake-standard-item-card summary strong {
    display: block;
    color: var(--ink);
    line-height: 1.18;
}

.intake-standard-item-card summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 760;
}

.intake-standard-item-card summary em {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    padding: 6px 9px;
    color: var(--blue);
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.intake-standard-item-body {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
    border-top: 1px solid #edf3f6;
}

.intake-item-active-pill {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.intake-item-active-pill:has(input:checked) {
    border-color: #cfe8da;
    background: #f4fbf7;
    color: var(--ok);
}

.intake-item-active-pill:has(input:disabled) {
    cursor: default;
}

.intake-item-active-pill input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #0b6acb;
}
.intake-builder-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.toggle-line {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    font-weight: 900;
}
.toggle-line input {
    width: 18px;
    height: 18px;
}
.intake-required-toggle {
    align-self: end;
}
.intake-preview-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.intake-category-editor {
    margin-top: 8px;
}
.intake-category-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.intake-category-list article {
    display: grid;
    grid-template-columns: 30px 130px minmax(260px, 1fr) minmax(150px, .35fr);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
}
.custom-intake-section {
    display: grid;
    gap: 14px;
}
.custom-intake-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.custom-intake-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f8fbfd);
}
.custom-intake-card[hidden] {
    display: none;
}
.custom-intake-card legend {
    padding: 0;
    font-weight: 900;
}
.custom-intake-answers {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.custom-intake-card .choice-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 900;
}
.custom-intake-card small {
    color: var(--muted);
    font-weight: 720;
    line-height: 1.4;
}

.module-section h3 {
    margin: 0 0 4px;
    color: var(--ink);
}

.module-toggle-grid.one {
    grid-template-columns: minmax(260px, 420px);
}

.module-toggle-card {
    position: relative;
    display: grid;
    gap: 8px;
    min-height: 170px;
    padding: 22px 22px 20px 68px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, #fff, rgba(245, 251, 255, 0.78));
    cursor: pointer;
}

.module-toggle-card input {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 24px;
    height: 24px;
    accent-color: var(--blue);
}

.module-toggle-card span {
    color: var(--gold);
    font-weight: 900;
    text-transform: uppercase;
    font-size: .78rem;
}

.module-toggle-card strong {
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1.15;
}

.module-toggle-card small {
    color: var(--muted);
    font-weight: 750;
    line-height: 1.42;
}

.module-toggle-card:has(input:checked) {
    border-color: rgba(31, 146, 102, 0.42);
    background: linear-gradient(145deg, rgba(31, 146, 102, 0.08), #fff);
    box-shadow: 0 18px 45px rgba(20, 50, 74, 0.08);
}

.module-toggle-card.is-primary:has(input:checked) {
    border-color: rgba(13, 95, 147, 0.38);
    background: linear-gradient(145deg, rgba(13, 95, 147, 0.08), #fff);
}

.module-toggle-card-muted {
    background: linear-gradient(145deg, rgba(250, 248, 243, 0.88), #fff);
}

@media (max-width: 900px) {
    .module-toggle-grid,
    .intake-standard-item-list,
    .module-toggle-grid.one {
        grid-template-columns: 1fr;
    }
}

.company-request-summary,
.company-offer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.company-request-summary div,
.company-offer-summary div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(245, 251, 255, 0.78);
}

.company-request-summary span,
.company-offer-summary span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.company-request-summary strong,
.company-offer-summary strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.company-offer-form {
    display: grid;
    gap: 16px;
}

.public-offer-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 20px 72px;
}

.public-offer-shell {
    display: grid;
    gap: 22px;
}

.public-offer-head {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.public-offer-head img {
    width: 170px;
    height: auto;
}

.offer-readable-block,
.offer-accept-box,
.offer-decline-box {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.offer-accept-box {
    border-color: rgba(31, 146, 102, 0.35);
    background: rgba(31, 146, 102, 0.06);
}

@media (max-width: 760px) {
    .company-service-grid,
    .company-request-summary,
    .company-offer-summary,
    .public-offer-head {
        grid-template-columns: 1fr;
    }
}

.tutorial-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 34px auto 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 28px;
    align-items: end;
}
.tutorial-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: .98;
}
.tutorial-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}
.tutorial-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.tutorial-hero aside {
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 10% 0%, rgba(44, 132, 91, .12), transparent 34%),
        linear-gradient(135deg, #fff, #f7fbfd);
    box-shadow: 0 20px 50px rgba(13, 47, 72, .07);
}
.tutorial-hero aside strong {
    color: var(--ink);
    font-size: 20px;
}
.tutorial-hero aside ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.55;
}
.tutorial-device-note,
.tutorial-final-panel {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid rgba(44, 132, 91, .24);
    border-left: 5px solid var(--ok);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f3fbf7, #fff);
}
.tutorial-device-note strong {
    color: var(--ink);
}
.tutorial-device-note p,
.tutorial-final-panel p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.5;
}
.upload-wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(247, 251, 253, .78);
    backdrop-filter: blur(8px);
}
body.upload-wait-active {
    overflow: hidden;
}
.scroll-top-button {
    position: fixed;
    right: clamp(16px, 2.4vw, 34px);
    bottom: clamp(18px, 3vw, 36px);
    z-index: 980;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(13, 95, 147, .18);
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 18%, rgba(255,255,255,.98), rgba(255,255,255,.72) 34%, transparent 35%),
        linear-gradient(135deg, rgba(13, 95, 147, .96), rgba(33, 116, 79, .94));
    box-shadow: 0 18px 42px rgba(16,43,66,.20);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(.94);
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.scroll-top-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.scroll-top-button:hover {
    box-shadow: 0 22px 52px rgba(16,43,66,.26);
    transform: translateY(-2px) scale(1.02);
}
.scroll-top-button:focus-visible {
    outline: 3px solid rgba(13, 95, 147, .22);
    outline-offset: 4px;
}
.scroll-top-button span {
    width: 15px;
    height: 15px;
    border-left: 3px solid currentColor;
    border-top: 3px solid currentColor;
    transform: translateY(3px) rotate(45deg);
    border-radius: 2px;
}
.scroll-top-button[hidden] {
    display: none;
}
.upload-wait-overlay[hidden] {
    display: none;
}
.upload-wait-card {
    width: min(420px, 100%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 28px 26px;
    border: 1px solid #cfe3ec;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(45, 138, 98, .14), transparent 38%),
        linear-gradient(180deg, #ffffff, #f8fbfd);
    box-shadow: 0 26px 70px rgba(16,43,66,.18);
    text-align: center;
}
.upload-wait-icon {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #e8f4fb, #f2fbf6);
    color: var(--blue);
}
.upload-wait-icon::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 30px;
    border: 2px solid rgba(45, 138, 98, .18);
    border-top-color: var(--ok);
    animation: uploadWaitSpin 1.3s linear infinite;
}
.upload-wait-icon svg {
    width: 46px;
    height: 46px;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.upload-wait-card strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.15;
}
.upload-wait-card p,
.upload-wait-card small {
    max-width: 330px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.upload-wait-card small {
    color: #21744f;
    font-weight: 850;
}
@keyframes uploadWaitSpin {
    to {
        transform: rotate(360deg);
    }
}
.tutorial-device-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background:
        linear-gradient(90deg, transparent 45%, #fff 45% 55%, transparent 55%),
        linear-gradient(135deg, var(--ok), #0d6b96);
    box-shadow: 0 14px 28px rgba(44, 132, 91, .2);
}
.tutorial-section-head {
    width: min(1180px, calc(100% - 48px));
    margin: 44px auto 18px;
}
.tutorial-section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 44px);
}
.tutorial-steps {
    display: grid;
    gap: 24px;
    padding-bottom: 18px;
}
.tutorial-mobile-steps {
    display: none;
}
.tutorial-step {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, .42fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 18px;
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 18px 48px rgba(13, 47, 72, .06);
}
.tutorial-step-copy {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 8px;
    padding: 4px 0;
}
.tutorial-step-copy span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #0d6698, #2c845b);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 14px 32px rgba(13, 102, 152, .18);
}
.tutorial-step-copy h3 {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 25px;
    line-height: 1.12;
}
.tutorial-step-copy p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.5;
}
.tutorial-step figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid #e3edf3;
    border-radius: 16px;
    background: #f7fbfd;
}
.tutorial-step img {
    display: block;
    width: 100%;
    height: auto;
}
.tutorial-step.mobile {
    grid-template-columns: minmax(0, .8fr) minmax(220px, 360px);
    justify-content: center;
}
.tutorial-final-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 32px;
    margin-bottom: 54px;
}
.tutorial-final-panel h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

@media (max-width: 760px) {
    .tutorial-hero,
    .tutorial-device-note,
    .tutorial-section-head,
    .tutorial-step,
    .tutorial-final-panel {
        width: min(100% - 28px, 520px);
    }
    .tutorial-hero {
        grid-template-columns: 1fr;
        margin-top: 22px;
        gap: 18px;
    }
    .tutorial-hero h1 {
        font-size: 38px;
        line-height: 1.02;
    }
    .tutorial-hero p {
        font-size: 16px;
    }
    .tutorial-hero-actions,
    .tutorial-hero-actions .btn {
        width: 100%;
    }
    .tutorial-hero-actions {
        flex-direction: column;
    }
    .tutorial-device-note {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 15px;
    }
    .tutorial-device-icon {
        width: 38px;
        height: 38px;
    }
    .tutorial-desktop-steps {
        display: none;
    }
    .tutorial-mobile-steps {
        display: grid;
    }
    .tutorial-step,
    .tutorial-step.mobile {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 14px;
    }
    .tutorial-step-copy {
        position: static;
    }
    .tutorial-step-copy h3 {
        font-size: 22px;
    }
    .tutorial-step figure {
        border-radius: 14px;
    }
    .tutorial-step.mobile figure {
        width: min(100%, 390px);
        justify-self: center;
    }
    .tutorial-final-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .tutorial-final-panel .btn {
        width: 100%;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
    overflow-x: hidden;
}
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, var(--cream) 100%);
    overflow-x: hidden;
}
body.modal-open {
    overflow: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
main { min-height: calc(100vh - 68px); }

.velensio-copyright {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    padding: 16px 20px;
    border-top: 1px solid #dce7ec;
    color: #667e8b;
    background: #f8fafb;
    text-align: center;
}
.velensio-copyright small { font-size: 11px; line-height: 1.55; }
.velensio-copyright a { color: #205c7d; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.velensio-copyright a:hover { color: #0b5f93; }
.velensio-copyright a:focus-visible { outline: 2px solid #0b5f93; outline-offset: 3px; border-radius: 2px; }
.has-velensio-copyright { min-height: 100vh; display: flex; flex-direction: column; }
.has-velensio-copyright > main { flex: 1; min-height: calc(100vh - 124px); }
.platform-entry-body:not(.saas-admin-body) { display: flex; flex-direction: column; }
.platform-entry-body:not(.saas-admin-body) > .platform-entry-main { flex: 1; min-height: 0; }
.saas-admin-body .saas-admin-main { display: flex; flex-direction: column; }
.saas-admin-main > .velensio-copyright { width: 100%; margin-top: auto; border-radius: 10px; background: transparent; }
.saas-white-label-preview { padding: 16px 19px; border: 1px solid #d9e6eb; border-radius: 11px; background: #f7fafb; }
.saas-white-label-preview > span { color: #6c8491; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.saas-white-label-preview p { margin: 7px 0 0; color: #385666; font-size: 12px; line-height: 1.5; }
.saas-white-label-preview a { color: #205c7d; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 3vw, 42px);
    padding: 0 clamp(20px, 3.2vw, 46px);
    background: var(--tenant-primary, #0d2b42);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tax-language {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.tax-language select {
    max-width: 112px;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 8px;
    color: #102f49;
    background: #fff;
    font: inherit;
}
@media (max-width: 900px) {
    .topbar .tax-language { order: 1; margin-left: auto; }
    .topbar .tax-language label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .topbar .tax-language select { max-width: 100px; }
    .topbar .mobile-menu-toggle { margin-left: 0; }
}
@media (max-width: 480px) {
    .topbar:not(.is-client-account):not(.is-module-only) { flex-wrap: wrap; }
    .topbar.has-app-launcher:not(.is-client-account):not(.is-module-only) .tax-language {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
    .topbar.is-client-account .brand { flex: 0 1 122px; padding-inline: 7px; }
    .topbar.is-client-account .brand img { width: 108px; }
    .topbar.is-client-account .tax-language select { width: 86px; }
}
.brand {
    flex: 0 0 clamp(170px, 15vw, 220px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}
.brand img {
    width: clamp(150px, 12vw, 190px);
    display: block;
}
.brand > strong {
    color: var(--tenant-primary, #0d2b42);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.demo-mode-banner {
    position: sticky;
    top: var(--topbar-height, 0px);
    z-index: 210;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid #f3c982;
    background: #fff8e8;
    color: #7a4b08;
    font-weight: 850;
    box-shadow: 0 8px 24px rgba(122, 75, 8, .08);
}
.demo-mode-banner strong {
    color: #9a610d;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}
.demo-mode-banner span {
    color: #6d5b3f;
}
.demo-mode-banner a {
    color: var(--blue);
    font-weight: 950;
    text-decoration: none;
}

.health-demo-shell {
    gap: 1.3rem;
}

.health-demo-lock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-color: rgba(14, 95, 144, 0.2);
    background:
        linear-gradient(135deg, rgba(232, 246, 241, 0.96), rgba(255, 255, 255, 0.98)),
        #fff;
}

.health-demo-lock h2 {
    margin: 0.15rem 0 0.7rem;
    font-size: clamp(1.6rem, 2.4vw, 2.35rem);
    line-height: 1.08;
}

.health-demo-lock .note {
    max-width: 920px;
    margin: 0;
}

.health-demo-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    filter: blur(4px);
    opacity: 0.52;
    pointer-events: none;
    user-select: none;
}

.health-demo-preview article {
    min-height: 150px;
    padding: 1.25rem;
    border: 1px solid #dcebf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(9, 41, 62, 0.07);
}

.health-demo-preview span {
    display: block;
    color: #b48237;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.health-demo-preview strong {
    display: block;
    margin: 0.6rem 0 1rem;
    color: #082b45;
    font-size: 1.35rem;
    line-height: 1.15;
}

.health-demo-preview small {
    display: block;
    width: 100%;
    height: 0.7rem;
    margin-top: 0.55rem;
    border-radius: 999px;
    background: #e8f1f6;
}

.health-demo-preview small:nth-child(4) {
    width: 76%;
}

.health-demo-preview small:nth-child(5) {
    width: 54%;
}

.oauth-demo-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    filter: blur(4px);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.oauth-demo-preview .panel {
    min-height: 230px;
}

.oauth-demo-preview .demo-line {
    width: 76%;
    height: 0.85rem;
    margin-top: 1rem;
    border-radius: 999px;
    background: #e4eef4;
}

.oauth-demo-preview .demo-line.wide {
    width: 100%;
}

.oauth-demo-preview .demo-line.short {
    width: 46%;
}

@media (max-width: 900px) {
    .health-demo-lock {
        align-items: flex-start;
        flex-direction: column;
    }

    .health-demo-preview {
        grid-template-columns: 1fr;
    }

    .oauth-demo-preview {
        grid-template-columns: 1fr;
    }

    .demo-readonly-notice {
        align-items: flex-start;
        flex-direction: column;
    }
}
.oauth-login-actions {
    display: grid;
    gap: 12px;
    width: min(100%, 520px);
}
.oauth-login-actions .btn {
    width: 100%;
    justify-content: center;
}
.oauth-microsoft::before {
    content: "";
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: -2px;
    background:
        linear-gradient(#f25022 0 0) 0 0 / 7px 7px no-repeat,
        linear-gradient(#7fba00 0 0) 9px 0 / 7px 7px no-repeat,
        linear-gradient(#00a4ef 0 0) 0 9px / 7px 7px no-repeat,
        linear-gradient(#ffb900 0 0) 9px 9px / 7px 7px no-repeat;
}
.mobile-menu-toggle {
    display: none;
}
.mobile-menu-backdrop,
.mobile-nav-heading,
.mobile-nav-assurance,
.public-nav-icon,
.public-nav-copy small,
.public-nav-arrow {
    display: none;
}
.public-nav-group,
.public-nav-copy {
    display: contents;
}
.public-nav-copy strong {
    font: inherit;
}
.topbar nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    gap: clamp(6px, .7vw, 12px);
    align-items: center;
    font-size: .89rem;
    color: rgba(255,255,255,.82);
    overflow-x: auto;
    scrollbar-width: none;
}
.topbar nav::-webkit-scrollbar {
    display: none;
}
.client-nav-group {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, .55vw, 8px);
    padding: 4px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
}
.admin-nav-group {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, .55vw, 8px);
    padding: 4px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
}
.admin-nav-group.clients {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.075);
}
.client-nav-group.tasks {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.075);
}
.client-nav-group.account {
    background: transparent;
}
.topbar.is-client-account {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}
.topbar.is-client-account + main {
    padding-top: 68px;
}
.topbar.is-client-account nav {
    max-width: calc(100vw - 240px);
    overflow-x: auto;
    scrollbar-width: thin;
}
.topbar.is-client-account nav::-webkit-scrollbar {
    height: 6px;
}
.topbar.is-client-account nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.26);
    border-radius: 999px;
}
.nav-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 0 clamp(8px, .58vw, 11px);
    white-space: nowrap;
    color: rgba(255,255,255,.82);
    font-size: clamp(.8rem, .72vw, .89rem);
    font-weight: 720;
    letter-spacing: 0;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nav-link:hover,
.nav-link.active {
    background: rgba(196,142,63,.13);
    color: var(--tenant-accent, #f1c77d);
    box-shadow: 0 8px 22px rgba(0,0,0,.10);
}
.nav-new-case {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(241,199,125,.22);
    background: rgba(15,105,156,.96);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.nav-new-case:hover,
.nav-new-case.active {
    color: #fff8e8;
    background: #0b527f;
}
.nav-link.logout {
    color: rgba(255,255,255,.66);
}
.nav-alert-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.nav-alert-dot {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
    box-shadow:
        0 0 0 3px rgba(184,64,64,.12),
        0 8px 18px rgba(184,64,64,.22);
}
.nav-alert-link.has-alert {
    color: #fff;
    font-weight: 850;
}
.nav-invoice-link.invoice-focus {
    color: #fff8e8;
    background:
        radial-gradient(circle at 20% 0%, rgba(241, 199, 125, .20), transparent 42%),
        rgba(255,255,255,.08);
    box-shadow: 0 10px 26px rgba(0,0,0,.14);
    animation: invoiceMenuNudge 3.2s ease-in-out infinite;
}
@keyframes invoiceMenuNudge {
    0%, 72%, 100% { transform: translateY(0); }
    80% { transform: translateY(-2px); }
    88% { transform: translateY(1px); }
}
.nav-draft-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.nav-draft-link.has-draft {
    color: #fff;
    font-weight: 850;
}
.nav-new-case.has-draft {
    color: #fff;
}
.nav-draft-badge {
    border-radius: 999px;
    padding: 3px 7px;
    background: #fff2d8;
    color: #9b6924;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}
.nav-new-case .nav-draft-badge {
    background: rgba(255,255,255,.96);
}
.nav-menu {
    position: relative;
    z-index: 1001;
}
.nav-menu > .nav-link { display: inline-flex; align-items: center; min-height: 38px; }
.nav-menu-trigger {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.nav-menu-chevron {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-left: 1px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    font-size: 14px;
    line-height: 1;
    transition: transform .18s ease, background .18s ease;
}
.nav-menu.is-open .nav-menu-chevron {
    transform: rotate(180deg);
    background: rgba(196,142,63,.20);
}
.nav-submenu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(310px, calc(100vw - 24px));
    max-height: min(72vh, 640px);
    display: none;
    gap: 4px;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(8,35,54,.24);
    z-index: 1300;
}
.nav-menu.is-open .nav-submenu { display: grid; }
.nav-submenu-heading {
    display: grid;
    gap: 2px;
    margin: -2px -2px 4px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid #e2edf2;
}
.nav-submenu-heading strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
}
.nav-submenu-heading small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}
.nav-submenu a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 740;
}
.nav-submenu a:hover { background: #fff8e8; color: #9b6924; }

.settings-submenu {
    width: min(600px, calc(100vw - 32px));
    gap: 0;
    padding: 18px;
    border-radius: 20px;
}
.settings-submenu .nav-submenu-heading {
    margin: 0 0 12px;
    padding: 2px 4px 14px;
}
.settings-submenu .nav-submenu-heading strong {
    font-size: 17px;
}
.settings-submenu .nav-submenu-heading small {
    font-size: 13px;
}
.settings-submenu .settings-overview-link {
    min-height: 48px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 11px 14px;
    border: 1px solid #d4e7ee;
    background: linear-gradient(110deg, #edf7fa, #f8fbfc);
    color: #0d5275;
    font-weight: 850;
}
.settings-submenu .settings-overview-link:hover {
    border-color: #b8d6e3;
    background: #e7f3f7;
    color: #0b4565;
}
.settings-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.settings-menu-group {
    min-width: 0;
    padding: 11px;
    border: 1px solid #e3edf1;
    border-radius: 14px;
    background: #fbfdfe;
}
.settings-menu-group h3 {
    margin: 0 0 6px;
    padding: 2px 10px 8px;
    border-bottom: 1px solid #e7eff2;
    color: #9b6924;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .055em;
    line-height: 1.3;
    text-transform: uppercase;
}
.settings-menu-group a {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 13px;
}
.settings-nav-menu .nav-menu-trigger:focus-visible,
.settings-submenu a:focus-visible {
    outline: 3px solid var(--tenant-accent, #f1c77d);
    outline-offset: 2px;
}

.app-launcher-trigger {
    min-height: 42px !important;
    gap: 9px;
    padding-inline: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
}
.topbar > .app-launcher {
    flex: 0 0 auto;
    margin-left: auto;
}
.topbar.is-module-only nav { display: none; }
.app-launcher-trigger:hover,
.app-launcher-trigger.active,
.app-launcher.is-open .app-launcher-trigger {
    border-color: rgba(241,199,125,.26);
    background: rgba(255,255,255,.11);
}
.app-launcher-trigger:focus-visible,
.app-launcher-menu .app-launcher-link:focus-visible {
    outline: 3px solid var(--tenant-accent, #f1c77d);
    outline-offset: 2px;
}
.app-launcher-grid {
    width: 18px;
    height: 18px;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, 6px);
    grid-template-rows: repeat(2, 6px);
    place-content: center;
    gap: 3px;
}
.app-launcher-grid > span {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: currentColor;
}
.app-launcher-menu {
    width: min(320px, calc(100vw - 24px));
    gap: 3px;
    padding: 8px;
}
.app-launcher-heading {
    padding: 10px 12px 8px;
    color: #6c7f8a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.app-launcher-menu .app-launcher-link {
    min-height: 46px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 780;
}
.app-logout-form { margin: 0; }
.app-logout-form button { font: inherit; cursor: pointer; }
.app-launcher-menu .app-logout-form button { width: 100%; border: 0; background: transparent; text-align: left; }
.app-logout-form button.nav-link { border: 0; background: transparent; }
.app-launcher-menu .app-launcher-link:hover {
    background: #edf5f7;
    color: var(--ink);
}
.app-launcher-menu .app-launcher-link.is-current {
    background: #edf5f7;
    color: #123a52;
}
.app-launcher-menu .app-launcher-link small {
    color: #71838d;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.app-launcher-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #e5f0f4;
    color: #0d5275;
    font-size: 12px;
    font-weight: 950;
}
.app-launcher-row-grid {
    width: 28px;
    height: 28px;
    color: #0d5275;
}
.app-launcher-row-grid > span {
    width: 5px;
    height: 5px;
}
.app-launcher-separator {
    display: block;
    height: 1px;
    margin: 6px 4px;
    background: #e2edf2;
}
.app-launcher-account-icon,
.app-launcher-logout-icon {
    position: relative;
    width: 28px;
    height: 28px;
    display: block;
    color: #54707f;
}
.app-launcher-account-icon {
    border: 1.5px solid currentColor;
    border-radius: 50%;
}
.app-launcher-account-icon::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 9px;
    width: 7px;
    height: 7px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}
.app-launcher-account-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    bottom: 4px;
    width: 14px;
    height: 7px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}
.app-launcher-logout-icon::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 4px;
    width: 11px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-right: 0;
    border-radius: 5px 0 0 5px;
}
.app-launcher-logout-icon::after {
    content: "→";
    position: absolute;
    top: 2px;
    right: 1px;
    font-size: 20px;
    line-height: 24px;
}
.app-launcher-menu .app-launcher-logout { color: #71838d; }

@media (min-width: 901px) {
    .topbar:not(.is-client-account) nav {
        overflow: visible;
    }
}

.hero {
    min-height: calc(100vh - 68px);
    display: grid;
    grid-template-columns: minmax(720px, 980px);
    grid-template-rows: 1fr auto;
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 46px) clamp(20px, 5vw, 72px) 28px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,248,243,.94)),
        radial-gradient(circle at 80% 20%, rgba(13,95,147,.08), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #f6fbfd 54%, #fbf8f1 100%);
}
.hero-copy {
    max-width: 720px;
    align-self: start;
    padding-top: clamp(18px, 5vw, 76px);
}
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0; font-size: 13px; font-weight: 800; }
h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.05; margin: 0 0 18px; letter-spacing: 0; }
h2 { margin: 0 0 16px; font-size: 22px; }
.hero p { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 650px; }
.returning-client-note,
.prefill-notice {
    border: 1px solid #cfe5d9;
    border-radius: var(--radius);
    background: #f2fbf6;
    padding: 14px 16px;
    color: var(--ink) !important;
    font-size: 15px !important;
}
.returning-client-note {
    display: grid;
    gap: 4px;
    max-width: 650px;
    margin-top: 18px;
}
.returning-client-note span { color: var(--muted); line-height: 1.45; }
.returning-client-note strong,
.prefill-notice {
    color: var(--ok);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 28px; color: var(--muted); }
.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: var(--muted);
}
.hero-proof span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 800;
}
.cover-choice {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 0;
}
.cover-actions {
    align-self: start;
    display: grid;
    gap: 14px;
    padding: clamp(12px, 2vw, 18px);
    border: 1px solid rgba(216,232,239,.86);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(247,251,253,.82));
    box-shadow: 0 22px 58px rgba(20,50,74,.09);
    backdrop-filter: blur(10px);
}
.choice-action {
    display: grid;
    gap: 7px;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 46px rgba(20,50,74,.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.choice-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 56px rgba(20,50,74,.13);
}
.choice-action span {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.choice-action strong {
    color: var(--ink);
    font-size: clamp(24px, 2.2vw, 31px);
    line-height: 1.15;
}
.choice-action small {
    color: var(--muted);
    line-height: 1.4;
    font-size: 14px;
}
.choice-action em {
    align-self: end;
    justify-self: start;
    margin-top: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    font-style: normal;
    font-weight: 900;
    background: var(--blue-soft);
    color: var(--blue);
}
.choice-action.primary {
    border-color: rgba(13,95,147,.35);
    background: linear-gradient(180deg, #ffffff, #f2f9fd);
    box-shadow: 0 22px 60px rgba(13,95,147,.16);
}
.choice-action.primary em {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 18px;
    border: 1px solid rgba(255,255,255,.38);
    background: linear-gradient(135deg, var(--blue), #168f72);
    color: #fff;
    box-shadow: 0 16px 34px rgba(13,95,147,.28);
    text-align: center;
    line-height: 1.2;
}
.choice-action.primary em::after,
.choice-action.existing em::after {
    content: " →";
}
.choice-action.existing {
    background: linear-gradient(180deg, #ffffff, #fffaf2);
}
.choice-action.existing em {
    background: #fff3df;
    color: #9b6924;
}
.public-access-panel {
    gap: 18px;
    padding: clamp(14px, 2vw, 20px);
}
.public-access-panel.two-column {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}
.public-access-panel.two-column > * {
    height: 100%;
}
.new-account-action {
    min-height: 230px;
    border-color: rgba(33, 116, 79, .28);
    background:
        radial-gradient(circle at 12% 0%, rgba(33,116,79,.14), transparent 36%),
        linear-gradient(180deg, #ffffff, #f2fbf6);
}
.new-account-action span {
    color: #21744f;
    font-size: clamp(16px, 1.45vw, 21px);
    letter-spacing: 0;
}
.new-account-action strong {
    font-size: clamp(30px, 3vw, 42px);
}
.new-account-action em {
    min-height: 62px;
    font-size: 17px;
}
.public-login-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% 0%, rgba(13,95,147,.08), transparent 34%),
        linear-gradient(145deg, #ffffff, #f8fbfd);
    box-shadow: 0 16px 40px rgba(20,50,74,.07);
}
.public-access-panel.two-column .public-login-card {
    align-content: start;
}
.public-login-head {
    display: grid;
    gap: 4px;
    text-align: center;
}
.public-login-head span {
    color: var(--gold);
    font-size: clamp(16px, 1.45vw, 21px);
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}
.public-login-head strong {
    color: var(--ink);
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.15;
}
.public-login-head small {
    color: var(--muted);
    font-weight: 760;
}
.public-oauth-actions {
    width: 100%;
}
.public-oauth-actions .oauth-provider-button {
    width: 100%;
    min-height: 62px;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 10px;
    padding: 0 18px;
    border-color: #cddbe3;
    border-radius: 14px;
    font-size: clamp(16px, 1.35vw, 20px);
    font-weight: 920;
    box-shadow: 0 12px 28px rgba(20,50,74,.07);
}
.public-oauth-actions .oauth-provider-button::after {
    content: "";
}
.public-oauth-actions .oauth-provider-button .oauth-logo {
    justify-self: center;
    width: 30px;
    height: 30px;
}
.public-oauth-actions .oauth-provider-button span:not(.oauth-logo) {
    justify-self: center;
}
.login-separator.compact {
    margin: 2px 0;
    font-size: 11px;
}
.public-email-login {
    display: grid;
    gap: 10px;
}
.public-email-login label {
    margin: 0;
}
.email-code-hint {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
.email-login-disclosure {
    display: grid;
    gap: 10px;
}
.email-login-disclosure summary {
    list-style: none;
    cursor: pointer;
}
.email-login-disclosure summary::-webkit-details-marker {
    display: none;
}
.email-login-disclosure .email-provider-button {
    width: 100%;
}
.email-login-disclosure[open] .email-provider-button {
    border-color: #9bc9dc;
    background: #f7fbfd;
    box-shadow: 0 14px 30px rgba(20,50,74,.10);
}
.oauth-logo.email {
    display: block;
    color: var(--blue);
}
.email-login-disclosure .public-email-login,
.email-login-disclosure .login-email-code-form {
    margin-top: 10px;
}
.public-email-login .btn {
    width: 100%;
    justify-content: center;
}
.public-password-link {
    justify-self: center;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}
.login-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.login-actions a {
    color: var(--blue);
    font-weight: 750;
}
.cover-panel {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(216,232,239,.86);
    border-radius: var(--radius);
    box-shadow: 0 20px 54px rgba(20,50,74,.09);
    padding: clamp(20px, 3vw, 26px);
    backdrop-filter: blur(10px);
}
.cover-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.cover-panel-head span {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
}
.cover-panel-head strong { font-size: 21px; }
.cover-steps {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
}
.cover-steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-areas:
        "num title"
        "num text";
    gap: 12px;
    align-items: start;
}
.cover-steps li span {
    grid-area: num;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
}
.cover-steps strong,
.cover-steps small { display: block; }
.cover-steps strong { grid-area: title; margin-top: 1px; font-size: 15px; }
.cover-steps small { grid-area: text; color: var(--muted); line-height: 1.45; margin-top: -8px; max-width: 100%; font-size: 13px; }
.cover-footer {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    padding-top: 28px;
    border-top: 1px solid rgba(216,232,239,.9);
}
.cover-footer.minimal {
    width: min(560px, 100%);
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trust-strip div, .panel, .price-box, .metrics div {
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(20,50,74,.08);
}
.cover-footer .trust-strip div {
    position: relative;
    min-height: 132px;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,253,.94));
    border: 1px solid #d8e8ef;
    border-radius: 8px;
    padding: 18px 18px 18px 20px;
    overflow: hidden;
}
.cover-footer .trust-strip {
    gap: 12px;
    background: linear-gradient(135deg, rgba(247,251,253,.8), rgba(255,255,255,.86));
    border: 1px solid rgba(216,232,239,.9);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 18px 46px rgba(20,50,74,.07);
}
.cover-footer .trust-strip div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--blue), #2d9a7b);
}
.trust-strip div { padding: 18px; }
.trust-strip i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 24px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}
.trust-strip span { color: var(--muted); margin-top: 8px; line-height: 1.45; }
.cover-footer address {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    font-style: normal;
    color: var(--muted);
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(216,232,239,.84);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
}
.cover-footer address strong {
    color: var(--blue);
}
.cover-footer address span {
    color: var(--muted);
}
.cover-footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.public-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.public-footer-links a {
    border: 1px solid rgba(216,232,239,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: var(--blue);
    padding: 9px 13px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}
.public-footer-links a:hover {
    border-color: #b9d8e9;
    background: var(--blue-soft);
}

.btn {
    position: relative;
    border: 1px solid #bdd5e2;
    border-radius: var(--radius);
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    color: var(--blue);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(13, 47, 72, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover {
    border-color: rgba(13, 95, 147, .46);
    background: linear-gradient(180deg, #ffffff, #eef7fb);
    color: #0b5d8b;
    box-shadow: 0 12px 26px rgba(13, 47, 72, .13);
    transform: translateY(-1px);
}
.btn:focus-visible {
    outline: 3px solid rgba(13, 95, 147, .24);
    outline-offset: 3px;
}
.btn:active {
    box-shadow: 0 5px 12px rgba(13, 47, 72, .12);
    transform: translateY(0);
}
.btn svg {
    flex: 0 0 auto;
    width: 1.08em;
    height: 1.08em;
}
.btn.primary {
    background: linear-gradient(180deg, #126fa8, var(--blue));
    border-color: #0b5d8b;
    color: #fff;
    box-shadow: 0 12px 26px rgba(13, 95, 147, .24);
}
.btn.primary:hover {
    background: linear-gradient(180deg, #0f669b, #0a5480);
    border-color: #084b73;
    color: #fff;
    box-shadow: 0 16px 32px rgba(13, 95, 147, .32);
}
.btn.ghost {
    background: var(--blue-soft);
    border-color: #c4deeb;
    margin-top: 16px;
    color: var(--blue);
}
.btn.small {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
}
.btn.disabled,
.btn[aria-disabled="true"],
.btn:disabled {
    cursor: not-allowed;
    border-color: #dce8ee;
    background: #f5f9fb;
    color: #7c919f;
    box-shadow: none;
    transform: none;
    opacity: .78;
}
.btn.danger {
    color: var(--danger);
    border-color: #efc3c3;
    background: linear-gradient(180deg, #fffafa, #fff2f2);
}
.btn.danger:hover {
    border-color: #e2a7a7;
    background: #ffecec;
    color: #9f3030;
}
.admin-cancel-case {
    margin-top: 12px;
    border: 1px solid #f0c8c8;
    border-radius: var(--radius);
    background: #fffafa;
    padding: 12px;
    scroll-margin-top: calc(var(--topbar-height, 68px) + 20px);
}
.admin-cancel-case summary {
    cursor: pointer;
    color: var(--danger);
    font-weight: 900;
}
.admin-cancel-case form {
    margin-top: 12px;
}
.admin-cancel-case .checkbox-line {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 62px;
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid #f0d6d6;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, #fff7f7);
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}
.admin-cancel-case .checkbox-line input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 0;
    border: 2px solid #d8b0b0;
    border-radius: 9px;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff, 0 8px 18px rgba(126, 45, 45, .08);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.admin-cancel-case .checkbox-line input[type="checkbox"]:checked {
    border-color: var(--danger);
    background: var(--danger);
    box-shadow: inset 0 0 0 4px #fff, 0 10px 22px rgba(187, 58, 58, .18);
}
.admin-cancel-case .checkbox-line input[type="checkbox"]:checked::after {
    content: "";
    display: block;
    width: 8px;
    height: 14px;
    margin: 3px auto 0;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.admin-cancel-case .checkbox-line:hover input[type="checkbox"] {
    transform: translateY(-1px);
    border-color: var(--danger);
}
.admin-cancel-case .checkbox-line input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(187, 58, 58, .18);
    outline-offset: 3px;
}
.admin-cancel-case .checkbox-line span {
    line-height: 1.25;
}
.admin-reactivate-case {
    margin-top: 12px;
    padding: clamp(18px, 2.5vw, 28px);
    border: 1px solid #bcded7;
    border-radius: var(--radius);
    background: #f3faf8;
    scroll-margin-top: 110px;
}
.admin-reactivate-case h2 { margin: 14px 0 6px; color: #173a52; }
.admin-reactivate-case p { max-width: 75ch; margin: 0 0 16px; color: #4f6976; line-height: 1.55; }
.admin-reactivate-case form { margin: 0; }
.admin-reactivate-billing-note {
    margin: 16px 0;
    padding: 16px 18px;
    border: 1px solid #ead6ad;
    border-radius: 12px;
    background: #fff9ed;
    color: #644b22;
}
.admin-reactivate-billing-note p { margin: 5px 0 0; line-height: 1.5; }
.btn.client-access-btn {
    border-color: #c8e9d6;
    background: #f2fbf6;
    color: #21744f;
}
.btn.client-access-btn:hover {
    background: #e8f7ef;
    border-color: #9bd3b5;
}
.impersonation-banner {
    position: sticky;
    top: 68px;
    z-index: 6;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px clamp(18px, 4vw, 52px);
    border-bottom: 1px solid #c8e9d6;
    background:
        radial-gradient(circle at 4% 0, rgba(44, 132, 91, .16), transparent 30%),
        linear-gradient(135deg, rgba(242,251,246,.98), rgba(255,255,255,.98));
    box-shadow: 0 14px 34px rgba(20,50,74,.08);
}
.impersonation-banner strong,
.impersonation-banner span {
    display: block;
}
.impersonation-banner strong {
    color: #21744f;
    font-size: 14px;
}
.impersonation-banner span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.panel { padding: clamp(18px, 3vw, 32px); }
.narrow { max-width: 760px; margin: 48px auto; }
.stack { display: grid; gap: 16px; }
.login-panel {
    max-width: 680px;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 10px;
}
.client-login-panel {
    max-width: 760px;
    background:
        radial-gradient(circle at top right, rgba(38, 153, 112, .10), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 251, 253, .96));
    box-shadow: 0 24px 70px rgba(20, 50, 74, .11);
}
.admin-login-panel {
    max-width: 560px;
}
.modern-login-panel {
    position: relative;
    width: min(680px, calc(100vw - 32px));
    margin: clamp(30px, 7vh, 82px) auto;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 0%, rgba(13,95,147,.08), transparent 32%),
        radial-gradient(circle at 94% 6%, rgba(45,138,98,.10), transparent 30%),
        linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 28px 72px rgba(16,43,66,.12);
}
.admin-login-panel {
    width: min(560px, calc(100vw - 32px));
}
.platform-entry-body {
    min-height: 100vh;
    background: #f4f7f9;
}
.platform-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 clamp(20px, 5vw, 72px);
    border-bottom: 1px solid #d6e2e8;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 43, 66, .06);
}
.platform-entry-brand {
    color: #0b5f93;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: 0;
    text-decoration: none;
}
.platform-entry-brand-logo {
    display: inline-flex;
    width: clamp(164px, 16vw, 214px);
    flex: 0 0 auto;
    align-items: center;
    line-height: 0;
}
.platform-entry-brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}
.platform-entry-header span {
    color: #526b7c;
    font-size: 14px;
    font-weight: 850;
}
.platform-entry-actions,
.saas-admin-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.platform-entry-actions a,
.platform-entry-actions button {
    color: #0b5f93;
    font-size: 14px;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.platform-entry-logout { margin: 0; }
.platform-entry-logout button,
.platform-logout-button { border: 0; background: none; font: inherit; cursor: pointer; }
.platform-entry-main {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 1px 16px 48px;
}
.organization-shell {
    max-width: 1080px;
    margin: 42px auto;
}
.organization-heading { margin-bottom: 24px; }
.organization-heading h1 { margin: 6px 0 8px; font-size: clamp(30px, 4vw, 42px); }
.organization-heading .eyebrow a { color: inherit; }
.organization-card {
    padding: clamp(20px, 3vw, 30px);
    margin: 0 0 18px;
    border: 1px solid #d6e2e8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 43, 66, .06);
}
.organization-card h2 { margin: 0 0 14px; font-size: 24px; }
.organization-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.organization-card-heading p { margin: 0 0 16px; }
.organization-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.organization-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.organization-product { display: flex; flex-direction: column; align-items: flex-start; min-height: 155px; padding: 18px; border: 1px solid #dce6eb; border-radius: 12px; background: #f9fbfc; }
.organization-product strong { font-size: 18px; }
.organization-product p { flex: 1; margin: 9px 0 16px; color: #526b7c; line-height: 1.45; }
.organization-product form { margin: 0; }
.organization-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #edf2f5; color: #425b6b; font-size: 12px; font-weight: 800; white-space: nowrap; }
.organization-tag.is-active { background: #e4f5ed; color: #146343; }
.organization-boundary { color: #526b7c; font-size: 13px; }
.organization-member-list { display: grid; gap: 10px; margin-top: 18px; }
.organization-member { border: 1px solid #dce6eb; border-radius: 12px; background: #fff; }
.organization-member > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; }
.organization-member > summary strong, .organization-member > summary small, .organization-grants strong, .organization-grants small { display: block; }
.organization-member > summary small, .organization-grants small { margin-top: 3px; color: #526b7c; }
.organization-member-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.organization-member-content { padding: 0 18px 20px; border-top: 1px solid #e5edf1; }
.organization-member-content h3 { margin: 20px 0 10px; font-size: 18px; }
.organization-inline-form { margin: 16px 0 0; }
.organization-grants { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.organization-grants li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; background: #f4f8fa; }
.organization-grants form { margin: 0; }
.organization-grant-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 20px; }
.organization-access-form { display: grid; gap: 10px; padding: 16px; border: 1px solid #dce6eb; border-radius: 10px; }
.organization-access-form h4 { margin: 0; }
.organization-access-form label { display: grid; gap: 5px; font-weight: 700; }
.organization-access-form select { width: 100%; min-height: 40px; }
.organization-advanced > summary { padding: 12px 0; cursor: pointer; font-weight: 800; }
.organization-security-card { max-width: 620px; }
.organization-security-card .organization-access-form { max-width: 430px; }
.organization-security-card code { display: inline-block; padding: 4px 7px; background: #eef4f7; border-radius: 5px; overflow-wrap: anywhere; }
.organization-security-qr { display: block; max-width: 100%; height: auto; margin: 16px 0; image-rendering: pixelated; }
@media (max-width: 760px) {
    .organization-products, .organization-grant-forms { grid-template-columns: 1fr; }
    .organization-card-heading, .organization-member > summary { align-items: flex-start; flex-direction: column; }
    .organization-card-actions { justify-content: flex-start; }
}
.velensio-billing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.velensio-billing-heading .muted { max-width: 650px; line-height: 1.55; }
.velensio-billing-total { display: grid; min-width: 135px; padding: 14px 18px; border: 1px solid #d5e5ed; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 8px 24px rgba(16, 43, 66, .04); }
.velensio-billing-total strong { color: #143c53; font-size: 28px; line-height: 1.1; }
.velensio-billing-total span { color: #5c7380; font-size: 12px; font-weight: 700; }
.velensio-billing-card { padding: 0; overflow: hidden; }
.velensio-billing-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px 28px; border-bottom: 1px solid #e5edf1; }
.velensio-billing-toolbar .eyebrow { margin: 0 0 4px; }
.velensio-billing-toolbar h2 { margin: 0; }
.velensio-billing-toolbar form { display: grid; gap: 5px; margin: 0; }
.velensio-billing-toolbar label { color: #526b7c; font-size: 12px; font-weight: 800; }
.velensio-billing-toolbar select { min-width: 210px; min-height: 40px; padding: 8px 12px; border: 1px solid #cadde6; border-radius: 9px; background: #fff; color: #143c53; }
.velensio-billing-list { display: grid; }
.velensio-billing-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(160px, 1fr) minmax(120px, .8fr) auto auto; align-items: center; gap: 18px; padding: 19px 28px; border-bottom: 1px solid #edf2f4; }
.velensio-billing-row:last-child { border-bottom: 0; }
.velensio-billing-row:hover { background: #f9fcfd; }
.velensio-billing-row-main,.velensio-billing-period,.velensio-billing-amount { display: grid; gap: 4px; min-width: 0; }
.velensio-billing-row-main strong { color: #143c53; font-size: 16px; }
.velensio-billing-row small,.velensio-billing-period span { color: #617987; font-size: 12px; line-height: 1.4; }
.velensio-billing-period strong { color: #254b5f; font-size: 13px; }
.velensio-billing-amount strong { color: #143c53; white-space: nowrap; }
.velensio-billing-row .btn { white-space: nowrap; }
.velensio-billing-empty { padding: 48px 28px; text-align: center; }
.velensio-billing-empty strong { color: #143c53; font-size: 18px; }
.velensio-billing-empty p { margin: 8px 0 0; color: #617987; }
.velensio-billing-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 17px; border-top: 1px solid #e5edf1; color: #526b7c; }
@media (max-width: 1050px) { .velensio-billing-row { grid-template-columns: minmax(160px, 1.4fr) minmax(150px, 1fr) auto auto; } .velensio-billing-period { display: none; } }
@media (max-width: 760px) { .velensio-billing-heading,.velensio-billing-toolbar { align-items: flex-start; flex-direction: column; } .velensio-billing-total { display: flex; align-items: baseline; gap: 8px; } .velensio-billing-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 18px; } .velensio-billing-row-main { grid-column: 1; } .velensio-billing-amount { grid-column: 1; } .velensio-billing-row .saas-status { grid-column: 2; grid-row: 1; } .velensio-billing-row .btn { grid-column: 2; grid-row: 2; } .velensio-billing-toolbar { padding: 20px; } .velensio-billing-toolbar form,.velensio-billing-toolbar select { width: 100%; } }
@media (max-width: 520px) { .velensio-billing-row { grid-template-columns: 1fr; } .velensio-billing-row .saas-status,.velensio-billing-row .btn { grid-column: 1; grid-row: auto; justify-self: start; } .velensio-billing-pagination { gap: 8px; flex-wrap: wrap; } }
.platform-login-panel,
.platform-tenant-panel {
    width: min(560px, calc(100vw - 32px));
    margin: clamp(36px, 8vh, 88px) auto;
    border: 1px solid #d4e2e9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 54px rgba(16, 43, 66, .10);
}
.platform-login-panel .login-intro h1,
.platform-tenant-panel .login-intro h1 {
    font-size: 36px;
}
.saas-admin-login-panel {
    width: min(520px, calc(100vw - 32px));
    padding: clamp(28px, 4vw, 44px);
    border-color: #cfdee6;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 4%, rgba(20, 198, 203, .08), transparent 30%),
        linear-gradient(180deg, #fff, #fbfdfe);
    box-shadow: 0 26px 70px rgba(7, 38, 72, .13);
}
.saas-admin-login-logo {
    width: min(310px, 82%);
    margin: 0 auto 32px;
    line-height: 0;
}
.saas-admin-login-logo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 360 / 92;
}
.saas-admin-login-panel .login-intro {
    text-align: center;
}
.saas-admin-login-panel .login-password-form {
    margin-top: 26px;
}
.saas-admin-login-panel .platform-logout-link {
    padding-top: 20px;
    border-top: 1px solid #e0e9ee;
}
.platform-login-note,
.platform-logout-link {
    display: block;
    margin: 20px 0 0;
    color: #62798a;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}
.platform-tenant-list {
    display: grid;
    gap: 10px;
}
.platform-tenant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #d6e3ea;
    border-radius: 6px;
    background: #f9fbfc;
}
.platform-tenant-row span,
.platform-tenant-row strong,
.platform-tenant-row small {
    display: block;
    min-width: 0;
}
.saas-admin-main {
    width: min(100%, 1440px);
    padding: 48px clamp(18px, 4vw, 64px) 64px;
}
.saas-admin-dashboard {
    display: grid;
    gap: 28px;
}
.saas-admin-heading,
.saas-admin-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
.saas-admin-heading h1,
.saas-admin-section-heading h2 {
    margin: 4px 0 0;
    color: #102b3f;
    letter-spacing: 0;
}
.saas-admin-heading h1 {
    font-size: 42px;
}
.saas-admin-section-heading h2 {
    font-size: 28px;
}
.saas-admin-heading .muted {
    margin: 10px 0 0;
}
.saas-admin-role-badge,
.saas-admin-section-heading > span {
    color: #526b7c;
    font-size: 13px;
    font-weight: 850;
}
.saas-admin-role-badge {
    padding: 8px 12px;
    border: 1px solid #bfd7e2;
    border-radius: 6px;
    background: #fff;
    text-transform: uppercase;
}
.saas-admin-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid #d4e2e9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(16, 43, 66, .07);
}
.saas-admin-metric {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 22px;
    border-right: 1px solid #e2ebef;
}
.saas-admin-metric:last-child {
    border-right: 0;
}
.saas-admin-metric strong {
    color: #0b5f93;
    font-size: 32px;
}
.saas-admin-metric span {
    color: #526b7c;
    font-size: 13px;
    font-weight: 800;
}
.saas-admin-metric.security strong {
    color: #18704f;
}
.saas-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #d4e2e9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(16, 43, 66, .07);
}
.saas-admin-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}
.saas-admin-table th,
.saas-admin-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #e2ebef;
    text-align: left;
    vertical-align: middle;
}
.saas-admin-table th {
    color: #526b7c;
    background: #f7fafb;
    font-size: 12px;
    text-transform: uppercase;
}
.saas-admin-table td {
    color: #19384d;
    font-size: 14px;
}
.saas-admin-table tr:last-child td {
    border-bottom: 0;
}
.saas-admin-table td strong,
.saas-admin-table td small {
    display: block;
}
.saas-admin-table td small {
    margin-top: 3px;
    color: #6a7f8e;
}
.saas-status {
    display: inline-flex;
    padding: 6px 9px;
    border: 1px solid #bfd7e2;
    border-radius: 999px;
    background: #f4f9fb;
    color: #31576d;
    font-size: 12px;
    font-weight: 850;
}
.saas-status.active,
.saas-status.trial {
    border-color: #b9dfcc;
    background: #f0faf5;
    color: #18704f;
}
.saas-status.suspended,
.saas-status.cancelled {
    border-color: #edc3c3;
    background: #fff4f4;
    color: #a43b3b;
}
.saas-admin-boundary-note {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-left: 4px solid #1b8b67;
    background: #eef8f4;
    color: #31576d;
}
.saas-admin-boundary-note strong {
    color: #145d45;
}
.saas-admin-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.saas-admin-nav a {
    padding: 9px 12px;
    border-radius: 7px;
    color: #d9eaf2;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.saas-admin-nav a:hover {
    background: #eaf4f8;
    color: #073f62;
}
.saas-admin-card {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid #d4e2e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(16, 43, 66, .06);
}
.saas-admin-card > summary,
.saas-subform > summary,
.saas-plan-edit > summary {
    cursor: pointer;
    list-style: none;
}
.saas-admin-card > summary::-webkit-details-marker,
.saas-subform > summary::-webkit-details-marker,
.saas-plan-edit > summary::-webkit-details-marker {
    display: none;
}
.saas-admin-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.saas-admin-card > summary strong,
.saas-admin-card > summary small {
    display: block;
}
.saas-admin-card > summary strong {
    color: #102b3f;
    font-size: 20px;
}
.saas-admin-card > summary small {
    margin-top: 5px;
    color: #657c8b;
}
.saas-admin-form {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}
.saas-admin-form.compact {
    gap: 14px;
    margin-top: 16px;
}
.saas-admin-form fieldset {
    margin: 0;
    padding: 18px;
    border: 1px solid #dce8ed;
    border-radius: 9px;
}
.saas-admin-form legend {
    padding: 0 8px;
    color: #31576d;
    font-weight: 850;
}
.saas-admin-form label,
.saas-inline-form label {
    display: grid;
    align-content: start;
    gap: 7px;
    color: #26465a;
    font-size: 13px;
    font-weight: 800;
}
.saas-admin-form label small,
.saas-inline-form label small {
    color: #718794;
    font-weight: 600;
}
.saas-admin-form input,
.saas-admin-form select,
.saas-admin-form textarea,
.saas-inline-form input,
.saas-inline-form select,
.saas-row-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbdce4;
    border-radius: 7px;
    background: #fff;
    color: #16364b;
    font: inherit;
}
.saas-form-grid {
    display: grid;
    gap: 16px;
}
.saas-form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.saas-form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.saas-form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.saas-admin-form > .btn {
    justify-self: start;
}
.saas-card-heading,
.saas-heading-actions,
.saas-list-row,
.saas-inline-form,
.saas-row-form {
    display: flex;
    align-items: center;
    gap: 14px;
}
.saas-card-heading {
    justify-content: space-between;
    margin-bottom: 20px;
}
.saas-card-heading h2 {
    margin: 3px 0 0;
    color: #102b3f;
    font-size: 26px;
}
.saas-card-heading p:not(.eyebrow) {
    margin: 7px 0 0;
    color: #607888;
}
.saas-heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.saas-back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #0b659a;
    font-weight: 800;
    text-decoration: none;
}
.saas-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d4e2e9;
    border-radius: 10px;
    background: #fff;
    position: sticky;
    top: 8px;
    z-index: 4;
}
.saas-section-nav a {
    padding: 9px 13px;
    border-radius: 7px;
    color: #31576d;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}
.saas-section-nav a:hover {
    background: #edf6fa;
    color: #0b659a;
}
.saas-list {
    display: grid;
    gap: 10px;
}
.saas-list-row {
    justify-content: space-between;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #e0e9ed;
    border-radius: 8px;
    background: #f9fbfc;
}
.saas-list-row > div:first-child {
    min-width: 0;
    flex: 1;
}
.saas-list-row strong,
.saas-list-row small {
    display: block;
}
.saas-list-row small {
    margin-top: 4px;
    color: #657c8b;
    overflow-wrap: anywhere;
}
.saas-inline-form {
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e0e9ed;
}
.saas-inline-form label {
    min-width: 190px;
    flex: 1;
}
.saas-inline-form label.check {
    display: flex;
    min-width: auto;
    flex: 0 0 auto;
}
.saas-inline-form label.check input,
.saas-check-grid input {
    width: auto;
    min-height: 0;
}
.saas-admin-table-wrap.flat {
    border-radius: 8px;
    box-shadow: none;
}
.saas-admin-table.compact th,
.saas-admin-table.compact td {
    padding: 12px 14px;
}
.saas-row-form {
    min-width: 240px;
}
.saas-row-form select {
    min-height: 36px;
    padding: 6px 8px;
}
.saas-subform {
    margin-top: 18px;
    padding: 16px;
    border: 1px dashed #bdd2dc;
    border-radius: 9px;
    background: #f8fbfc;
}
.saas-subform > summary,
.saas-plan-edit > summary {
    color: #0b659a;
    font-weight: 850;
}
.saas-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.saas-check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d8e5eb;
    border-radius: 7px;
    background: #fff;
}
.saas-check-grid label.disabled {
    opacity: .55;
}
.saas-usage-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.saas-usage-strip > div {
    display: grid;
    gap: 3px;
    padding: 14px;
    border-radius: 8px;
    background: #f1f7f9;
}
.saas-usage-strip strong { color: #0b659a; font-size: 23px; }
.saas-usage-strip span,
.saas-usage-strip small { color: #607888; }
.saas-empty {
    margin: 0;
    padding: 18px;
    border-radius: 8px;
    background: #f7fafb;
    color: #657c8b;
}
.saas-admin-metrics.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.saas-scheduler-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
    gap: 20px;
    align-items: start;
}
.saas-scheduler-side { display: grid; gap: 20px; }
.saas-scheduler-side h2 { margin: 4px 0 8px; color: #102b3f; }
.saas-scheduler-errors {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #edc3c3;
    border-radius: 9px;
    background: #fff7f7;
    color: #7d3b3b;
}
.saas-scheduler-errors p { display: grid; gap: 2px; margin: 0; font-size: 12px; }
.saas-scheduler-errors span { font-weight: 850; }
.saas-product-block {
    display: grid;
    gap: 20px;
}
.saas-product-block.coming-soon {
    padding: 24px;
    border: 1px dashed #c7d7df;
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
}
.saas-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.saas-plan-card {
    padding: 22px;
    border: 1px solid #d4e2e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 43, 66, .05);
}
.saas-plan-card.featured {
    border-color: #8fc5d9;
    box-shadow: 0 15px 34px rgba(11, 101, 154, .11);
}
.saas-plan-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.saas-plan-heading span:first-child {
    color: #b17a27;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.saas-plan-heading h3 {
    margin: 3px 0 0;
    color: #102b3f;
    font-size: 24px;
}
.saas-plan-price {
    display: grid;
    gap: 2px;
    margin: 22px 0 16px;
}
.saas-plan-price strong { color: #0b659a; font-size: 30px; }
.saas-plan-price span,
.saas-plan-price small,
.saas-plan-limit { color: #607888; }
.saas-plan-limit strong { color: #19384d; }
.saas-entitlement-list {
    display: grid;
    gap: 8px;
    min-height: 140px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}
.saas-entitlement-list li {
    position: relative;
    padding-left: 20px;
    color: #31576d;
    font-size: 13px;
}
.saas-entitlement-list li::before {
    position: absolute;
    left: 0;
    content: "✓";
    color: #16815c;
    font-weight: 900;
}
.saas-plan-edit {
    padding-top: 14px;
    border-top: 1px solid #e2ebef;
}
.saas-admin-table.audit { min-width: 1100px; }
.saas-admin-table.audit code {
    display: block;
    max-width: 300px;
    color: #526b7c;
    white-space: normal;
    overflow-wrap: anywhere;
}
.saas-status.open,
.saas-status.past_due,
.saas-status.overdue {
    border-color: #efd1a3;
    background: #fff8eb;
    color: #99631d;
}
.saas-status.paid { border-color: #b9dfcc; background: #f0faf5; color: #18704f; }
.saas-status.void { border-color: #d4dce1; background: #f4f7f8; color: #556b78; }
.saas-status.scheduled { border-color: #c9d8f1; background: #f3f7ff; color: #315d9a; }
.saas-privilege-section {
    border-color: #c5ddd8;
    background: linear-gradient(145deg, #fff 0%, #fbfefd 68%, #f0faf7 100%);
}
.saas-privilege-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.saas-privilege-summary span {
    display: grid;
    min-width: 96px;
    gap: 2px;
    padding: 11px 14px;
    border: 1px solid #d6e4e8;
    border-radius: 10px;
    background: #fff;
    color: #607888;
    font-size: 11px;
    font-weight: 800;
    text-align: right;
    box-shadow: 0 8px 20px rgba(16, 43, 66, .05);
}
.saas-privilege-summary strong { color: #126f58; font-size: 20px; line-height: 1; }
.saas-privilege-summary .complimentary { border-color: #ead6ab; background: #fffaf0; }
.saas-privilege-summary .complimentary strong { color: #a06b1b; }
.saas-privilege-billing-lock {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #b9dfcc;
    border-radius: 10px;
    background: #eef9f4;
    color: #1d654f;
}
.saas-privilege-billing-lock > span {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    background: #1f8d6a;
    color: #fff;
    font-weight: 950;
}
.saas-privilege-billing-lock strong,
.saas-privilege-billing-lock small { display: block; }
.saas-privilege-billing-lock small { margin-top: 2px; color: #4f796c; }
.saas-privilege-list { display: grid; gap: 12px; }
.saas-privilege-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 18px;
    border: 1px solid #dce7ea;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
}
.saas-privilege-card.is-active {
    border-color: #b6dccc;
    box-shadow: 0 12px 28px rgba(24, 112, 79, .07);
}
.saas-privilege-card-main { display: flex; gap: 14px; min-width: 0; }
.saas-privilege-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #0c699d, #19846d);
    color: #fff;
    font-size: 17px;
    font-weight: 950;
}
.saas-privilege-card-kicker,
.saas-privilege-meta,
.saas-privilege-rights { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.saas-privilege-card-kicker {
    color: #a16d20;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.saas-privilege-card h3 { margin: 5px 0 4px; color: #102b3f; font-size: 19px; }
.saas-privilege-card p { margin: 0; color: #536f80; line-height: 1.5; }
.saas-privilege-meta { margin-top: 10px; color: #6b808e; font-size: 12px; }
.saas-privilege-meta span + span::before { margin-right: 6px; content: "·"; }
.saas-mini-badge {
    padding: 3px 6px;
    border-radius: 999px;
    background: #eef3f5;
    color: #617783;
    font-size: 9px;
}
.saas-privilege-rights { margin-top: 11px; }
.saas-privilege-rights span {
    padding: 5px 8px;
    border: 1px solid #d2e3e8;
    border-radius: 999px;
    background: #f6fafb;
    color: #34596e;
    font-size: 11px;
    font-weight: 750;
}
.saas-privilege-waiver {
    display: inline-flex;
    margin-top: 11px;
    padding: 6px 9px;
    border-radius: 7px;
    background: #fff5df;
    color: #8b5d17;
    font-size: 12px;
    font-weight: 850;
}
.saas-revocation-note { display: block; margin-top: 10px; color: #9a4a4a; }
.saas-privilege-card-actions { display: grid; align-content: start; justify-items: end; gap: 10px; }
.saas-privilege-revoke { position: relative; }
.saas-privilege-revoke > summary { color: #a43b3b; cursor: pointer; font-size: 12px; font-weight: 850; list-style: none; }
.saas-privilege-revoke > summary::-webkit-details-marker { display: none; }
.saas-privilege-revoke form {
    display: grid;
    width: min(330px, 75vw);
    gap: 10px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #edc3c3;
    border-radius: 9px;
    background: #fff;
}
.saas-privilege-revoke label { display: grid; gap: 5px; color: #674747; font-size: 12px; font-weight: 800; }
.saas-privilege-revoke input { min-height: 40px; padding: 8px 10px; border: 1px solid #dfc6c6; border-radius: 7px; }
.saas-privilege-builder { margin-top: 22px; border-style: solid; border-color: #bad9d0; background: #f5fbf9; }
.saas-permanent-check {
    display: flex !important;
    align-items: center !important;
    width: fit-content;
    gap: 8px !important;
}
.saas-permanent-check input { width: auto; min-height: 0; }
.saas-entitlement-picker {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid #cfdee3;
    border-radius: 10px;
    background: #fff;
}
.saas-entitlement-picker > div:first-child strong,
.saas-entitlement-picker > div:first-child small { display: block; }
.saas-entitlement-picker > div:first-child strong { color: #19384d; }
.saas-entitlement-picker > div:first-child small { margin-top: 3px; color: #6c818f; }
.saas-entitlement-product {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
.saas-entitlement-product[hidden] { display: none; }
.saas-entitlement-product label {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 9px;
    padding: 11px;
    border: 1px solid #dce7ea;
    border-radius: 9px;
    background: #f9fbfc;
    cursor: pointer;
}
.saas-entitlement-product input { width: auto; min-height: 0; margin-top: 3px; }
.saas-entitlement-product strong,
.saas-entitlement-product small { display: block; }
.saas-entitlement-product strong { color: #274b60; font-size: 12px; }
.saas-entitlement-product small { margin-top: 3px; color: #80909a; font-size: 10px; font-weight: 600; }
.saas-privilege-product-note {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-left: 3px solid #c58a30;
    border-radius: 5px;
    background: #fff8eb;
    color: #7c5a25;
    font-size: 13px;
}
.saas-privilege-submit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.saas-privilege-submit small { color: #657c8b; }
@media (max-width: 900px) {
    .saas-admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .saas-admin-metric {
        border-bottom: 1px solid #e2ebef;
    }
    .saas-admin-heading,
    .saas-admin-section-heading,
    .saas-admin-boundary-note {
        align-items: flex-start;
        flex-direction: column;
    }
    .saas-form-grid.cols-3,
    .saas-form-grid.cols-4,
    .saas-plan-grid,
    .saas-scheduler-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .saas-entitlement-product { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .platform-entry-header,
    .platform-entry-actions,
    .saas-admin-header-actions {
        align-items: flex-start;
        flex-direction: column;
    }
    .platform-entry-header {
        gap: 10px;
        padding-top: 14px;
        padding-bottom: 14px;
    }
    .platform-entry-actions { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
    .platform-entry-brand-logo {
        width: 178px;
    }
    .saas-admin-login-panel {
        margin-top: 24px;
        padding: 26px 22px;
        border-radius: 18px;
    }
    .saas-admin-login-logo {
        width: min(280px, 90%);
        margin-bottom: 26px;
    }
    .saas-admin-heading h1 {
        font-size: 34px;
    }
    .saas-admin-metrics {
        grid-template-columns: 1fr;
    }
    .saas-admin-metric {
        border-right: 0;
    }
    .saas-admin-nav,
    .saas-section-nav,
    .saas-card-heading,
    .saas-list-row,
    .saas-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .saas-form-grid.cols-2,
    .saas-form-grid.cols-3,
    .saas-form-grid.cols-4,
    .saas-plan-grid,
    .saas-scheduler-grid,
    .saas-admin-metrics.four {
        grid-template-columns: 1fr;
    }
    .saas-privilege-card { grid-template-columns: 1fr; }
    .saas-privilege-card-actions { justify-items: start; }
    .saas-privilege-summary { justify-content: flex-start; }
    .saas-entitlement-product { grid-template-columns: 1fr; }
    .saas-section-nav { position: static; }
}
.platform-tenant-row strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}
.platform-tenant-row small {
    margin-top: 3px;
    color: #62798a;
    overflow-wrap: anywhere;
}
.login-intro {
    display: grid;
    gap: 8px;
    justify-items: center;
    margin-bottom: 22px;
    text-align: center;
}
.login-intro h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: 0;
}
.login-intro .muted {
    max-width: 560px;
    margin: 0;
    line-height: 1.55;
}
.login-security-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 18px;
}
.login-security-points span {
    padding: 7px 11px;
    border: 1px solid #cfe8da;
    border-radius: 999px;
    background: #f4fbf7;
    color: #21744f;
    font-size: 12px;
    font-weight: 900;
}
.login-method-card {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin: 18px 0 20px;
    padding: clamp(18px, 3vw, 24px);
    border: 1px solid rgba(216,232,239,.95);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 0%, rgba(13,95,147,.08), transparent 38%),
        linear-gradient(135deg, rgba(247,251,253,.94), rgba(255,255,255,.99));
    box-shadow: 0 18px 46px rgba(20,50,74,.08);
}
.login-method-head {
    display: grid;
    gap: 4px;
    width: min(100%, 520px);
    text-align: center;
}
.login-method-head strong {
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
}
.login-method-head span {
    color: var(--muted);
    line-height: 1.45;
}
.oauth-provider-button {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(100%, 480px);
    min-height: 62px;
    padding: 0 22px;
    border: 1px solid #cfd8df;
    border-radius: 12px;
    background: #fff;
    color: #2f3337;
    font-size: clamp(16px, 2vw, 19px);
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 10px 24px rgba(20,50,74,.06);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.email-provider-button {
    color: var(--ink);
}
.oauth-provider-button span:not(.oauth-logo) {
    min-width: 0;
}
.oauth-login-actions {
    width: min(100%, 520px);
    display: grid;
    gap: 12px;
    justify-items: center;
}
.oauth-provider-button:hover {
    transform: translateY(-1px);
    border-color: #b9c7d1;
    box-shadow: 0 14px 30px rgba(20,50,74,.11);
    background: #fbfdfe;
}
.oauth-provider-button:focus-visible {
    outline: 3px solid rgba(15,105,156,.2);
    outline-offset: 3px;
}
.oauth-provider-button.is-disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.oauth-provider-button.is-disabled:hover {
    transform: none;
    border-color: #cfd8df;
    background: #fff;
    box-shadow: none;
}
.oauth-logo {
    justify-self: end;
    width: 26px;
    height: 26px;
}
.oauth-logo.google {
    display: block;
}
.oauth-logo.microsoft {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}
.oauth-logo.microsoft i {
    display: block;
}
.oauth-logo.microsoft i:nth-child(1) { background: #f25022; }
.oauth-logo.microsoft i:nth-child(2) { background: #7fba00; }
.oauth-logo.microsoft i:nth-child(3) { background: #00a4ef; }
.oauth-logo.microsoft i:nth-child(4) { background: #ffb900; }
.login-separator {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.login-separator::before,
.login-separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}
.login-password-form {
    padding-top: 2px;
}
.login-email-code-form,
.login-code-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: clamp(16px, 2vw, 20px);
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(20, 50, 74, .06);
}
.login-email-code-form .btn,
.login-code-card .btn {
    min-height: 50px;
    white-space: nowrap;
}
.login-email-code-form .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
}
.login-email-code-form label,
.login-code-card label {
    margin: 0;
}
.login-email-code-form .email-code-hint {
    grid-column: 1;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
.client-login-panel .email-login-disclosure {
    width: min(100%, 520px);
    margin: 0 auto;
}
.client-login-panel .email-login-disclosure .email-provider-button {
    width: min(100%, 520px);
}
.client-login-panel .email-login-disclosure .login-email-code-form {
    width: 100%;
}
.login-code-card input[name="code"] {
    font-size: 28px;
    font-weight: 950;
    letter-spacing: .28em;
    text-align: center;
}
.legacy-password-login {
    margin-top: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    overflow: hidden;
}
.legacy-password-login summary {
    padding: 14px 16px;
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.legacy-password-login summary::-webkit-details-marker {
    display: none;
}
.legacy-password-login .login-password-form {
    padding: 0 16px 16px;
}
.login-client-start {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-weight: 800;
}
.login-client-start a {
    color: var(--blue);
    font-weight: 950;
}
.passwordless-intake-note {
    margin-top: 12px;
    border-color: #cfe8da;
    background: #f4fbf7;
}
@media (max-width: 640px) {
    .hero.client-cover {
        min-height: auto;
        align-items: start;
        padding: 18px 12px 20px;
        gap: 14px;
    }
    .public-access-panel {
        width: 100%;
        padding: 10px;
        border-radius: 16px;
        gap: 10px;
    }
    .new-account-action {
        min-height: 0;
        padding: 18px;
        border-radius: 14px;
    }
    .new-account-action span,
    .public-login-head span {
        font-size: 15px;
    }
    .new-account-action strong {
        font-size: 30px;
        line-height: 1.08;
    }
    .new-account-action small {
        font-size: 13px;
        line-height: 1.35;
    }
    .new-account-action em {
        min-height: 52px;
        margin-top: 6px;
        padding: 13px 14px;
        font-size: 15px;
    }
    .public-login-card {
        padding: 16px;
        border-radius: 14px;
        gap: 10px;
    }
    .public-login-head {
        text-align: left;
    }
    .public-login-head strong {
        font-size: 30px;
        line-height: 1.08;
    }
    .public-login-head small {
        font-size: 13px;
    }
    .public-oauth-actions .oauth-provider-button {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        min-height: 58px;
        border-radius: 12px;
        padding: 0 10px;
        font-size: clamp(14px, 4.2vw, 17px);
    }
    .public-oauth-actions .oauth-provider-button .oauth-logo {
        width: 28px;
        height: 28px;
    }
    .public-email-login input {
        min-height: 50px;
    }
    .cover-footer.minimal {
        width: 100%;
        justify-content: center;
        padding-top: 0;
        text-align: center;
    }
    .cover-footer address,
    .public-footer-links {
        justify-content: center;
    }
    .login-panel {
        margin: 22px 12px;
        padding: 22px 16px;
    }
    .login-method-card {
        justify-items: stretch;
        padding: 16px;
    }
    .login-method-head,
    .oauth-login-actions {
        width: 100%;
    }
    .oauth-provider-button {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        min-height: 58px;
        padding: 0 12px;
        gap: 10px;
        font-size: clamp(14px, 4.2vw, 17px);
    }
    .oauth-logo {
        width: 24px;
        height: 24px;
    }
    .login-separator {
        font-size: 12px;
        text-align: center;
    }
    .login-email-code-form,
    .login-code-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .login-email-code-form .btn,
    .login-email-code-form .email-code-hint {
        grid-column: auto;
        grid-row: auto;
    }
}
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; }
.label-text { display: inline-flex; align-items: baseline; gap: 4px; }
.required-mark { color: var(--danger); font-weight: 900; }
.required-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin: -6px 0 2px;
    padding: 7px 10px;
    border: 1px solid #f0d0d0;
    border-radius: 999px;
    background: #fff8f8;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
.muted, .note { color: var(--muted); line-height: 1.55; }
.alert, .flash { border: 1px solid #f1c8c8; background: #fff5f5; color: var(--danger); padding: 14px 16px; border-radius: var(--radius); margin: 16px auto; max-width: 980px; }
.flash { border-color: #c8e6d8; background: #f2fbf6; color: var(--ok); }
.flash-error { border-color: #f1c8c8; background: #fff5f5; color: var(--danger); }
.flash-warning { border-color: #f0c36a; background: #fff8e8; color: var(--warn); }
.flash-upload-issue { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1040px; border-color: #f1c8c8; background: #fff8f7; color: #8f3933; box-shadow: 0 10px 28px rgba(131, 47, 40, .08); }
.flash-upload-issue strong { display: block; margin-bottom: 4px; color: #7b302b; }
.flash-upload-issue .btn { flex: 0 0 auto; white-space: nowrap; }
.upload-feedback { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 2px; padding: 14px 16px; border: 1px solid #efc9c5; border-radius: 12px; background: linear-gradient(135deg, #fff9f8, #fff3f1); color: #873b34; box-shadow: 0 8px 22px rgba(131, 47, 40, .06); }
.upload-feedback strong { display: block; margin-bottom: 4px; }
.upload-feedback p { margin: 0; line-height: 1.5; }
.upload-feedback-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.upload-feedback-link { color: #8f3933; font-weight: 800; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.upload-feedback-limits { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 11px; }
.upload-feedback-limits span { display: inline-flex; align-items: center; padding: 6px 10px; border: 1px solid #e7c8c2; border-radius: 8px; background: #fff; color: #682f2a; font-size: .86rem; font-weight: 700; line-height: 1.35; }
.upload-support-backdrop { position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10, 33, 50, .46); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.upload-support-dialog { width: min(100%, 520px); padding: clamp(25px, 5vw, 42px); border: 1px solid #d5e7ee; border-top: 5px solid #c28a35; border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgba(9, 35, 52, .25); color: #12384e; }
.upload-support-eyebrow { color: #a16f2f; font-size: .77rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.upload-support-dialog h2 { margin: 11px 0 15px; color: #0c334a; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.18; }
.upload-support-dialog p { margin: 0; color: #49677a; line-height: 1.65; }
.upload-support-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.upload-support-dialog-actions .btn { justify-content: center; }
.dashboard-payment-dialog { box-sizing: border-box; width: min(500px, calc(100% - 32px)); max-width: 500px; margin: auto; padding: clamp(25px, 5vw, 38px); border: 1px solid #d5e7ee; border-top: 5px solid #c28a35; border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgba(9, 35, 52, .25); color: #12384e; }
.dashboard-payment-dialog::backdrop { background: rgba(10, 33, 50, .52); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.dashboard-payment-dialog .eyebrow { margin: 0 0 9px; color: #a16f2f; }
.dashboard-payment-dialog h2 { margin: 0 0 13px; color: #0c334a; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.18; }
.dashboard-payment-dialog > p:not(.eyebrow) { margin: 0; color: #49677a; line-height: 1.6; }
.dashboard-payment-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 27px; }
.dashboard-payment-dialog-actions .btn { justify-content: center; }
@media (max-width: 640px) { .flash-upload-issue, .upload-feedback { align-items: flex-start; flex-direction: column; } .upload-feedback-actions { flex-wrap: wrap; } }
@media (max-width: 640px) { .upload-support-dialog-actions .btn { flex: 1 1 100%; } }
@media (max-width: 640px) { .dashboard-payment-dialog-actions .btn { flex: 1 1 100%; } }
.install-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(18px, 4vw, 44px);
    background:
        linear-gradient(110deg, rgba(255,255,255,.98), rgba(255,255,255,.84)),
        url("logo-fiduline.png") no-repeat right 7vw bottom 8vh / min(520px, 52vw),
        linear-gradient(145deg, #ffffff 0%, #f4f9fc 52%, #fbf8f1 100%);
}
.install-shell { width: min(1080px, 100%); }
.install-card {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
    gap: 0;
    align-items: stretch;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(20,50,74,.16);
    overflow: hidden;
    min-height: 690px;
}
.install-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    padding: clamp(28px, 4vw, 46px);
    background:
        linear-gradient(180deg, rgba(13,95,147,.94), rgba(20,50,74,.98)),
        linear-gradient(145deg, var(--blue), var(--ink));
    color: #fff;
}
.install-intro .eyebrow { color: #e9c177; }
.install-intro .muted { color: rgba(255,255,255,.78); }
.install-logo {
    width: 232px;
    padding: 12px 14px;
    background: rgba(255,255,255,.96);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(0,0,0,.14);
}
.install-intro h1 {
    color: #fff;
    font-size: clamp(34px, 4vw, 54px);
    margin-bottom: 16px;
}
.install-progress { display: grid; gap: 14px; }
.progress-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}
.progress-item.active { background: rgba(255,255,255,.14); border-color: rgba(233,193,119,.55); }
.progress-item span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
}
.progress-item strong, .progress-item small { display: block; }
.progress-item small { color: rgba(255,255,255,.72); margin-top: 4px; line-height: 1.35; }
.install-assurance {
    padding: 18px;
    border: 1px solid rgba(233,193,119,.42);
    border-radius: 8px;
    background: rgba(233,193,119,.12);
}
.install-assurance strong { color: #ffe2a0; }
.install-assurance p { margin: 8px 0 0; color: rgba(255,255,255,.78); line-height: 1.5; }
.install-form {
    padding: clamp(28px, 4vw, 48px);
    background: rgba(255,255,255,.96);
}
.form-title {
    border-bottom: 1px solid var(--line);
    padding-bottom: 22px;
}
.form-title h2 {
    font-size: clamp(28px, 3vw, 38px);
    margin-bottom: 8px;
}
.form-title p:last-child {
    color: var(--muted);
    margin: 0;
}
fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}
legend {
    width: 100%;
    padding: 24px 0 14px;
    font-size: 18px;
    font-weight: 900;
    color: var(--ink);
}
.install-form label {
    color: #26465f;
}
.install-form input {
    min-height: 48px;
    background: #fbfdfe;
    border-color: #d7e4ec;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.install-form input:focus {
    outline: none;
    background: #fff;
    border-color: #7eb7d5;
    box-shadow: 0 0 0 4px rgba(13,95,147,.12);
}
.field-help {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.install-submit {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.install-submit .btn {
    min-width: 190px;
    min-height: 50px;
    box-shadow: 0 12px 28px rgba(13,95,147,.24);
}
.install-submit span {
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}
/*
.install-points span {
    border: 1px solid var(--line);
    background: var(--blue-soft);
    color: var(--blue);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-weight: 800;
}
*/

.wizard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    padding: clamp(20px, 4vw, 46px);
}
.intake-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    padding: clamp(20px, 4vw, 46px);
}
.intake-main { display: grid; gap: 20px; }
.intake-main,
.wizard-form,
.wizard-step,
.intake-section,
.choice-grid,
.choice-card,
.gentle-step-banner,
.dynamic-row,
.coord-card,
.coord-field-grid,
.document-mode-choice,
.document-mode-card,
.flow-choice-card,
.delay-choice-grid,
.transmission-card-grid,
.payment-choice-grid,
.intake-oauth-card,
.intake-oauth-actions {
    min-width: 0;
}
.intake-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
}
.intake-head h1 { font-size: clamp(32px, 4vw, 48px); }
.intake-tools {
    display: grid;
    justify-items: end;
    gap: 10px;
}
.save-status {
    border: 1px solid #cfe1ec;
    border-radius: 999px;
    min-height: 38px;
    padding: 0 13px 0 36px;
    background: #f7fbfd;
    color: var(--blue);
    font-weight: 850;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}
.save-status::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    border: 2px solid currentColor;
    border-radius: 3px;
    box-shadow: inset 0 -4px 0 rgba(13,95,147,.18);
}
.save-status[data-state="saving"] { color: var(--warn); background: #fff8ec; border-color: #ecd3a4; }
.save-status[data-state="saved"] { color: var(--ok); background: #f1faf5; border-color: #c8e9d6; }
.save-status[data-state="error"] { color: var(--danger); background: #fff5f5; border-color: #efc6c6; }
.draft-takeover-note {
    display: grid;
    gap: 6px;
    padding: 16px 18px 16px 22px;
    border: 1px solid #ecd3a4;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fffaf0, #fff);
}
.draft-takeover-note strong,
.final-validation-callout strong {
    color: var(--ink);
}
.draft-takeover-note p,
.final-validation-callout p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.deposit-scope-note {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid rgba(184, 64, 64, .22);
    border-left: 5px solid #c85b5b;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 0 0, rgba(184, 64, 64, .12), transparent 30%),
        linear-gradient(135deg, #fff6f6, #ffffff);
    box-shadow: 0 14px 34px rgba(184,64,64,.075);
}
.deposit-scope-note > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #c85b5b, #9f3f3f);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(184,64,64,.2);
}
.deposit-scope-note strong {
    display: block;
    color: var(--ink);
    font-size: 17px;
}
.deposit-scope-note p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 700;
}
.mobile-intake-promise {
    display: none;
}
.final-validation-callout {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    overflow: hidden;
    padding: 20px 22px;
    border: 1px solid rgba(44, 132, 91, .34);
    border-left: 6px solid var(--ok);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 8% 20%, rgba(44, 132, 91, .16), transparent 28%),
        linear-gradient(135deg, #f4fbf7, #ffffff 68%);
    box-shadow: 0 18px 48px rgba(13, 47, 72, .08), 0 0 0 1px rgba(255, 255, 255, .72) inset;
}
.final-validation-callout::after {
    content: "";
    position: absolute;
    inset: -40% auto -40% -28%;
    width: 35%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
    transform: skewX(-16deg);
    animation: finalCalloutSweep 4.8s ease-in-out infinite;
    pointer-events: none;
}
.final-validation-callout strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.06rem;
}
.final-validation-pulse {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ok), #0d6b96);
    box-shadow: 0 12px 28px rgba(44, 132, 91, .28);
}
.final-validation-pulse::before,
.final-validation-pulse::after {
    content: "";
    position: absolute;
    border-radius: inherit;
}
.final-validation-pulse::before {
    inset: -7px;
    border: 1px solid rgba(44, 132, 91, .26);
    animation: finalCalloutPulse 2.4s ease-out infinite;
}
.final-validation-pulse::after {
    left: 14px;
    top: 9px;
    width: 11px;
    height: 18px;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    transform: rotate(42deg);
}
@keyframes finalCalloutPulse {
    0% { opacity: .72; transform: scale(.9); }
    70% { opacity: 0; transform: scale(1.38); }
    100% { opacity: 0; transform: scale(1.38); }
}
@keyframes finalCalloutSweep {
    0%, 42% { transform: translateX(0) skewX(-16deg); opacity: 0; }
    54% { opacity: 1; }
    78%, 100% { transform: translateX(430%) skewX(-16deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .final-validation-callout::after,
    .final-validation-pulse::before,
    .invoice-client-guidance::after,
    .nav-invoice-link.invoice-focus {
        animation: none;
    }
}
.client-processing-note {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
    padding: 20px;
    border: 1px solid #dbe8ef;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 18% 0%, rgba(44, 132, 91, .12), transparent 32%),
        linear-gradient(135deg, #ffffff, #f7fbfd);
    box-shadow: 0 18px 45px rgba(13, 47, 72, .06);
}
.client-processing-note span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    background: #edf4f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.client-processing-note strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
}
.client-processing-note p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}
.client-processing-note textarea {
    min-height: 150px;
    background: rgba(255, 255, 255, .9);
}
.document-prep-banner {
    border-left-color: var(--ok);
    background: linear-gradient(135deg, #f1faf5, #fff);
}
.document-prep-banner strong {
    color: #21744f;
}
.progress-pill {
    min-width: 72px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 12px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
}
.wizard-progress {
    height: 7px;
    background: #e7eef3;
    border-radius: 999px;
    overflow: hidden;
}
.wizard-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--blue), var(--ok));
    transition: width .2s ease;
}
.wizard-step-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}
.wizard-step-nav-item {
    flex: 0 0 auto;
    min-width: 118px;
    max-width: 180px;
    min-height: 50px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    color: var(--muted);
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 9px 11px;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.wizard-step-nav-item span {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #edf6fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}
.wizard-step-nav-item strong {
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wizard-step-nav-item small {
    grid-column: 2;
    color: #98a8b4;
    font-size: 11px;
    font-weight: 800;
    margin-top: -4px;
}
.wizard-step-nav-item.is-accessible:hover {
    border-color: #9ccde4;
    box-shadow: 0 10px 24px rgba(20,50,74,.08);
    color: var(--ink);
}
.wizard-step-nav-item.is-current {
    border-color: #88c7e8;
    background: linear-gradient(180deg, #f3fbff, #fff);
    box-shadow: 0 12px 28px rgba(13,95,147,.10);
    color: var(--ink);
}
.wizard-step-nav-item.is-current span {
    background: var(--blue);
    color: #fff;
}
.wizard-step-nav-item.is-locked {
    cursor: not-allowed;
    opacity: .62;
}
.wizard-mobile-step-nav {
    display: none;
    position: relative;
}
.wizard-mobile-step-toggle {
    width: 100%;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    min-height: 46px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(20,50,74,.07);
}
.wizard-mobile-step-toggle strong {
    color: var(--blue);
    font-size: 18px;
}
.wizard-mobile-step-panel {
    position: absolute;
    z-index: 25;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 22px 60px rgba(16,43,66,.16);
    backdrop-filter: blur(14px);
    padding: 14px;
}
.wizard-mobile-step-panel > strong {
    display: block;
    color: var(--ink);
    font-size: 17px;
}
.wizard-mobile-step-panel > p {
    margin: 4px 0 12px;
    color: var(--muted);
    line-height: 1.4;
}
.wizard-mobile-step-list {
    display: grid;
    gap: 8px;
    max-height: min(56vh, 420px);
    overflow: auto;
}
.wizard-mobile-step-option {
    border: 1px solid #e0edf3;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    min-height: 48px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}
.wizard-mobile-step-option span {
    font-weight: 850;
}
.wizard-mobile-step-option small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.wizard-mobile-step-option.is-current {
    border-color: #88c7e8;
    background: #f3fbff;
}
.wizard-mobile-step-option.is-locked {
    opacity: .58;
}
.wizard-form { display: grid; gap: 18px; }
.wizard-step { display: none; }
.wizard-step.is-active { display: grid; gap: 18px; }
.wizard-step h2 { font-size: clamp(24px, 3vw, 34px); }
.wizard-step-heading.compact-heading {
    gap: 4px;
    margin-top: 4px;
}
.wizard-step-heading.compact-heading h3 {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
}
.fiscal-year-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.fiscal-year-card {
    min-height: 154px;
    align-content: center;
    padding-right: 70px;
}
.fiscal-year-card strong {
    font-size: 28px;
}
.fiscal-year-card small {
    max-width: 520px;
}
.gentle-step-banner {
    display: grid;
    gap: 6px;
    padding: clamp(16px, 2.5vw, 22px);
    border: 1px solid #d6e8ef;
    border-left: 5px solid var(--blue);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.gentle-step-banner strong {
    color: var(--ink);
    font-size: clamp(18px, 2vw, 22px);
}
.gentle-step-banner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.coord-wizard-layout {
    display: grid;
    gap: 16px;
}
.coord-card {
    display: grid;
    gap: 16px;
    padding: clamp(18px, 2vw, 24px);
    border: 1px solid rgba(13, 95, 147, .16);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(247, 251, 253, .98), rgba(255, 255, 255, .98));
    box-shadow: 0 18px 46px rgba(20, 50, 74, .055);
}
.coord-card-situation {
    grid-template-columns: minmax(260px, .42fr) minmax(320px, .58fr);
    align-items: end;
}
.coord-card-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.coord-card-head > span {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #e9f6fc, #fff6e8);
    color: var(--blue);
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(13, 95, 147, .12);
}
.coord-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(20px, 2vw, 25px);
    letter-spacing: 0;
}
.coord-card-head > div,
.coord-card-head h3,
.coord-card-head p,
.coord-field-grid label,
.intake-oauth-head,
.intake-oauth-head strong,
.intake-oauth-head span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.coord-wizard-layout .coord-field-grid label > small {
    display: none;
}
.coord-card-head p {
    margin: 3px 0 0;
    color: var(--muted);
    line-height: 1.4;
}
.taxpayer-identity-groups { display: grid; gap: 12px; min-width: 0; }
.taxpayer-identity-group {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: clamp(15px, 2vw, 20px);
    border: 1px solid #dceaf0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .88);
}
.taxpayer-identity-group[hidden] { display: none; }
.taxpayer-identity-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; padding-bottom: 10px; border-bottom: 1px solid #edf2f5; }
.taxpayer-identity-group-head strong { color: var(--ink); font-size: 15px; }
.taxpayer-identity-group-head span { color: var(--muted); font-size: 12px; font-weight: 650; }
.taxpayer-case-number {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr);
    align-items: center;
    gap: 14px 22px;
    padding: 17px 20px;
    border: 1px solid #cce2e7;
    border-radius: 12px;
    background: #f0f8fa;
}
.taxpayer-case-number > div { display: grid; gap: 4px; min-width: 0; }
.taxpayer-case-number strong { color: var(--ink); font-size: 15px; }
.taxpayer-case-number small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.taxpayer-case-number label { min-width: 0; }
@media (max-width: 760px) { .taxpayer-case-number { grid-template-columns: 1fr; padding: 16px; } }
.coord-field-grid {
    display: grid;
    gap: 14px;
}
.coord-field-grid.two,
.coord-field-grid.contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.coord-field-grid.address {
    grid-template-columns: minmax(240px, 1fr) minmax(110px, .22fr) minmax(130px, .28fr) minmax(220px, .75fr);
}
.coord-field-grid .wide-field,
.coord-field-grid .account-email-locked {
    grid-column: 1 / -1;
}
.coord-sub-option {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}
.move-option-row { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.coord-sub-option .move-option-row .check-row { display: flex; align-items: center; flex: 1; min-width: 0; width: auto; margin: 0; }
.move-add-button { flex: none; display: grid; place-items: center; width: 54px; min-height: 54px; padding: 0; border: 1px solid #afd0de; border-radius: 12px; background: #f2f9fc; color: #0b6587; font: inherit; font-size: 29px; font-weight: 500; line-height: 1; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.move-add-button:hover { background: #e5f4f9; border-color: #73b3cc; transform: translateY(-1px); }
.move-add-button:focus-visible { outline: 3px solid #68acc9; outline-offset: 3px; }
.move-add-button:disabled { opacity: .48; cursor: default; transform: none; }
.previous-address {
    display: grid;
    gap: 10px;
}
.previous-address[hidden] {
    display: none;
}
.previous-address > strong {
    color: var(--ink);
    font-size: 16px;
}
.previous-address-hint { margin: -4px 0 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.additional-previous-moves { display: grid; gap: 12px; margin-top: 5px; }
.additional-previous-move { display: grid; gap: 14px; padding: clamp(15px, 2vw, 20px); border: 1px solid #d6e6ed; border-radius: 14px; background: linear-gradient(135deg, #f7fbfd, #fff); }
.additional-previous-move-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.additional-previous-move-head strong { color: var(--ink); font-size: 15px; }
.additional-previous-move-head button { padding: 8px 11px; border: 1px solid #dbe6eb; border-radius: 8px; background: #fff; color: #587184; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.additional-previous-move-head button:hover { border-color: #c78775; color: #9b4a38; }
.additional-previous-move-head button:focus-visible { outline: 3px solid #68acc9; outline-offset: 2px; }
.previous-address-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(90px, .22fr) minmax(120px, .28fr) minmax(220px, .7fr);
    gap: 12px;
}
.previous-address-grid .previous-move-date-field {
    grid-column: 1 / span 2;
}
.swiss-city-field { position: relative; display: grid; align-content: start; min-width: 0; }
.swiss-city-field > label { min-width: 0; }
.estate-city-field { position: relative; }
.swiss-locality-picker {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    gap: 10px;
    width: max(100%, 280px);
    max-width: calc(100vw - 40px);
    margin-top: 0;
    padding: 12px;
    border: 1px solid #c9dfec;
    border-radius: 13px;
    background: #f7fbfd;
    box-shadow: 0 10px 24px rgba(20, 61, 83, .07);
}
.swiss-locality-picker[hidden] {
    display: none;
}
.swiss-locality-heading { display: grid; gap: 2px; }
.swiss-locality-heading strong { color: #183c50; font-size: 12px; line-height: 1.3; }
.swiss-locality-heading small,
.swiss-locality-message,
.swiss-locality-tip { color: #5d7684; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.swiss-locality-message,
.swiss-locality-tip { margin: 0; }
.swiss-locality-options {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.swiss-locality-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d5e5ed;
    border-radius: 9px;
    background: #fff;
    color: #173e52;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.swiss-locality-option span:first-child { min-width: 0; overflow-wrap: anywhere; }
.swiss-locality-option span:last-child { flex: none; color: #6793a4; font-size: 17px; line-height: 1; }
.swiss-locality-option:hover,
.swiss-locality-option.is-selected {
    border-color: #83bdcf;
    background: #edf7fa;
    box-shadow: 0 4px 13px rgba(20, 70, 95, .07);
}
.swiss-locality-option:focus-visible { outline: 3px solid #54a2c4; outline-offset: 2px; }
.coord-sub-option .check-row {
    width: fit-content;
    max-width: 100%;
    padding: 13px 15px;
    border: 1px solid rgba(196, 142, 63, .22);
    border-radius: 10px;
    background: rgba(255, 250, 241, .8);
}
.coord-card-access {
    border-color: rgba(38, 153, 112, .20);
    background: linear-gradient(135deg, rgba(243, 251, 247, .88), rgba(255, 255, 255, .98));
}
.coord-card-access .generate-password {
    justify-self: start;
    margin-top: 2px;
}
.intake-oauth-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(216,232,239,.95);
    border-radius: 10px;
    background: rgba(255,255,255,.78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.intake-oauth-head {
    display: grid;
    gap: 3px;
    text-align: center;
}
.intake-oauth-head strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}
.intake-oauth-head span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}
.intake-oauth-actions {
    display: grid;
    gap: 10px;
    width: min(100%, 500px);
    justify-self: center;
}
.intake-oauth-card .oauth-provider-button {
    min-height: 56px;
    font-size: clamp(16px, 1.7vw, 19px);
}
.intake-oauth-card .intake-email-disclosure {
    display: grid;
    width: min(100%, 480px);
    justify-self: center;
    justify-items: center;
    margin-inline: auto;
}
.intake-oauth-card .intake-email-disclosure .email-provider-button {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
    padding-left: 76px;
    padding-right: 76px;
}
.intake-oauth-card .intake-email-disclosure .email-provider-button::-webkit-details-marker,
.intake-oauth-card .intake-email-disclosure .email-provider-button::marker {
    display: none;
    content: "";
}
.intake-email-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(20,50,74,.06);
}
.intake-email-fields .passwordless-intake-note {
    grid-column: 1 / -1;
    margin: 0;
}
.intake-oauth-card .login-separator {
    margin: 2px 0 0;
}
.coord-card .account-email-locked {
    margin: 0;
}
.alimony-section {
    border-color: rgba(196, 142, 63, .22);
    background: linear-gradient(135deg, rgba(255, 250, 241, .74), rgba(255, 255, 255, .98));
}
.alimony-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.alimony-choice {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-content: start;
    align-items: start;
    column-gap: 14px;
    row-gap: 6px;
    min-height: 112px;
    border-color: rgba(13, 95, 147, .16);
    box-shadow: 0 14px 36px rgba(20, 50, 74, .045);
}
.alimony-choice input {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 3px;
}
.alimony-choice strong {
    grid-column: 2;
    display: block;
    color: var(--ink);
    font-size: clamp(16px, 1.4vw, 18px);
    line-height: 1.22;
}
.alimony-step-number {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef7fb;
    color: var(--blue);
    font-size: 15px;
    font-weight: 950;
}
.alimony-choice span {
    grid-column: 2;
    display: block;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}
.alimony-amount-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.alimony-amount-grid label {
    padding: 16px;
    border: 1px solid rgba(38, 153, 112, .22);
    border-radius: 10px;
    background: rgba(242, 251, 247, .8);
}
@media (max-width: 900px) {
    .coord-card,
    .coord-card-situation,
    .coord-field-grid.two,
    .coord-field-grid.contact,
    .coord-field-grid.address,
    .intake-email-fields,
    .alimony-choice-grid,
    .alimony-amount-grid {
        grid-template-columns: 1fr;
    }
    .previous-address-grid {
        grid-template-columns: minmax(0, 1fr) minmax(92px, .34fr);
    }
    .previous-address-grid label:nth-child(1),
    .previous-address-grid .previous-city-field,
    .previous-address-grid label:nth-child(5),
    .previous-address-grid .previous-move-date-field {
        grid-column: 1 / -1;
    }
    .coord-card {
        padding: 16px;
        border-radius: 10px;
    }
    .coord-card-head {
        gap: 10px;
    }
    .coord-card-head > span {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }
    .coord-sub-option .check-row,
    .coord-card-access .generate-password {
        width: 100%;
    }
}
.transmission-context-banner {
    border-color: #bfe2d1;
    border-left-color: #1f8c62;
    background: linear-gradient(135deg, #f3fbf7, #ffffff);
}
.transmission-context-banner strong {
    color: #1f8c62;
}
.decision-zone {
    display: grid;
    gap: 14px;
}
.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.choice-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
    display: grid;
    gap: 8px;
    cursor: pointer;
    min-height: 88px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.choice-card input { width: auto; min-height: auto; }
.choice-card:has(input:checked) {
    border-color: #9dcbe4;
    background: var(--blue-soft);
    color: var(--blue);
}
.choice-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    min-width: 0;
}
.premium-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.premium-choice-grid .choice-card {
    min-height: 116px;
    align-content: center;
    padding: 20px;
    border-color: #d5e3eb;
    box-shadow: 0 12px 30px rgba(20,50,74,.045);
}
.premium-choice-grid .choice-card:has(input:checked) {
    border-color: #8ec3df;
    background: linear-gradient(135deg, #eef8fd, #fff);
    box-shadow: 0 16px 38px rgba(13,95,147,.10);
}
.premium-choice-grid .choice-card span {
    display: block;
    margin-left: 28px;
    margin-top: -4px;
}
.document-mode-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.document-mode-card {
    position: relative;
    min-height: 188px;
    border: 1px solid #d5e4ec;
    border-radius: 14px;
    background: #fff;
    padding: 28px 22px 22px 78px;
    display: grid;
    align-content: center;
    gap: 9px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.document-mode-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.document-mode-card:hover {
    transform: translateY(-1px);
    border-color: #9dcbe4;
    box-shadow: 0 16px 38px rgba(20,50,74,.10);
}
.document-mode-card:has(input:checked) {
    border-color: #86bfdd;
    background: linear-gradient(180deg, #f5fbfe, #ffffff);
    box-shadow: 0 18px 42px rgba(13,95,147,.13);
}
.document-mode-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid #cde3ee;
    background: #f6fbfd;
    color: var(--blue);
    font-weight: 950;
}
.document-mode-icon.file-stack::before,
.document-mode-icon.file-stack::after {
    content: "";
    position: absolute;
    border-radius: 4px;
    border: 2px solid currentColor;
    background: #f6fbfd;
}
.document-mode-icon.file-stack::before {
    width: 18px;
    height: 23px;
    transform: translate(3px, 2px);
    opacity: .55;
}
.document-mode-icon.file-stack::after {
    width: 18px;
    height: 23px;
    transform: translate(-3px, -2px);
    box-shadow: inset 0 7px 0 rgba(13,95,147,.08);
}
.document-mode-card:has(input:checked) .document-mode-icon {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.document-mode-card:has(input:checked) .document-mode-icon.file-stack::before,
.document-mode-card:has(input:checked) .document-mode-icon.file-stack::after {
    background: var(--blue);
}
.document-mode-card strong {
    color: var(--ink);
    max-width: 360px;
    padding-right: 96px;
    font-size: clamp(22px, 1.55vw, 28px);
    line-height: 1.14;
}
.document-mode-card small {
    max-width: 560px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}
.document-mode-badge {
    position: absolute;
    right: 18px;
    top: 18px;
    border-radius: 999px;
    background: #fff4de;
    color: var(--gold);
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.canton-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.canton-card { align-items: center; justify-items: center; text-align: center; }
.canton-card img {
    width: 72px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.two-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-choice { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.unsupported-canton {
    max-width: 980px;
    padding: 0;
    overflow: hidden;
}
.unsupported-canton summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: clamp(16px, 1.8vw, 22px);
    cursor: pointer;
    list-style: none;
}
.unsupported-canton summary::-webkit-details-marker {
    display: none;
}
.unsupported-canton .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff4de;
    color: var(--gold);
    font-weight: 950;
    transform: rotate(0deg);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}
.unsupported-canton[open] .collapse-arrow {
    transform: rotate(90deg);
    background: var(--blue);
    color: #fff;
}
.unsupported-canton summary strong {
    display: block;
    font-size: clamp(22px, 1.8vw, 30px);
    line-height: 1.2;
}
.unsupported-canton-body {
    padding: 0 clamp(16px, 1.8vw, 22px) clamp(18px, 2vw, 26px);
}
.unsupported-canton-body > p {
    max-width: 980px;
    margin: 0 0 18px;
    line-height: 1.45;
}
.other-canton-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.unsupported-canton .choice-card {
    min-height: 74px;
    padding: 14px 16px;
    align-items: center;
}
.unsupported-canton label:not(.choice-card) {
    margin-top: 12px;
}
.unsupported-canton .lead-submit {
    margin-top: 10px;
}
.canton-grid {
    grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1fr);
}
.wizard-canton-step {
    gap: clamp(22px, 3vw, 30px);
}
.wizard-step-heading {
    display: grid;
    gap: 10px;
    max-width: 820px;
}
.wizard-step-heading h2 {
    margin: 0;
    font-size: clamp(36px, 4.2vw, 58px);
    line-height: 1.04;
}
.wizard-step-heading .note {
    margin: 0;
    max-width: 780px;
    font-size: clamp(17px, 1.7vw, 23px);
}
.step-kicker {
    width: fit-content;
    border: 1px solid #d9e7ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--gold);
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.premium-canton-grid {
    grid-template-columns: repeat(2, minmax(280px, 420px));
    gap: 18px;
    align-items: stretch;
}
.premium-canton-grid .canton-card {
    position: relative;
    min-height: 238px;
    padding: 24px;
    border-color: #d6e5ed;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 18px 42px rgba(20,50,74,.07);
    align-content: center;
    gap: 12px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.premium-canton-grid .canton-card:hover {
    transform: translateY(-2px);
    border-color: #a9d0e5;
    box-shadow: 0 22px 52px rgba(20,50,74,.11);
}
.premium-canton-grid .canton-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.premium-canton-grid .choice-indicator {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #9fb4c3;
    background: #fff;
    box-shadow: inset 0 0 0 5px #fff;
}
.premium-canton-grid .canton-card:has(input:checked) {
    border-color: #83c0df;
    background: linear-gradient(180deg, #f1f9fd, #ffffff);
    color: var(--ink);
    box-shadow: 0 24px 62px rgba(13,95,147,.14);
}
.premium-canton-grid .canton-card:has(input:checked) .choice-indicator {
    border-color: var(--blue);
    background: var(--blue);
}
.canton-flag-wrap,
.canton-flag-placeholder {
    width: 92px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(20,50,74,.08);
}
.premium-canton-grid .canton-card img {
    width: 72px;
    border: 0;
    border-radius: 5px;
}
.canton-flag-placeholder {
    color: var(--blue);
    background: #f6fbfd;
    font-size: 24px;
    font-weight: 950;
}
.premium-canton-grid .canton-card strong {
    display: block;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.15;
}
.premium-canton-grid .canton-card small {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 750;
}
.canton-card.supported {
    min-height: 122px;
    border-color: #9dcbe4;
    background: linear-gradient(180deg, #ffffff, #eff8fc);
    box-shadow: 0 18px 42px rgba(13,95,147,.12);
}
.other-canton-card {
    align-content: center;
}
.premium-canton-grid .canton-card.supported,
.premium-canton-grid .other-canton-card {
    min-height: 238px;
}
.premium-canton-grid .canton-card.supported {
    border-color: #83c0df;
    background: linear-gradient(180deg, #f1f9fd, #ffffff);
    box-shadow: 0 24px 62px rgba(13,95,147,.14);
}
.premium-canton-grid .other-canton-card {
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
}
.canton-admin-panel {
    margin-bottom: 18px;
}
.canton-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.canton-admin-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: -2px;
}
.canton-admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, #f8fbfd);
    padding: 16px;
    display: grid;
    gap: 12px;
    cursor: grab;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.canton-admin-card:active {
    cursor: grabbing;
}
.canton-admin-card.is-dragging {
    opacity: .55;
    transform: scale(.985);
    box-shadow: 0 22px 52px rgba(16, 43, 66, .18);
}
.canton-admin-card.is-available {
    border-color: #bfe3cf;
    background: linear-gradient(135deg, #f3fbf7, #fff);
}
.canton-admin-card-new {
    margin-top: 14px;
    max-width: 720px;
    cursor: default;
}
.canton-admin-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}
.canton-drag-handle {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0 0 8px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--blue);
    font-weight: 950;
    cursor: grab;
}
.canton-admin-head strong,
.canton-admin-head span {
    display: block;
}
.canton-admin-head strong {
    color: var(--ink);
    font-size: 20px;
}
.canton-admin-head span {
    color: var(--muted);
    font-weight: 850;
}
.canton-admin-head select {
    max-width: 150px;
    min-height: 42px;
}
.wizard-client-type-step {
    gap: clamp(22px, 3vw, 30px);
}
.choice-grid.client-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.client-type-grid .client-type-card {
    position: relative;
    display: grid;
    min-height: 258px;
    padding: 30px 24px 26px;
    border-color: #d6e5ed;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 18px 42px rgba(20,50,74,.07);
    align-content: center;
    justify-items: start;
    gap: 12px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.client-type-grid .client-type-card:hover {
    transform: translateY(-2px);
    border-color: #a9d0e5;
    box-shadow: 0 22px 52px rgba(20,50,74,.11);
}
.client-type-grid .client-type-card.is-unavailable,
.client-type-grid .client-type-card.is-unavailable:hover {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    border-color: #d6e5ed;
    box-shadow: 0 18px 42px rgba(20,50,74,.07);
}
.client-type-grid .client-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.client-type-grid .choice-indicator {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #9fb4c3;
    background: #fff;
    box-shadow: inset 0 0 0 5px #fff;
}
.client-type-grid .client-type-card:has(input:checked) {
    border-color: #83c0df;
    background: linear-gradient(180deg, #f1f9fd, #ffffff);
    color: var(--ink);
    box-shadow: 0 24px 62px rgba(13,95,147,.14);
}
.client-type-grid .client-type-card.private:has(input:checked) {
    border-color: #8fd6b8;
    background:
        linear-gradient(180deg, rgba(241,250,245,.92), rgba(255,255,255,.98)),
        linear-gradient(135deg, rgba(45,138,98,.12), rgba(13,95,147,.05));
    box-shadow:
        0 0 0 1px rgba(45,138,98,.18),
        0 24px 62px rgba(45,138,98,.13);
}
.client-type-grid .client-type-card.private:has(input:checked)::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.68);
}
.client-type-grid .client-type-card:has(input:checked) .choice-indicator {
    border-color: var(--blue);
    background: var(--blue);
}
.client-type-grid .client-type-card.private:has(input:checked) .choice-indicator {
    border-color: var(--ok);
    background: var(--ok);
}
.client-type-grid .client-type-card.independent:has(input:checked),
.client-type-grid .client-type-card.company:has(input:checked) {
    border-color: rgba(196, 142, 63, .72);
    background: linear-gradient(180deg, #fff9ed, #ffffff);
    box-shadow:
        0 0 0 1px rgba(196, 142, 63, .18),
        0 22px 54px rgba(105, 73, 28, .1);
}
.client-type-grid .client-type-card.independent:has(input:checked) .choice-indicator,
.client-type-grid .client-type-card.company:has(input:checked) .choice-indicator {
    border-color: var(--gold);
    background: var(--gold);
}
.client-type-unavailable {
    border-color: rgba(196, 142, 63, .42);
    background: #fff9ed;
}
.client-type-unavailable strong {
    color: var(--ink);
}
.client-type-unavailable p {
    margin-bottom: 0;
    color: #8a632a;
    font-weight: 760;
}
.client-type-grid .client-type-card strong {
    display: block;
    max-width: 100%;
    margin-top: 6px;
    color: var(--ink);
    font-size: clamp(21px, 1.7vw, 28px);
    line-height: 1.16;
}
.client-type-grid .client-type-card small {
    max-width: 100%;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
}
.client-type-icon {
    position: relative;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gold);
    box-shadow: none;
}
.client-type-icon::before,
.client-type-icon::after {
    content: "";
    position: absolute;
    display: block;
}
.client-type-card.private .client-type-icon::before {
    top: 8px;
    left: 50%;
    width: 18px;
    height: 18px;
    border: 4px solid currentColor;
    border-radius: 999px;
    transform: translateX(-50%);
}
.client-type-card.private .client-type-icon::after {
    bottom: 8px;
    left: 50%;
    width: 42px;
    height: 27px;
    border: 4px solid currentColor;
    border-bottom: 0;
    border-radius: 30px 30px 0 0;
    transform: translateX(-50%);
}
.client-type-card.independent .client-type-icon::before {
    left: 50%;
    bottom: 11px;
    width: 42px;
    height: 30px;
    border: 4px solid currentColor;
    border-radius: 7px;
    transform: translateX(-50%);
}
.client-type-card.independent .client-type-icon::after {
    left: 50%;
    top: 12px;
    width: 22px;
    height: 14px;
    border: 4px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    transform: translateX(-50%);
}
.client-type-card.company .client-type-icon::before {
    left: 50%;
    bottom: 8px;
    width: 42px;
    height: 44px;
    border: 4px solid currentColor;
    border-radius: 6px;
    background:
        linear-gradient(currentColor, currentColor) 10px 10px / 6px 6px no-repeat,
        linear-gradient(currentColor, currentColor) 26px 10px / 6px 6px no-repeat,
        linear-gradient(currentColor, currentColor) 10px 24px / 6px 6px no-repeat,
        linear-gradient(currentColor, currentColor) 26px 24px / 6px 6px no-repeat;
    transform: translateX(-50%);
}
.client-type-card.company .client-type-icon::after {
    left: 50%;
    bottom: 8px;
    width: 10px;
    height: 16px;
    background: currentColor;
    border-radius: 3px 3px 0 0;
    transform: translateX(-50%);
}
.income-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.income-grid .choice-card {
    align-content: start;
}
.income-grid .choice-card span {
    margin-left: 0;
}
.childcare-choice,
.education-expense-choice {
    position: relative;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 18px;
    min-height: 108px;
    margin-top: 14px;
    padding: 20px 22px;
    border-color: #d8e8ef;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 16px 38px rgba(20,50,74,.06);
}
.childcare-choice input,
.education-expense-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.childcare-choice:has(input:checked),
.education-expense-choice:has(input:checked) {
    border-color: #8fd6b8;
    background: linear-gradient(180deg, #f2fbf6, #ffffff);
    color: var(--ink);
    box-shadow:
        0 0 0 1px rgba(45,138,98,.14),
        0 20px 46px rgba(45,138,98,.11);
}
.childcare-icon {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #f3fbf7;
    color: var(--ok);
}
.childcare-icon::before,
.childcare-icon::after {
    content: "";
    position: absolute;
    display: block;
}
.childcare-icon::before {
    left: 14px;
    top: 11px;
    width: 20px;
    height: 18px;
    border: 4px solid currentColor;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
}
.childcare-icon::after {
    left: 11px;
    bottom: 10px;
    width: 28px;
    height: 23px;
    border: 4px solid currentColor;
    border-radius: 7px;
}
.education-expense-icon {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #f3fbf7;
    color: var(--ok);
}
.education-expense-icon::before,
.education-expense-icon::after {
    content: "";
    position: absolute;
    display: block;
}
.education-expense-icon::before {
    left: 14px;
    top: 11px;
    width: 24px;
    height: 31px;
    border: 4px solid currentColor;
    border-radius: 5px;
}
.education-expense-icon::after {
    left: 20px;
    top: 22px;
    width: 13px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 9px 0 currentColor;
}
.childcare-copy {
    display: grid;
    gap: 5px;
}
.childcare-copy strong {
    color: var(--ink);
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.15;
}
.childcare-copy small {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 750;
}
.childcare-check {
    position: relative;
    width: 30px;
    height: 30px;
    border: 2px solid #a8bdca;
    border-radius: 9px;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
}
.childcare-choice:has(input:checked) .childcare-check,
.education-expense-choice:has(input:checked) .childcare-check {
    border-color: var(--ok);
    background: var(--ok);
}
.childcare-choice:has(input:checked) .childcare-check::after,
.education-expense-choice:has(input:checked) .childcare-check::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 5px;
    width: 9px;
    height: 15px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.soft-block {
    border: 1px solid #ecd1aa;
    border-radius: var(--radius);
    background: #fff8ef;
    padding: 16px;
    display: grid;
    gap: 10px;
}
.securities-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 18px;
    align-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    padding: 22px;
    box-shadow: 0 14px 34px rgba(20,50,74,.06);
}
.securities-intro h3 {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.5vw, 30px);
}
.securities-intro p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.premium-toggle {
    min-height: 82px;
    border: 1px solid #cfe3ec;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
}
.premium-toggle input {
    position: absolute;
    opacity: 0;
}
.premium-toggle span {
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: #dce8ef;
    position: relative;
    flex: 0 0 auto;
    transition: background .18s ease;
}
.premium-toggle span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20,50,74,.18);
    transition: transform .18s ease;
}
.premium-toggle input:checked + span {
    background: var(--blue);
}
.premium-toggle input:checked + span::after {
    transform: translateX(18px);
}
.premium-toggle strong {
    color: var(--ink);
    font-size: 18px;
    display: grid;
    gap: 3px;
}
.premium-toggle strong small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.health-insurance-section {
    display: grid;
    gap: 14px;
}
.health-insurance-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    border-left: 0;
}
.health-insurance-details .premium-toggle {
    min-height: 128px;
    align-items: flex-start;
}
.deduction-question-card {
    margin-top: 14px;
    border-color: #cfe5d9;
    background: linear-gradient(135deg, #f5fbf8, #ffffff);
}
.securities-fields {
    display: grid;
    gap: 14px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    padding: 18px;
}
.soft-price-note {
    border: 1px solid #ead2ad;
    border-radius: 12px;
    background: #fffaf2;
    padding: 14px 16px;
}
.soft-price-note strong {
    color: var(--gold);
}
.soft-price-note p {
    margin: 5px 0 0;
    color: #385a72;
    line-height: 1.45;
}
.securities-count-field {
    max-width: 460px;
}
.compact-note {
    max-width: 760px;
}
.service-option-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 18px;
    align-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    padding: 22px;
    box-shadow: 0 14px 34px rgba(20,50,74,.06);
}
.service-option-card h3 {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.5vw, 30px);
}
.service-option-card p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.delay-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.delay-card {
    position: relative;
    min-height: 176px;
    border: 1px solid #d5e4ec;
    border-radius: 14px;
    background: #fff;
    padding: 22px;
    display: grid;
    align-content: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.delay-card input {
    position: absolute;
    opacity: 0;
}
.delay-card:hover {
    transform: translateY(-1px);
    border-color: #9dcbe4;
    box-shadow: 0 16px 38px rgba(20,50,74,.10);
}
.delay-card:has(input:checked) {
    border-color: #86bfdd;
    background: linear-gradient(180deg, #f5fbfe, #ffffff);
    box-shadow: 0 18px 42px rgba(13,95,147,.13);
}
.delay-card:has(input:checked)::after {
    content: "✓";
    position: absolute;
    right: 18px;
    top: 16px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.delay-kicker {
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.delay-card strong {
    color: var(--ink);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.12;
}
.delay-card small {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}
.deadline-assurance {
    display: block;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid rgba(38, 153, 112, .24);
    border-left: 4px solid #1f8c62;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(242, 251, 247, .96), rgba(255, 255, 255, .98));
    color: #1f6f53;
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.42;
}
.delay-card.featured {
    background: linear-gradient(180deg, #fffdf8, #ffffff);
}
.transmission-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.flow-choice-card {
    position: relative;
    min-height: 178px;
    border: 1px solid #d5e4ec;
    border-radius: 14px;
    background: #fff;
    padding: 58px 24px 24px;
    display: grid;
    align-content: start;
    gap: 10px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.flow-choice-card input {
    position: absolute;
    opacity: 0;
}
.flow-choice-card:hover {
    transform: translateY(-1px);
    border-color: #9dcbe4;
    box-shadow: 0 16px 38px rgba(20,50,74,.10);
}
.flow-choice-card:has(input:checked) {
    border-color: #86bfdd;
    background: linear-gradient(180deg, #f5fbfe, #ffffff);
    box-shadow: 0 18px 42px rgba(13,95,147,.13);
}
.flow-choice-card:has(input:checked)::after {
    content: "✓";
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.flow-choice-card strong {
    max-width: calc(100% - 54px);
    color: var(--ink);
    font-size: clamp(24px, 2.5vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
}
.flow-choice-card small {
    max-width: min(560px, calc(100% - 44px));
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}
.flow-choice-card em {
    color: var(--gold);
    font-style: normal;
    font-weight: 900;
    font-size: 15px;
}
.payment-note-card {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #f7fbfd;
    padding: 16px 18px;
    color: #385a72;
    line-height: 1.5;
    font-weight: 750;
}
.payment-focus-panel {
    display: grid;
    gap: 24px;
}
.account-payment-center {
    gap: 20px;
}
.payment-focus-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 22px;
    align-items: stretch;
}
.payment-focus-head h1 {
    margin-bottom: 12px;
}
.payment-focus-head p {
    max-width: 780px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.5;
}
.payment-amount-card {
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbfd, #fff);
    padding: 22px;
    display: grid;
    align-content: center;
    gap: 8px;
    box-shadow: 0 16px 42px rgba(20,50,74,.08);
}
.payment-amount-card span,
.payment-amount-card small {
    color: var(--muted);
    font-weight: 800;
}
.payment-amount-card strong {
    color: var(--blue);
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1;
}
.payment-path-card {
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: #fff;
    padding: 22px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.payment-path-card.paid {
    border-color: #bfe2d1;
    background: linear-gradient(180deg, #f4fbf7, #fff);
}
.payment-path-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #e8f5fb;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 24px;
}
.payment-path-card.paid .payment-path-icon {
    background: #1f8c62;
    color: #fff;
}
.payment-path-card strong {
    color: var(--ink);
    font-size: clamp(22px, 2.4vw, 30px);
}
.payment-path-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}
.payment-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.payment-main-cta {
    font-size: 18px;
    padding: 16px 22px;
}
.attention-callout {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border: 1px solid #efcaca;
    border-left: 5px solid var(--danger);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff8f8, #ffffff);
    padding: 16px 18px;
    box-shadow: 0 14px 34px rgba(184,64,64,.08);
}
.attention-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 0 0 5px rgba(184,64,64,.11);
}
.attention-callout strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
    margin-bottom: 4px;
}
.attention-callout p {
    margin: 0;
    color: #536f82;
    line-height: 1.5;
    font-weight: 700;
}
.documents-alert {
    margin-bottom: 4px;
}
.payment-helper-note {
    margin: 0;
    border-left: 4px solid #1f8c62;
    border-radius: 12px;
    background: #f4fbf7;
    padding: 16px 18px;
    color: #31576c;
    line-height: 1.5;
    font-weight: 750;
}
.active-case-mini {
    margin: 14px 0 0;
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #f7fbfd;
    padding: 11px 13px;
    color: var(--muted);
}
.active-case-mini strong { color: var(--ink); }
.active-case-mini a { color: var(--blue); font-weight: 900; }
.active-case-mini button {
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
}
.account-payment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.account-payment-summary div {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8fbfd);
    padding: 16px;
}
.account-payment-summary span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}
.account-payment-summary strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: clamp(22px, 2.2vw, 32px);
}
.invoice-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.invoice-filter-tabs button {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    padding: 9px 13px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.invoice-filter-tabs button.active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}
.invoice-section {
    display: grid;
    gap: 12px;
}
.invoice-section h2 { margin: 0; }
.account-invoice-list {
    display: grid;
    gap: 10px;
}
.account-invoice-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    padding: 15px;
}
.account-invoice-card > div {
    display: grid;
    gap: 4px;
}
.account-invoice-card > div:last-child { justify-items: end; }
.account-invoice-card strong { color: var(--ink); }
.account-invoice-card small { color: var(--muted); }
.invoice-state {
    width: fit-content;
    border-radius: 999px;
    background: #fff5ea;
    color: #bd7128;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 900;
}
.invoice-state.paid { background: #eaf7ef; color: #1f8c62; }
.paid-invoices-section {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    padding: 0;
    overflow: hidden;
}
.paid-invoices-section summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    cursor: pointer;
    font-weight: 900;
    color: var(--ink);
}
.paid-invoices-section summary span { color: var(--muted); }
.paid-invoices-section .account-invoice-list { padding: 0 15px 15px; }
.account-invoice-card.is-hidden { display: none; }
.field-error {
    margin: -6px 0 0;
    color: var(--danger);
    font-weight: 750;
}
.field-invalid {
    border-color: #d16b6b !important;
    box-shadow: 0 0 0 4px rgba(184,64,64,.10) !important;
}
.field-help-error {
    color: var(--danger);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
}
.password-field {
    position: relative;
    display: block;
}
.password-field input { padding-right: 46px; }
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--blue);
    cursor: pointer;
}
.password-toggle:hover { background: var(--blue-soft); }
.eye-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 12px;
    margin: 0 auto;
    border: 2px solid currentColor;
    border-radius: 999px 999px 999px 999px / 700px 700px 700px 700px;
}
.eye-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}
.password-toggle.is-visible .eye-icon::after {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    top: 50%;
    height: 2px;
    background: currentColor;
    transform: rotate(-35deg);
}
.generate-password {
    justify-self: start;
}
.dynamic-list {
    display: grid;
    gap: 10px;
}
.intake-section {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,253,.94)),
        #fff;
    box-shadow: 0 14px 34px rgba(20,50,74,.06);
}
.section-heading {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    position: relative;
    padding-left: 14px;
}
.section-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--gold));
}
.section-heading h3 {
    margin: 0;
    font-size: 18px;
    color: var(--ink);
}
.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}
.compact-number {
    max-width: 420px;
}
.dynamic-row {
    display: grid;
    grid-template-columns: 140px repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdfe;
}
.dynamic-row.dependent-row {
    grid-template-columns: 110px repeat(5, minmax(0, 1fr));
}
.dynamic-row.child-row {
    grid-template-columns: 110px repeat(4, minmax(0, 1fr));
}
.dynamic-row.salary-row {
    grid-template-columns: minmax(180px, .7fr) minmax(0, 2fr) minmax(170px, .75fr);
    align-items: start;
    gap: 18px;
    padding: 18px;
    border-color: #d9e8ee;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbfd, #fff);
}
.salary-row > strong { padding-top: 24px; line-height: 1.35; }
.salary-work-address { min-width: 0; }
.salary-work-address-title { display: block; margin-bottom: 8px; color: #15445d; font-size: 14px; font-weight: 800; }
.salary-work-address-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(68px, .45fr) minmax(80px, .55fr) minmax(0, 1fr) minmax(0, .85fr); gap: 8px; }
.salary-work-address-grid label, .salary-commute-field, .salary-employer-field { display: grid; align-content: start; gap: 7px; min-width: 0; color: #466475; font-size: 13px; font-weight: 700; }
.salary-work-address-grid input, .salary-commute-field select, .salary-employer-field input { width: 100%; min-width: 0; }
.salary-row:has(.salary-employer-field) { grid-template-columns: minmax(150px, .55fr) minmax(160px, .8fr) minmax(0, 2fr) minmax(170px, .7fr); }
@media(max-width:1300px) { .dynamic-row.salary-row, .salary-row:has(.salary-employer-field) { grid-template-columns: minmax(150px, .65fr) minmax(0, 2fr); } .salary-work-address { grid-column: 1 / -1; grid-row: 2; } .salary-row > strong { padding-top: 0; } }
@media(max-width:760px) { .salary-work-address-grid { grid-template-columns: minmax(0, 1fr) minmax(76px, .4fr); } .salary-work-address-grid label:nth-child(n+3) { grid-column: 1 / -1; } }
.case-commute-review { margin-top: 24px; padding: clamp(18px, 2vw, 26px); border: 1px solid #d6e8ef; border-radius: 20px; background: linear-gradient(135deg, #f7fbfd, #fff 72%); }
.case-commute-review-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.case-commute-review-head h3 { margin: 4px 0 0; color: #123e55; font-size: clamp(21px, 2vw, 26px); }
.case-commute-review-head small, .case-commute-origin, .case-commute-footnote { color: #627e8d; }
.case-commute-origin { margin: 16px 0 20px; }
.case-commute-origin strong { display: block; color: #174960; }
.case-commute-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 14px; }
.case-commute-card { min-width: 0; padding: 20px; border: 1px solid #dceaf0; border-radius: 17px; background: #fff; box-shadow: 0 12px 30px rgba(19, 63, 83, .05); }
.case-commute-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.case-commute-card-head div { display: grid; gap: 3px; }
.case-commute-card-head strong { color: #123e55; }
.case-commute-card-head div span, .case-commute-destination small { color: #637f8e; font-size: 13px; }
.case-commute-status { flex: none; padding: 6px 10px; border-radius: 999px; background: #e8f5ef; color: #216d52; font-size: 12px; font-weight: 800; }
.case-commute-status.needs-review { background: #fff2df; color: #956021; }
.case-commute-destination { display: grid; gap: 3px; margin: 17px 0; }
.case-commute-destination strong { color: #234e64; font-size: 15px; }
.case-commute-distance { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 12px; background: #eef7fa; }
.case-commute-distance span { color: #4d6f81; font-size: 13px; }
.case-commute-distance strong { color: #0d5d80; font-size: 20px; white-space: nowrap; }
.case-commute-hint { margin: 11px 0 0; color: #805b2c; font-size: 13px; }
.case-commute-original { display: block; margin-top: 9px; color: #607d8c; }
.case-commute-form { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 10px; margin-top: 17px; }
.case-commute-form label { display: grid; gap: 7px; min-width: 0; color: #476879; font-size: 13px; font-weight: 700; }
.case-commute-form input { width: 100%; min-width: 0; min-height: 43px; }
.case-commute-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.case-commute-footnote { margin: 18px 0 0; font-size: 13px; }
@media(max-width:760px) { .case-commute-review-head, .case-commute-card-head { flex-direction: column; align-items: start; } .case-commute-form { grid-template-columns: 1fr; } }
.dynamic-row.estate-row {
    grid-template-columns: 110px minmax(170px, .8fr) minmax(120px, .45fr) minmax(180px, 1fr) minmax(170px, .75fr);
}
.estate-city-field {
    display: grid;
    gap: 0;
}
.dynamic-row.compact-row input,
.dynamic-row.child-row input,
.dynamic-row.child-row select,
.dynamic-row.salary-row input,
.dynamic-row.salary-row select,
.dynamic-row.dependent-row input,
.dynamic-row.estate-row input,
.dynamic-row.estate-row select {
    min-height: 40px;
}
.rent-field.rent-field-attention {
    position: relative;
    padding: 12px;
    border: 1px solid rgba(196, 142, 63, .46);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 250, 241, .96), rgba(255, 255, 255, .98));
    box-shadow: 0 16px 36px rgba(196, 142, 63, .12);
    animation: rentFieldPulse 1.8s ease-in-out 2;
}
.rent-field.rent-field-attention input[name="rent_monthly"] {
    border-color: rgba(196, 142, 63, .7);
    background: #fffdfa;
    box-shadow: 0 0 0 4px rgba(196, 142, 63, .12);
}
@keyframes rentFieldPulse {
    0%, 100% { border-color: rgba(196, 142, 63, .42); box-shadow: 0 16px 36px rgba(196, 142, 63, .12); }
    50% { border-color: rgba(15, 105, 156, .62); box-shadow: 0 18px 42px rgba(15, 105, 156, .16); }
}
@media (prefers-reduced-motion: reduce) {
    .rent-field.rent-field-attention {
        animation: none;
    }
}
.progressive-panel {
    background: linear-gradient(135deg, #f3f9fc, #fff);
    border-color: #bcd9e8;
    border-left: 5px solid #8ec3df;
}
.unemployment-income-note,
.income-context-note {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(38, 153, 112, .24);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(242, 251, 247, .98), rgba(255, 255, 255, .98));
    color: var(--muted);
    font-weight: 760;
    line-height: 1.4;
}
.unemployment-income-note {
    margin-top: 12px;
    margin-bottom: 14px;
}
.unemployment-income-note strong,
.income-context-note strong {
    color: #147653;
    font-weight: 950;
}
.deductions-choice-grid {
    margin-bottom: 4px;
}
.settings-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdfe;
    overflow: hidden;
}
.settings-group summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 900;
    color: var(--ink);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.settings-group summary::-webkit-details-marker { display: none; }
.settings-group summary::after {
    content: "›";
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    transform: rotate(90deg);
    transition: transform .18s ease;
}
.settings-group[open] summary::after {
    transform: rotate(-90deg);
}
.settings-group label {
    margin: 0 16px 14px;
}
.section-subtitle {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.delivery-advice {
    border: 1px solid #cfe5d9;
    border-radius: var(--radius);
    background: #f2fbf6;
    padding: 14px 16px;
}
.delivery-advice strong { color: var(--ok); }
.delivery-advice p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.post-advice {
    border-color: #ead2ad;
    background: #fff8ef;
}
.post-advice strong { color: #9b6924; }
.document-mode-choice {
    margin-bottom: 4px;
}
.guided-document-options {
    display: grid;
    gap: 14px;
}
.housing-other-field {
    grid-column: 1 / -1;
}
.document-choice-helper {
    display: grid;
    gap: 5px;
    border: 1px solid #bfe2d1;
    border-left: 5px solid #1f8c62;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3fbf7, #ffffff);
    padding: 15px 17px;
}
.document-choice-helper strong {
    color: #1f8c62;
    font-size: clamp(18px, 2vw, 22px);
}
.document-choice-helper span {
    color: var(--muted);
    line-height: 1.45;
}
.document-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.document-select-data {
    display: none;
}
.document-select-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.document-select-group[hidden] {
    display: none;
}
.document-select-group h3 {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: var(--ink);
    font-size: 18px;
}
.document-select-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.document-select-card input {
    width: auto;
    min-height: auto;
    margin-top: 4px;
}
.document-select-card span {
    justify-self: start;
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.document-select-card strong {
    grid-column: 2;
    color: var(--ink);
}
.document-select-card.obligatoire {
    border-color: #b9d9e9;
    background: #f5fbfe;
}
.document-select-card.recommande span {
    background: #fff4df;
    color: #9b6924;
}
.document-select-card.optionnel span {
    background: #f4f8fb;
    color: #587388;
}
.document-select-card.badge-required span {
    background: var(--blue-soft);
    color: var(--blue);
}
.document-select-card.badge-if-relevant span {
    background: #fff4df;
    color: #9b6924;
}
.document-select-card.badge-useful span {
    background: #f4f8fb;
    color: #587388;
}
.document-personal-count {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    border-radius: 999px;
    padding: 7px 10px;
    background: #f2fbf6;
    color: var(--ok);
    font-size: 13px;
    font-weight: 950;
}
.tariff-alert {
    border-color: #ead2ad;
    background: #fffaf2;
}
.tariff-alert h2 { margin-bottom: 8px; }
.tariff-alert .doc-list { margin-top: 14px; }
.summary-box {
    display: grid;
    gap: 16px;
}
.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.summary-cards div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
}
.summary-box span,
.summary-cards span { display: block; color: var(--muted); font-size: 13px; }
.summary-box strong,
.summary-cards strong { display: block; margin-top: 4px; }
.wizard h1, .dashboard-shell h1 { font-size: clamp(30px, 4vw, 48px); }
.price-box {
    position: sticky;
    top: 96px;
    padding: 24px;
}
@media (min-width: 901px) {
    .wizard-v2 .price-box {
        position: fixed;
        top: 92px;
        right: clamp(20px, 4vw, 46px);
        width: 340px;
        max-height: calc(100vh - 112px);
        overflow: auto;
        z-index: 4;
    }
}
.mobile-price-float {
    display: none;
}
#quote-lines { display: grid; gap: 10px; margin: 18px 0; }
#quote-lines div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
#quote-total { display: block; font-size: 34px; color: var(--blue); margin: 16px 0; }
.price-note {
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background: #f5fafc;
    padding: 14px;
    margin: 16px 0;
}
.price-note strong { color: var(--blue); }
.price-note p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-grid label {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.choice-grid span { margin-left: auto; color: var(--gold); font-size: 12px; }
.choice-grid.premium-choice-grid label.choice-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 8px 12px;
    min-height: 116px;
    padding: 20px;
    border-color: #d5e3eb;
    box-shadow: 0 12px 30px rgba(20,50,74,.045);
}
.choice-grid.premium-choice-grid label.choice-card:has(input:checked) {
    border-color: #8ec3df;
    background: linear-gradient(135deg, #eef8fd, #fff);
    box-shadow: 0 16px 38px rgba(13,95,147,.10);
}
.choice-grid.premium-choice-grid label.choice-card span {
    grid-column: 2;
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-shell { padding: clamp(20px, 4vw, 46px); display: grid; gap: 22px; }
.case-workstation-shell {
    --case-tabs-gap: 12px;
    display: flex;
    flex-direction: column;
}
.case-workstation-shell > .admin-head { order: -2; }
.case-workstation-shell > .case-workflow-panel { order: 1; }
.case-workstation-shell > .case-tabs,
.case-workstation-shell > .case-tabs-placeholder { order: -1; }
.case-workstation-shell > .production-banner { order: 3; }
.case-workstation-shell > #synthese { order: 4; }
.case-workstation-shell > .deadline-alert-card { order: 5; }
.case-workstation-shell > #delai-fiscal { order: 6; }
.case-workstation-shell > .case-priority-card { order: -1; }
.case-workstation-shell > .prior-year-documents { order: 0; }
.case-workstation-shell > .prior-year-review { order: 0; }
.case-workstation-shell > .case-readiness-panel { order: 9; }
.case-workstation-shell > .gentle-step-banner { order: 11; }
.case-workstation-shell > .ai-case-panel { order: 12; }
.case-workstation-shell > .fiscal-review-panel { order: 13; }
.case-workstation-shell > #justificatifs { order: 20; }
.case-workstation-shell > .grid.two { order: 31; }
.case-workstation-shell > .case-delivery-grid { order: 40; }
.case-workstation-shell > #decision-taxation { order: 70; }
.case-workstation-shell > #historique { order: 80; }
.case-workstation-shell > .admin-cancel-case,
.case-workstation-shell > .admin-reactivate-case { order: 100; }
.admin-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.case-workstation-shell .case-created-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.case-workstation-shell .case-created-meta time { color: var(--ink); font-weight: 700; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.search { display: flex; gap: 10px; width: min(520px, 100%); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metrics div { padding: 18px; }
.metrics span, .summary-grid span { display: block; color: var(--muted); font-size: 13px; }
.metrics strong, .summary-grid strong { font-size: 26px; }
.metrics.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 16px 0;
}
.metrics.compact div {
    padding: 14px;
    border-radius: 14px;
}
.metrics.compact strong {
    font-size: 18px;
    word-break: break-word;
}
.document-encryption-panel {
    border-color: rgba(31,140,98,.24);
    background: linear-gradient(145deg, #ffffff, #f6fbf8);
}
.document-encryption-panel .inline-form {
    margin-top: 12px;
}
.alert.compact {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #f1c7c7;
    background: #fff6f6;
    color: #a13b3b;
    font-weight: 750;
}
.success-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid #bfe2d1;
    border-radius: 14px;
    background: #f4fbf7;
    color: #1f8c62;
    font-weight: 850;
}
.summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 10px; vertical-align: middle; }
td small { display: block; color: var(--muted); margin-top: 4px; }
.table-actions { vertical-align: middle; }
.table-actions-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-actions form { margin: 0; }
.client-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}
.client-filter-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 900;
    text-decoration: none;
}
.client-filter-tabs a.active {
    border-color: #b7dded;
    background: #eef8fc;
    color: var(--blue);
    box-shadow: 0 12px 24px rgba(18,105,152,.08);
}
.client-create-panel {
    margin-bottom: 18px;
}
.client-create-panel summary {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}
.client-create-panel summary::-webkit-details-marker { display: none; }
.client-create-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.client-create-choice {
    display: grid;
    gap: 7px;
    text-align: left;
    padding: 20px;
    border: 1px solid #d8e8ef;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff, #f6fbfd);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(9, 41, 68, .05);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.client-create-choice:hover,
.client-create-choice.active {
    border-color: #8ac9e7;
    background: linear-gradient(135deg, #eef8fc, #fff);
    box-shadow: 0 22px 48px rgba(13, 95, 147, .12);
    transform: translateY(-1px);
}
.client-create-choice.company:hover,
.client-create-choice.company.active {
    border-color: #e8c88f;
    background: linear-gradient(135deg, #fff7ea, #fff);
    box-shadow: 0 22px 48px rgba(187, 135, 52, .12);
}
.client-create-choice span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.client-create-choice strong {
    font-size: 26px;
    line-height: 1.1;
}
.client-create-choice em {
    color: var(--muted);
    font-style: normal;
    font-weight: 750;
    line-height: 1.35;
}
.client-create-forms {
    margin-top: 18px;
}
.client-create-card {
    display: none;
    gap: 14px;
    padding: 22px;
    border: 1px solid #d8e8ef;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdfe, #fff);
    box-shadow: 0 22px 55px rgba(9, 41, 68, .06);
}
.client-create-card.is-active {
    display: grid;
}
.client-create-card.company {
    border-color: #ecd7b3;
    background: linear-gradient(180deg, #fffaf2, #fff);
}
.client-create-card header span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.client-create-card header h3 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 26px;
}
.client-create-card header p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.client-create-card .wide {
    grid-column: 1 / -1;
}
.client-create-card .soft-block.compact {
    padding: 14px;
}
@media (max-width: 760px) {
    .client-create-switch {
        grid-template-columns: 1fr;
    }
}
.clients-list-panel table strong {
    display: block;
}
.clients-list-panel table small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.clients-list-panel { overflow-x: auto; }
.clients-list-panel table { min-width: 900px; }
.clients-list-panel .table-actions { min-width: 214px; white-space: nowrap; }
.clients-list-panel .table-actions-inner { flex-wrap: nowrap; gap: 6px; }
.clients-list-panel .table-actions-inner > form { flex: 0 0 auto; }
.clients-list-panel .client-access-btn { padding-inline: 12px; white-space: nowrap; }
.clients-list-panel .client-table-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; }
.clients-list-panel .client-table-icon-btn svg { width: 18px; height: 18px; }
.clients-list-panel .client-table-edit-btn { border-color: #c0d9e6; background: #f8fbfd; color: #0b5f93; }
.clients-list-panel .client-table-edit-btn:hover { border-color: #8dbad0; background: #eaf5fa; color: #084f78; }
.document-queue-actions {
    min-width: 0;
}
.document-queue-actions .btn.primary {
    box-shadow: 0 10px 24px rgba(13,95,147,.14);
}
.document-workqueue,
.document-workqueue > .panel {
    min-width: 0;
    max-width: 100%;
}
.document-workqueue .admin-head {
    min-width: 0;
    flex-wrap: wrap;
}
.document-workqueue .admin-head > div:first-child {
    min-width: 0;
    flex: 1 1 620px;
}
.document-workqueue .admin-head .quick-links {
    max-width: 100%;
}
.document-queue-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}
.document-queue-table {
    min-width: 1280px;
    table-layout: fixed;
}
.document-queue-table th,
.document-queue-table td {
    padding-inline: 8px;
    overflow-wrap: anywhere;
}
.document-queue-table th { overflow-wrap: normal; }
.document-queue-table th:nth-child(1) { width: 18%; }
.document-queue-table th:nth-child(2) { width: 11%; }
.document-queue-table th:nth-child(3) { width: 9%; }
.document-queue-table th:nth-child(4) { width: 8%; }
.document-queue-table th:nth-child(5) { width: 10%; }
.document-queue-table th:nth-child(6) { width: 7%; }
.document-queue-table th:nth-child(7) { width: 9%; }
.document-queue-table th:nth-child(8) { width: 15%; }
.document-queue-table th:nth-child(9) { width: 13%; }
.document-queue-year-heading {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.document-queue-client > strong {
    display: block;
    line-height: 1.3;
}
.document-queue-client > small {
    line-height: 1.35;
}
.document-queue-client-year {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #edf5fa;
    color: #0b5f93;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}
.document-queue-table .priority-chip {
    white-space: normal;
    overflow-wrap: anywhere;
}
.document-queue-table th:last-child,
.document-queue-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: #fff;
    box-shadow: -8px 0 14px -14px rgba(13, 47, 72, .35);
}
.document-queue-actions .table-actions-inner {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
}
.document-queue-actions .document-queue-icon-action,
.document-queue-actions .client-access-btn.document-queue-icon-action {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
}
.document-queue-actions .document-queue-icon-action svg {
    width: 21px;
    height: 21px;
}
.document-queue-actions .document-queue-summary-action {
    background: #f5faff;
}
.document-queue-actions .document-queue-client-action {
    border-color: #b9ddc8;
    background: #f1faf4;
    color: #177a50;
}
.document-queue-actions .document-queue-client-action:hover {
    border-color: #88c8a6;
    background: #e7f6ed;
    color: #126741;
}
.action-muted { color: var(--muted); font-size: 13px; font-weight: 700; }
.client-admin-card .admin-head { align-items: start; margin-bottom: 18px; }
.danger-zone { border-color: #f0d0d0; background: linear-gradient(135deg, #fffafa, #fff); }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 850; }
.status-pill.ok { color: var(--ok); background: #edf8f2; }
.status-pill.warning { color: var(--warn); background: #fff6e8; }
.status-pill.danger { color: #a53b3b; background: #fff0f0; border: 1px solid #f1cccc; }
.score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    line-height: 1;
    font-weight: 850;
    white-space: nowrap;
}
.score.vert { color: #21744f; background: #eaf7f0; border: 1px solid #c7e9d7; }
.score.orange { color: #98611b; background: #fff4e7; border: 1px solid #f0d1a5; }
.score.rouge { color: #9c3131; background: #fff0f0; border: 1px solid #efc2c2; }
.score-summary-card {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 8px;
    min-height: 132px;
}
.score-summary-card > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.score-summary-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}
.score.score-large {
    min-height: 40px;
    padding: 0 16px;
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: 0;
}
.score-readable {
    min-width: 74px;
    padding: 7px 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-cockpit .muted { color: var(--muted); }
.admin-home-dashboard {
    display: grid;
    gap: 18px;
}
.admin-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(247,252,254,.96) 62%, rgba(235,248,246,.9) 100%);
    box-shadow: 0 22px 55px rgba(16,43,66,.08);
}
.admin-dashboard-hero.has-finance { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.dashboard-hero-copy { display: grid; align-content: start; justify-items: start; min-width: 0; }
.dashboard-hero-copy .eyebrow { margin: 0 0 12px; }
.admin-dashboard-hero h1 {
    margin: 0;
    line-height: 1.08;
}
.dashboard-hero-copy .muted { max-width: 680px; margin: 14px 0 0; }
.admin-dashboard-hero .dashboard-month-revenue { justify-self: end; align-self: start; }
.dashboard-search {
    justify-self: end;
    width: min(100%, 560px);
}
.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 12px;
}
.dashboard-metric-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 118px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(16,43,66,.07);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.dashboard-metric-card:hover {
    transform: translateY(-2px);
    border-color: #a9d7ea;
    box-shadow: 0 22px 46px rgba(16,43,66,.12);
}
.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #edf7fc;
    color: var(--blue);
    font-weight: 950;
}
.metric-icon svg {
    width: 22px;
    height: 22px;
}
.dashboard-metric-card small,
.dashboard-metric-card em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.25;
}
.dashboard-metric-card strong {
    display: block;
    margin: 4px 0;
    font-size: 32px;
    line-height: 1;
}
.dashboard-metric-card.tone-success .metric-icon { background: #eaf7ef; color: #1f8c62; }
.dashboard-metric-card.tone-warning .metric-icon { background: #fff5ea; color: #bd7128; }
.dashboard-metric-card.tone-danger .metric-icon { background: #fff0f0; color: #b24b4b; }
.dashboard-metric-card.tone-info .metric-icon { background: #eef4ff; color: #345fb6; }
.dashboard-metric-card.tone-gold .metric-icon { background: #fff4df; color: #b8791f; }
.dashboard-financial-panel {
    display: grid;
    gap: 16px;
    border-color: #d7eadf;
    background:
        radial-gradient(circle at 0% 0%, rgba(43, 143, 93, .10), transparent 28%),
        linear-gradient(135deg, #ffffff, #f8fcfb);
}
.dashboard-daily-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.dashboard-daily-grid--solo { grid-template-columns: minmax(0, 1fr); }
.dashboard-daily-grid > .panel { min-width: 0; }
.dashboard-daily-grid > .panel { display: flex; flex-direction: column; }
.dashboard-month-revenue { box-sizing: border-box; min-width: 0; width: 100%; padding: 17px 19px; border: 1px solid #c6e2dc; border-radius: 17px; background: linear-gradient(130deg, #f4fbf8 0%, #fff 72%); box-shadow: 0 12px 28px rgba(16, 81, 71, .07); }
.dashboard-month-revenue > div { display: flex; align-items: center; gap: 11px; }
.dashboard-month-revenue .eyebrow { margin: 0 0 3px; color: #38877d; font-size: 10px; }
.dashboard-month-revenue > div strong { color: #173e4d; font-size: 13px; }
.dashboard-month-revenue-icon { display: grid; flex: none; width: 37px; height: 37px; place-items: center; border-radius: 11px; background: #16847c; color: #fff; font-size: 20px; }
.dashboard-month-revenue > p { margin: 11px 0 9px; color: #0e5968; font-size: clamp(22px, 1.8vw, 26px); font-weight: 850; line-height: 1.1; letter-spacing: -.02em; }
.dashboard-month-revenue > a { color: #126387; font-size: 12px; font-weight: 800; text-decoration: none; }
.dashboard-month-revenue > a:hover { text-decoration: underline; }
.dashboard-month-revenue > a span { margin-left: 4px; }
.dashboard-support-panel { border-color: #d7e8e5; background: linear-gradient(145deg, #fff, #f8fcfb); }
.dashboard-queue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-queue-head h2 { margin: 0; color: #173b50; font-size: clamp(22px, 2vw, 29px); line-height: 1.15; }
.dashboard-queue-head .eyebrow { margin: 0 0 5px; }
.dashboard-support-list { display: grid; gap: 9px; max-height: 780px; overflow-y: auto; margin: 14px 0 0; padding: 0 5px 3px 0; list-style: none; scrollbar-color: #bfd3de transparent; }
.dashboard-daily-grid .daily-assistant-list, .dashboard-daily-grid .dashboard-support-list { max-height: 740px; }
.dashboard-support-item { min-width: 0; border: 1px solid #dce9e7; border-radius: 15px; background: #fff; overflow: hidden; }
.dashboard-support-item:hover { border-color: #a5cec7; box-shadow: 0 7px 22px rgba(16, 80, 70, .06); }
.dashboard-support-link { position: relative; display: grid; gap: 4px; padding: 13px 35px 12px 16px; color: #173b50; text-decoration: none; }
.dashboard-support-link:focus-visible { outline: 3px solid #3288ae; outline-offset: -3px; }
.dashboard-support-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #64828e; font-size: 11px; font-weight: 850; }
.dashboard-support-item-top em { padding: 2px 7px; border-radius: 999px; background: #fff1e7; color: #a65b31; font-size: 10px; font-style: normal; }
.dashboard-support-link > strong { color: #135b79; font-size: 13px; line-height: 1.35; }
.dashboard-support-client, .dashboard-support-case, .dashboard-support-assignee { color: #617b89; font-size: 11px; line-height: 1.4; }
.dashboard-support-assignee { color: #326d63; font-weight: 750; }
.dashboard-support-assignee.is-unassigned { color: #9b6631; }
.dashboard-support-arrow { position: absolute; top: 13px; right: 13px; color: #397d9f; }
.dashboard-support-transfer { padding: 8px 15px 11px; border-top: 1px solid #e3efed; }
.dashboard-support-transfer summary { width: fit-content; color: #146d77; font-size: 11px; font-weight: 800; cursor: pointer; }
.dashboard-support-transfer form { display: grid; gap: 9px; margin-top: 11px; }
.dashboard-support-transfer label { display: grid; gap: 5px; color: #375f6d; font-size: 11px; font-weight: 750; }
.dashboard-support-transfer label small { color: #738b94; font-weight: 550; }
.dashboard-support-transfer select, .dashboard-support-transfer input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #c8dde0; border-radius: 9px; background: #fff; color: #173b50; font: inherit; font-size: 12px; }
.dashboard-support-transfer .btn { justify-self: start; }
.dashboard-queue-more { margin: 12px 0 0; color: #667f8c; font-size: 12px; }
.dashboard-queue-all { display: inline-flex; align-items: center; gap: 5px; width: fit-content; margin-top: 14px; color: #176c83; font-size: 12px; font-weight: 850; text-decoration: none; }
.dashboard-queue-all:hover { text-decoration: underline; }
.dashboard-daily-grid .dashboard-queue-all { margin-top: auto; padding-top: 17px; }
.admin-priorities-page { display: grid; gap: 18px; }
.admin-priorities-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px; border: 1px solid #d8e8ef; border-radius: 18px; background: linear-gradient(135deg, #fff, #f4fafc); }
.admin-priorities-head a { color: #176c83; font-size: 13px; font-weight: 800; text-decoration: none; }
.admin-priorities-head h1 { margin: 7px 0; color: #123b54; }
.admin-priorities-head p:last-child { margin: 0; color: #617b89; }
.admin-priorities-page .daily-assistant-list { max-height: none; }
.admin-priorities-page .dashboard-daily-panel { min-width: 0; }
.support-transfer-control { margin-top: 13px; padding: 13px; border: 1px solid #cce4df; border-radius: 13px; background: #f5fbf8; }
.support-transfer-control summary { color: #146d72; font-size: 12px; font-weight: 850; cursor: pointer; }
.support-transfer-control form { display: grid; gap: 11px; margin-top: 13px; }
.support-transfer-control label { display: grid; gap: 5px; color: #315d69; font-size: 12px; font-weight: 750; }
.support-transfer-control label small { color: #6c8790; font-weight: 550; }
.support-transfer-control select, .support-transfer-control textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #c7dce0; border-radius: 9px; background: #fff; color: #173b50; font: inherit; font-size: 12px; }
.support-transfer-control textarea { min-height: 68px; resize: vertical; }
.support-transfer-control .btn { justify-self: start; }
.dashboard-daily-grid .dashboard-financial-panel { align-content: start; }
.dashboard-daily-grid .financial-kpi-grid { gap: 8px; }
.dashboard-daily-grid .financial-kpi { padding: 12px; border-radius: 13px; }
.dashboard-daily-grid .financial-kpi strong { font-size: clamp(18px, 1.5vw, 25px); overflow-wrap: anywhere; }
.dashboard-daily-grid .financial-kpi span,
.dashboard-daily-grid .financial-kpi small { font-size: 12px; line-height: 1.3; }
.dashboard-daily-panel {
    border-color: #d9e7f0;
    background: linear-gradient(145deg, #fff, #f7fbfe);
}
.daily-assistant-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.daily-assistant-head .eyebrow { margin: 0 0 5px; }
.daily-assistant-head h2 { margin: 0; font-size: clamp(22px, 2vw, 29px); line-height: 1.15; }
.daily-assistant-count { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 50%; background: #e7f2f8; color: #075a86; font-weight: 900; }
.daily-assistant-scope,
.daily-assistant-updated { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.daily-assistant-list { list-style: none; padding: 0 5px 3px 0; margin: 14px 0 0; display: grid; gap: 9px; max-height: 650px; overflow-y: auto; scrollbar-color: #bfd3de transparent; }
.daily-assistant-list li { min-width: 0; }
.daily-assistant-item { border: 1px solid #dce9ef; border-radius: 15px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.daily-assistant-item:hover { border-color: #aacbd9; box-shadow: 0 7px 22px rgba(16,43,66,.06); }
.daily-assistant-item.is-signaled { border-color: #a9d5c6; background: #fbfefd; }
.daily-assistant-list a.daily-assistant-case-link { position: relative; display: grid; gap: 3px; padding: 14px 35px 12px 16px; text-decoration: none; color: var(--ink); }
.daily-assistant-list a.daily-assistant-case-link:focus-visible { outline: 3px solid #3288ae; outline-offset: -3px; }
.daily-assistant-person { font-weight: 850; font-size: 13px; }
.daily-assistant-person small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.daily-assistant-list strong { color: #075a86; font-size: 13px; }
.daily-assistant-detail { color: var(--muted); font-size: 12px; line-height: 1.35; }
.daily-assistant-arrow { position: absolute; top: 12px; right: 12px; color: #397d9f; }
.daily-assistant-item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 10px 16px 12px; border-top: 1px solid #e7eff2; }
.daily-assistant-assignee { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-right: auto; font-size: 12px; color: #708997; }
.daily-assistant-assignee strong { color: #234a60; font-size: 12px; }
.daily-assistant-item-foot small { color: #6b8a80; font-size: 11px; }
.daily-assistant-signal, .daily-assistant-assign { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 11px; border: 1px solid #bed9e5; border-radius: 9px; background: #f4fafc; color: #1a6485; font: inherit; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.daily-assistant-signal:hover, .daily-assistant-assign:hover { border-color: #7db4ca; background: #eaf5f8; }
.daily-assistant-signal svg { width: 16px; height: 16px; flex: none; }
.daily-assistant-signal.is-sent, .daily-assistant-signal.is-sent:disabled { opacity: 1; border-color: #9fcfbb; background: #eaf7ef; color: #1c754e; cursor: default; box-shadow: inset 0 0 0 1px rgba(40,130,85,.08); }
.daily-assistant-signal-note { color: #20724e; font-size: 12px; font-weight: 750; }
.daily-assistant-open-status { width: 100%; color: #4f7469 !important; font-weight: 700; }
.daily-assistant-assign { margin-left: auto; }
.daily-assistant-more,
.daily-assistant-empty { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.daily-assistant-updated { margin-top: 12px; }
.daily-assistant-modal[hidden], .daily-assistant-modal-error[hidden] { display: none; }
.daily-assistant-modal { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: center; padding: 20px; background: rgba(9, 32, 49, .58); }
.daily-assistant-dialog { display: flex; flex-direction: column; width: min(900px, 100%); max-height: min(94vh, 950px); overflow: hidden; border: 1px solid #d8e6eb; border-radius: 20px; background: #fff; box-shadow: 0 28px 75px rgba(4, 29, 45, .24); }
.daily-assistant-dialog > header { display: flex; justify-content: space-between; gap: 18px; padding: 20px 25px; border-bottom: 1px solid #e0ebee; }
.daily-assistant-dialog > header .eyebrow { margin: 0 0 6px; }
.daily-assistant-dialog h3 { margin: 0; color: #12394f; font-size: clamp(22px, 2vw, 27px); }
.daily-assistant-dialog > header p:last-child { margin: 6px 0 0; color: #6c8593; font-size: 13px; line-height: 1.45; }
.daily-assistant-dialog > header button { align-self: flex-start; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #d7e6eb; border-radius: 50%; background: #fff; color: #315d71; font-size: 27px; cursor: pointer; }
.daily-assistant-dialog-body { min-height: 0; overflow-y: auto; display: grid; gap: 15px; padding: 22px 25px; background: #f7fafb; }
.daily-assistant-dialog-body > label { display: grid; gap: 7px; color: #274b5e; font-size: 13px; font-weight: 800; }
.daily-assistant-dialog-body > label small { color: #8399a4; font-weight: 500; }
.daily-assistant-dialog-body textarea { width: 100%; min-height: 75px; border-radius: 10px; background: #fff; }
.daily-assistant-email-meta { display: grid; gap: 6px; padding: 13px 16px; border: 1px solid #dce8ec; border-radius: 12px; background: #fff; color: #708998; font-size: 12px; }
.daily-assistant-email-meta strong { margin-left: 6px; color: #163c52; overflow-wrap: anywhere; }
.daily-assistant-dialog iframe { width: 100%; height: min(45vh, 420px); min-height: 270px; border: 1px solid #dce8ec; border-radius: 12px; background: #fff; }
.daily-assistant-modal-error { margin: 0; padding: 12px 14px; border: 1px solid #e7b9b2; border-radius: 10px; background: #fff5f3; color: #a34437; font-size: 13px; }
.daily-assistant-dialog > footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 25px; border-top: 1px solid #e0ebee; }
.daily-assistant-dialog > footer > span { color: #6d8794; font-size: 12px; }
.daily-assistant-dialog > footer > div { display: flex; gap: 9px; }
.daily-assistant-dialog > footer .btn { min-height: 42px; }
.daily-assistant-dialog :is(button, textarea):focus-visible, .daily-assistant-signal:focus-visible, .daily-assistant-assign:focus-visible { outline: 3px solid #3288ae; outline-offset: 2px; }
@media (max-width: 650px) { .daily-assistant-modal { padding: 0; } .daily-assistant-dialog { max-height: 100vh; border-radius: 0; } .daily-assistant-dialog > header, .daily-assistant-dialog-body, .daily-assistant-dialog > footer { padding-inline: 17px; } .daily-assistant-dialog > footer { align-items: stretch; flex-direction: column; } .daily-assistant-dialog > footer > div { display: grid; grid-template-columns: 1fr; } .daily-assistant-item-foot { align-items: flex-start; flex-direction: column; } .daily-assistant-assign { margin-left: 0; } }
.dashboard-daily-scoped { margin-bottom: 18px; }
@media (max-width: 1050px) {
    .dashboard-daily-grid { grid-template-columns: 1fr; }
}
.dashboard-alert-strip {
    min-width: 0;
    padding: 13px 17px;
    border: 1px solid #d7e5ec;
    border-left: 4px solid #c99851;
    border-radius: 15px;
    background: linear-gradient(105deg, #fffaf2 0%, #fff 27%, #f8fbfd 100%);
    box-shadow: 0 10px 28px rgba(16, 43, 66, .045);
}
.dashboard-alert-strip-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-height: 38px;
}
.dashboard-alert-strip-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
.dashboard-alert-strip-heading h2 {
    margin: 0;
    color: #183c53;
    font-size: 15px;
    line-height: 1.2;
}
.dashboard-alert-strip-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 10px;
    background: #fff0d9;
    color: #a6691e;
    font-size: 18px;
    font-weight: 900;
}
.dashboard-alert-strip-chips {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.dashboard-alert-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 6px 5px 12px;
    border: 1px solid #d9e6eb;
    border-radius: 999px;
    background: #fff;
    color: #24516a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-alert-chip strong {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding-inline: 5px;
    border-radius: 999px;
    background: #edf5f8;
    font-size: 12px;
}
.dashboard-alert-chip.tone-warning strong { background: #fff1d9; color: #955e18; }
.dashboard-alert-chip.tone-danger strong { background: #ffe9e9; color: #a53942; }
.dashboard-alert-chip.tone-info strong { background: #e9f2fa; color: #225f88; }
.dashboard-alert-chip:hover,
.dashboard-alert-chip:focus-visible {
    border-color: #a3c8d8;
    box-shadow: 0 5px 14px rgba(16, 43, 66, .09);
    transform: translateY(-1px);
}
.dashboard-alert-strip-details { flex: none; margin-left: auto; }
.dashboard-alert-strip-details summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 2px;
    color: #17638b;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}
.dashboard-alert-strip-details summary::-webkit-details-marker { display: none; }
.dashboard-alert-strip-details summary span { display: inline-block; transition: transform .18s ease; }
.dashboard-alert-strip-details[open] { flex: 1 0 100%; }
.dashboard-alert-strip-details[open] summary { margin-left: auto; }
.dashboard-alert-strip-details[open] summary span { transform: rotate(180deg); }
.dashboard-alert-strip-detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 9px;
    margin-top: 7px;
    padding-top: 13px;
    border-top: 1px solid #e2ebef;
}
.dashboard-alert-detail {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #e0eaee;
    border-radius: 11px;
    background: #fff;
    color: #20485f;
    text-decoration: none;
}
.dashboard-alert-detail:hover,
.dashboard-alert-detail:focus-visible { border-color: #9bc7d9; background: #f8fcfe; }
.dashboard-alert-chip:focus-visible,
.dashboard-alert-strip-details summary:focus-visible,
.dashboard-alert-detail:focus-visible { outline: 3px solid #8fc4dc; outline-offset: 2px; }
.dashboard-alert-detail-count {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #e9f2fa;
    color: #225f88;
    font-size: 12px;
    font-weight: 900;
}
.dashboard-alert-detail.tone-warning .dashboard-alert-detail-count { background: #fff1d9; color: #955e18; }
.dashboard-alert-detail.tone-danger .dashboard-alert-detail-count { background: #ffe9e9; color: #a53942; }
.dashboard-alert-detail strong,
.dashboard-alert-detail small { display: block; }
.dashboard-alert-detail strong { font-size: 12px; }
.dashboard-alert-detail small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.dashboard-alert-detail-arrow { color: #4b829d; font-weight: 900; }
@media (max-width: 640px) {
    .dashboard-alert-strip { padding: 12px; }
    .dashboard-alert-strip-heading { flex-basis: 100%; }
    .dashboard-alert-strip-chips { flex-basis: 100%; }
    .dashboard-alert-strip-details { margin-left: 0; }
    .dashboard-alert-strip-details[open] summary { margin-left: 0; }
    .dashboard-alert-strip-detail-list { grid-template-columns: minmax(0, 1fr); }
}
.financial-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.financial-kpi {
    border: 1px solid #dceaf0;
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    padding: 16px;
    box-shadow: 0 12px 26px rgba(16,43,66,.06);
}
.financial-kpi span,
.financial-kpi small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}
.financial-kpi strong {
    display: block;
    margin: 6px 0;
    color: var(--ink);
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1;
}
.financial-kpi.success { border-color: #bfe3cf; background: #f6fcf8; }
.financial-kpi.warning { border-color: #f3d1a2; background: #fffaf3; }
.financial-kpi.danger { border-color: #f0c1c1; background: #fff7f7; }
.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr);
    gap: 18px;
    align-items: start;
}
.dashboard-side-stack {
    display: grid;
    gap: 18px;
}
.panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.panel-title-row h2 {
    margin: 0;
    font-size: clamp(24px, 2.1vw, 34px);
    line-height: 1.05;
}
.panel-title-row > a {
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
.dashboard-action-list,
.dashboard-activity-list {
    display: grid;
    gap: 10px;
}
.dashboard-action-row,
.dashboard-activity-row {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #e2edf2;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fbfdfe);
    color: var(--ink);
    text-decoration: none;
}
.dashboard-action-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(205px, .82fr);
    grid-template-areas: "identity focus" "context context";
    column-gap: 22px;
    row-gap: 17px;
    padding: 19px 21px 16px;
    overflow: hidden;
    border-color: #d9e8ed;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #fff 60%, #f6fafc 100%);
    box-shadow: 0 6px 18px rgba(20, 57, 77, .035);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-action-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #5b91ab;
}
.dashboard-action-row.tone-warning::before { background: #c8954b; }
.dashboard-action-row.tone-success::before { background: #4e9a75; }
.dashboard-action-row.tone-neutral::before { background: #92a9b6; }
.dashboard-action-row:hover,
.dashboard-action-row:focus-visible {
    transform: translateY(-2px);
    border-color: #acd0df;
    box-shadow: 0 13px 28px rgba(20, 57, 77, .11);
}
.dashboard-action-row:focus-visible {
    outline: 3px solid #82b9d2;
    outline-offset: 3px;
}
.dashboard-action-identity {
    grid-area: identity;
    min-width: 0;
    align-self: center;
}
.dashboard-action-identity strong {
    color: #123652;
    font-size: clamp(17px, 1.35vw, 21px);
    line-height: 1.2;
}
.dashboard-action-identity > small {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.dashboard-action-focus {
    grid-area: focus;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 4px;
    min-width: 0;
    padding-left: 20px;
    border-left: 1px solid #e3edf1;
}
.dashboard-action-focus > small {
    margin: 0;
    color: #698191;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.dashboard-action-focus > strong {
    color: #165375;
    font-size: clamp(15px, 1.15vw, 18px);
    line-height: 1.3;
}
.dashboard-action-row.tone-warning .dashboard-action-focus > strong { color: #925c17; }
.dashboard-action-row.tone-success .dashboard-action-focus > strong { color: #21744f; }
.dashboard-action-row.tone-neutral .dashboard-action-focus > strong { color: #385b6d; }
.dashboard-action-open {
    margin-top: 3px;
    color: #28739a;
    font-size: 12px;
    font-weight: 800;
}
.dashboard-action-open span { margin-left: 3px; }
.dashboard-action-context {
    grid-area: context;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 9px;
    padding-top: 12px;
    border-top: 1px solid #e8eff2;
}
.dashboard-action-context > span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 9px;
    border-radius: 7px;
    background: #f1f6f8;
    color: #506c7d;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}
.dashboard-action-context > .is-attention { background: #fff6e9; color: #8a5c19; }
.dashboard-action-context > .is-urgent { background: #fff0f0; color: #ad3e42; }
.dashboard-action-context > .is-express { background: #f8f1e6; color: #866017; }
.dashboard-action-row strong,
.dashboard-activity-row strong {
    display: block;
}
.dashboard-action-row small,
.dashboard-activity-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.dashboard-action-row .dashboard-action-focus > small {
    margin: 0;
    color: #698191;
}
small.workflow-urgency-text,
span.workflow-urgency-text {
    display: block;
    margin-top: 7px;
    color: #b24b4b;
    font-weight: 900;
    line-height: 1.2;
}
small.workflow-express-text,
span.workflow-express-text {
    display: block;
    margin-top: 5px;
    color: #a86b16;
    font-weight: 900;
    line-height: 1.2;
}
#dossiers-suivi,
#activite-recente,
#documents-suivi,
#factures-suivi,
#actions-support {
    scroll-margin-top: calc(var(--topbar-height, 68px) + 24px);
}
.dashboard-performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-performance-grid div {
    padding: 14px;
    border: 1px solid #e2edf2;
    border-radius: 14px;
    background: #fbfdfe;
}
.dashboard-performance-grid .wide {
    grid-column: 1 / -1;
}
.dashboard-performance-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.dashboard-performance-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 24px;
}
.statistics-dashboard {
    display: grid;
    gap: 24px;
}
.statistics-filter-panel {
    display: grid;
    gap: 16px;
}
.stats-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.stats-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.stats-kpi-card {
    min-height: 138px;
    border: 1px solid rgba(202, 224, 237, .95);
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff, #f7fbfd);
    box-shadow: 0 18px 46px rgba(7, 47, 74, .07);
    display: grid;
    align-content: center;
    gap: 8px;
}
.stats-kpi-card span,
.stats-kpi-card small {
    color: var(--muted);
    font-weight: 800;
}
.stats-kpi-card span {
    text-transform: uppercase;
    font-size: 13px;
    color: var(--gold);
}
.stats-kpi-card strong {
    color: var(--ink);
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1;
}
.stats-kpi-card.success {
    background: linear-gradient(135deg, #f0fbf5, #ffffff);
    border-color: rgba(38, 143, 97, .22);
}
.stats-kpi-card.warning {
    background: linear-gradient(135deg, #fff8ed, #ffffff);
    border-color: rgba(189, 132, 49, .26);
}
.stats-kpi-card.money strong {
    color: var(--blue);
}
.stats-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}
.stats-chart-panel,
.stats-table-panel,
.stats-support-panel {
    min-width: 0;
}
.stats-bar-chart {
    display: grid;
    gap: 12px;
}
.stats-bar-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 112px;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}
.stats-bar-row div {
    height: 14px;
    border-radius: 999px;
    background: #e9f2f7;
    overflow: hidden;
}
.stats-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--green));
}
.stats-bar-chart.gold .stats-bar-row i {
    background: linear-gradient(90deg, var(--gold), #e6bc70);
}
.stats-bar-row strong {
    color: var(--ink);
    text-align: right;
}
.table-scroll {
    overflow-x: auto;
}
.premium-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
.premium-table th,
.premium-table td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.premium-table th {
    color: var(--ink);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0;
}
.premium-table td {
    color: var(--muted);
    font-weight: 750;
}
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.stats-mini-grid div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    display: grid;
    gap: 6px;
}
.stats-mini-grid span {
    color: var(--muted);
    font-weight: 800;
}
.stats-mini-grid strong {
    color: var(--ink);
    font-size: 28px;
}
.stats-ranked-list,
.stats-chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.stats-ranked-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.stats-ranked-list strong {
    display: block;
    color: var(--ink);
}
.stats-ranked-list small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 750;
}
.stats-ranked-list em {
    min-width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-style: normal;
    font-weight: 950;
}
.stats-ranked-list.warning em {
    background: #fff1df;
    color: var(--gold);
}
.stats-chip-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}
.stats-chip-list strong {
    color: var(--ink);
}
@media (max-width: 1100px) {
    .stats-filter-grid,
    .stats-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-main-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .stats-filter-grid,
    .stats-kpi-grid,
    .stats-mini-grid {
        grid-template-columns: 1fr;
    }
    .stats-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-filter-actions .btn {
        width: 100%;
    }
    .stats-bar-row {
        grid-template-columns: 58px minmax(0, 1fr);
    }
    .stats-bar-row strong {
        grid-column: 2;
        text-align: left;
        font-size: 14px;
    }
    .stats-kpi-card {
        min-height: 116px;
        padding: 18px;
    }
}
.dashboard-activity-details {
    padding: 0;
    overflow: hidden;
}
.dashboard-activity-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}
.dashboard-activity-details summary::-webkit-details-marker {
    display: none;
}
.dashboard-activity-details .collapse-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #eef7fc;
    color: var(--blue);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    transition: transform .18s ease, background .18s ease;
}
.dashboard-activity-details[open] .collapse-arrow {
    transform: rotate(90deg);
    background: #e5f3fa;
}
.dashboard-activity-details .dashboard-activity-list {
    max-height: 390px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 0 22px 14px;
}
.dashboard-activity-details summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.dashboard-activity-list:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.dashboard-activity-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 18px; border-top: 1px solid #e3edf1; color: var(--muted); font-size: 13px; font-weight: 700; }
.dashboard-activity-pagination > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 620px) {
    .dashboard-activity-pagination { align-items: flex-start; flex-direction: column; }
}
.dashboard-activity-row {
    grid-template-columns: 12px minmax(0, 1fr);
}
.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 0 5px rgba(18,105,152,.1);
}
.cockpit-table-head {
    margin-bottom: 10px;
}
.cockpit-panel { overflow-x: auto; }
.cockpit-priority-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.cockpit-priority-strip a,
.cockpit-priority-strip span,
.log-filters span {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--muted);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 850;
}
.cockpit-priority-strip a {
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.cockpit-priority-strip a:hover {
    border-color: #9ed3ea;
    color: var(--primary);
    transform: translateY(-1px);
}
.cockpit-priority-strip a.active {
    border-color: rgba(18, 105, 152, .32);
    background: linear-gradient(135deg, #eaf7ff 0%, #f4fbf8 100%);
    color: var(--primary);
    box-shadow: 0 10px 26px rgba(18, 105, 152, .12);
}
.cockpit-table { min-width: 1030px; table-layout: fixed; }
.cockpit-table th:nth-child(1), .cockpit-table td:nth-child(1) { width: 170px; }
.cockpit-table th:nth-child(2), .cockpit-table td:nth-child(2) { width: 250px; }
.cockpit-table th:nth-child(3), .cockpit-table td:nth-child(3) { width: 80px; }
.cockpit-table th:nth-child(4), .cockpit-table td:nth-child(4) { width: 190px; }
.cockpit-table th:nth-child(5), .cockpit-table td:nth-child(5) { width: 150px; }
.cockpit-table th:nth-child(6), .cockpit-table td:nth-child(6) { width: 92px; }
.cockpit-table th:nth-child(7), .cockpit-table td:nth-child(7) { width: 180px; }
.cockpit-table th:nth-child(8), .cockpit-table td:nth-child(8) { width: 148px; }
.cockpit-table td { vertical-align: top; }
.dashboard-search-result {
    scroll-margin-top: calc(var(--topbar-height, 68px) + 22px);
    outline: none;
}
.dashboard-search-result.is-search-arrival td {
    animation: dashboard-search-arrival 2.2s ease-out;
}
@keyframes dashboard-search-arrival {
    0%, 22% { background-color: #e8f6fc; }
    100% { background-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-search-result.is-search-arrival td { animation: none; }
}
.cockpit-table td strong,
.cockpit-table td small { display: block; }
.cockpit-table td small {
    color: var(--muted);
    margin-top: 4px;
}
.priority-pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.cockpit-status-stack .status-chip {
    white-space: normal;
    line-height: 1.15;
}
.priority-pill { background: #f4f8fb; color: var(--ink); }
.priority-pill.rank-1,
.status-chip.success { background: #eaf7ef; color: #1f8c62; }
.priority-pill.rank-2 { background: #fff4df; color: #b8791f; }
.priority-pill.rank-3 { background: #fff0f0; color: #b24b4b; }
.priority-pill.rank-4,
.status-chip.warning { background: #fff5ea; color: #bd7128; }
.priority-pill.rank-5,
.status-chip.muted { background: #f1f5f8; color: var(--muted); }
.status-chip.info { background: #eaf5fb; color: var(--primary); }
.invoice-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.invoice-overview-card {
    display: grid;
    gap: 6px;
    min-height: 126px;
}
.invoice-overview-card span {
    color: var(--muted);
    font-weight: 750;
}
.invoice-overview-card strong {
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1;
}
.invoice-overview-card small {
    color: var(--muted);
    line-height: 1.25;
}
.invoice-overview-card.warning {
    border-color: #f1d2ab;
    background: linear-gradient(135deg, #fffaf3, #fff);
}
.invoice-overview-card.success {
    border-color: #bfe3cf;
    background: linear-gradient(135deg, #f2fbf6, #fff);
}
.invoice-admin-panel {
    overflow: hidden;
}
.invoice-admin-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}
.invoice-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.invoice-admin-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--muted);
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
}
.invoice-admin-tabs a.active {
    border-color: rgba(18,105,152,.32);
    background: linear-gradient(135deg, #eaf7ff, #f4fbf8);
    color: var(--primary);
    box-shadow: 0 10px 26px rgba(18,105,152,.12);
}
.invoice-admin-tabs span {
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #fff;
    color: inherit;
}
.invoice-admin-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 170px 170px auto auto;
    gap: 10px;
    align-items: end;
}
.invoice-admin-filters label {
    margin: 0;
}
.invoice-admin-table-wrap {
    overflow-x: auto;
}
.invoice-admin-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    table-layout: fixed;
}
.invoice-admin-table th,
.invoice-admin-table td {
    padding: 16px 12px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.invoice-admin-table th {
    color: var(--ink);
    font-weight: 900;
}
.invoice-admin-table th:nth-child(1),
.invoice-admin-table td:nth-child(1) { width: 190px; }
.invoice-admin-table th:nth-child(2),
.invoice-admin-table td:nth-child(2) { width: 300px; }
.invoice-admin-table th:nth-child(3),
.invoice-admin-table td:nth-child(3) { width: 190px; }
.invoice-admin-table th:nth-child(4),
.invoice-admin-table td:nth-child(4) { width: 130px; }
.invoice-admin-table th:nth-child(5),
.invoice-admin-table td:nth-child(5) { width: 190px; }
.invoice-admin-table th:nth-child(6),
.invoice-admin-table td:nth-child(6) { width: 210px; }
.invoice-admin-table td strong,
.invoice-admin-table td span,
.invoice-admin-table td small {
    display: block;
}
.invoice-admin-table td small {
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.3;
}
.invoice-admin-table tr.is-overdue {
    background: linear-gradient(90deg, rgba(255,245,234,.9), transparent 28%);
}
.demo-login-log-page .table-wrap {
    overflow-x: auto;
}
.demo-access-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.demo-access-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}
.demo-access-actions form {
    margin: 0;
}
.demo-login-summary .stat-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.demo-login-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}
.demo-login-table th,
.demo-login-table td {
    padding: 14px 12px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.demo-login-table th {
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.demo-login-user-agent {
    max-width: 360px;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.demo-signal-detail {
    display: grid;
    gap: 8px;
    min-width: 260px;
}
.demo-signal-detail strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 950;
}
.demo-signal-detail > span {
    color: var(--muted);
    font-size: 14px;
}
.demo-signal-detail small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.demo-signal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.demo-signal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    background: #f7fbfd;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.demo-signal-meta em {
    color: var(--gold);
    font-style: normal;
    text-transform: uppercase;
}
@media (max-width: 760px) {
    .demo-access-panel {
        align-items: stretch;
        flex-direction: column;
    }
    .demo-access-actions {
        justify-content: stretch;
    }
    .demo-access-actions form,
    .demo-access-actions .btn {
        width: 100%;
    }
}
.invoice-overdue-label {
    color: #bd7128 !important;
    font-weight: 800;
}
.demo-invoice-reminder {
    width: fit-content;
    margin-top: 7px !important;
    border: 1px solid rgba(13, 95, 147, .18);
    border-radius: 999px;
    background: #f0f7fb;
    color: var(--blue) !important;
    padding: 5px 8px;
    font-weight: 900;
}
.invoice-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.invoice-admin-actions form {
    margin: 0;
}
.invoice-admin-actions .btn {
    min-height: 38px;
    padding-inline: 12px;
}
.cockpit-status-stack {
    display: grid;
    justify-items: start;
    gap: 7px;
}
.cockpit-status-stack small {
    margin-top: 0;
    line-height: 1.25;
}
.cockpit-actions {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.cockpit-actions form { margin: 0; min-width: 0; }
.cockpit-actions .btn {
    width: 100%;
    justify-content: center;
}
.cockpit-main-action {
    min-width: 64px;
    min-height: 40px;
    padding-inline: 14px;
}
.payment-quick-action {
    border-color: #bfe3cf;
    background: #eef9f2;
    color: #1f7a52;
}
.payment-quick-action:hover {
    background: #dcf4e6;
}
.cockpit-assign-form select {
    width: 100%;
    min-width: 0;
    max-width: 170px;
    padding: 8px 10px;
    font-size: 13px;
}
.production-banner {
    position: sticky;
    top: 12px;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) minmax(220px, 1.4fr) minmax(140px, .9fr) minmax(185px, 1.1fr);
    gap: 10px;
    align-items: stretch;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 40px rgba(16,43,66,.12);
    padding: 12px;
    backdrop-filter: blur(10px);
}
.production-banner > div {
    min-width: 0;
    border: 1px solid #edf3f6;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f9fcfd);
    padding: 10px 12px;
}
.production-banner span,
.fiscal-summary-grid span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.production-banner strong {
    display: block;
    margin-top: 3px;
    color: var(--ink);
    line-height: 1.25;
}
.production-banner small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}
.production-client-address {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.production-client-card small {
    margin-top: 8px;
    font-weight: 700;
}
.production-contact-list {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
}
.production-contact-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}
.production-contact-list dd {
    margin: 1px 0 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.production-contact-list a {
    color: var(--blue);
    text-decoration: none;
}
.production-contact-list a:hover,
.production-contact-list a:focus-visible { text-decoration: underline; }
.case-taxpayer-identity {
    display: grid;
    gap: 13px;
    margin: 16px 0 20px;
    padding: clamp(16px, 2vw, 22px);
    border: 1px solid #d8e7ed;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5fafb, #fff);
    scroll-margin-top: 120px;
}
.case-taxpayer-identity-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.case-taxpayer-identity-head h3 { margin: 2px 0 0; color: var(--ink); font-size: clamp(18px, 2vw, 22px); }
.case-taxpayer-identity-head small { color: var(--muted); font-size: 12px; }
.case-taxpayer-identity-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 15px; padding: 13px 16px; border: 1px solid #c8dee7; border-radius: 11px; background: #fff; }
.case-taxpayer-identity-number span { color: var(--muted); font-size: 12px; font-weight: 700; }
.case-taxpayer-identity-number strong { color: var(--ink); font-size: 17px; letter-spacing: .01em; overflow-wrap: anywhere; }
.case-taxpayer-identity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.case-taxpayer-identity-person { min-width: 0; padding: 15px 17px; border: 1px solid #e0eaee; border-radius: 12px; background: #fff; }
.case-taxpayer-identity-person > span { color: #99733c; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.case-taxpayer-identity-person > strong { display: block; margin-top: 4px; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.case-taxpayer-identity-person dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin: 13px 0 0; padding-top: 12px; border-top: 1px solid #edf2f4; }
.case-taxpayer-identity-person dt { color: var(--muted); font-size: 11px; font-weight: 750; }
.case-taxpayer-identity-person dd { margin: 3px 0 0; color: var(--ink); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
@media (max-width: 1200px) {
    .production-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.production-assignee-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    column-gap: 10px;
    align-content: start;
    position: relative;
    padding-right: 12px !important;
}
.production-banner > .production-assignee-card.is-unassigned {
    border-color: #f1d4d1;
    background: linear-gradient(135deg, #fffafa 0%, #fff1ef 100%);
}
.production-assignee-card.is-unassigned > strong { color: #9c4a45; }
.production-assignee-card > span {
    grid-column: 1;
    grid-row: 1;
}
.production-assignee-card > strong {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-right: 0;
    overflow-wrap: anywhere;
}
.assignee-edit {
    position: relative;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
}
.assignee-edit summary {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe4ed;
    border-radius: 999px;
    background: linear-gradient(180deg, #f3fbff, #fff);
    color: var(--primary);
    box-shadow: 0 10px 24px rgba(18,105,152,.12);
    cursor: pointer;
    list-style: none;
}
.assignee-edit summary::-webkit-details-marker { display: none; }
.assignee-edit summary svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.assignee-edit[open] summary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.assignee-edit form {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 8;
    width: min(360px, 78vw);
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 50px rgba(16,43,66,.18);
}
.assignee-edit select {
    width: 100%;
    min-width: 0;
}
.assignee-edit .btn {
    width: 100%;
    justify-content: center;
}
.assignment-shell {
    gap: 18px;
}
.assignment-head {
    align-items: end;
}
.assignment-workload-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.assignment-workload-card {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f8fbfd);
    box-shadow: 0 14px 34px rgba(16, 43, 66, .06);
}
.assignment-workload-card.unassigned {
    border-color: rgba(196, 123, 43, .32);
    background: linear-gradient(145deg, rgba(255, 246, 229, .86), #fff);
}
.assignment-workload-card span {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
}
.assignment-workload-card strong {
    color: var(--ink);
    font-size: clamp(18px, 1.8vw, 23px);
    line-height: 1.12;
    word-break: break-word;
}
.assignment-workload-card small {
    color: var(--muted);
    font-weight: 780;
}
.assignment-panel {
    display: grid;
    gap: 14px;
}
.assignment-search {
    grid-template-columns: minmax(220px, 1fr) minmax(190px, .55fr) auto;
}
.assignment-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
}
.assignment-bulk-form {
    display: grid;
    gap: 12px;
}
.assignment-bulk-bar {
    position: relative;
    z-index: 120;
    display: grid;
    grid-template-columns: auto minmax(210px, .6fr) minmax(230px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(13, 95, 147, .22);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 46px rgba(16, 43, 66, .16);
    backdrop-filter: blur(10px);
    margin-top: 2px;
}
.assignment-bulk-bar.is-floating {
    position: fixed;
    top: calc(var(--topbar-height, 68px) + 8px);
    z-index: 520;
    margin-top: 0;
}
.assignment-bulk-placeholder {
    width: 100%;
}
.assignment-bulk-bar strong {
    align-self: center;
    color: var(--ink);
}
.assignment-bulk-bar label {
    margin: 0;
}
.assignment-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.assignment-table-wrap {
    overflow-x: auto;
}
.assignment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.assignment-table th {
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
}
.assignment-table td {
    padding: 14px;
    border-top: 1px solid #d8e8ef;
    border-bottom: 1px solid #d8e8ef;
    background: #fff;
    vertical-align: middle;
}
.assignment-table td:first-child {
    border-left: 1px solid #d8e8ef;
    border-radius: 14px 0 0 14px;
}
.assignment-table td:last-child {
    border-right: 1px solid #d8e8ef;
    border-radius: 0 14px 14px 0;
    text-align: right;
}
.assignment-table tr.is-selected td {
    border-color: rgba(45, 138, 98, .32);
    background: linear-gradient(145deg, rgba(45, 138, 98, .08), #fff);
}
.assignment-table strong {
    display: block;
    color: var(--ink);
}
.assignment-table small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 760;
}
@media (max-width: 1100px) {
    .assignment-workload-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .assignment-bulk-bar,
    .assignment-search {
        grid-template-columns: 1fr;
    }
}
.case-workflow-panel {
    display: grid;
    grid-template-columns: repeat(var(--workflow-step-count, 5), minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid rgba(18, 105, 152, .22);
    border-radius: 20px;
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 105, 152, .15), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fbfd);
    box-shadow: 0 18px 44px rgba(16,43,66,.09);
    overflow-x: auto;
    scrollbar-width: thin;
}
.case-workflow-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    row-gap: 5px;
    align-content: center;
    align-items: center;
    min-height: 116px;
    padding: 13px;
    border: 1px solid #e0edf3;
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    color: var(--muted);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.case-workflow-step:hover,
.case-workflow-step:focus-visible {
    transform: translateY(-1px);
    border-color: #b9dceb;
    box-shadow: 0 12px 26px rgba(18,105,152,.10);
}
.case-workflow-step > span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #eef7fb;
    color: var(--blue);
    font-weight: 950;
}
.case-workflow-step > strong {
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.case-workflow-step > small {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}
.case-workflow-step.done {
    border-color: #c8e9d6;
    background: #f5fbf7;
}
.case-workflow-step.done > span {
    background: #dff3e8;
    color: #1f875b;
}
.case-workflow-step.current {
    border-color: rgba(196, 142, 63, .42);
    background: linear-gradient(135deg, #fff8ec, #ffffff);
    box-shadow: 0 14px 30px rgba(196, 142, 63, .13);
}
.case-workflow-step.current > span {
    background: #fff0d4;
    color: #a26519;
}
.case-workflow-step.blocked,
.case-workflow-step.pending {
    opacity: .72;
}
.case-workflow-combined {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 4px;
}
.case-workflow-substep {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 9px;
    color: var(--ink);
    text-decoration: none;
}
.case-workflow-substep:hover,
.case-workflow-substep:focus-visible { background: rgba(18, 105, 152, .08); }
.case-workflow-substep + .case-workflow-substep { border-top: 1px solid #e2ebee; }
.case-workflow-substep-number {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef7fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
}
.case-workflow-substep-copy { min-width: 0; display: grid; gap: 2px; }
.case-workflow-substep-copy strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
}
.case-workflow-substep-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}
.case-workflow-substep.done .case-workflow-substep-number { background: #dff3e8; color: #1f875b; }
.case-workflow-substep.current .case-workflow-substep-number { background: #fff0d4; color: #a26519; }
.case-workflow-substep.blocked { opacity: .66; }
.case-workstation-shell .production-banner {
    position: relative;
    top: auto;
    z-index: auto;
    margin-top: 0;
    box-shadow: 0 18px 40px rgba(16,43,66,.12);
}
.case-workstation-shell .case-tabs {
    top: calc(var(--topbar-height, 68px) + var(--case-tabs-gap, 12px));
    z-index: 990;
    margin-inline: 0;
    padding: 12px 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(16,43,66,.07);
}
.case-workstation-shell .case-tabs.is-floating { border-radius: 0; }
.case-priority-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 12px;
    padding: 28px 30px;
    border: 1px solid rgba(18, 105, 152, .22);
    border-left: 9px solid var(--blue);
    border-radius: 12px;
    background:
        radial-gradient(circle at 0% 0%, rgba(18,105,152,.16), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fbfd);
    box-shadow: 0 24px 56px rgba(16,43,66,.12);
}
.case-priority-actions { display: grid; flex: 0 0 auto; gap: 10px; }
.case-priority-actions .btn { justify-content: center; }
.case-priority-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.12;
}
.case-priority-card p:not(.eyebrow) {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.case-priority-card p:not(.eyebrow) strong {
    color: var(--ink);
}
.case-priority-card.warning {
    border-color: rgba(196, 142, 63, .30);
    border-left-color: #c48e3f;
    background: linear-gradient(135deg, #fff9ef, #ffffff);
}
.case-priority-card.review {
    border-color: rgba(18, 105, 152, .26);
    border-left-color: var(--blue);
    background: linear-gradient(135deg, #f4fbff, #ffffff);
}
.case-priority-card.success {
    border-color: rgba(38, 153, 112, .24);
    border-left-color: #269970;
    background: linear-gradient(135deg, #f4fbf7, #ffffff);
}
.case-priority-card.muted {
    border-color: #d8e8ef;
    border-left-color: var(--muted);
    background: linear-gradient(135deg, #f7fbfd, #ffffff);
}
.case-readiness-panel {
    border-color: rgba(38, 153, 112, .20);
}
.case-readiness-panel summary {
    background:
        radial-gradient(circle at 0% 0%, rgba(38, 153, 112, .10), transparent 34%),
        linear-gradient(135deg, #ffffff, #f7fcf9);
}
.case-readiness-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0 18px 18px;
}
.case-readiness-grid article {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: #fff;
}
.case-readiness-grid article.done {
    border-color: #bfe3cf;
    background: #f4fbf7;
}
.case-readiness-grid article.warning {
    border-color: #f1d2ab;
    background: #fff8ef;
}
.case-readiness-grid article.open {
    background: #f7fbfd;
}
.case-readiness-grid span {
    justify-self: start;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef7fb;
    color: var(--blue);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.case-readiness-grid article.done span {
    background: #dff3e8;
    color: #1f875b;
}
.case-readiness-grid article.warning span {
    background: #fff0d4;
    color: #a26519;
}
.case-readiness-grid strong {
    color: var(--ink);
    line-height: 1.2;
}
.case-readiness-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.case-invoices-panel summary {
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 105, 152, .08), transparent 34%),
        linear-gradient(135deg, #ffffff, #f7fbfd);
}
.case-invoice-list {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}
.case-invoice-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(110px, auto) minmax(220px, auto);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: #fff;
}
.case-invoice-row.open {
    border-color: #f1d2ab;
    background: #fff8ef;
}
.case-invoice-row.paid {
    border-color: #bfe3cf;
    background: #f5fbf7;
}
.case-invoice-row.cancelled {
    border-color: #efcaca;
    background: #fff6f6;
}
.case-invoice-row span,
.case-invoice-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.25;
}
.case-invoice-row .case-invoice-status {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #f4fbf7;
    color: var(--ink);
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.18;
}
.case-invoice-badge {
    display: inline-flex !important;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    margin: 6px 0 0;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
    text-transform: uppercase;
}
.case-invoice-badge.supplement {
    border: 1px solid rgba(15, 105, 156, .18);
    background: #eaf5f9;
    color: var(--blue);
}
.case-invoice-row.open .case-invoice-status {
    border-color: #f1d2ab;
    background: #fff2df;
    color: #9b641b;
}
.case-invoice-row.paid .case-invoice-status {
    border-color: #c8e9d6;
    background: #eaf7ef;
    color: #1f875b;
}
.case-invoice-row.cancelled .case-invoice-status {
    border-color: #efc1c1;
    background: #fdecec;
    color: #b84242;
}
.case-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.case-invoice-actions form {
    display: flex;
    margin: 0;
}
.case-invoice-actions .btn {
    min-width: 118px;
    justify-content: center;
}
.document-control-actions form {
    display: flex;
    margin: 0;
}
.document-missing-request-btn {
    position: relative;
    border-color: rgba(196, 142, 63, .32);
    background: #fff8ef;
    color: #8a5a15;
}
.document-missing-request-btn span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-left: 6px;
    border-radius: 999px;
    background: #c48e3f;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}
.document-missing-request-btn:hover {
    border-color: rgba(196, 142, 63, .62);
    background: #fff1d9;
}
.missing-draft-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 11px;
    border: 1px solid #ecd8b9;
    border-radius: 999px;
    background: #fff8ee;
    color: #825719;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}
.missing-draft-indicator[hidden] { display: none; }
.invoice-admin-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 18px 18px;
}
.invoice-admin-footer-actions form { margin: 0; }
.invoice-action-modal[hidden] {
    display: none;
}
.invoice-action-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(8, 29, 44, .52);
}
.invoice-action-dialog {
    width: min(1080px, 100%);
    max-height: min(88vh, 980px);
    overflow: auto;
    border: 1px solid #d7e6ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(4, 20, 32, .28);
}
.invoice-action-dialog-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 20px;
    border-bottom: 1px solid #dce9f0;
    background: linear-gradient(135deg, #ffffff, #f7fbfd);
}
.invoice-action-dialog-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 2vw, 34px);
}
.invoice-action-dialog-head p:not(.eyebrow) {
    margin: 5px 0 0;
    color: var(--muted);
    font-weight: 680;
}
.icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d5e6ee;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.icon-button:hover {
    border-color: rgba(196, 142, 63, .44);
    color: #9b6924;
}
.invoice-action-dialog.billing-correction-panel {
    margin: 0;
    overflow: auto;
}
.tariff-adjustment-dialog .tariff-adjustment-form {
    padding: 22px 26px 26px;
}
.tariff-adjustment-dialog { width: min(900px, 100%); border-radius: 18px; }
.tariff-adjustment-form { gap: 16px; }
.tariff-services-editor { display: grid; gap: 12px; padding: 18px; border: 1px solid #d8e7ee; border-radius: 14px; background: linear-gradient(145deg, #f8fcfd, #fff); }
.tariff-services-list { display: grid; gap: 10px; }
.tariff-service-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, 190px) 38px; gap: 10px; align-items: end; padding: 12px; border: 1px solid #e0ebf0; border-radius: 11px; background: #fff; }
.tariff-service-row label { min-width: 0; }
.tariff-service-row input { width: 100%; }
.tariff-service-remove { display: grid; place-items: center; width: 38px; height: 42px; padding: 0; border: 1px solid #e3e9eb; border-radius: 9px; background: #f8fafb; color: #76545a; font-size: 23px; line-height: 1; cursor: pointer; }
.tariff-service-remove:hover { border-color: #d6aeb1; background: #fff3f2; color: #a94345; }
.tariff-service-remove[hidden] { display: none; }
.tariff-service-add { justify-self: start; }
.tariff-services-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 14px 2px 2px; border-top: 1px solid #dce8ed; color: #476777; font-weight: 750; }
.tariff-services-total strong { color: #103c54; font-size: 24px; font-weight: 900; white-space: nowrap; }
.tariff-form-section-title { display: flex; align-items: center; gap: 13px; padding-top: 8px; border-top: 1px solid #e4edf1; }
.tariff-form-section-title:first-of-type { border-top: 0; padding-top: 0; }
.tariff-form-section-title > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: #edf5f8; color: #176582; font-size: 12px; font-weight: 900; }
.tariff-form-section-title strong { display: block; color: #143b51; font-size: 17px; }
.tariff-form-section-title small { display: block; margin-top: 2px; color: #647f8d; font-size: 12px; font-weight: 550; }
.tariff-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tariff-form-grid .tariff-due-grid { display: contents; }
.tariff-form-grid [hidden] { display: none; }
.tariff-adjustment-form textarea { min-height: 0; resize: vertical; }
.tariff-internal-note { padding: 12px 16px; border: 1px solid #dce9ef; border-radius: 10px; background: #f9fcfd; }
.tariff-internal-note summary { color: #32677d; font-size: 13px; font-weight: 750; cursor: pointer; }
.tariff-internal-note label { display: block; margin-top: 13px; }
.tariff-adjustment-actions { align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid #e3edf1; }
.tariff-adjustment-actions > span { color: #688391; font-size: 12px; }
.tariff-recipient-warning { margin: 12px 0 0; padding: 12px 14px; border: 1px solid #ebd5ae; border-radius: 9px; background: #fff9ed; color: #91601b; font-size: 13px; }
.missing-request-dialog .missing-email-grid {
    padding: 18px 20px 20px;
}
.missing-open-summary {
    display: grid;
    gap: 10px;
    margin: 18px 20px 0;
    padding: 14px;
    border: 1px solid rgba(196, 142, 63, .32);
    border-radius: 8px;
    background: #fff8ef;
}
.missing-open-summary > strong {
    color: #8a5a15;
    font-size: 16px;
}
.missing-open-summary .doc-list {
    margin: 0;
}
.billing-correction-panel {
    margin: 18px;
    border: 1px solid #d7e6ee;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,251,253,.98)),
        radial-gradient(circle at 12% 0%, rgba(15,105,156,.08), transparent 30%);
    box-shadow: 0 16px 34px rgba(16,47,69,.07);
    overflow: hidden;
}
.billing-correction-panel.compact {
    display: inline-block;
    width: auto;
    max-width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.case-invoices-panel .billing-correction-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: max-content;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 8px;
    border: 1px solid #0f699c;
    background: #0f699c;
    color: #fff !important;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 12px 26px rgba(15,105,156,.22);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.case-invoices-panel .billing-correction-button::-webkit-details-marker {
    display: none;
}
.case-invoices-panel .billing-correction-button:hover {
    background: #0b5d8b;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15,105,156,.28);
}
.billing-correction-panel.compact[open] {
    display: block;
    border: 1px solid #d7e6ee;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,251,253,.98)),
        radial-gradient(circle at 12% 0%, rgba(15,105,156,.08), transparent 30%);
    box-shadow: 0 16px 34px rgba(16,47,69,.07);
    overflow: hidden;
}
.billing-correction-panel.compact[open] .billing-correction-button {
    margin: 18px 18px 0;
}
.billing-correction-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 92px;
    padding: 18px 20px;
    cursor: pointer;
    color: var(--ink);
    list-style: none;
}
.billing-correction-head::-webkit-details-marker {
    display: none;
}
.billing-correction-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: #eaf5f9;
    color: var(--blue);
    font-size: 14px;
    font-weight: 950;
    letter-spacing: 0;
}
.billing-correction-title {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.billing-correction-title strong {
    color: var(--ink);
    font-size: 22px;
    font-weight: 950;
    line-height: 1.15;
}
.billing-correction-title small {
    color: var(--muted);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
}
.billing-correction-cta {
    border: 1px solid #cfe2eb;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 850;
}
.billing-correction-panel[open] .billing-correction-cta {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.billing-correction-panel[open] .billing-correction-head {
    border-bottom: 1px solid #dce9f0;
}
.billing-correction-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: min(1040px, calc(100% - 36px));
    margin: 18px;
}
.billing-correction-summary div {
    border: 1px solid #dce9f0;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}
.billing-correction-summary span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 5px;
}
.billing-correction-summary strong {
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
}
.billing-correction-rule {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: min(1040px, calc(100% - 36px));
    margin: 0 18px 18px;
    border: 1px solid #f0d2a8;
    border-radius: 8px;
    background: #fff8ef;
    color: #8a5a15;
    padding: 12px 14px;
}
.billing-correction-rule strong {
    color: #8a5a15;
    font-weight: 950;
}
.billing-correction-rule span {
    color: #6d5b45;
    line-height: 1.35;
}
.billing-correction-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
    width: min(1040px, calc(100% - 36px));
    padding: 0;
    margin: 0 18px 18px;
}
.billing-correction-section-title,
.billing-correction-submit {
    grid-column: 1 / -1;
}
.billing-field-wide {
    grid-column: 1 / -1;
}
.billing-correction-section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    border-top: 1px solid #dce9f0;
    padding-top: 16px;
    margin-top: 4px;
}
.billing-correction-section-title.first {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
.billing-correction-section-title strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
}
.billing-correction-section-title span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}
.billing-correction-form .billing-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid #dce9f0;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}
.billing-correction-form .billing-field > span {
    color: var(--ink);
    font-weight: 900;
}
.billing-correction-form .billing-field > small {
    color: var(--muted);
    line-height: 1.35;
}
.billing-correction-form input,
.billing-correction-form textarea {
    width: 100%;
    border-radius: 8px;
    background: #fbfdfe;
}
.billing-correction-form textarea {
    min-height: 118px;
    resize: vertical;
}
.billing-correction-form .billing-field:not(.billing-field-wide) textarea {
    min-height: 132px;
}
.billing-lines-editor {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    border: 1px solid #dce9f0;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}
.billing-lines-head,
.billing-line-row {
    display: grid;
    grid-template-columns: minmax(250px, 1.5fr) 110px 145px 125px 92px;
    gap: 10px;
    align-items: end;
}
.billing-lines-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.billing-line-row {
    position: relative;
    border: 1px solid #e2edf3;
    border-radius: 8px;
    background: #fbfdfe;
    padding: 12px;
}
.billing-line-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.billing-line-row label > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.billing-line-row input {
    min-height: 42px;
    background: #fff;
}
.billing-line-row strong {
    display: grid;
    align-items: center;
    min-height: 42px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 950;
    white-space: nowrap;
}
.billing-line-row.is-disabled {
    opacity: .48;
}
.billing-line-row.is-disabled input:not([type="checkbox"]) {
    text-decoration: line-through;
}
.billing-line-active {
    position: absolute;
    top: 10px;
    right: 112px;
    width: auto;
}
.billing-line-active span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.billing-line-active input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: var(--blue);
}
.billing-line-add {
    justify-self: start;
}
.billing-lines-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    border-top: 1px solid #dce9f0;
    padding-top: 12px;
}
.billing-lines-total span {
    color: var(--muted);
    font-weight: 850;
}
.billing-lines-total strong {
    color: var(--ink);
    font-size: 24px;
    font-weight: 950;
}
.billing-correction-submit {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border-top: 1px solid #dce9f0;
    padding-top: 16px;
}
.billing-correction-submit span {
    color: var(--muted);
    font-weight: 700;
}
.tariff-adjustment-form {
    gap: 14px;
}
.tariff-due-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
    gap: 14px;
    align-items: end;
}
.tariff-adjustment-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}
.preview-eye-button {
    border-color: rgba(15, 105, 156, .22);
    background: #eef7fb;
    color: var(--blue);
}
.preview-eye-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.preview-eye-button:hover {
    border-color: rgba(196, 142, 63, .42);
    background: #fff8e8;
    color: #9b6924;
}
.tariff-invoice-preview {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(15, 105, 156, .18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(247, 251, 253, .98), rgba(255, 255, 255, .98)),
        radial-gradient(circle at 95% 0%, rgba(196, 142, 63, .12), transparent 32%);
    box-shadow: 0 14px 34px rgba(16, 43, 66, .07);
}
.tariff-invoice-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dce9f0;
}
.tariff-invoice-preview-head span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.tariff-invoice-preview-head strong {
    color: var(--ink);
    text-align: right;
}
.tariff-invoice-preview-body {
    color: var(--muted);
    font-weight: 720;
    line-height: 1.55;
}
.tariff-invoice-preview-body p {
    margin: 0 0 10px;
}
.tariff-preview-recipient {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 105, 156, .16);
    border-radius: 8px;
    background: #f7fbfd;
}
.tariff-preview-recipient span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.tariff-preview-recipient strong {
    color: var(--ink);
    overflow-wrap: anywhere;
    text-align: right;
}
.tariff-preview-warning {
    padding: 10px 12px;
    border: 1px solid rgba(196, 142, 63, .38);
    border-radius: 8px;
    background: #fff8e8;
    color: #9b6924;
}
.tariff-preview-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(38, 153, 112, .24);
    border-radius: 8px;
    background: #f4fbf7;
}
.tariff-preview-amount span {
    color: var(--ink);
    font-weight: 900;
}
.tariff-preview-amount strong {
    color: #147653;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .tariff-adjustment-dialog .tariff-adjustment-form { padding: 18px; }
    .tariff-services-editor { padding: 12px; }
    .tariff-service-row { grid-template-columns: minmax(0, 1fr) 38px; }
    .tariff-service-row label:first-child { grid-column: 1 / -1; }
    .tariff-service-row label:nth-child(2) { grid-column: 1; }
    .tariff-service-row .tariff-service-remove { grid-column: 2; }
    .tariff-form-grid { grid-template-columns: 1fr; }
    .tariff-adjustment-actions { align-items: stretch; }
    .tariff-adjustment-actions > span { width: 100%; }
    .invoice-action-modal {
        align-items: end;
        padding: 10px;
    }

    .invoice-action-dialog {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .invoice-action-dialog-head {
        grid-template-columns: minmax(0, 1fr) 42px;
        padding: 16px;
    }

    .invoice-admin-footer-actions,
    .tariff-adjustment-actions {
        justify-content: stretch;
    }

    .invoice-admin-footer-actions .btn,
    .tariff-adjustment-actions .btn {
        width: 100%;
    }
    .invoice-admin-footer-actions form { width: 100%; }

    .tariff-due-grid {
        grid-template-columns: 1fr;
    }

    .tariff-invoice-preview-head,
    .tariff-preview-recipient,
    .tariff-preview-amount {
        align-items: flex-start;
        flex-direction: column;
    }

    .tariff-invoice-preview-head strong,
    .tariff-preview-recipient strong {
        text-align: left;
    }
}
.case-tabs {
    position: sticky;
    top: calc(var(--topbar-height, 68px) + var(--case-tabs-gap, 12px));
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(216, 232, 239, .72);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.case-tabs-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}
.case-tabs-client-access {
    justify-self: end;
    margin: 0 8px 0 10px;
}
.case-tabs-client-access .client-access-btn {
    min-height: 40px;
    padding-inline: 16px;
    white-space: nowrap;
}
.case-tabs.is-floating {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--topbar-height, 68px) + var(--case-tabs-gap, 12px));
    z-index: 995;
    margin: 0;
    padding: 7px clamp(18px, 4vw, 52px) 9px;
    border-top: 1px solid rgba(216, 232, 239, .74);
    border-bottom: 1px solid rgba(216, 232, 239, .86);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 38px rgba(16,43,66,.12);
}
.case-tabs.is-floating::before {
    content: '';
    position: absolute;
    inset: calc(0px - var(--case-tabs-gap, 12px)) 0 auto;
    height: var(--case-tabs-gap, 12px);
    background: var(--cream);
    pointer-events: none;
}
body.document-viewer-open .case-tabs,
body.document-viewer-open .case-tabs-placeholder {
    display: none !important;
}
.case-tabs-placeholder[hidden] {
    display: none;
}
.case-tabs a,
.case-tabs button {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    padding: 9px 13px;
    text-decoration: none;
    font-weight: 900;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}
.case-tabs a:hover,
.case-tabs button:hover {
    border-color: rgba(196, 142, 63, .48);
    color: #9b6924;
    background: #fffaf2;
}
.case-tabs .case-tab-viewer {
    border-color: rgba(15, 105, 156, .2);
    background: linear-gradient(135deg, #0f6a9d, #17856f);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 105, 156, .18);
}
.case-tabs .case-tab-viewer:hover {
    border-color: rgba(196, 142, 63, .38);
    background: linear-gradient(135deg, #0c5d8c, #14775f);
    color: #fff;
    transform: translateY(-1px);
}
.case-tabs .case-tab-viewer:disabled {
    opacity: .52;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
@media (max-width: 1280px) {
    .case-tabs {
        grid-template-columns: 1fr;
    }
    .case-tabs-client-access {
        justify-self: end;
        margin-right: 8px;
    }
}
.case-workstation-shell [id] {
    scroll-margin-top: calc(var(--topbar-height, 68px) + var(--case-tabs-height, 62px) + var(--case-tabs-gap, 12px) + 24px);
}
.fiscal-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.fiscal-summary-grid article {
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    padding: 14px;
    display: grid;
    gap: 6px;
}
.fiscal-summary-grid strong {
    color: var(--ink);
    font-size: 18px;
}
.fiscal-summary-grid p {
    margin: 0;
    color: var(--muted);
}
.compact-person-list {
    display: grid;
    gap: 5px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.compact-person-list li {
    border-left: 3px solid #c8e9d6;
    border-radius: 6px;
    background: #f4fbf7;
    color: var(--ink);
    padding: 7px 9px;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.35;
}
.compact-person-list.dependents li {
    border-left-color: #efd3a8;
    background: #fff8ec;
}
.case-alimony-summary { margin-top: 16px; padding: 18px; border: 1px solid #d6e7ed; border-radius: 16px; background: linear-gradient(135deg, #f7fbfd, #fff); }
.case-alimony-summary-head h3 { margin: 3px 0 14px; color: var(--ink); }
.case-alimony-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.case-alimony-summary-grid article { min-width: 0; padding: 15px; border: 1px solid #deebf0; border-radius: 12px; background: #fff; }
.case-alimony-summary-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #edf2f4; }
.case-alimony-summary-title span { color: #176487; font-weight: 800; }
.case-alimony-summary-title strong { color: var(--ink); }
.case-alimony-summary-grid small { display: block; color: var(--muted); font-weight: 750; }
.case-alimony-summary-name { display: block; margin-top: 4px; color: var(--ink); font-size: 17px; }
.case-alimony-summary-grid p { margin: 5px 0 0; color: #526d7e; overflow-wrap: anywhere; }
@media (max-width: 700px) { .case-alimony-summary-grid { grid-template-columns: 1fr; } }
.case-client-context {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #c8e9d6;
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 0%, rgba(44, 132, 91, .14), transparent 34%),
        linear-gradient(135deg, #f7fcf9, #ffffff);
}
.case-client-context .context-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.case-client-context .context-head span {
    border-radius: 999px;
    padding: 7px 12px;
    background: #eaf7ef;
    color: #21744f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.case-client-context .context-head strong {
    color: var(--ink);
}
.context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.context-grid article {
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    padding: 14px;
}
.context-grid article span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.context-grid article strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
    font-size: 18px;
}
.context-grid article p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}
.case-move-history { display: grid; gap: 10px; margin: 13px 0 0; padding: 0; list-style: none; }
.case-move-history li { min-width: 0; padding: 11px 13px; border: 1px solid #e0e9ed; border-radius: 10px; background: #fbfdfd; }
.case-move-history li span { color: #6f8795; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.case-move-history li p { margin: 4px 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.case-move-history li small { color: var(--muted); font-size: 12px; }
.housing-context-card {
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,251,253,.92)),
        #fff;
}
.housing-context-details {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    min-width: 0;
}
.housing-context-line,
.housing-estate-line {
    display: grid;
    grid-template-columns: minmax(72px, .5fr) minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(216, 232, 239, .92);
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.housing-context-line {
    grid-template-columns: minmax(74px, .42fr) minmax(120px, 1fr) minmax(110px, .82fr);
}
.housing-estate-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: start;
    padding: 12px 14px;
}
.housing-context-line b,
.housing-estate-line b {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    line-height: 1.2;
}
.housing-context-line span,
.housing-estate-line span,
.housing-estate-line em,
.housing-estate-line small {
    display: block;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.housing-estate-line span {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 950;
}
.housing-estate-line em {
    font-size: 13px;
    font-weight: 900;
}
.housing-context-line em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.housing-context-line.highlight {
    border-color: rgba(15, 105, 156, .18);
    background: #f4fafc;
}
.housing-context-line.note {
    grid-template-columns: minmax(74px, .35fr) 1fr;
}
.housing-estate-line small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}
.housing-estate-line.is-incomplete {
    border-color: rgba(196, 142, 63, .34);
    background: #fffaf2;
}
.housing-estate-line.is-incomplete em,
.housing-estate-line.is-incomplete small {
    color: #9b6924;
}
@media (max-width: 760px) {
    .housing-context-line,
    .housing-estate-line {
        grid-template-columns: 1fr;
        gap: 4px;
        align-items: start;
    }
}
.coherence-alerts {
    margin-top: 14px;
    border: 1px solid #f0c9c9;
    border-radius: 14px;
    background: #fff6f6;
    color: #8f3f3f;
    padding: 14px 16px;
}
.coherence-alerts ul { margin: 8px 0 0; }
.consistency-panel {
    border-color: #d7eadf;
    background:
        radial-gradient(circle at 0% 0%, rgba(43, 143, 93, .10), transparent 32%),
        linear-gradient(135deg, #ffffff, #f8fcfb);
}
.consistency-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.consistency-summary span {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 950;
}
.consistency-summary .ok,
.consistency-card.ok { border-color: #bfe3cf; background: #f3fbf7; color: #1f7a55; }
.consistency-summary .warning,
.consistency-card.warning { border-color: #f3d1a2; background: #fff8ef; color: #9b5f19; }
.consistency-summary .danger,
.consistency-card.danger { border-color: #efbcbc; background: #fff5f5; color: #9b3434; }
.consistency-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.consistency-card {
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    padding: 14px;
}
.consistency-card strong {
    display: block;
    color: var(--ink);
    line-height: 1.25;
}
.consistency-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.collapsible-admin-block {
    padding: 0;
    overflow: hidden;
    scroll-margin-top: calc(var(--topbar-height, 68px) + var(--case-tabs-height, 62px) + var(--case-tabs-gap, 0px) + 24px);
}
.case-followup-panels {
    display: grid;
    gap: 16px;
    margin: 18px 0;
}
.case-followup-panels > .collapsible-admin-block {
    width: 100%;
}
.manual-document-bundle-grid {
    margin-top: 18px;
}
.manual-document-panel {
    min-width: 0;
    border: 1px solid #edf3f6;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f9fcfd);
    padding: 18px;
}
.manual-document-panel h2 {
    margin-top: 0;
}
.manual-document-panel-wide {
    grid-column: 1 / -1;
}
.collapsible-admin-block summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 18px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.collapsible-admin-block summary::-webkit-details-marker {
    display: none;
}
.collapsible-admin-block .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    transition: transform .18s ease;
}
.collapsible-admin-block[open] .collapse-arrow {
    transform: rotate(90deg);
}
.collapsible-admin-block summary h2 {
    margin: 0 0 4px;
}
.collapsible-admin-block summary p {
    margin: 0;
    color: var(--muted);
}
.collapsible-admin-block > .note,
.collapsible-admin-block > form,
.collapsible-admin-block > ul,
.collapsible-admin-block > h3,
.collapsible-admin-block > .log-filters {
    margin-left: 18px;
    margin-right: 18px;
}
.collapsible-admin-block > .note {
    margin-top: 0;
}
.collapsible-admin-block > form,
.collapsible-admin-block > ul {
    margin-bottom: 18px;
}
.collapsible-admin-block > h3 {
    margin-top: 16px;
}
.case-log-timeline {
    display: grid;
    gap: 12px;
    margin: 0 18px 18px;
}
.case-log-entry {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}
.case-log-dot {
    width: 12px;
    height: 12px;
    margin-top: 22px;
    border: 3px solid #d8ebf3;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 0 4px #f4fafc;
}
.case-log-entry:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 38px;
    bottom: -18px;
    width: 2px;
    background: #e1edf2;
}
.case-log-body {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dceaf0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248,252,253,.98), #fff);
    box-shadow: 0 12px 28px rgba(12,54,78,.05);
}
.case-log-body header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.case-log-level {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.case-log-body h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(16px, 1.05vw, 20px);
    line-height: 1.25;
}
.case-log-body time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}
.case-log-actor {
    margin: 8px 0 0;
    color: #607789;
    font-weight: 750;
}
.case-log-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}
.case-log-context div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e4eef3;
    border-radius: 10px;
    background: #fff;
}
.case-log-context dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.case-log-context dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-weight: 850;
    overflow-wrap: anywhere;
}
@media (max-width: 760px) {
    .case-log-body header {
        display: grid;
    }
    .case-log-context {
        grid-template-columns: 1fr;
    }
}
.final-declaration-panel {
    border-color: rgba(38, 143, 97, .22);
    background:
        linear-gradient(135deg, rgba(242, 251, 246, .96), rgba(255, 255, 255, .98) 54%),
        #fff;
}
.final-declaration-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.final-declaration-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.final-declaration-form label {
    margin: 0;
}
.required-hint,
.optional-hint {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #52708a;
}
.required-hint {
    color: #12689a;
}
.final-declaration-form .btn {
    min-height: 58px;
    white-space: nowrap;
}
.final-declaration-files {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}
.final-declaration-email-form {
    margin-top: 14px;
}
.final-declaration-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(16, 60, 92, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}
.final-declaration-file div:first-child {
    min-width: 0;
}
.final-declaration-file span,
.final-declaration-file small {
    display: block;
    color: #60768a;
}
.final-declaration-file span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.final-declaration-file strong {
    display: block;
    overflow-wrap: anywhere;
}
.correction-admin-panel {
    border-color: rgba(37, 99, 160, .18);
}
.correction-admin-list {
    display: grid;
    gap: 12px;
}
.correction-admin-card {
    padding: 16px 18px;
    border: 1px solid rgba(16, 60, 92, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
}
.correction-admin-card.open {
    border-left: 5px solid #b7791f;
}
.correction-admin-card.handled {
    border-left: 5px solid #2f8f61;
}
.correction-admin-card span {
    display: block;
    color: #60768a;
    font-size: 13px;
    font-weight: 800;
}
.correction-admin-card p {
    margin: 8px 0 12px;
}
.correction-resolution-form {
    margin: 14px 0 18px;
}
.correction-admin-response {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(47, 143, 97, .08);
}
.correction-admin-response strong {
    display: block;
    color: #1f6f4a;
}
.correction-action-form,
.correction-close-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.correction-action-form textarea {
    min-height: 92px;
}
.correction-close-form {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
    align-items: end;
}
.correction-close-form label {
    margin: 0;
}
@media (max-width: 760px) {
    .case-workflow-panel {
        gap: 8px;
    }
    .case-priority-card {
        padding: 18px;
    }
    .case-priority-card h2 {
        font-size: 24px;
    }
    .final-declaration-form {
        grid-template-columns: 1fr;
    }
    .final-declaration-fields {
        grid-template-columns: 1fr;
    }
    .final-declaration-form .btn {
        width: 100%;
    }
    .final-declaration-file {
        align-items: stretch;
        flex-direction: column;
    }
    .correction-close-form {
        grid-template-columns: 1fr;
    }
}
.deadline-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 28px;
    border: 1px solid rgba(196, 63, 63, .24);
    border-left: 7px solid #c84f56;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 246, 246, .98), rgba(255, 255, 255, .98));
    box-shadow: 0 18px 42px rgba(116, 52, 52, .08);
}
.deadline-alert-card h2,
.deadline-status-panel h2,
.deadline-confirmation-panel h2 {
    margin: 0;
}
.deadline-alert-card p {
    margin: 8px 0 0;
    color: var(--muted);
}
.deadline-admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}
.deadline-status-panel { min-height: 100%; }
.deadline-collapsible-panel {
    margin: 18px 0;
    border-color: rgba(196, 142, 63, .25);
    background: linear-gradient(135deg, rgba(255, 250, 241, .92), rgba(255, 255, 255, .98));
}
.deadline-collapsible-panel summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}
.deadline-collapsible-panel summary::-webkit-details-marker {
    display: none;
}
.deadline-collapsible-panel summary h2 {
    margin: 0;
}
.deadline-collapsible-panel summary p:not(.eyebrow) {
    margin: 6px 0 0;
    color: var(--muted);
}
.deadline-summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef7fb;
    color: #0d5f93;
    font-weight: 950;
    white-space: nowrap;
}
.deadline-summary-pill.urgent {
    background: #fff0ee;
    color: #a64331;
}
.deadline-date-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 14px;
    padding: 18px 20px;
    border: 1px solid rgba(13, 95, 147, .16);
    border-radius: 8px;
    background: #f7fbfd;
}
.deadline-date-display strong {
    font-size: 2rem;
    color: var(--ink);
}
.deadline-date-display span {
    padding: 9px 14px;
    border-radius: 999px;
    background: #eef7fb;
    color: #0d5f93;
    font-weight: 900;
}
.deadline-date-display.urgent {
    border-color: rgba(196, 63, 63, .28);
    background: #fff6f6;
}
.deadline-date-display.urgent span {
    background: #fff0ee;
    color: #a64331;
}
.deadline-confirmation-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 18px 16px;
    padding: 14px 16px;
    border: 1px solid rgba(38, 153, 112, .25);
    border-radius: 8px;
    background: rgba(242, 251, 247, .96);
}
.deadline-inline-confirmation {
    margin: 20px 0 14px;
    padding: 16px 18px;
    border: 1px solid rgba(13, 95, 147, .16);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(246, 251, 253, .98), rgba(255, 255, 255, .98));
}
.deadline-inline-confirmation strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
    margin-bottom: 4px;
}
.deadline-inline-confirmation p {
    margin: 0;
    color: var(--muted);
}
.deadline-rule-note,
.deadline-rule-client-panel {
    border-color: rgba(38, 153, 112, .26);
    background: linear-gradient(135deg, rgba(242, 251, 247, .98), rgba(255, 255, 255, .98));
}
.deadline-rule-note {
    margin: 16px 0 14px;
    padding: 15px 18px;
    border: 1px solid rgba(38, 153, 112, .26);
    border-radius: 8px;
}
.deadline-rule-note strong {
    display: block;
    color: #147653;
    font-weight: 950;
}
.deadline-rule-note p {
    margin: 4px 0 0;
    color: var(--muted);
}
.deadline-confirmation-form {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.deadline-confirmation-form .note {
    grid-column: 1 / -1;
    margin: 0;
}
.deadline-client-panel {
    border-color: rgba(38, 153, 112, .25);
    background: linear-gradient(135deg, rgba(242, 251, 247, .96), rgba(255, 255, 255, .96));
}
.tax-decision-admin-panel,
.client-tax-decision-panel {
    border-color: rgba(196, 142, 63, .24);
    background: linear-gradient(135deg, rgba(255, 250, 241, .96), rgba(255, 255, 255, .98));
}
.tax-decision-admin-panel .section-title-row,
.client-tax-decision-head {
    align-items: flex-start;
}
.tax-decision-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.tax-decision-summary article,
.tax-decision-client-response,
.client-tax-decision-message,
.secure-reply-note,
.tax-decision-upload-box {
    border: 1px solid rgba(13, 95, 147, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    padding: 14px 16px;
}
.tax-decision-summary article.urgent {
    border-color: rgba(196, 63, 63, .28);
    background: #fff6f6;
}
.tax-decision-summary span,
.tax-decision-summary em {
    display: block;
    color: var(--muted);
    font-weight: 800;
}
.tax-decision-summary strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.18rem;
}
.tax-decision-fields {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr);
    gap: 14px;
}
.tax-decision-form {
    display: grid;
    gap: 14px;
}
.tax-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.client-tax-decision-panel.needs-reply {
    border-left: 7px solid #c48e3f;
}
.client-tax-decision-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.secure-reply-note {
    margin: 14px 0;
    border-color: rgba(38, 153, 112, .25);
    background: rgba(242, 251, 247, .96);
}
.tax-decision-upload-box {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}
.tax-decision-upload-box strong {
    display: block;
    color: var(--ink);
}
.tax-decision-upload-box p {
    margin: 4px 0 0;
    color: var(--muted);
}
.tax-decision-upload-form {
    display: grid;
    grid-template-columns: minmax(170px, .55fr) minmax(0, 1.45fr) auto;
    gap: 10px;
    align-items: end;
}
.tax-decision-upload-form label {
    margin: 0;
}
.tax-decision-upload-form input[type="file"] {
    min-width: 0;
}
.tax-decision-uploaded-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tax-decision-uploaded-list a {
    border: 1px solid rgba(13, 95, 147, .16);
    border-radius: 999px;
    color: var(--primary);
    font-weight: 800;
    padding: 7px 12px;
    text-decoration: none;
}
.secure-reply-note p,
.client-tax-decision-message p,
.tax-decision-client-response p {
    margin: 6px 0 0;
}
@media (max-width: 900px) {
    .deadline-alert-card,
    .deadline-date-display,
    .deadline-confirmation-current,
    .client-tax-decision-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .deadline-admin-grid,
    .deadline-confirmation-form,
    .tax-decision-fields,
    .tax-decision-summary {
        grid-template-columns: 1fr;
    }
    .tax-decision-upload-form {
        grid-template-columns: 1fr;
    }
}
.ai-settings-page .admin-head .muted {
    max-width: 780px;
}
.ai-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
    align-items: start;
}
.ai-settings-main,
.ai-policy-panel {
    grid-column: 1 / -1;
}
.ai-settings-main,
.ai-module-panel,
.ai-policy-panel {
    display: grid;
    gap: 16px;
}
.premium-switch,
.ai-module-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(246, 251, 253, .96), rgba(255, 255, 255, .98));
}
.premium-switch span,
.ai-module-card span {
    display: grid;
    gap: 4px;
}
.premium-switch small,
.ai-module-card small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}
.subtle-check {
    align-items: center;
    color: var(--muted);
}
.ai-module-list {
    display: grid;
    gap: 12px;
}
.ai-module-config {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: visible;
    background: #fff;
}
.ai-module-config summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.ai-module-config summary::-webkit-details-marker {
    display: none;
}
.ai-module-config .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 950;
    transition: transform .18s ease;
}
.ai-module-config[open] .collapse-arrow {
    transform: rotate(90deg);
}
.ai-module-config summary strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
}
.ai-module-config summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
}
.ai-module-config-body {
    display: grid;
    gap: 16px;
    padding: 18px;
}
.ai-module-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    cursor: pointer;
}
.ai-module-card input,
.premium-switch input {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--blue);
}
.ai-module-card.is-cautious {
    background: linear-gradient(135deg, #fff8ed, #fffdf8);
    border-color: #efd1a4;
}
.premium-switch.cautious {
    background: linear-gradient(135deg, #fff8ed, #fffdf8);
    border-color: #efd1a4;
}
.ai-fallback-settings {
    margin-top: 0;
}
.ai-advanced-options {
    margin-top: 2px;
    background: linear-gradient(135deg, #fffaf2, #ffffff);
    border-color: rgba(189, 132, 49, .28);
}
.ai-soft-warning {
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid rgba(189, 132, 49, .22);
    border-radius: 16px;
    background: rgba(255, 248, 237, .82);
}
.ai-soft-warning strong {
    display: block;
    color: var(--gold);
    font-size: 15px;
    text-transform: uppercase;
}
.ai-soft-warning p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 750;
}
.field-label-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.inline-help-popover {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    line-height: 1;
}
.inline-help-popover[open] {
    z-index: 80;
}
.inline-help-popover summary {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    cursor: pointer;
    background: linear-gradient(135deg, #eaf6fd, #fff8ea);
    border: 1px solid rgba(22, 103, 154, .22);
    color: var(--blue);
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    box-shadow: 0 10px 24px rgba(7, 47, 74, .08);
}
.inline-help-popover summary::-webkit-details-marker {
    display: none;
}
.inline-help-popover[open] summary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.inline-help-panel {
    position: absolute;
    z-index: 90;
    top: 32px;
    left: 50%;
    width: min(360px, calc(100vw - 48px));
    transform: translateX(-50%);
    padding: 16px;
    border: 1px solid rgba(22, 103, 154, .18);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 50px rgba(7, 47, 74, .16);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}
.inline-help-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid rgba(22, 103, 154, .18);
    border-top: 1px solid rgba(22, 103, 154, .18);
    background: #fff;
}
.inline-help-panel strong {
    color: var(--ink);
}
.inline-help-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}
.inline-help-panel ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
}
.inline-help-panel li + li {
    margin-top: 6px;
}
.ai-policy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.ai-policy-grid > div {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
}
.ai-policy-grid strong {
    display: block;
    margin-bottom: 8px;
}
.ai-policy-grid ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.5;
}
.ai-settings-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}
.ai-case-panel {
    border-color: rgba(22, 103, 154, .28);
    background: linear-gradient(135deg, #f7fcff, #ffffff);
}
.ai-case-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}
.ai-case-head h2 {
    margin: 0 0 8px;
}
.ai-case-empty,
.ai-analysis-output {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
}
.ai-case-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.ai-case-empty p {
    margin: 4px 0 0;
    color: var(--muted);
}
.ai-analysis-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.ai-analysis-meta span {
    color: var(--muted);
    font-weight: 700;
}
.fiscal-review-panel { border-color: #c9dfe7; background: linear-gradient(135deg, #f7fbfc 0%, #fff 68%); }
.prior-year-documents { display: grid; gap: 17px; padding: 24px; border: 1px solid #bad9e5; border-left: 6px solid #126e94; border-radius: 16px; background: linear-gradient(125deg, #f0f8fb, #fff 65%); box-shadow: 0 12px 32px rgba(15, 62, 81, .07); }
.prior-year-documents-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; }
.prior-year-documents-head > div { min-width: 0; }
.prior-year-documents-head .eyebrow { margin: 0 0 5px; color: #176b8a; }
.prior-year-documents-head h2 { margin: 0; color: #10364d; font-size: clamp(1.2rem, 1.8vw, 1.55rem); }
.prior-year-documents-head p:not(.eyebrow) { margin: 7px 0 0; color: #557585; line-height: 1.5; }
.prior-year-documents-head > .btn { flex: none; }
.prior-year-documents-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prior-year-document-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #d4e5ec; border-radius: 12px; background: #fff; }
.prior-year-document-row > div { display: grid; gap: 4px; min-width: 0; }
.prior-year-document-row span { color: #176b8a; font-size: .76rem; font-weight: 800; }
.prior-year-document-row strong { color: #153b51; font-size: .9rem; overflow-wrap: anywhere; }
.prior-year-document-row .btn { flex: none; }
@media (max-width: 900px) { .prior-year-documents-list { grid-template-columns: 1fr; } .prior-year-documents-head { align-items: flex-start; flex-direction: column; } }
@media (max-width: 520px) { .prior-year-documents { padding: 18px; } .prior-year-document-row { align-items: flex-start; flex-direction: column; } }
.prior-year-review{border:1px solid #c7dfe8;background:linear-gradient(130deg,#f8fcfd,#fff 62%);box-shadow:0 14px 38px rgba(15,62,81,.06)}
.prior-year-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.prior-year-review-head h2{margin:4px 0 8px;color:#10364d;font-size:clamp(1.25rem,2vw,1.65rem)}
.prior-year-review-head p:not(.eyebrow){max-width:78ch;margin:0;color:#5b7584;line-height:1.55}
.prior-year-review-badge{flex:none;padding:9px 14px;border:1px solid #b8d6df;border-radius:999px;background:#eaf5f8;color:#125b78;font-size:.82rem;font-weight:800;white-space:nowrap}
.prior-year-review-context{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin:17px 0 18px;font-size:.85rem}
.prior-year-review-context a{color:#0b6488;font-weight:800;text-decoration:none}
.prior-year-review-context a:hover{text-decoration:underline}
.prior-year-review-context span{color:#67818f}
.prior-year-review-empty{margin:0;padding:16px 18px;border:1px solid #deebef;border-radius:12px;background:#fff;color:#557585}
.prior-year-review-list{display:grid;gap:9px}
.prior-year-review-point{overflow:hidden;border:1px solid #d9e8ed;border-radius:13px;background:#fff}
.prior-year-review-point.is-open{border-left:3px solid #d6ae72}
.prior-year-review-point summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 17px;cursor:pointer;list-style:none}
.prior-year-review-point summary::-webkit-details-marker{display:none}
.prior-year-review-point summary::after{content:'⌄';color:#688493;font-size:1.25rem;line-height:1;transition:transform .2s ease}
.prior-year-review-point[open] summary::after{transform:rotate(180deg)}
.prior-year-review-point summary:focus-visible{outline:3px solid #7bbad2;outline-offset:-3px}
.prior-year-review-point-copy{display:grid;gap:2px;min-width:0;margin-right:auto}
.prior-year-review-point-copy small{color:#77919d;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.prior-year-review-point-copy strong{color:#123c54;overflow-wrap:anywhere}
.prior-year-review-state{flex:none;padding:5px 10px;border-radius:999px;background:#edf6f8;color:#1c6580;font-size:.75rem;font-weight:800}
.prior-year-review-point.is-open .prior-year-review-state{background:#fff3e2;color:#98621c}
.prior-year-review-point-body{padding:0 17px 17px;border-top:1px solid #edf2f4}
.prior-year-review-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}
.prior-year-review-values>span{display:grid;gap:3px;min-width:0;padding:11px 13px;border:1px solid #e4edf0;border-radius:10px;background:#f9fcfd}
.prior-year-review-values small{color:#77909d;font-size:.76rem;font-weight:800}
.prior-year-review-values strong{color:#173d53;font-size:.9rem;overflow-wrap:anywhere}
.prior-year-review-point-body p{margin:12px 0 0;color:#557585;line-height:1.5}
.prior-year-review-point-body .prior-year-review-hint{color:#866027;font-size:.83rem}
.prior-year-review-sources{display:flex;flex-wrap:wrap;gap:8px 13px;margin:12px 0}
.prior-year-review-sources a{color:#0a678a;font-size:.82rem;font-weight:700;text-decoration:none}
.prior-year-review-sources a:hover{text-decoration:underline}
.prior-year-review-decision{display:grid;grid-template-columns:minmax(170px,.75fr) minmax(180px,1.2fr) auto;align-items:end;gap:10px;padding-top:12px;border-top:1px solid #edf2f4}
.prior-year-review-decision label{display:grid;gap:5px;min-width:0;color:#345d71;font-size:.8rem;font-weight:800}
.prior-year-review-decision label span{color:#8095a0;font-weight:600}
.prior-year-review-decision select,.prior-year-review-decision input{width:100%;min-height:40px;padding:8px 11px;border:1px solid #cbdde5;border-radius:9px;background:#fff;color:#153c52;font:inherit;font-weight:600}
.prior-year-review-decision button{min-height:40px}
@media(max-width:860px){.prior-year-review-head{flex-direction:column;gap:12px}.prior-year-review-decision{grid-template-columns:repeat(2,minmax(0,1fr))}.prior-year-review-decision button{justify-self:start}}
@media(max-width:600px){.prior-year-review-decision,.prior-year-review-values{grid-template-columns:1fr}.prior-year-review-point summary{flex-wrap:wrap}.prior-year-review-state{order:2}.prior-year-review-badge{white-space:normal}}
@media(prefers-reduced-motion:reduce){.prior-year-review-point summary::after{transition:none}}
.fiscal-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.fiscal-review-heading h2 { margin: 0 0 8px; }
.fiscal-review-heading p:not(.eyebrow) { margin: 0; max-width: 72ch; color: var(--muted); line-height: 1.55; }
.fiscal-review-local-badge { white-space: nowrap; border: 1px solid #c9dfe7; border-radius: 999px; padding: 9px 13px; color: #27647c; background: #edf6f8; font-size: 13px; font-weight: 750; }
.fiscal-review-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.fiscal-review-overview a { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid #dce9ee; border-radius: 12px; background: #fff; color: #21566d; text-decoration: none; }
.fiscal-review-overview a:hover, .fiscal-review-overview a:focus-visible { border-color: #76a8bb; background: #f5fafc; }
.fiscal-review-overview a span { color: #5c7886; font-size: 12px; line-height: 1.4; }
.fiscal-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fiscal-review-card { min-width: 0; padding: clamp(18px, 2.2vw, 28px); border: 1px solid #dce9ee; border-radius: 20px; background: #fff; box-shadow: 0 12px 36px rgba(12, 53, 76, .045); }
.fiscal-review-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.fiscal-review-card h3 { margin: 0 0 7px; font-size: clamp(18px, 1.6vw, 22px); }
.fiscal-review-card-head p { margin: 0; color: var(--muted); line-height: 1.48; }
.fiscal-review-card-head form { flex: 0 0 auto; }
.fiscal-review-empty { margin: 22px 0 0; padding: 16px; border-radius: 12px; background: #f3f8fa; color: #5a7484; }
.fiscal-review-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid #e2edf0; color: #607b89; font-size: 13px; }
.fiscal-review-meta strong { color: #176481; }
.fiscal-review-meta .fiscal-review-stale { color: #a56916; }
.fiscal-review-coverage { margin: 12px 0; padding: 12px 15px; border: 1px solid #dce9ee; border-radius: 12px; background: #f8fbfc; color: #4f6f7f; font-size: 13px; }
.fiscal-review-coverage summary { cursor: pointer; color: #176481; font-weight: 750; }
.fiscal-review-coverage p { margin: 10px 0; line-height: 1.45; }
.fiscal-review-coverage ul { margin: 10px 0 0; padding-left: 20px; }
.fiscal-review-coverage li { margin: 6px 0; }
.fiscal-review-legacy { color: #8a641e; font-size: 13px; }
.fiscal-review-points { display: grid; gap: 12px; }
.fiscal-review-point { padding: 16px; border: 1px solid #e3edf0; border-radius: 14px; background: #fbfdfe; }
.fiscal-review-point-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.fiscal-review-point-title span { color: #8a641e; font-size: 12px; font-weight: 750; }
.fiscal-review-point p { margin: 8px 0; color: #5b7584; line-height: 1.45; }
.fiscal-review-values { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fiscal-review-values span { padding: 6px 9px; border-radius: 8px; background: #edf5f7; font-size: 13px; font-weight: 700; }
.fiscal-review-sources { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #6a8190; }
.fiscal-review-sources a { color: #126a94; }
.fiscal-review-point .fiscal-review-note { color: #284c60; font-style: italic; }
.fiscal-review-decision { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(160px, 1.5fr) auto; gap: 8px; margin-top: 14px; }
.fiscal-review-decision select, .fiscal-review-decision input { min-width: 0; }
.provider-governance-list { display: grid; gap: 8px; margin: 18px 0; }
.provider-governance-list > div { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #e1ebef; border-radius: 11px; background: #fbfdfe; }
.provider-governance-list > div > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; }
.provider-governance-list .is-done { color: #1d805c; background: #e8f6ee; }
.provider-governance-list .is-pending { color: #a87420; background: #fff4df; }
.provider-governance-list small { color: #6a8190; white-space: nowrap; }
@media (max-width: 1100px) {
    .fiscal-review-grid, .fiscal-review-overview { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .fiscal-review-heading, .fiscal-review-card-head { flex-direction: column; }
    .fiscal-review-local-badge { white-space: normal; }
    .fiscal-review-decision { grid-template-columns: 1fr; }
}
.users-rights-form {
    display: grid;
    gap: 18px;
}
.users-rights-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #f7fcff, #fff);
}
.users-rights-intro h2 {
    margin: 0 0 6px;
}
.users-rights-intro p {
    margin: 0;
    color: var(--muted);
}
.backend-user-list,
.client-user-list,
.role-rights-list {
    display: grid;
    gap: 12px;
}
.backend-user-row,
.client-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
}
.backend-user-row strong,
.client-user-row strong {
    display: block;
    color: var(--ink);
}
.backend-user-row span,
.client-user-row span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
}
.backend-user-row label {
    margin: 0;
    min-width: 220px;
}
.backend-otp-panel {
    grid-column: 1 / -1;
    border: 1px solid rgba(216,232,239,.9);
    border-radius: 14px;
    background: #f8fcfd;
    padding: 10px 12px;
}
.backend-otp-panel summary {
    cursor: pointer;
    font-weight: 850;
    color: var(--ink);
}
.backend-otp-panel[open] summary {
    margin-bottom: 10px;
}
.backend-otp-panel .qr-payment-card-image {
    width: 180px;
    max-width: 100%;
    margin: 8px 0;
}
.backend-otp-panel label {
    margin-top: 10px;
    max-width: 360px;
}
.backend-otp-panel .btn {
    margin-top: 10px;
}
.client-user-row > div:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.role-rights-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}
.role-rights-card summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.role-rights-card summary::-webkit-details-marker {
    display: none;
}
.role-rights-card .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 950;
    transition: transform .18s ease;
}
.role-rights-card[open] .collapse-arrow {
    transform: rotate(90deg);
}
.role-rights-card summary strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
}
.role-rights-card summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
}
.role-rights-card summary em {
    border-radius: 999px;
    padding: 7px 10px;
    background: #eef6fb;
    color: var(--blue);
    font-style: normal;
    font-weight: 950;
    font-size: 12px;
    text-transform: uppercase;
}
.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}
.permission-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
}
.permission-card input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--ok);
}
.permission-card strong {
    display: block;
    color: var(--ink);
}
.permission-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}
.permission-card.is-enabled {
    border-color: #bfe2cf;
    background: linear-gradient(135deg, #f3fbf7, #fff);
}
.permission-card.is-locked {
    cursor: default;
    opacity: .82;
}
.users-rights-actions {
    display: flex;
    justify-content: flex-end;
}
.case-delivery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
    gap: 16px;
    align-items: stretch;
}
.case-delivery-grid > .panel {
    margin: 0;
}
.internal-files-panel {
    border-color: #cfe6dc;
    background:
        linear-gradient(135deg, rgba(244, 251, 247, .95), rgba(255, 255, 255, .98)),
        #fff;
}
.internal-files-panel summary {
    background: linear-gradient(135deg, #f3fbf7, #fff);
}
.internal-files-notice {
    display: grid;
    gap: 4px;
    margin: 0 18px 16px;
    padding: 14px 16px;
    border: 1px solid #bfe2cf;
    border-radius: 14px;
    background: #f3fbf7;
    color: #0b2f4a;
}
.internal-files-notice strong {
    color: #1f7a52;
}
.internal-files-notice p {
    margin: 0;
    color: var(--muted);
}
.internal-file-upload-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.internal-file-list {
    display: grid;
    gap: 10px;
    margin: 0 18px 18px;
}
.internal-file-list-title {
    margin: 8px 18px 10px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}
.internal-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.internal-file-row strong {
    display: block;
    overflow-wrap: anywhere;
}
.internal-file-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}
.internal-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.btn.danger-soft {
    color: var(--danger);
    border-color: #f0c8c8;
    background: #fff8f8;
}
.btn.danger-soft:hover {
    background: #ffecec;
}
@media (max-width: 760px) {
    .internal-file-upload-form,
    .internal-file-row {
        grid-template-columns: 1fr;
    }
    .internal-file-actions {
        justify-content: stretch;
    }
    .internal-file-actions .btn,
    .internal-file-actions form,
    .internal-file-actions button {
        width: 100%;
    }
}
.missing-request-panel summary {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}
.summary-count {
    justify-self: end;
    align-self: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff3df;
    color: #9b6924;
    font-size: 13px;
    white-space: nowrap;
}
.missing-request-panel > .missing-floating-bar {
    margin-left: 18px;
    margin-right: 18px;
}
.document-category-control .section-title-row {
    align-items: center;
    margin-bottom: 18px;
}
.section-title-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.section-title-actions form {
    margin: 0;
}
.document-quick-summary {
    max-width: 780px;
    margin: 18px 0 24px;
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid #d9dde1;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(16, 31, 43, .08);
}
.document-quick-summary h3 {
    margin: 0 0 20px;
    color: #101820;
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.2;
}
.document-quick-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.document-quick-stat {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 122px;
    padding: 14px 8px;
    border: 1.5px solid currentColor;
    border-radius: 20px;
    text-align: center;
}
.document-quick-stat strong {
    font-size: clamp(30px, 3vw, 38px);
    line-height: 1.1;
}
.document-quick-stat span {
    margin-top: 10px;
    font-size: clamp(15px, 1.6vw, 20px);
    line-height: 1.2;
}
.document-quick-stat.approved { color: #087b55; background: #eff8f4; border-color: #b8dfcf; }
.document-quick-stat.received { color: #1555c4; background: #f0f4ff; border-color: #b8cbf4; }
.document-quick-stat.flagged { color: #b96600; background: #fff7ed; border-color: #f3d3a9; }
.document-quick-stat.missing { color: #c91f1f; background: #fff1f1; border-color: #f2b7ba; }
.document-quick-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    min-height: 72px;
    margin-top: 24px;
    padding: 12px 20px;
    border: 1.5px solid #d9dde1;
    border-radius: 20px;
    background: #fff;
    color: #101820;
    font: inherit;
    font-size: clamp(18px, 2.2vw, 27px);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.document-quick-download svg { width: 29px; height: 29px; flex: none; }
.document-quick-download:hover:not(:disabled) { background: #f5f8fa; border-color: #a9bac3; }
.document-quick-download:focus-visible { outline: 3px solid #81b5ca; outline-offset: 3px; }
.document-quick-download:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) {
    .document-quick-summary { padding: 22px; border-radius: 20px; }
    .document-quick-summary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .document-quick-stat { min-height: 100px; border-radius: 16px; }
    .document-quick-download { min-height: 62px; gap: 12px; border-radius: 16px; }
}
.document-replacement-open-btn {
    border-color: #d7b36f;
    background: #fff8eb;
    color: #825414;
    box-shadow: 0 9px 20px rgba(130, 84, 20, .1);
}
.document-replacement-open-btn:hover {
    border-color: #bd8731;
    background: #fff1d6;
    color: #68400b;
}
.document-reference-state-mini {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid #bde2ce;
    border-radius: 999px;
    padding: 0 12px;
    background: #effaf4;
    color: #1c704c;
    font-size: 12px;
    font-weight: 900;
}
.document-reference-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr) auto;
    gap: 18px;
    align-items: center;
    margin: 0 0 18px;
    border: 1px solid #bce2cd;
    border-left: 5px solid #229163;
    border-radius: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f1fbf6, #fbfefd);
    box-shadow: 0 14px 34px rgba(31, 111, 77, .08);
}
.document-reference-banner-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
}
.document-reference-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #208d60;
    color: #fff;
    font-size: 20px;
    font-weight: 950;
}
.document-reference-banner .eyebrow {
    margin: 0 0 3px;
    color: #21815a;
}
.document-reference-banner h3 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
}
.document-reference-banner p:not(.eyebrow) {
    margin: 5px 0 0;
    color: var(--muted);
    font-weight: 700;
}
.document-reference-details {
    display: grid;
    gap: 7px;
    margin: 0;
}
.document-reference-details div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
}
.document-reference-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.document-reference-details dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.document-reference-restore-btn {
    border-color: #d5e4eb;
    background: #fff;
    color: #315c70;
    white-space: nowrap;
}
.document-replacement-dialog {
    width: min(760px, 100%);
}
.document-replacement-form {
    display: grid;
    gap: 16px;
    padding: 20px;
}
.document-replacement-impact {
    border: 1px solid #efd3a8;
    border-radius: 10px;
    padding: 13px 15px;
    background: #fff8ec;
    color: #76501b;
}
.document-replacement-impact strong {
    display: block;
    color: #70470f;
}
.document-replacement-impact p {
    margin: 4px 0 0;
}
.document-replacement-dropzone {
    display: grid;
    gap: 5px;
    border: 2px dashed #a9d1e2;
    border-radius: 12px;
    padding: 20px;
    background: #f7fbfd;
    color: var(--muted);
    cursor: pointer;
}
.document-replacement-dropzone:hover {
    border-color: #4c9dc4;
    background: #f0f8fc;
}
.document-replacement-dropzone-title {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}
.document-replacement-dropzone input {
    margin-top: 8px;
}
.document-replacement-selection {
    margin-top: -7px;
    color: #3d667a;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.document-replacement-selection.is-error {
    color: #b33f3f;
}
.document-replacement-form > label:not(.document-replacement-dropzone):not(.document-replacement-confirm) {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 850;
}
.document-replacement-form textarea {
    min-height: 96px;
}
.document-replacement-form small {
    color: var(--muted);
    font-weight: 700;
}
.document-replacement-confirm {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid #c9e4d5;
    border-radius: 10px;
    padding: 13px;
    background: #f3faf6;
    color: #235e45;
    font-weight: 800;
}
.document-replacement-confirm input {
    margin-top: 3px;
}
.document-replacement-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}
.quick-review-panel,
.document-rubric-control-panel {
    margin: 0 0 20px;
    border: 1px solid rgba(13, 95, 147, .18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(247, 251, 253, .98), rgba(255, 255, 255, .96)),
        radial-gradient(circle at top right, rgba(38, 153, 112, .10), transparent 34%);
    box-shadow: 0 18px 48px rgba(20, 50, 74, .075);
    overflow: hidden;
}
.quick-review-panel summary::-webkit-details-marker,
.document-rubric-control-panel summary::-webkit-details-marker {
    display: none;
}
.quick-review-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: clamp(16px, 2vw, 22px);
    cursor: pointer;
    list-style: none;
}
.quick-review-head .collapse-arrow {
    transition: transform .18s ease;
}
.quick-review-panel[open] .quick-review-head .collapse-arrow,
.document-rubric-control-panel[open] .quick-review-head .collapse-arrow {
    transform: rotate(90deg);
}
.quick-review-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(22px, 2vw, 30px);
    letter-spacing: 0;
}
.quick-review-head p {
    margin: 6px 0 0;
    max-width: 780px;
    color: var(--muted);
    line-height: 1.45;
}
.quick-review-meter {
    min-width: 174px;
    display: grid;
    gap: 3px;
    justify-items: end;
    padding: 13px 15px;
    border: 1px solid #cfe4ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(20, 50, 74, .055);
}
.quick-review-meter strong {
    color: var(--blue);
    font-size: 26px;
    line-height: 1;
}
.quick-review-meter span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-align: right;
}
.quick-review-simple-list {
    display: grid;
    gap: 8px;
    justify-items: stretch;
    align-items: stretch;
    padding: 0 clamp(16px, 2vw, 22px) clamp(16px, 2vw, 22px);
    border-top: 1px solid #e4eef4;
}
.quick-review-simple-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(170px, .42fr) auto;
    gap: 12px;
    align-items: center;
    justify-self: stretch;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding: 12px;
    border: 1px solid #d9e8ef;
    border-left: 4px solid #d9e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 50, 74, .035);
    text-align: left;
}
.quick-review-simple-row > div:first-child,
.quick-review-simple-row small {
    justify-self: start;
    text-align: left;
}
.quick-review-simple-row.review { border-left-color: var(--gold); }
.quick-review-simple-row.alert { border-left-color: #b24b4b; }
.quick-review-simple-row.ok { border-left-color: #4f9d75; }
.quick-review-simple-row span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.quick-review-simple-row strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.18;
}
.quick-review-simple-row small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}
.quick-review-simple-row .btn {
    min-width: 92px;
    justify-content: center;
}
.document-inline-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    justify-self: end;
}
.document-inline-actions form {
    margin: 0;
}
.btn.icon-only,
.category-document-row .btn.icon-only,
.document-inline-actions .btn.icon-only {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}
body.document-viewer-open {
    overflow: hidden;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.document-viewer-modal[hidden] {
    display: none;
}
.document-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 260;
    padding: 16px;
    background: rgba(9, 31, 49, .52);
    backdrop-filter: blur(12px);
}
.document-viewer-shell {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(0, 2fr) minmax(300px, .82fr);
    gap: 12px;
    border: 1px solid rgba(216, 232, 239, .68);
    border-radius: 18px;
    background: #f6fafc;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .26);
    overflow: hidden;
    transition: grid-template-columns .18s ease;
}
.document-viewer-shell.is-actions-collapsed {
    grid-template-columns: minmax(260px, .58fr) minmax(0, 2.8fr);
}
.document-viewer-list,
.document-viewer-actions {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    overflow: auto;
}
.document-viewer-list {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}
.document-viewer-actions[hidden] {
    display: none;
}
.document-viewer-list-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 2px 2px 12px;
    border-bottom: 1px solid #e4eef4;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 74%, rgba(255, 255, 255, .92) 100%);
}
.document-viewer-list-head span,
.document-viewer-current span {
    display: block;
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.15;
    text-transform: uppercase;
}
.document-viewer-current strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.document-viewer-list-head strong {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #d7e8ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--ink);
    font-size: 14px;
    line-height: 1;
    font-weight: 900;
}
.document-viewer-list-head strong span {
    display: inline;
    color: var(--blue);
    font-size: 18px;
    line-height: 1;
    font-weight: 950;
    text-transform: none;
}
.document-viewer-priority-context { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid #edcf98; border-radius: 11px; background: #fff8eb; }
.document-viewer-priority-context[hidden] { display: none; }
.document-viewer-priority-context p { display: grid; gap: 3px; margin: 0; }
.document-viewer-priority-context b { color: #794d13; font-size: 13px; line-height: 1.3; }
.document-viewer-priority-context small { color: #8d642e; font-size: 11px; font-weight: 700; }
.document-viewer-priority-context button { justify-self: start; padding: 0; border: 0; background: none; color: #0b5f93; font: inherit; font-size: 11px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.document-viewer-items {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}
.document-viewer-item {
    position: relative;
    text-align: left;
    border: 1px solid #dbe8ef;
    border-radius: 12px;
    background: #fff;
    padding: 11px 76px 11px 11px;
    color: var(--ink);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.document-viewer-item.active {
    border-color: #94cde6;
    background: #eef8fc;
    box-shadow: inset 4px 0 0 var(--blue);
}
.document-viewer-item.is-reviewed {
    border-color: #b9e3cf;
    background: #f0fbf5;
    box-shadow: inset 4px 0 0 #34a86f;
}
.document-viewer-item.is-reviewed.active {
    border-color: #75cda0;
    background: #e8f8ef;
    box-shadow: inset 4px 0 0 #188756, 0 10px 24px rgba(24, 135, 86, .11);
}
.document-viewer-item.is-priority-match,
.document-viewer-item.is-reviewed.is-priority-match { border-color: #dda84d; background: #fff8e9; box-shadow: inset 4px 0 0 #c18420; }
.document-viewer-item.is-priority-match.active,
.document-viewer-item.is-reviewed.is-priority-match.active { border-color: #b97918; background: #ffefd0; box-shadow: inset 4px 0 0 #a96712, 0 8px 22px rgba(169, 103, 18, .14); }
.document-viewer-item.is-priority-dim { opacity: .52; }
.document-viewer-item.is-priority-dim.active { opacity: 1; }
.document-viewer-review-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #cfe0e8;
    background: #fff;
    color: #9aaeb9;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
}
.document-viewer-duplicate-toggle {
    position: absolute;
    top: 12px;
    right: 44px;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #e8d2d2;
    background: #fff;
    color: #a96a6a;
    cursor: pointer;
}
.document-viewer-duplicate-toggle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.document-viewer-duplicate-toggle:hover {
    border-color: #d88f8f;
    background: #fff1f1;
    color: #b84242;
}
.document-viewer-review-toggle:hover {
    border-color: #75cda0;
    color: #188756;
}
.document-viewer-item.is-reviewed .document-viewer-review-toggle {
    border-color: #75cda0;
    background: #188756;
    color: #fff;
}
.document-viewer-item span {
    display: block;
    color: var(--gold);
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}
.document-viewer-item strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
    line-height: 1.18;
}
.document-viewer-item small,
.document-viewer-current small,
.document-viewer-shortcuts {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 800;
}
.document-viewer-stage {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
}
.document-viewer-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}
.document-viewer-toolbar [data-viewer-close] {
    margin-right: 74px;
}
.document-viewer-zoom,
.document-viewer-nav-controls {
    display: flex;
    gap: 8px;
}
.document-viewer-zoom {
    justify-self: start;
}
.document-viewer-nav-controls {
    justify-self: center;
}
.document-viewer-zoom .btn,
.document-viewer-nav-controls .btn {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 22px;
    font-weight: 950;
}
.document-viewer-nav-button svg,
.document-viewer-rotate-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.document-viewer-actions-tab {
    position: absolute;
    top: 12px;
    right: -24px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 34px;
    height: 68px;
    border: 1px solid #b9d8e9;
    border-right-color: #dbe8ef;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(180deg, #ffffff, #eef7fb);
    color: var(--blue);
    box-shadow: -8px 10px 24px rgba(13, 47, 72, .12);
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.document-viewer-actions-tab:hover {
    background: linear-gradient(180deg, #fffaf2, #eef7fb);
    color: #9b6924;
    box-shadow: -10px 14px 30px rgba(13, 47, 72, .16);
    transform: translateX(-2px);
}
.document-viewer-actions-tab:focus-visible {
    outline: 3px solid rgba(13, 95, 147, .24);
    outline-offset: 3px;
}
.document-viewer-actions-tab svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.document-viewer-actions-tab.is-collapsed {
    right: 10px;
    border-radius: 14px;
    border-color: #b9d8e9;
    box-shadow: 0 10px 24px rgba(13, 47, 72, .14);
}
.document-viewer-actions-tab.is-collapsed:hover {
    transform: translateX(0);
}
.document-viewer-actions-tab.is-collapsed svg {
    transform: rotate(180deg);
}
.document-viewer-preview {
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background:
        linear-gradient(45deg, rgba(216, 232, 239, .42) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(216, 232, 239, .42) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(216, 232, 239, .42) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(216, 232, 239, .42) 75%),
        #fff;
    background-size: 28px 28px;
    background-position: 0 0, 0 14px, 14px -14px, -14px 0;
    cursor: default;
    overscroll-behavior: contain;
    user-select: none;
}
.document-viewer-preview.is-zoomed {
    cursor: grab;
    place-items: start center;
}
.document-viewer-preview.is-dragging {
    cursor: grabbing;
}
.document-viewer-preview.is-zoomed iframe {
    pointer-events: none;
}
.document-viewer-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    transform-origin: center;
    transition: transform .16s ease;
    box-shadow: 0 18px 48px rgba(20, 50, 74, .18);
}
.document-viewer-preview img {
    max-width: 92%;
    max-height: 92%;
    transform-origin: center;
    transition: transform .16s ease;
    box-shadow: 0 18px 48px rgba(20, 50, 74, .22);
}
.document-viewer-fallback {
    max-width: 520px;
    display: grid;
    gap: 12px;
    padding: 24px;
    border: 1px solid #dbe8ef;
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    text-align: center;
}
.document-viewer-fallback p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}
.document-viewer-fallback div,
.document-viewer-file-actions,
.document-viewer-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.document-viewer-file-actions {
    display: grid;
    padding: 10px;
    border: 1px solid #dbe8ef;
    border-radius: 12px;
    background: #f7fbfd;
}
.document-viewer-file-actions-main {
    display: flex;
    min-width: 0;
    gap: 8px;
}
.document-viewer-file-actions-main [data-viewer-open-link] {
    flex: 1 1 auto;
    min-width: 0;
}
.document-viewer-download-icon {
    flex: 0 0 40px;
    width: 40px;
    padding: 0 !important;
}
.document-viewer-download-icon svg {
    width: 19px;
    height: 19px;
}
.document-viewer-file-actions > [data-viewer-add-photo] {
    justify-self: start;
}
.document-viewer-form {
    display: grid;
    gap: 10px;
}
.document-viewer-form label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 900;
}
.document-viewer-form textarea {
    resize: vertical;
}
.document-viewer-category-hint {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d9e9f2;
    border-radius: 10px;
    background: #f3f9fc;
    color: #174b69;
    font-size: 13px;
    line-height: 1.4;
}
.document-viewer-category-hint[hidden] {
    display: none;
}
.document-viewer-save-feedback {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #bfe5d0;
    border-radius: 10px;
    background: #edf9f3;
    color: #216c4d;
    font-size: 13px;
    font-weight: 800;
}
.document-viewer-save-feedback[hidden] {
    display: none;
}
.document-viewer-save-feedback.is-error {
    border-color: #edc4b8;
    background: #fff3ef;
    color: #9b3f32;
}
.document-viewer-actions > .btn,
.document-viewer-actions form .btn {
    width: 100%;
    justify-content: center;
}
.document-viewer-primary-action {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #bfe5d0;
    border-radius: 12px;
    background: linear-gradient(135deg, #edf9f3, #ffffff);
    box-shadow: 0 10px 24px rgba(23, 118, 78, .08);
}
.document-viewer-primary-action .btn {
    min-height: 44px;
    font-weight: 950;
}
.document-viewer-primary-action small {
    color: #2e7558;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}
.document-duplicate-modal[hidden] {
    display: none;
}
.document-duplicate-modal {
    position: fixed;
    inset: 0;
    z-index: 285;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(9, 31, 49, .58);
    backdrop-filter: blur(8px);
}
.document-duplicate-dialog {
    width: min(100%, 560px);
    display: grid;
    gap: 18px;
    border: 1px solid #e7c8c8;
    border-radius: 12px;
    padding: clamp(20px, 3vw, 30px);
    background: #fff;
    box-shadow: 0 28px 80px rgba(8, 34, 52, .28);
}
.document-duplicate-dialog h3 {
    margin: 5px 0 8px;
    color: var(--ink);
    font-size: 25px;
}
.document-duplicate-dialog p {
    margin: 0;
    color: var(--muted);
}
.document-duplicate-dialog label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 900;
}
.document-duplicate-dialog label small {
    color: var(--muted);
    font-weight: 700;
}
.document-duplicate-notice {
    border: 1px solid #efd4d4;
    border-left: 4px solid #c85e5e;
    border-radius: 8px;
    padding: 11px 13px;
    background: #fff7f7;
    color: #8d4040;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}
.document-duplicate-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.quick-review-empty {
    margin: 0;
    padding: 14px 0 0;
    color: var(--muted);
    font-weight: 800;
}
.document-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}
.document-rubric-control-panel .document-control-grid {
    padding: 0 clamp(16px, 2vw, 22px) clamp(16px, 2vw, 22px);
    border-top: 1px solid #e4eef4;
}
.document-category-card {
    display: grid;
    align-content: start;
    min-width: 0;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fbfdfe);
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(20,50,74,.045);
}
.document-category-card,
.document-category-card * {
    max-width: 100%;
}
.document-category-card header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    min-height: 138px;
    padding: 16px 16px 12px;
    border-left: 5px solid #d8e8ef;
    background: #fff;
}
.document-category-card header > div {
    min-width: 0;
}
.document-category-card.ok header { border-left-color: #4f9d75; }
.document-category-card.missing header { border-left-color: #b24b4b; }
.document-category-card.review header { border-left-color: var(--gold); }
.document-category-card header span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.document-category-card header h3 {
    margin: 3px 0;
    color: var(--ink);
    overflow-wrap: anywhere;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.18;
}
.document-category-card header p {
    margin: 0;
    color: var(--muted);
}

.document-auto-classification {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    width: fit-content;
    margin-top: 6px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.document-auto-classification.high {
    background: #edf8f2;
    color: #1f8c62;
}

.document-auto-classification.medium {
    background: #fff5ea;
    color: #bd7128;
}

.document-auto-classification.low {
    background: #eef5f9;
    color: var(--primary);
}

.document-auto-classification-note {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.document-ocr-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    border: 1px solid #cfe4ed;
    border-radius: 6px;
    padding: 5px 8px;
    background: #f2f8fb;
    color: #275e78;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.document-ocr-status.completed {
    border-color: #bfe2cd;
    background: #eff9f3;
    color: #20734f;
}

.document-ocr-status.failed {
    border-color: #efc1c1;
    background: #fff3f3;
    color: #b43e3e;
}

.document-ocr-status.processing {
    border-color: #edcf9f;
    background: #fff8eb;
    color: #945e0d;
}

.document-ocr-details {
    width: min(100%, 560px);
    margin-top: 7px;
    border: 1px solid #d8e8ef;
    border-radius: 7px;
    background: #fbfdfe;
}

.document-ocr-details > summary {
    padding: 7px 9px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.document-ocr-details > div {
    display: grid;
    gap: 8px;
    border-top: 1px solid #e2edf2;
    padding: 9px;
    color: var(--muted);
    font-size: 12px;
}

.document-ocr-details ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.document-ocr-details p {
    margin: 0;
}

.category-document-row .document-ocr-details .btn {
    width: fit-content;
    max-width: 100%;
}

.btn.ocr-action-btn {
    border-color: #c79a51;
    background: linear-gradient(180deg, #fffaf0, #fff3df);
    color: #85520c;
    box-shadow: 0 7px 16px rgba(170, 112, 28, .12);
}

.btn.ocr-action-btn:hover:not(:disabled) {
    border-color: #a97321;
    background: #fff0d2;
    color: #6f4307;
}

.btn.ocr-action-btn:disabled {
    cursor: not-allowed;
    opacity: .52;
    box-shadow: none;
}

.mini-doc-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.document-category-card header > strong {
    border-radius: 999px;
    background: #f1f5f8;
    color: var(--muted);
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}
.document-category-card.ok header > strong { background: #eaf7ef; color: #1f8c62; }
.document-category-card.missing header > strong { background: #fff0f0; color: #b24b4b; }
.document-category-card.review header > strong { background: #fff5ea; color: #bd7128; }
.category-actions {
    display: grid;
    gap: 10px;
    padding: 12px 16px 14px;
    border-top: 1px solid #eef4f7;
    background: linear-gradient(180deg, #fbfdfe, #fff);
}
.category-actions form { margin: 0; }
.category-primary-actions {
    display: grid;
    grid-template-columns: .72fr 1fr 1fr;
    gap: 8px;
}
.category-secondary-actions {
    position: relative;
}
.category-secondary-actions summary {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #d8e8ef;
    border-radius: 8px;
    background: #f7fbfd;
    color: var(--blue);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.category-secondary-actions summary::-webkit-details-marker {
    display: none;
}
.category-secondary-actions form {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    min-width: 180px;
    padding: 10px;
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(16,43,66,.16);
}
.category-secondary-actions form .btn {
    width: 100%;
}
.category-cover-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
}
.category-cover-select span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.category-cover-select select {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
    min-width: 0;
}
.category-actions .btn {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    white-space: normal;
    line-height: 1.15;
}
.category-primary-actions .btn {
    font-size: 13px;
}
.category-upload-details {
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.category-upload-details summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
    color: var(--blue);
    font-size: 13px;
    font-weight: 950;
}
.category-upload-details summary::-webkit-details-marker {
    display: none;
}
.category-upload-details summary::after {
    content: "⌄";
    color: var(--muted);
    transition: transform .18s ease;
}
.category-upload-details[open] summary::after {
    transform: rotate(180deg);
}
.category-upload-details summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.category-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eef4f7;
    background: #f8fcfd;
}
.category-upload-form input[type="file"] {
    min-width: 0;
    width: 100%;
}
.category-upload-form .btn {
    min-width: 0;
}
.admin-category-dropzone {
    min-height: 104px;
    padding: 14px;
    border-color: #b8dce9;
    background:
        linear-gradient(135deg, rgba(239, 248, 252, .92), rgba(255, 255, 255, .98));
}
.admin-category-dropzone span {
    color: var(--ink);
    font-size: 15px;
}
.admin-category-dropzone small {
    font-size: 12px;
}
.category-upload-form.is-uploading .admin-category-dropzone {
    border-color: #75cda0;
    background: #f0fbf5;
}
.category-cover-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid #e3eef4;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
}
.category-cover-action .btn {
    width: auto;
    min-width: 132px;
    padding-inline: 12px;
}
.category-document-details {
    margin: 0 16px 16px;
    border: 1px solid #dfeaf0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.category-document-details summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
    color: var(--blue);
    font-size: 13px;
    font-weight: 950;
}
.category-document-details summary::-webkit-details-marker {
    display: none;
}
.category-document-details summary::after {
    content: "⌄";
    color: var(--muted);
    font-size: 14px;
    transition: transform .18s ease;
}
.category-document-details[open] summary::after {
    transform: rotate(180deg);
}
.category-document-details summary strong {
    margin-left: auto;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 5px 8px;
    font-size: 12px;
}
.category-document-list {
    display: grid;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #edf3f6;
    min-width: 0;
}
.document-control-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    margin: 10px;
    border: 1px dashed #cfe4ed;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fcfd, #fff);
    color: var(--muted);
    font-size: clamp(18px, 1.35vw, 24px);
    font-weight: 850;
    line-height: 1.35;
    text-align: center;
}
.document-control-possible-match {
    display: grid;
    gap: 10px;
    margin: 10px;
    padding: 16px;
    border: 1px solid #d9e9f2;
    border-radius: 12px;
    background: #f3f9fc;
    color: var(--ink);
}
.document-control-possible-match p {
    margin: 0;
    color: var(--muted);
}
.document-control-possible-match .btn {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.category-document-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid #e1edf2;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    min-width: 0;
    overflow: hidden;
}
.category-document-row .btn,
.category-document-row button,
.category-document-row select,
.category-document-row input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.document-file-name {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.document-file-name strong {
    display: block;
    color: var(--ink);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}
.document-file-name small {
    color: var(--muted);
    min-width: 0;
    overflow-wrap: anywhere;
}
.category-document-row select,
.category-document-row input {
    min-height: 40px;
}
.category-document-row.document-card-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-left: 5px solid #d9e8ef;
    box-shadow: 0 12px 28px rgba(12,54,78,.05);
    cursor: grab;
}
.category-document-row.document-card-row:hover {
    border-color: #c8e0ea;
    border-left-color: var(--blue);
    box-shadow: 0 16px 34px rgba(12,54,78,.09);
}
.category-document-row.document-card-row.is-ok {
    border-color: #bfe7d0;
    border-left-color: #4f9d75;
    background: linear-gradient(135deg, rgba(233,248,240,.96), #fff);
}
.category-document-row.document-card-row.is-extra-document {
    display: none;
}
.document-format-icon {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px;
    padding: 0;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #f2f8fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
}
.document-format-icon.pdf {
    border-color: #f1c8c8;
    background: #fff3f3;
    color: #b64242;
}
.document-format-icon.image {
    border-color: #c8e6d4;
    background: #effaf3;
    color: #25764d;
}
.document-format-icon.word {
    border-color: #bfd7ef;
    background: #f0f7ff;
    color: #175c9f;
}
.document-format-icon.excel {
    border-color: #bfdccf;
    background: #eefaf4;
    color: #1f7a4a;
}
.document-card-primary-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}
.category-document-row .document-card-primary-actions .btn {
    flex: 1;
    width: auto;
    min-width: 0;
    max-width: 220px;
}
.document-ok-toggle {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px;
    border: 1px solid #cfe4ed;
    border-radius: 999px;
    background: #fff;
    color: #8aa0ad;
    font-size: 20px;
    font-weight: 950;
    cursor: pointer;
}
.document-ok-toggle:hover,
.document-ok-toggle[aria-pressed="true"] {
    border-color: #4f9d75;
    background: #2f8d61;
    color: #fff;
    box-shadow: 0 8px 18px rgba(47,141,97,.18);
}
.document-card-more {
    grid-column: 1 / -1;
    min-width: 0;
}
.document-card-more summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #d9e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.document-card-row .document-card-more summary {
    min-width: 116px;
}
.document-card-row .document-file-name strong {
    font-size: clamp(16px, 1vw, 20px);
    line-height: 1.18;
}
.document-card-row .document-file-name small {
    font-size: 13px;
    line-height: 1.35;
}
.document-card-more summary::-webkit-details-marker {
    display: none;
}
.document-card-more > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #edf3f6;
}
.document-card-more > div > .btn {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
}
.document-card-more > div .document-reclassify-hint {
    grid-column: 1 / -1;
}
.document-drag-hint {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    margin: 0;
    padding: 7px 10px;
    border: 1px dashed #c9dfe8;
    border-radius: 12px;
    background: #f7fbfd;
    color: #5f7788;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}
.document-drag-hint span {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: #e9f4f8;
    color: var(--blue);
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -4px;
    padding-right: 3px;
}
.document-card-more > div input[name="internal_note"] {
    grid-column: span 2;
}
.document-show-more {
    justify-self: start;
    margin: 2px 0 0 8px;
}
.document-category-card.is-drop-target {
    outline: 3px solid rgba(19,105,151,.22);
    outline-offset: 4px;
    background: linear-gradient(135deg, rgba(237,247,252,.98), #fff);
}
.document-card-row.is-dragging {
    opacity: .55;
    transform: scale(.99);
    cursor: grabbing;
}
.document-card-row.is-saving {
    pointer-events: none;
    opacity: .72;
}
.category-document-row.is-reclassifying {
    border-color: #efd3a8;
    background: linear-gradient(180deg, #fffaf2, #fff);
}
.category-document-row.is-reclassifying .document-category-select {
    border-color: #d9aa66;
    background: #fff8ec;
    box-shadow: 0 0 0 3px rgba(185,139,69,.10);
}
.document-reclassify-hint {
    margin: -2px 0 0;
    padding: 9px 11px;
    border: 1px solid #efd3a8;
    border-radius: 10px;
    background: #fffaf2;
    color: #9a651f;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}
@media (max-width: 900px) {
    .category-document-row.document-card-row {
        grid-template-columns: 46px minmax(0, 1fr);
    }
    .document-card-primary-actions,
    .document-card-more {
        grid-column: 1 / -1;
    }
    .document-card-primary-actions {
        justify-content: stretch;
    }
    .category-document-row .document-card-primary-actions .btn {
        flex: 1;
        min-width: 0;
    }
    .document-card-more > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .document-card-more > div input[name="internal_note"] {
        grid-column: auto;
    }
}
@media (max-width: 520px) {
    .document-card-more > div {
        grid-template-columns: 1fr;
    }
}
.removed-documents-panel {
    margin-top: 18px;
    border: 1px solid #e4edf2;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(247,251,253,.98), rgba(255,255,255,.96));
    overflow: hidden;
}
.removed-documents-panel summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    list-style: none;
}
.removed-documents-panel summary::-webkit-details-marker {
    display: none;
}
.removed-documents-panel .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #eef4f7;
    color: var(--muted);
    font-weight: 950;
    transition: transform .18s ease;
}
.removed-documents-panel[open] .collapse-arrow {
    transform: rotate(90deg);
}
.removed-documents-panel summary strong {
    color: var(--ink);
    font-size: 17px;
}
.removed-documents-panel summary p {
    margin: 3px 0 0;
    color: var(--muted);
}
.removed-document-list {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}
.removed-document-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e1edf2;
    border-radius: 12px;
    background: #fff;
}
.removed-document-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.removed-document-meta strong,
.removed-document-meta small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.removed-document-meta small {
    color: var(--muted);
}
.removed-document-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.removed-document-reason {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #d9e6ec;
    border-radius: 999px;
    padding: 4px 8px;
    background: #f3f7f9;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}
.removed-document-reason.duplicate {
    border-color: #efc6c6;
    background: #fff0f0;
    color: #b84242;
}
.removed-document-reason.replaced {
    border-color: #efd29d;
    background: #fff7e8;
    color: #8b5a14;
}
.removed-document-reason.rollback {
    border-color: #c8ddea;
    background: #f1f7fa;
    color: #35677f;
}
.removed-document-batch-note {
    max-width: 170px;
    color: #6f8793;
    font-weight: 800;
    text-align: right;
}
@media (max-width: 960px) {
    .document-reference-banner {
        grid-template-columns: 1fr;
    }
    .document-reference-banner form,
    .document-reference-restore-btn {
        width: 100%;
    }
    .document-reference-restore-btn {
        justify-content: center;
    }
}
@media (max-width: 620px) {
    .document-reference-banner-main {
        grid-template-columns: 1fr;
    }
    .document-reference-details div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .document-replacement-actions {
        display: grid;
    }
    .document-replacement-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .removed-document-batch-note {
        max-width: none;
        text-align: left;
    }
}
.duplicate-original-reference {
    color: #8d4c4c !important;
}
.process-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 26px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(90deg, #f7fbfd, #fff);
}
.process-summary span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}
.process-summary strong {
    font-size: 20px;
    color: var(--ink);
}
.process-track {
    --done: #4f9d75;
    --current: var(--blue);
    --future: #d8e4eb;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 8px 0 18px;
    counter-reset: step;
}
.client-process { grid-template-columns: repeat(var(--step-count), minmax(0, 1fr)); }
.next-action-card {
    display: grid;
    gap: 6px;
    margin: 18px 0 24px;
    padding: 18px 20px;
    border: 1px solid #b8dfca;
    border-radius: var(--radius);
    background: linear-gradient(90deg, #f2fbf6, #fff);
}
.next-action-card span {
    color: var(--ok);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.next-action-card strong {
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.25;
}
.next-action-button {
    width: fit-content;
    margin-top: 8px;
}
.client-home-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}
.client-home-head h1 {
    margin-bottom: 8px;
}
.client-dashboard {
    display: grid;
    gap: 16px;
}
.client-dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f7fbfd);
    box-shadow: 0 14px 34px rgba(16, 43, 66, .06);
}
.client-dashboard-heading h1 {
    margin: 4px 0 6px;
    font-size: clamp(27px, 3.2vw, 42px);
}
.client-dashboard-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}
.client-dashboard-heading-actions,
.client-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.client-dashboard-heading-actions {
    justify-content: flex-end;
}
.client-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
    gap: 16px;
    align-items: start;
}
.client-dashboard-main,
.client-dashboard-side {
    display: grid;
    gap: 16px;
}
.client-status-hero,
.client-progress-panel,
.client-quick-panel {
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(16, 43, 66, .07);
}
.client-status-hero {
    padding: clamp(20px, 3.5vw, 34px);
    border-left: 7px solid var(--blue);
    background: linear-gradient(135deg, #f3f9fc, #fff 68%);
}
.client-status-hero.complete {
    border-color: #b8dfca;
    border-left-color: var(--ok);
    background: linear-gradient(135deg, #f0faf5, #fff 68%);
}
.client-status-hero.warning,
.client-status-hero.attention {
    border-left-color: var(--gold);
    background: linear-gradient(135deg, #fff8ee, #fff 68%);
}
.client-status-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}
.client-status-head h2 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 3.6vw, 46px);
    line-height: 1.08;
}
.client-status-head p:not(.eyebrow) {
    max-width: 850px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}
.client-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #eaf7ef;
    color: #21744f;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}
.client-status-hero.attention .client-status-pill,
.client-status-hero.warning .client-status-pill {
    background: #fff0d9;
    color: #8c5b14;
}
.client-deadline-focus {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #cfe5d9;
}
.client-deadline-focus > strong {
    color: var(--ok);
    font-size: clamp(30px, 4.5vw, 54px);
    line-height: 1;
    white-space: nowrap;
}
.client-deadline-focus span {
    display: block;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}
.client-deadline-focus p {
    margin: 5px 0 0;
    color: var(--muted);
}
.client-deadline-focus.appeal {
    border-top-color: #ead8ba;
}
.client-status-actions {
    margin-top: 22px;
}
.client-progress-panel,
.client-quick-panel {
    padding: 20px;
}
.client-progress-panel h2,
.client-quick-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}
.client-progress-panel {
    padding: clamp(20px, 2.5vw, 28px);
    background: linear-gradient(145deg, #fff 15%, #f8fbfd 100%);
}
.client-progress-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.client-progress-heading .eyebrow {
    margin-bottom: 5px;
}
.client-progress-heading h2 {
    margin: 0;
    font-size: clamp(22px, 2.3vw, 28px);
}
.client-progress-summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.client-progress-summary.needs-action {
    background: #fff3df;
    color: #805018;
}
.client-progress-summary.all-clear {
    background: #e9f7f0;
    color: #216d4e;
}
.client-progress-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.client-progress-group {
    min-width: 0;
    padding: clamp(16px, 2vw, 22px);
    border: 1px solid #dbe8ef;
    border-radius: 18px;
    background: #fff;
}
.client-progress-client {
    border-color: #ecdabc;
    background: linear-gradient(155deg, #fffaf2, #fff 55%);
}
.client-progress-cabinet {
    border-color: #cce3e2;
    background: linear-gradient(155deg, #f4fbfa, #fff 55%);
}
.client-progress-group > header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    margin-bottom: 15px;
}
.client-progress-group > header .eyebrow {
    margin: 0 0 3px;
    font-size: 11px;
    letter-spacing: .07em;
}
.client-progress-group h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(17px, 1.8vw, 20px);
    line-height: 1.2;
}
.client-progress-group-icon {
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    height: 38px;
    border-radius: 12px;
    background: #f7e9cf;
    color: #8b601e;
    font-weight: 900;
}
.client-progress-cabinet .client-progress-group-icon {
    background: #dcf1ec;
    color: #197b6a;
}
.client-progress-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.client-progress-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    min-height: 64px;
    padding: 12px;
    border: 1px solid #e5edf1;
    border-radius: 13px;
    background: rgba(255, 255, 255, .88);
}
.client-progress-state-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    background: #e9f0f4;
    color: #587488;
    font-size: 13px;
    font-weight: 900;
}
.client-progress-list li strong,
.client-progress-list li small {
    display: block;
}
.client-progress-list li strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.3;
}
.client-progress-list li small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.client-progress-list li a {
    grid-column: 2;
    justify-self: start;
    color: #0d6594;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.client-progress-list li a:hover,
.client-progress-list li a:focus-visible {
    text-decoration: underline;
}
.client-progress-list li.done .client-progress-state-icon {
    background: var(--ok);
    color: #fff;
}
.client-progress-client li.current {
    border-color: #ebce98;
    background: #fff8eb;
}
.client-progress-client li.current .client-progress-state-icon {
    background: #bc8635;
    color: #fff;
}
.client-progress-cabinet li.current {
    border-color: #bee0da;
    background: #f1faf7;
}
.client-progress-cabinet li.current .client-progress-state-icon {
    background: #248b77;
    color: #fff;
}
.client-quick-links {
    display: grid;
}
.client-quick-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
    color: var(--primary);
    text-decoration: none;
}
.client-quick-links a:last-child {
    border-bottom: 0;
}
.client-quick-links span {
    font-weight: 900;
}
.client-quick-links small {
    color: var(--muted);
    text-align: right;
}
.correction-request-panel {
    border-color: #b8dfca;
    background: linear-gradient(135deg, #f2fbf6, #fff);
}
@media (max-width: 980px) {
    .client-dashboard-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 790px) {
    .client-progress-columns {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .client-dashboard-heading,
    .client-status-head {
        flex-direction: column;
    }
    .client-dashboard-heading-actions,
    .client-dashboard-heading-actions .btn,
    .client-status-actions,
    .client-status-actions .btn {
        width: 100%;
    }
    .client-progress-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .client-deadline-focus {
        grid-template-columns: 1fr;
        gap: 9px;
    }
}
@media (max-width: 430px) {
    .client-quick-links a {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    .client-quick-links small {
        text-align: left;
    }
}
.client-case-accordion {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.client-case-fold {
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #f8fbfd);
    box-shadow: 0 14px 34px rgba(16,43,66,.06);
    overflow: hidden;
}
.client-case-fold.active {
    border-color: #b8dfca;
    box-shadow: 0 16px 38px rgba(33, 116, 79, .1);
}
.client-case-fold summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}
.client-case-fold summary::-webkit-details-marker {
    display: none;
}
.client-case-chevron {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #eef6fa;
    color: var(--blue);
    font-size: 26px;
    font-weight: 900;
    transition: transform .18s ease, background .18s ease;
}
.client-case-fold[open] .client-case-chevron {
    transform: rotate(90deg);
    background: var(--blue);
    color: #fff;
}
.client-case-summary-main {
    min-width: 0;
}
.client-case-summary-main span {
    display: block;
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.client-case-summary-main strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: clamp(19px, 2.2vw, 26px);
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.client-case-summary-main small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
}
.client-case-summary-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.client-case-summary-status em {
    border-radius: 999px;
    padding: 8px 11px;
    background: #fff4e7;
    color: #9d661b;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}
.client-case-summary-status em.done {
    background: #eaf7ef;
    color: #21744f;
}
.client-case-progress-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fcfd 0%, #ffffff 100%);
}
.client-case-progress-line span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}
.client-case-progress-line span::before {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 999px;
    background: #b9c8d1;
}
.client-case-progress-line span.done {
    border-color: #c8e9d6;
    background: #f2fbf6;
    color: #21744f;
}
.client-case-progress-line span.done::before {
    background: #26925f;
}
.client-case-progress-line span.pending {
    border-color: #e5eef3;
    background: #f7fafc;
}
.client-case-fold-body {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px 66px;
}
.next-action-card.compact {
    margin: 0;
    padding: 14px 16px;
}
.next-action-card.compact strong {
    font-size: 20px;
}
.today-action-panel.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}
.client-case-fold-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.takeover-card {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid #ecd1aa;
    background: #fff8ef;
}
.takeover-card.ready {
    border-color: #b8dfca;
    background: #f2fbf6;
}
.takeover-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.takeover-card .btn { margin-top: 14px; }
.process-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--muted);
    text-align: center;
}
.process-step::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 0;
    right: 50%;
    height: 2px;
    background: var(--future);
    z-index: 0;
}
.process-step::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 50%;
    right: 0;
    height: 2px;
    background: var(--future);
    z-index: 0;
}
.process-step:first-child::before,
.process-step:last-child::after { display: none; }
.process-step.done::before,
.process-step.done::after,
.process-step.current::before { background: var(--done); }
.process-dot {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid var(--future);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    z-index: 1;
    box-shadow: 0 0 0 6px #fff;
}
.process-step.done .process-dot {
    border-color: var(--done);
    background: var(--done);
    color: #fff;
}
.process-step.current .process-dot {
    width: 42px;
    height: 42px;
    margin-top: -3px;
    border-color: var(--current);
    color: var(--current);
    box-shadow: 0 0 0 6px #fff, 0 10px 24px rgba(13,95,147,.18);
}
.process-label {
    max-width: 118px;
    min-height: 34px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 750;
}
.process-step.done .process-label { color: var(--done); }
.process-step.current .process-label { color: var(--current); }
.doc-list, .check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.doc-list li { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.doc-list span { color: var(--muted); }

.tax-appeal-create-form,
.tax-appeal-document-form,
.tax-appeal-invoice-form,
.tax-appeal-close-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.tax-appeal-close-form {
    grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr);
}
.tax-appeal-close-form .btn {
    justify-self: start;
}
.tax-appeal-list,
.tax-appeal-documents,
.tax-appeal-log-list {
    display: grid;
    gap: 10px;
}
.tax-appeal-row,
.tax-appeal-documents article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .35fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #dce9ef;
    border-left: 5px solid var(--gold);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f9fcfd);
    box-shadow: 0 12px 30px rgba(20,50,74,.05);
}
.tax-appeal-row.closed {
    border-left-color: #8fb8ca;
    opacity: .82;
}
.tax-appeal-row span,
.tax-appeal-documents span,
.tax-appeal-hero span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.tax-appeal-row strong,
.tax-appeal-documents strong,
.tax-appeal-hero strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
}
.tax-appeal-row p,
.tax-appeal-documents p,
.tax-appeal-hero p {
    margin: 4px 0 0;
    color: var(--muted);
}
.tax-appeal-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.tax-appeal-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tax-appeal-hero article {
    padding: 18px;
    border: 1px solid #dce9ef;
    border-radius: 14px;
    background: #fff;
}
.tax-appeal-hero article.urgent {
    border-color: #efd3a8;
    background: #fff8ec;
}
.tax-appeal-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.tax-appeal-action-card {
    min-height: 330px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
    border-color: #d8e8ef;
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,252,253,.9)),
        #fff;
}
.tax-appeal-action-head {
    display: grid;
    gap: 9px;
}
.tax-appeal-action-head span {
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff5e3;
    color: var(--gold);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.tax-appeal-action-head h2 {
    margin: 0;
    font-size: 24px;
}
.tax-appeal-action-head p,
.tax-appeal-action-state p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.tax-appeal-action-form,
.tax-appeal-invoice-form,
.tax-appeal-close-form {
    align-self: end;
}
.tax-appeal-action-form {
    display: flex;
}
.tax-appeal-action-form .btn {
    min-width: 230px;
}
.tax-appeal-action-state {
    align-self: end;
    padding: 16px;
    border: 1px solid #c8e9d6;
    border-radius: 14px;
    background: #f4fbf7;
}
.tax-appeal-action-state strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
}
.tax-appeal-invoice-form {
    grid-template-columns: minmax(150px, 1fr) minmax(160px, auto);
    width: min(100%, 420px);
}
.tax-appeal-invoice-form label {
    margin: 0;
}
.tax-appeal-invoice-form input {
    min-height: 54px;
    font-size: 18px;
    font-weight: 900;
}
.tax-appeal-invoice-form .btn {
    min-height: 54px;
    white-space: normal;
}
.tax-appeal-close-form {
    grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr);
    width: 100%;
}
.tax-appeal-close-form label {
    margin: 0;
}
.tax-appeal-close-form .btn {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 220px;
}
@media (max-width: 980px) {
    .tax-appeal-action-card {
        min-height: 0;
    }
    .tax-appeal-invoice-form,
    .tax-appeal-close-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .tax-appeal-action-form .btn,
    .tax-appeal-close-form .btn {
        width: 100%;
        min-width: 0;
    }
}
.tax-appeal-documents article {
    grid-template-columns: minmax(0, 1fr) auto;
}
.tax-appeal-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tax-appeal-log-list li {
    padding: 12px 14px;
    border: 1px solid #e1edf2;
    border-radius: 12px;
    background: #fff;
}
.tax-appeal-log-list strong {
    display: block;
    color: var(--ink);
}
.tax-appeal-log-list span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.tax-appeal-log-list.compact {
    padding: 0 18px 18px;
}
.tax-appeal-case-summary summary {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}
.print-case-page {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}
.print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.print-case-header,
.print-info-grid,
.print-check-grid {
    display: grid;
    gap: 12px;
}
.print-case-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #f7fbfd);
    padding: 22px;
}
.print-case-header h1 {
    margin: 4px 0 6px;
}
.print-case-header span {
    display: block;
    color: var(--muted);
}
.print-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.print-info-grid article,
.print-block,
.print-check-grid article {
    border: 1px solid #dbe8ef;
    border-radius: 16px;
    background: #fff;
    padding: 16px;
}
.print-info-grid span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.print-info-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
}
.print-info-grid p,
.print-check-grid p {
    margin: 8px 0 0;
    color: var(--muted);
}
.print-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.print-check-grid article.ok { border-color: #bfe3cf; background: #f6fcf8; }
.print-check-grid article.warning { border-color: #f3d1a2; background: #fffaf3; }
.print-check-grid article.danger { border-color: #efbcbc; background: #fff6f6; }
.print-table {
    width: 100%;
    border-collapse: collapse;
}
.print-table th,
.print-table td {
    border-bottom: 1px solid #e2edf2;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}
.print-log-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}
.print-log-list li {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf3f6;
}
.print-log-list span {
    color: var(--muted);
}
.dropzone { border: 1px dashed #9dcbe4; background: var(--blue-soft); padding: 20px; border-radius: var(--radius); }
.document-center { display: grid; gap: 18px; }
.active-case-banner {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 12px 30px rgba(20,50,74,.06);
}
.active-case-banner.documents-context {
    border-color: #e8b8b8;
    background:
        radial-gradient(circle at 0% 0%, rgba(190, 68, 68, .16), transparent 34%),
        linear-gradient(135deg, #fff5f5, #ffffff);
    box-shadow: 0 16px 36px rgba(150, 54, 54, .12);
}
.active-case-banner div {
    display: grid;
    gap: 3px;
}
.active-case-banner span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.active-case-banner.documents-context span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: #ffe5e5;
    color: #a33b3b;
}
.active-case-banner.documents-complete {
    border-color: #b9e2cc;
    background: linear-gradient(135deg, #effaf4, #ffffff);
    box-shadow: 0 16px 36px rgba(31, 120, 79, .1);
}
.active-case-banner.documents-complete span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: #dff4e8;
    color: #21744f;
}
.active-case-banner strong {
    color: var(--ink);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.2;
}
.case-switcher-modal[hidden] {
    display: none;
}
.case-switcher-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
}
.case-switcher-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 47, 69, .34);
    backdrop-filter: blur(8px);
}
.case-switcher-dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    padding: 26px;
    border: 1px solid #d9e8ef;
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 30px 80px rgba(16,47,69,.24);
}
.case-switcher-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}
.case-switcher-dialog-head h2 {
    margin: 0 0 8px;
    font-size: 34px;
}
.case-switcher-dialog-head p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.case-switcher-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #f7fbfd;
    color: var(--ink);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
}
.quick-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}
.quick-case-card {
    display: grid;
    gap: 7px;
    min-height: 168px;
    padding: 20px;
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(16,47,69,.06);
}
.quick-case-card.active {
    border-color: #97cce7;
    background: linear-gradient(135deg, #eef8fd, #ffffff);
}
.quick-case-card span {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef6fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.quick-case-card strong {
    font-size: 24px;
}
.quick-case-card small {
    color: var(--muted);
    font-weight: 800;
}
.quick-case-card em {
    align-self: end;
    color: #6b8193;
    font-style: normal;
    font-size: 13px;
    line-height: 1.35;
}
.case-switcher-full-link {
    margin-top: 18px;
    width: 100%;
    justify-content: center;
}
.missing-docs-modal[hidden] {
    display: none;
}
.missing-docs-modal {
    position: fixed;
    inset: 0;
    z-index: 82;
    display: grid;
    place-items: center;
    padding: 22px;
}
.missing-docs-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 47, 69, .38);
    backdrop-filter: blur(8px);
    cursor: pointer;
}
.missing-docs-dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    padding: clamp(22px, 3vw, 30px);
    border: 1px solid #d9e8ef;
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 30px 80px rgba(16,47,69,.24);
}
.missing-docs-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}
.missing-docs-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.08;
}
.missing-docs-head p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.missing-docs-icon {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f2fbf6, #ffffff);
    color: var(--ok);
    box-shadow: inset 0 0 0 1px #cfe8dc;
}
.missing-docs-icon::before,
.missing-docs-icon::after {
    content: "";
    position: absolute;
    display: block;
}
.missing-docs-icon::before {
    left: 17px;
    top: 12px;
    width: 18px;
    height: 25px;
    border: 3px solid currentColor;
    border-radius: 4px;
    background:
        linear-gradient(currentColor, currentColor) 5px 7px / 8px 2px no-repeat,
        linear-gradient(currentColor, currentColor) 5px 13px / 8px 2px no-repeat;
}
.missing-docs-icon::after {
    right: 12px;
    bottom: 12px;
    width: 15px;
    height: 9px;
    border: solid var(--blue);
    border-width: 0 0 3px 3px;
    transform: rotate(-45deg);
}
.missing-docs-list {
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 9px;
}
.missing-docs-list li {
    list-style: none;
    position: relative;
    padding: 12px 14px 12px 42px;
    border: 1px solid #d8e8ef;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 850;
}
.missing-docs-list li::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 12px;
    height: 7px;
    border: solid var(--ok);
    border-width: 0 0 3px 3px;
    transform: translateY(-58%) rotate(-45deg);
}
.missing-docs-postal {
    margin-top: 16px;
    border: 1px solid #d8e8ef;
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    background: #fffaf1;
    padding: 14px 16px;
}
.missing-docs-postal strong {
    color: var(--ink);
}
.missing-docs-postal p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 750;
}
.missing-docs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.draft-resume-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid #ead2ad;
    border-left: 5px solid var(--gold);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,248,239,.96), rgba(255,255,255,.96)),
        #fff;
    box-shadow: 0 18px 45px rgba(185,139,69,.12);
    padding: 18px;
    margin-bottom: 18px;
}
.draft-resume-icon {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #fff2d8;
    color: var(--gold);
    box-shadow: inset 0 0 0 1px rgba(185,139,69,.22);
}
.draft-resume-icon::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 13px;
    width: 20px;
    height: 26px;
    border: 3px solid currentColor;
    border-radius: 4px;
    background:
        linear-gradient(currentColor, currentColor) 5px 8px / 9px 2px no-repeat,
        linear-gradient(currentColor, currentColor) 5px 14px / 9px 2px no-repeat;
}
.draft-resume-banner span {
    display: block;
    color: #9b6924;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}
.draft-resume-banner strong {
    display: block;
    margin-top: 3px;
    color: var(--ink);
    font-size: clamp(20px, 2vw, 26px);
}
.draft-resume-banner p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 700;
}
.draft-resume-banner small {
    display: inline-block;
    margin-top: 8px;
    color: #7d6a4c;
    font-weight: 800;
}
.draft-resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}
.draft-resume-actions form {
    margin: 0;
}
.today-action-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.today-action-panel > div {
    display: grid;
    align-content: center;
    gap: 4px;
}
.today-action-panel > div span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.today-action-panel > div strong {
    color: var(--ink);
    font-size: 20px;
}
.today-action-panel > div p {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
}
.today-action-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    padding: 12px;
    text-decoration: none;
    font-weight: 900;
}
.today-action-row span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff0f0;
    color: #b24b4b;
}
.today-action-row.done {
    border-color: #c8e9d6;
    background: #f4fbf7;
}
.today-action-row.done span {
    background: #21744f;
    color: #fff;
}
.draft-resume-modal[hidden] {
    display: none !important;
}
.draft-resume-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
}
.modal-actions {
    justify-content: flex-start;
    margin-top: 18px;
}
.btn.subtle {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}
.btn.subtle:hover {
    background: #f3f7fa;
    color: var(--ink);
}
.soft-status {
    align-self: end;
    color: var(--muted);
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
}
.document-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}
.document-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}
.document-group summary::-webkit-details-marker { display: none; }
.document-group summary::before {
    content: "›";
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    transform: rotate(0deg);
    transition: transform .18s ease;
}
.document-group[open] summary::before { transform: rotate(90deg); }
.document-group summary span { margin-right: auto; }
.document-group summary small { color: var(--muted); font-weight: 650; }
.document-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0 16px 16px;
}
.documents-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,248,251,.96)),
        #fff;
    box-shadow: 0 18px 42px rgba(20,50,74,.08);
}
.documents-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
    margin-bottom: 8px;
}
.documents-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    max-width: 760px;
}
.documents-hero-status {
    border: 1px solid #cfe3ec;
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    display: grid;
    gap: 6px;
}
.documents-hero-status strong {
    color: var(--blue);
    font-size: 18px;
}
.documents-hero-status span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.document-progress-panel {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}
.document-progress-panel > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}
.document-progress-panel strong {
    color: var(--ink);
    font-size: 18px;
}
.document-progress-panel span {
    color: var(--muted);
    font-weight: 750;
}
.document-progress-bar {
    height: 11px;
    border-radius: 999px;
    background: #e9f1f5;
    overflow: hidden;
}
.document-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), #1f8c62);
}
.guided-document-group.todo summary::before {
    background: #e5f3fb;
}
.guided-document-group.done summary::before {
    background: #e6f6ee;
    color: #1f8c62;
}
.guided-document-group.other summary::before {
    background: #fff6e8;
    color: var(--gold);
}
.guided-upload-card .category-dropzone span {
    font-size: 18px;
}
.upload-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 9px;
    background: #fff6e8;
    color: var(--gold);
    font-size: 12px !important;
    font-weight: 900 !important;
}
.upload-state.done {
    background: #e6f6ee;
    color: #1f8c62 !important;
}
.upload-state.pending {
    background: #fff6e8;
    color: var(--gold) !important;
}
.all-good-card {
    margin-top: 16px;
    border: 1px solid #bfe2d1;
    border-radius: 16px;
    background: linear-gradient(180deg, #f5fbf8, #fff);
    padding: 20px;
}
.all-good-card strong {
    color: #1f8c62;
    font-size: 22px;
}
.all-good-card p {
    color: var(--muted);
    margin: 8px 0 0;
}
.client-documents-validated {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) minmax(230px, auto);
    gap: 18px;
    align-items: center;
    border: 1px solid #bce2cd;
    border-left: 5px solid #218d61;
    border-radius: 14px;
    padding: clamp(18px, 3vw, 28px);
    background: linear-gradient(135deg, #f0fbf5, #ffffff);
    box-shadow: 0 18px 42px rgba(31, 111, 77, .09);
}
.client-documents-validated-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #218d61;
    color: #fff;
    font-size: 25px;
    font-weight: 950;
}
.client-documents-validated h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: 0;
}
.client-documents-validated p:not(.eyebrow) {
    margin: 7px 0 0;
    color: var(--muted);
    font-weight: 680;
}
.client-documents-validated-status {
    display: grid;
    gap: 4px;
    border: 1px solid #cae7d7;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}
.client-documents-validated-status strong {
    color: #21744f;
}
.client-documents-validated-status span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}
.client-documents-validated-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
@media (max-width: 820px) {
    .client-documents-validated {
        grid-template-columns: 1fr;
    }
    .client-documents-validated-actions {
        display: grid;
    }
    .client-documents-validated-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
.upload-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdfe;
    padding: 14px;
    display: grid;
    gap: 12px;
    min-height: 210px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.upload-card.has-files { border-color: #b8dfca; background: #f7fcf9; }
.upload-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(20,50,74,.08);
}
.upload-card header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}
.upload-guidance {
    border: 1px solid #dbeaf1;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    padding: 12px 14px;
    color: #385a72;
    font-size: 13.5px;
    line-height: 1.45;
}
.upload-guidance p {
    margin: 0 0 8px;
    font-weight: 800;
    color: var(--ink);
}
.upload-guidance ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 5px;
}
.badge {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge.obligatoire { background: #fff0f0; color: #a84848; }
.badge.recommande { background: #fff7e8; color: #9a681d; }
.badge.optionnel { background: var(--blue-soft); color: var(--blue); }
.category-upload-form,
.photo-upload-form { display: grid; gap: 8px; }
.health-cover-options {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(216,232,239,.9);
    border-radius: 8px;
    background: rgba(247,251,253,.82);
}
.health-cover-options .check-row {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.global-upload-card {
    max-width: 620px;
}
.category-dropzone {
    min-height: 86px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 2px;
    padding: 14px;
    border: 1px dashed #9dcbe4;
    border-radius: var(--radius);
    background: #fff;
    color: var(--blue);
    cursor: pointer;
    border-style: dashed;
    background: #fff;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.category-dropzone:hover {
    border-color: #9dcbe4;
    background: #f7fbfd;
}
.category-upload-form.is-uploading .category-dropzone {
    opacity: .72;
    pointer-events: none;
}
.category-upload-form.is-uploading .category-dropzone::after {
    content: "Chargement " attr(data-upload-current) " / " attr(data-upload-count) "...";
    color: var(--blue);
    font-weight: 900;
}
.category-dropzone.dragging {
    border-color: var(--done, #4f9d75);
    background: #f2fbf6;
    transform: translateY(-1px);
}
.category-dropzone input,
.photo-capture input { display: none; }
.category-dropzone span { font-weight: 900; }
.category-dropzone small { color: var(--muted); }
.photo-capture {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    background: #fff;
    color: var(--blue);
    font-weight: 850;
}
.mini-doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 7px;
    min-width: 0;
}
.mini-doc-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 7px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    min-width: 0;
}
.mini-doc-list span {
    display: block;
    color: var(--muted);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
}
.mini-doc-list form {
    margin: 0;
    min-width: 0;
}
.doc-delete {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #fff0f0;
    color: var(--danger);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.doc-delete:hover {
    background: #ffdede;
}
.otp-login-field {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdfe;
    padding: 12px;
}
.otp-login-field input::placeholder {
    color: var(--muted);
}
.empty-card { color: var(--muted); font-size: 13px; margin: 0; }
.document-submit-bar {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 22px;
    z-index: 30;
    width: min(980px, calc(100vw - 48px));
    transform: translateX(-50%);
    margin-top: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.document-submit-bar form {
    pointer-events: auto;
    padding: 10px;
    border: 1px solid #cfe3ec;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 48px rgba(20,50,74,.16);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
}
.document-submit-bar span {
    color: #385a72;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    max-width: 340px;
}
.document-submit-bar .btn {
    min-height: 50px;
    padding-inline: 24px;
}
.document-center {
    padding-bottom: 132px;
}
.document-center .document-group {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.document-center .document-group + .document-group {
    margin-top: 10px;
}
.document-center .document-group summary {
    padding: 10px 2px 18px;
    border-bottom: 1px solid #dbe7ee;
}
.document-center .document-group summary::before {
    width: 34px;
    height: 34px;
    font-size: 18px;
    background: #edf7fc;
}
.document-center .document-group summary > span:first-of-type {
    display: grid;
    gap: 3px;
}
.document-center .document-group summary > span:first-of-type strong,
.document-center .document-group summary > span:first-of-type {
    font-size: 24px;
    color: var(--ink);
}
.document-center .document-group summary > span:first-of-type small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}
.document-center .document-group summary > small,
.document-group-count {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    padding: 7px 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.document-category-grid {
    gap: 16px;
    padding: 18px 0 6px;
}
.upload-card {
    position: relative;
    min-height: 0;
    padding: 18px;
    gap: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    border-color: #d8e6ee;
    box-shadow: 0 12px 30px rgba(20,50,74,.055);
}
.upload-card.is-complete,
.upload-card.has-files {
    border-color: #b8dfca;
    background: linear-gradient(180deg, #ffffff, #f5fbf8);
}
.upload-card.is-unavailable {
    border-color: #d8e8ef;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}
.upload-card.is-complete::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 5px;
    height: 100%;
    border-radius: 8px 0 0 8px;
    background: var(--ok);
}
.upload-card header {
    min-height: 52px;
    align-items: start;
}
.upload-card-heading {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.upload-card-heading strong,
.upload-card header > strong {
    font-size: 18px;
    line-height: 1.25;
}
.upload-card-heading small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.upload-card.is-complete .upload-card-heading small {
    color: var(--ok);
}
.upload-guidance {
    padding: 12px 14px;
    background: #f9fcfd;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.upload-guidance ul {
    padding-left: 17px;
}
.badge {
    padding: 5px 9px;
    font-size: 10px;
    letter-spacing: 0;
}
.badge.obligatoire {
    background: #fff1f1;
    color: #9f3f3f;
}
.category-dropzone {
    min-height: 74px;
    width: 100%;
    box-sizing: border-box;
    border-color: #a9d3e8;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
}
.upload-card .category-upload-form,
.upload-card .photo-upload-form {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0;
    border-top: 0;
    background: transparent;
}
.upload-card .photo-upload-form {
    display: none;
}
.category-dropzone span {
    font-size: 14px;
}
.category-dropzone small {
    font-size: 12px;
}
.photo-capture {
    min-height: 36px;
    background: #f9fcfd;
}
.empty-card {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.document-unavailable-form {
    margin-top: -4px;
}
.document-unavailable-form button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d6e5ee;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.document-unavailable-form button:hover {
    border-color: rgba(15, 105, 156, .32);
    background: #f4fafc;
    color: var(--blue);
    transform: translateY(-1px);
}
.document-unavailable-form span {
    color: var(--ok);
    font-weight: 950;
}
.document-unavailable-note {
    padding: 12px 14px;
    border: 1px solid #d9e9e0;
    border-radius: 10px;
    background: #f5fbf8;
    color: var(--ink);
}
.document-unavailable-note strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}
.document-unavailable-note p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.45;
}
.document-submit-bar {
    bottom: 22px;
}
.document-submit-bar form {
    max-width: 980px;
    width: 100%;
    border-radius: 18px;
    padding: 12px;
    justify-content: space-between;
}
.document-submit-bar span {
    max-width: 520px;
    padding-left: 6px;
    font-size: 14px;
}
.document-submit-bar span strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
    text-transform: uppercase;
}
.document-submit-bar .btn {
    min-width: 300px;
    box-shadow: 0 12px 28px rgba(13,95,147,.22);
}
.document-submit-bar.ready form {
    border-color: #bfe2d1;
    background: rgba(246,252,248,.96);
}
.document-submit-bar.ready span {
    color: #245f48;
}
.document-submit-bar.ready .btn {
    background: #1f8c62;
    box-shadow: 0 12px 28px rgba(31,140,98,.24);
}
.document-submit-bar.waiting form {
    border-color: #ecd1aa;
}
.final-panel { display: grid; gap: 12px; }
.missing-request-box {
    border: 1px solid #ecd1aa;
    border-radius: var(--radius);
    background: #fff8ef;
    padding: 16px;
}
.missing-request-box.waiting-review {
    border-color: #9dcbe4;
    background: var(--blue-soft);
}
.late-upload-box {
    border: 1px solid #9dcbe4;
    border-radius: var(--radius);
    background: var(--blue-soft);
    padding: 16px;
}
.late-upload-box p { margin: 6px 0 10px; color: var(--muted); line-height: 1.5; }
.late-upload-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}
.late-upload-box li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid rgba(13,95,147,.16);
}
.late-upload-box span { color: var(--muted); }
.postal-documents-panel {
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    box-shadow: 0 18px 45px rgba(20,50,74,.08);
    padding: 20px;
    display: grid;
    gap: 18px;
}
.postal-documents-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: stretch;
}
.postal-documents-head span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.postal-documents-head strong {
    display: block;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.15;
    margin-top: 4px;
}
.postal-documents-head p,
.postal-status-note {
    color: var(--muted);
    line-height: 1.55;
    margin: 8px 0 0;
}
.postal-documents-head address {
    margin: 0;
    border: 1px solid #cfe3ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: inset 4px 0 0 var(--gold);
    color: var(--ink);
    font-style: normal;
    font-weight: 850;
    line-height: 1.55;
    padding: 16px 18px;
}
.postal-document-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.postal-document-item {
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.postal-document-item strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
}
.postal-document-item small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.35;
}
.postal-documents-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.postal-documents-actions form {
    margin: 0;
}
.postal-documents-actions .btn[disabled] {
    opacity: .72;
    cursor: default;
}
.postal-admin-card {
    margin-top: 14px;
    border: 1px solid #ecd1aa;
    border-radius: 14px;
    background: #fff9f0;
    padding: 14px;
    display: grid;
    gap: 10px;
}
.postal-admin-card strong {
    color: var(--ink);
    font-size: 17px;
}
.postal-admin-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}
.postal-admin-card form {
    margin: 0;
}
.missing-request-box ul { margin: 8px 0 0; padding-left: 20px; }
.support-center,
.support-history {
    display: grid;
    gap: 18px;
}
.support-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}
.support-hero h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 54px);
}
.support-hero p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.55;
}
.support-hero-status {
    min-width: 180px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f6fbfd, #fff);
    padding: 16px;
}
.support-hero-status span,
.support-ticket-card small,
.support-admin-row small,
.support-admin-row em {
    color: var(--muted);
}
.support-hero-status strong {
    display: block;
    color: var(--blue);
    font-size: 36px;
}
.support-form {
    display: grid;
    gap: 14px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #fff;
    padding: 18px;
}
.support-ticket-list,
.support-thread {
    display: grid;
    gap: 12px;
}
.support-ticket-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 16px;
}
.support-ticket-card header,
.support-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.support-ticket-card h3,
.support-detail-head h2 {
    margin: 7px 0 4px;
}
.support-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    background: var(--blue-soft);
    color: var(--blue);
}
.support-status.status-open { background: #fff2d8; color: #9b6924; }
.support-status.status-in_progress { background: var(--blue-soft); color: var(--blue); }
.support-status.status-answered { background: #f2fbf6; color: var(--ok); }
.support-status.status-waiting_client { background: #f2fbf6; color: var(--ok); }
.support-status.status-resolved,
.support-status.status-closed { background: #eef2f4; color: var(--muted); }
.support-status.status-spam { background: #fff0f0; color: #a33d3d; }
.support-priority {
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff0f0;
    color: var(--danger);
    font-size: 12px;
    text-transform: uppercase;
}
.support-message {
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #f9fcfd;
    padding: 12px 14px;
}
.support-message.from-client {
    border-color: #ead2ad;
    background: #fffaf1;
}
.support-message.from-admin {
    border-color: #bfe2d1;
    background: #f3fbf7;
}
.support-message.internal {
    border-style: dashed;
    background: #f7f8f9;
}
.support-message p {
    margin: 6px 0;
    color: var(--ink);
    line-height: 1.5;
}
.ai-support-suggest-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fcff, #fff);
}
.ai-support-suggest-form span {
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}
.support-reply-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.support-admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: start;
}
.support-command-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.support-command-card {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #f7fbfd);
    text-decoration: none;
    box-shadow: 0 18px 42px rgba(9, 41, 68, .05);
}
.support-command-card span {
    color: var(--muted);
    font-weight: 850;
}
.support-command-card strong {
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
}
.support-command-card em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}
.support-command-card.warning { border-color: #f0d4a3; background: linear-gradient(135deg, #fff8ec, #fff); }
.support-command-card.info { border-color: #cae4f2; background: linear-gradient(135deg, #f2faff, #fff); }
.support-command-card.success { border-color: #bfe5d2; background: linear-gradient(135deg, #f2fbf6, #fff); }
.support-command-card.danger { border-color: #f0caca; background: linear-gradient(135deg, #fff6f6, #fff); }
.support-admin-list,
.support-admin-detail {
    display: grid;
    gap: 12px;
}
.support-list-head h2 {
    margin: 0;
}
.support-admin-row {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 13px;
}
.support-admin-row.active,
.support-admin-row:hover {
    border-color: #9dcbe4;
    background: #f6fbfd;
}
.support-admin-row strong {
    color: var(--ink);
}
.support-workflow-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: #f9fcfd;
    padding: 14px;
}
.support-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.support-quick-actions form {
    margin: 0;
}
.btn.success {
    border-color: #bfe5d2;
    background: #f2fbf6;
    color: var(--ok);
}
.admin-thread {
    margin-top: 6px;
}
.support-empty-detail {
    min-height: 320px;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--muted);
}
.contact-request-panel {
    margin: 18px 0;
    display: grid;
    gap: 14px;
}
.support-desk-public summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}
.support-desk-public summary::-webkit-details-marker {
    display: none;
}
.support-desk-public summary h2 {
    margin: 0;
}
.support-desk-public summary p:not(.eyebrow) {
    margin: 6px 0 0;
    color: var(--muted);
}
.contact-request-list {
    display: grid;
    gap: 12px;
}
.contact-request-card {
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbfd, #fff);
    padding: 16px;
    display: grid;
    gap: 12px;
}
.contact-request-card header,
.contact-request-card footer,
.contact-request-status {
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-request-card header {
    justify-content: space-between;
}
.contact-request-card h3 {
    margin: 8px 0 4px;
}
.contact-request-card p {
    margin: 0;
    color: var(--ink);
    line-height: 1.55;
}
.contact-request-message,
.contact-reply-history,
.contact-reply-box {
    border: 1px solid #e2edf2;
    border-radius: 14px;
    background: #fbfdfe;
    padding: 14px;
}
.contact-request-message strong,
.contact-reply-history > strong {
    display: block;
    color: var(--ink);
    margin-bottom: 7px;
}
.contact-reply-history {
    display: grid;
    gap: 10px;
}
.contact-reply-item {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #e2edf2;
}
.contact-reply-item:first-of-type {
    padding-top: 0;
    border-top: 0;
}
.contact-reply-item small {
    color: var(--ok);
    font-weight: 800;
}
.contact-reply-item.failed small,
.contact-reply-item.failed em {
    color: #b24b4b;
}
.contact-reply-box {
    padding: 0;
    overflow: hidden;
}
.contact-reply-box summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    padding: 14px;
    cursor: pointer;
    list-style: none;
}
.contact-reply-box summary::-webkit-details-marker {
    display: none;
}
.contact-reply-box summary::after {
    content: "›";
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef7fc;
    color: var(--blue);
    font-size: 24px;
    font-weight: 900;
    transition: transform .18s ease;
}
.contact-reply-box[open] summary::after {
    transform: rotate(90deg);
}
.contact-reply-box summary span {
    color: var(--ink);
    font-weight: 950;
}
.contact-reply-box summary small {
    color: var(--muted);
    grid-column: 1;
}
.contact-reply-box form {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}
.contact-request-card footer {
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}
.client-audit-panel {
    display: grid;
    gap: 14px;
}
.client-audit-list {
    display: grid;
    gap: 10px;
}
.client-audit-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
    gap: 14px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 13px 14px;
}
.client-audit-row span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.client-audit-row strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
}
.client-audit-row small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.4;
}
.client-invoices-panel {
    display: grid;
    gap: 18px;
}
.client-invoice-list {
    display: grid;
    gap: 10px;
}
.client-invoice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.client-invoice-card > div {
    display: grid;
    gap: 4px;
}
.client-invoice-card > div:last-child {
    justify-items: end;
}
.client-invoice-card span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.client-invoice-card small {
    color: var(--muted);
}
.client-invoice-card.soldee {
    background: #f4fbf7;
    border-color: #cfe5d9;
}
.client-invoice-card.soldee span {
    color: var(--ok);
}
.account-settings-panel {
    padding: clamp(22px, 3.5vw, 38px);
}
.account-settings-grid {
    display: grid;
    grid-template-columns: minmax(420px, 620px) minmax(320px, 430px);
    gap: clamp(24px, 4vw, 52px);
    align-items: start;
    justify-content: space-between;
}
.account-settings-main {
    max-width: 620px;
}
.account-settings-main h1 {
    font-size: clamp(30px, 3vw, 42px);
}
.account-details-form {
    max-width: 620px;
}
.account-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 18px;
}
.account-field-grid .full {
    grid-column: 1 / -1;
}
.account-field-grid .postal-field {
    grid-column: 1;
}
.account-field-grid input,
.account-security-form input {
    min-height: 50px;
    background: #fbfdfe;
    border-color: #d7e5ed;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.account-field-grid input:focus,
.account-security-form input:focus {
    outline: none;
    background: #fff;
    border-color: #8ec3df;
    box-shadow: 0 0 0 4px rgba(13,95,147,.09);
}
.account-readonly-field input[readonly] {
    color: #49677b;
    background: #f1f6f8;
    border-color: #dce8ed;
    cursor: default;
}
.account-readonly-field small {
    display: block;
    margin-top: 7px;
    color: #718797;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}
.account-details-form .btn {
    width: 100%;
    margin-top: 4px;
}
.account-security-card {
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    padding: clamp(18px, 2vw, 24px);
    box-shadow: 0 14px 34px rgba(20,50,74,.06);
}
.account-security-card h2 {
    margin-bottom: 10px;
}
.account-security-card .otp-explainer {
    margin-top: 12px;
    grid-template-columns: 1fr;
}
.account-security-card .otp-app-links {
    justify-content: flex-start;
}
.account-security-card .otp-app-links a {
    flex: 1 1 160px;
}
.admin-profile-page {
    display: grid;
    gap: 24px;
}
.admin-profile-billing-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; border: 1px solid #cfe1e9; background: linear-gradient(110deg, #f4fafc, #fff 70%); box-shadow: 0 14px 36px rgba(16, 47, 73, .06); }
.admin-profile-billing-card h2 { margin: 4px 0 6px; color: #123b54; font-size: 21px; }
.admin-profile-billing-card p:last-child { margin: 0; color: #567080; line-height: 1.5; }
.admin-profile-billing-card .btn { flex: 0 0 auto; }
.tax-storage-panel { padding: 22px 26px; }
.tax-storage-panel-head { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.tax-storage-panel-head h2 { margin:4px 0 12px; }
.tax-storage-gauge { display:grid; gap:14px; margin:14px 0; }
.tax-storage-gauge-row { min-width:0; }
.tax-storage-gauge-label { display:flex; justify-content:space-between; gap:10px; font-size:.9rem; }
.tax-storage-gauge-label span { white-space:nowrap; }
.tax-storage-gauge progress { display:block; width:100%; height:12px; margin-top:5px; accent-color:#23806c; }
.tax-storage-gauge.is-compact { min-width:155px; gap:7px; margin:0; }
.tax-storage-gauge.is-compact .tax-storage-gauge-label { display:grid; gap:0; font-size:.74rem; }
.tax-storage-gauge.is-compact progress { height:7px; margin-top:2px; }
.tax-storage-dashboard-alert { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:14px 18px; border-color:#e2b968; background:#fff9e9; }
.tax-archive-page { gap:18px; }
.tax-archive-page > .panel { padding:22px 26px; }
.tax-archive-filter { display:flex; flex-wrap:wrap; align-items:end; gap:14px; }
.tax-archive-filter label { display:grid; gap:5px; }
.tax-archive-purge .stack { max-width:680px; }
.tax-archive-date-form { max-width:540px; margin-top:20px; }
@media (max-width:760px) { .tax-storage-panel-head { align-items:stretch; flex-direction:column; } }
@media (max-width: 760px) { .admin-profile-billing-card { flex-direction: column; align-items: stretch; } }
.admin-profile-head {
    margin-bottom: 0;
}
.admin-profile-head h1 {
    margin-bottom: 8px;
}
.admin-profile-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
    gap: 24px;
    align-items: stretch;
}
.admin-profile-card,
.admin-profile-preview-card,
.admin-profile-security-card {
    border-color: #d6e6ed;
    box-shadow: 0 18px 46px rgba(16, 47, 73, .07);
}
.admin-profile-card,
.admin-profile-security-card {
    background: linear-gradient(180deg, #fff, #fbfdfe);
}
.admin-profile-card .section-title-row,
.admin-profile-security-card .section-title-row {
    align-items: flex-start;
    margin-bottom: 24px;
}
.admin-profile-card h2,
.admin-profile-security-card h2 {
    margin: 4px 0 8px;
}
.admin-profile-step {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #cfe0e8;
    border-radius: 14px;
    background: #f4f9fb;
    color: #527084;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}
.admin-profile-form,
.admin-profile-security-form {
    max-width: none;
}
.admin-profile-form input,
.admin-profile-security-form input {
    min-height: 52px;
    background: #fff;
    border-color: #d5e3ea;
}
.admin-profile-form label > small,
.admin-profile-security-form label > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.45;
}
.admin-profile-form > .btn,
.admin-profile-security-form > .btn {
    justify-self: start;
    width: auto;
    min-width: 240px;
}
.admin-profile-preview-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0c3d58 0%, #0b6670 56%, #138c83 100%);
    color: #fff;
}
.admin-profile-preview-card::after {
    content: '';
    position: absolute;
    right: -90px;
    top: -80px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
}
.admin-profile-preview-card > * {
    position: relative;
    z-index: 1;
}
.admin-profile-preview-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.admin-profile-preview-label span {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.admin-profile-preview-label small {
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    color: rgba(255,255,255,.82);
}
.admin-profile-preview-person {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.admin-profile-avatar {
    position: relative;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.55);
    border-radius: 26px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}
.admin-profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-profile-preview-person strong,
.admin-profile-preview-person span,
.admin-profile-preview-person a {
    display: block;
}
.admin-profile-preview-person strong {
    font-size: 21px;
    line-height: 1.2;
}
.admin-profile-preview-person div > span {
    margin-top: 7px;
    color: rgba(255,255,255,.78);
    font-weight: 700;
}
.admin-profile-preview-person a {
    margin-top: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}
.admin-profile-preview-card > p {
    margin: 26px 0;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.78);
    line-height: 1.55;
}
.admin-profile-photo-form {
    gap: 10px;
}
.admin-profile-file-picker {
    display: grid;
    gap: 8px;
}
.admin-profile-file-picker > span {
    font-weight: 850;
}
.admin-profile-file-picker input {
    width: 100%;
    padding: 9px;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    color: #fff;
}
.admin-profile-file-picker input::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #12364d;
    font-weight: 850;
    cursor: pointer;
}
.admin-profile-photo-form > small {
    color: rgba(255,255,255,.7);
    line-height: 1.45;
}
.admin-profile-photo-form .btn {
    border-color: #fff;
    background: #fff;
    color: #12364d;
}
.admin-profile-remove-photo {
    margin-top: 10px;
}
.admin-profile-remove-photo .btn {
    border-color: rgba(255,255,255,.3);
    color: #fff;
}
.admin-profile-readonly-note {
    color: rgba(255,255,255,.76) !important;
}
.admin-profile-security-card {
    width: 100%;
}
.admin-profile-security-state {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-profile-security-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 22px;
}
.admin-profile-security-form > label:first-of-type,
.admin-profile-security-form > .grid,
.admin-profile-security-form > .admin-profile-otp-toggle,
.admin-profile-security-form > .admin-profile-otp-setup,
.admin-profile-security-form > .admin-profile-confirmation,
.admin-profile-security-form > .btn {
    grid-column: 1 / -1;
}
.admin-profile-otp-toggle {
    align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid #d6e6ed;
    border-radius: 14px;
    background: #f7fbfc;
}
.admin-profile-otp-toggle span,
.admin-profile-otp-toggle small {
    display: block;
}
.admin-profile-otp-toggle small {
    margin-top: 4px;
    color: var(--muted);
}
.admin-profile-otp-setup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, .65fr);
    gap: 22px;
    align-items: center;
}
.admin-profile-otp-setup img {
    padding: 8px;
    border: 1px solid #dce8ed;
    border-radius: 14px;
    background: #fff;
}
.admin-profile-confirmation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    gap: 22px;
    align-items: end;
}
.admin-profile-confirmation p {
    margin-bottom: 0;
}
@media (max-width: 900px) {
    .admin-profile-layout {
        grid-template-columns: 1fr;
    }
    .admin-profile-preview-card {
        order: -1;
    }
    .admin-profile-otp-setup,
    .admin-profile-confirmation {
        grid-template-columns: 1fr;
        align-items: start;
    }
}
@media (max-width: 640px) {
    .account-settings-panel.admin-profile-page {
        padding: 18px 14px;
    }
    .admin-profile-head,
    .admin-profile-head-actions,
    .admin-profile-card .section-title-row,
    .admin-profile-security-card .section-title-row {
        align-items: stretch;
    }
    .admin-profile-head-actions .btn,
    .admin-profile-form > .btn,
    .admin-profile-security-form > .btn {
        width: 100%;
    }
    .admin-profile-head-actions {
        justify-content: flex-start;
    }
    .admin-profile-step {
        display: none;
    }
    .admin-profile-preview-person {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .admin-profile-avatar {
        width: 72px;
        height: 72px;
        border-radius: 22px;
    }
    .admin-profile-security-state {
        justify-content: flex-start;
    }
}
.account-new-case-button {
    margin-bottom: 14px;
}
.case-switcher-panel {
    display: grid;
    gap: 22px;
}
.case-switcher-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 8px 0 4px;
}
.case-switcher-hero h1 {
    margin-bottom: 8px;
}
.case-switcher-hero p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
    line-height: 1.55;
}
.case-switcher-current {
    margin-top: 0;
    border-color: #bfe2d0;
    background: linear-gradient(135deg, #f2fbf6, #ffffff);
}
.case-switcher-current span {
    color: #1f8c62;
}
.case-switcher-current small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.case-switcher-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
}
.case-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    border: 1px solid #d8e8ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 16px 35px rgba(16,47,69,.06);
}
.case-card.active-case-card {
    border-color: #97cce7;
    background: linear-gradient(135deg, #eef8fd, #fff);
    box-shadow: 0 16px 34px rgba(13,95,147,.12);
}
.case-card-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef6fb;
    color: var(--blue);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.case-card.active-case-card .case-card-status {
    color: var(--blue);
    background: #dff0fb;
}
.case-card h2 {
    margin: 14px 0 2px;
    font-size: 26px;
}
.case-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}
.case-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.case-card-tags span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #fff6ed;
    color: #b9781f;
    font-weight: 900;
    font-size: 13px;
}
.case-card-tags span.done {
    background: #eaf7ef;
    color: #1f8c62;
}
.final-download-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #c8e9d6;
    border-radius: 8px;
    background:
        radial-gradient(circle at 0 0, rgba(44, 132, 91, .12), transparent 34%),
        linear-gradient(135deg, #f4fbf7, #fff);
}
.final-download-card span,
.final-download-card small {
    display: block;
    color: var(--muted);
}
.final-download-card span {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.final-download-card strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
}
.final-download-card small {
    margin-top: 4px;
    overflow-wrap: anywhere;
}
.final-download-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.case-switcher-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.case-switcher-actions strong {
    width: 100%;
    text-align: left;
    color: var(--ink);
    font-size: 20px;
}
.account-linked-profiles {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}
.account-linked-profiles h2 {
    margin: 0;
    font-size: 24px;
}
.account-profile-detail {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    overflow: hidden;
}
.account-profile-detail summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    font-weight: 900;
}
.account-profile-detail summary::-webkit-details-marker {
    display: none;
}
.account-profile-detail summary::before {
    content: "›";
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    transition: transform .18s ease;
}
.account-profile-detail[open] summary::before {
    transform: rotate(90deg);
}
.account-profile-detail summary span {
    margin-right: auto;
    color: var(--ink);
}
.account-profile-detail summary small {
    color: var(--muted);
    font-weight: 800;
}
.account-profile-detail .client-invoice-list {
    padding: 0 18px 18px;
}
.document-workqueue .muted {
    max-width: 780px;
}
.admin-title-help-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-title-help-row h1 {
    margin: 0;
}
.status-help-popover {
    position: relative;
    z-index: 8;
}
.status-help-popover summary {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e6ee;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 0%, rgba(45, 138, 98, .16), transparent 42%),
        #fff;
    color: var(--blue);
    cursor: pointer;
    font-weight: 950;
    line-height: 1;
    list-style: none;
    box-shadow: 0 10px 24px rgba(13, 47, 72, .08);
}
.status-help-popover summary::-webkit-details-marker {
    display: none;
}
.status-help-popover[open] summary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--ok));
}
.status-help-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: min(430px, calc(100vw - 42px));
    padding: 16px;
    border: 1px solid #d7e6ee;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 60px rgba(13, 47, 72, .16);
    backdrop-filter: blur(10px);
}
.status-help-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 12px;
    width: 13px;
    height: 13px;
    transform: rotate(45deg);
    border-left: 1px solid #d7e6ee;
    border-top: 1px solid #d7e6ee;
    background: #fff;
}
.status-help-panel > strong {
    display: block;
    margin-bottom: 12px;
    color: var(--ink);
    font-size: 16px;
}
.status-help-panel dl {
    display: grid;
    gap: 10px;
    margin: 0;
}
.status-help-panel dl > div {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #edf3f6;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfdfe, #fff);
}
.status-help-panel dt {
    color: var(--ink);
    font-weight: 950;
}
.status-help-panel dd {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.42;
}
.queue-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.queue-tabs a {
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 11px 15px;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(20,50,74,.05);
}
.queue-tabs a.active {
    border-color: #86bfdd;
    background: var(--blue);
    color: #fff;
}
.document-queue-search {
    margin-bottom: 16px;
}
.queue-documents-complete-column {
    min-width: 0;
    text-align: center;
}
.queue-completeness-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    vertical-align: middle;
}
.queue-completeness-icon svg {
    display: block;
    width: 25px;
    height: 25px;
}
.queue-completeness-icon.is-complete { color: #168660; }
.queue-completeness-icon.is-incomplete { color: #bf7777; }
.queue-status,
.priority-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.queue-status.ready,
.queue-status.done {
    background: #e6f6ee;
    color: #1f8c62;
}
.queue-status.warning,
.queue-status.global {
    background: #fff6e8;
    color: var(--gold);
}
.queue-status.danger {
    background: #fff1f1;
    color: #9f3f3f;
}
.queue-status.muted {
    background: #eef4f7;
    color: var(--muted);
}
.priority-chip {
    background: #f7fbfd;
    color: #31576c;
    border: 1px solid #d8e8ef;
}
.priority-1 {
    border-color: #bfe2d1;
    background: #f4fbf7;
    color: #1f8c62;
}
.priority-2,
.priority-3 {
    border-color: #ecd1aa;
    background: #fff8ef;
    color: var(--gold);
}
.priority-4 {
    border-color: #f0c2c2;
    background: #fff5f5;
    color: #9f3f3f;
}
.otp-explainer {
    margin: 14px 0 18px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbfd, #fff);
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}
.otp-explainer strong {
    color: var(--ink);
    font-size: 18px;
}
.otp-explainer p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}
.otp-app-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.otp-app-links a {
    min-width: 158px;
    border-radius: 12px;
    background: #102b42;
    color: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(16,43,66,.16);
}
.otp-app-links a:hover {
    transform: translateY(-1px);
}
.otp-app-links small {
    display: block;
    color: rgba(255,255,255,.78);
    font-size: 10px;
    font-weight: 750;
}
.store-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 20px;
}
.expected-documents-box {
    border: 1px solid #d8e8ef;
    border-radius: var(--radius);
    background: #f7fbfd;
    padding: 16px;
    display: grid;
    gap: 10px;
}
.expected-documents-box strong { color: var(--blue); }
.expected-documents-box ul {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.expected-documents-box li {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.expected-documents-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.correction-deadline {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border-color: #b8dfca;
    background: linear-gradient(90deg, #f2fbf6, #fff);
}
.correction-deadline strong {
    display: block;
    font-size: clamp(28px, 4vw, 44px);
    color: var(--ok);
}
.final-documents { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form { display: flex; gap: 10px; margin-bottom: 14px; }
.email-card { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; display: grid; gap: 10px; }
.email-branding-panel {
    margin-bottom: 28px;
    padding: clamp(22px, 3vw, 38px);
    overflow: hidden;
}
.email-branding-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}
.email-branding-heading h2 { margin: 3px 0 8px; color: #073553; font-size: clamp(1.55rem, 2.5vw, 2.2rem); }
.email-branding-heading p:last-child { max-width: 760px; margin: 0; color: #657f90; line-height: 1.65; }
.email-branding-badge {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid #cfe2eb;
    border-radius: 999px;
    background: #f5fafc;
    color: #41677d;
    font-size: .78rem;
    font-weight: 800;
}
.email-branding-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); gap: 28px; align-items: start; }
.email-branding-form { display: grid; gap: 20px; }
.email-branding-fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid #d7e6ed; border-radius: 18px; background: #fbfdfe; }
.email-branding-fieldset legend { padding: 0 8px; color: #0b3a58; font-size: 1rem; font-weight: 900; }
.email-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.email-theme-card { position: relative; display: grid; grid-template-columns: 50px 1fr; grid-template-rows: auto auto; gap: 2px 11px; padding: 14px; border: 1px solid #d6e5ec; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.email-theme-card:hover { transform: translateY(-1px); border-color: #91bdcf; }
.email-theme-card.is-selected { border-color: #1878aa; box-shadow: 0 0 0 3px rgba(24,120,170,.12); }
.email-theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.email-theme-card strong { color: #153e56; }
.email-theme-card small { grid-column: 2; color: #6a8290; line-height: 1.35; }
.email-theme-swatches { grid-row: 1 / span 2; display: flex; overflow: hidden; width: 50px; height: 38px; border-radius: 9px; border: 1px solid rgba(13,50,72,.1); }
.email-theme-swatches i { flex: 1; }
.email-custom-colors { display: none; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.email-custom-colors.is-visible { display: grid; }
.email-custom-colors label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid #d8e5eb; border-radius: 12px; background: #fff; color: #234b63; font-weight: 800; }
.email-custom-colors input[type="color"] { width: 48px; height: 34px; padding: 2px; border: 0; border-radius: 8px; background: transparent; }
.email-semantic-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.email-semantic-colors span { padding: 7px 11px; border-radius: 999px; font-size: .78rem; font-weight: 900; }
.email-semantic-colors .is-urgent { color: #a93636; background: #fff0f0; }
.email-semantic-colors .is-warning { color: #a36510; background: #fff6e7; }
.email-semantic-colors .is-success { color: #176949; background: #eaf7f1; }
.email-logo-config { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: center; }
.email-logo-preview { display: flex; align-items: center; justify-content: flex-start; min-height: 96px; padding: 16px; border: 1px dashed #b9d2de; border-radius: 14px; background: #fff; overflow: hidden; }
.email-logo-preview img { display: block; max-width: 155px; max-height: 64px; width: auto; height: auto; object-fit: contain; object-position: left center; }
.email-logo-preview strong { color: #0b3a58; font-size: 1.05rem; }
.email-logo-upload { display: grid; gap: 8px; color: #173f57; font-weight: 900; }
.email-logo-upload input { width: 100%; padding: 10px; border: 1px solid #cadde6; border-radius: 11px; background: #fff; color: #4e6d7e; }
.email-logo-upload small { color: #6f8794; font-weight: 500; line-height: 1.45; }
.email-signature-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.email-signature-field { display: grid; gap: 7px; }
.email-signature-field > label:last-child { display: grid; gap: 6px; color: #244b62; font-size: .82rem; font-weight: 800; }
.email-signature-field input:not([type="checkbox"]) { width: 100%; }
.email-signature-field .check-row { margin: 0; color: #486b7d; font-size: .8rem; }
.email-signature-note-field { display: grid; gap: 8px; margin-top: 18px; padding: 16px; border: 1px solid #d9e7ed; border-radius: 12px; background: #f8fbfc; color: #244b62; font-size: .84rem; font-weight: 800; }
.email-signature-note-field textarea { width: 100%; min-height: 76px; resize: vertical; background: #fff; }
.email-signature-note-field small { color: #698393; font-size: .77rem; font-weight: 500; line-height: 1.45; }
.email-remove-logo-form { margin-top: 12px; }
.email-branding-preview-pane { position: sticky; top: 20px; padding: 18px; border: 1px solid #d7e6ed; border-radius: 19px; background: #eef3f5; }
.email-branding-preview-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 15px; }
.email-branding-preview-head > div:first-child { display: grid; gap: 3px; }
.email-branding-preview-head strong { color: #0b3a58; }
.email-branding-preview-head span { color: #6b8391; font-size: .78rem; }
.email-device-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: #dde8ed; }
.email-device-switch button { padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: #587485; font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; }
.email-device-switch button.is-active { background: #fff; color: #0b5f91; box-shadow: 0 2px 8px rgba(18,63,88,.12); }
.email-branding-frame-shell { width: 100%; min-height: 570px; margin: 0 auto; overflow: hidden; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(11,48,72,.1); transition: width .25s ease; }
.email-branding-frame-shell.is-mobile { width: min(100%, 390px); }
.email-branding-frame { display: block; width: 100%; height: 570px; border: 0; background: #f1f4f6; }
.email-branding-preview-pane .note { margin: 12px 0; }
@media (max-width: 1080px) {
    .email-branding-grid { grid-template-columns: 1fr; }
    .email-branding-preview-pane { position: static; }
}
@media (max-width: 680px) {
    .email-branding-panel { padding: 20px 15px; border-radius: 18px; }
    .email-branding-heading, .email-branding-preview-head { align-items: stretch; flex-direction: column; }
    .email-branding-badge { align-self: flex-start; white-space: normal; }
    .email-theme-grid, .email-signature-fields, .email-custom-colors { grid-template-columns: 1fr; }
    .email-logo-config { grid-template-columns: 1fr; }
    .email-logo-preview { min-height: 82px; }
    .email-device-switch { align-self: flex-start; }
    .email-branding-preview-pane { padding: 12px; margin-left: -4px; margin-right: -4px; }
    .email-branding-frame-shell, .email-branding-frame { min-height: 520px; height: 520px; }
}

.email-management-panel {
    display: grid;
    gap: 14px;
}
.email-help-box {
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fbfd, #fff);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 14px;
    align-items: center;
}
.email-help-box strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}
.email-help-box div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.email-help-box code {
    border: 1px solid #d5e5ed;
    border-radius: 999px;
    background: #fff;
    color: #31576c;
    padding: 5px 8px;
    font-size: 12px;
}
.email-help-box p {
    grid-column: 2;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.demo-readonly-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    border-color: rgba(14, 95, 144, 0.22);
    background:
        linear-gradient(135deg, rgba(232, 246, 241, 0.98), rgba(255, 255, 255, 0.98)),
        #fff;
}

.demo-readonly-notice h2 {
    margin: 0.1rem 0 0.45rem;
    color: var(--ink);
    font-size: clamp(1.45rem, 2vw, 2.05rem);
    line-height: 1.12;
}

.demo-readonly-notice p {
    max-width: 980px;
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.demo-readonly-notice > span {
    flex: 0 0 auto;
    border: 1px solid #b8dfca;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    background: #ecf9f2;
    color: var(--ok);
    font-weight: 950;
    text-transform: uppercase;
}
.accounting-export-panel {
    max-width: 1180px;
}
.accounting-export-panel form.is-demo-readonly {
    position: relative;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(247, 251, 253, 0.84), rgba(255, 255, 255, 0.98));
}

.accounting-export-panel form.is-demo-readonly input:disabled,
.accounting-export-panel form.is-demo-readonly select:disabled {
    color: #47657a;
    background: #f6fafc;
    border-color: #dcebf2;
    cursor: default;
}

.accounting-export-panel form.is-demo-readonly .check-row {
    opacity: 0.75;
}

.accounting-export-panel form.is-demo-readonly .btn.primary:disabled {
    border-color: #d8e8ef;
    background: #eef6f9;
    color: #45677d;
    box-shadow: none;
    cursor: not-allowed;
}
.export-field-picker {
    display: grid;
    gap: 12px;
}
.field-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.field-check-grid .check-row {
    min-height: 48px;
    margin: 0;
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
}
.email-section {
    border: 1px solid #d7e7ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    margin: 0;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(16,43,66,.05);
}
.email-section-inactive {
    border-color: #e8dcc9;
    background: linear-gradient(180deg, #fffdfa, #faf8f3);
    box-shadow: 0 12px 28px rgba(81, 63, 38, .06);
}
.email-section-inactive > .email-section-title {
    border-left-color: #b98b45;
    background: linear-gradient(120deg, #fbf6ec, #fffdfa 68%, #f8f3e9);
}
.email-section-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #98733c;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.email-section-inactive .email-section-icon,
.email-section-inactive .email-section-count {
    color: #8c6c3e;
    background: #f3e9d8;
}
.email-inactive-message {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 16px 10px;
    padding: 20px;
    border: 1px solid #e7d8bf;
    border-radius: 14px;
    background: linear-gradient(120deg, #fffaf1, #fff);
    box-shadow: 0 10px 24px rgba(74, 55, 28, .045);
}
.email-inactive-symbol {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 12px;
    color: #9a7135;
    background: #f3e6cf;
}
.email-inactive-symbol svg { width: 23px; height: 23px; }
.email-inactive-message > div { flex: 1; min-width: 0; }
.email-inactive-message strong { color: #463c30; font-size: 16px; }
.email-inactive-message p { margin: 5px 0 0; color: #766c5d; line-height: 1.45; }
.email-inactive-message .btn { flex: 0 0 auto; border-color: #d8c4a4; color: #74552c; background: #fff; }
.email-section-title {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 0;
    padding: 17px 20px;
    border-left: 4px solid var(--blue);
    background: linear-gradient(135deg, #f7fbfd, #fff);
    cursor: pointer;
    list-style: none;
    min-height: 92px;
}
.email-section-title::-webkit-details-marker { display: none; }
.email-section-title::before { content: none; }
.email-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    transition: transform .18s ease;
}
.email-section[open] .email-section-icon {
    transform: rotate(90deg);
}
.email-section-title:first-of-type { margin-top: 0; }
.email-section-title h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.15;
}
.email-section-title p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}
.email-section-count {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}
.email-template-card {
    margin: 14px 16px;
    border: 1px solid #d8e7ee;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 7px 20px rgba(16, 43, 66, .045);
}
.email-template-summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) minmax(220px, .62fr);
    gap: 14px;
    align-items: center;
    min-height: 100px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(135deg, #fff, #fbfdfe);
}
.email-template-summary::-webkit-details-marker { display: none; }
.email-template-summary::before { content: none; }
.email-template-summary:hover { background: linear-gradient(135deg, #f8fcfe, #fff); }
.email-template-toggle {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 20px;
    font-weight: 950;
    transition: transform .18s ease;
}
.email-template-card[open] .email-template-toggle { transform: rotate(90deg); }
.email-template-summary-main,
.email-template-summary-meta {
    min-width: 0;
    display: grid;
    gap: 5px;
}
.email-template-summary-main strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}
.email-template-summary-main small,
.email-template-summary-meta small {
    color: var(--muted);
    line-height: 1.35;
}
.email-template-audience {
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff3df;
    color: #9b6924;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.email-template-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.email-template-inactive-badge {
    width: fit-content;
    border: 1px solid #e4d6c2;
    border-radius: 999px;
    padding: 3px 8px;
    color: #80633d;
    background: #faf4e9;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.email-template-card.is-module-inactive { border-color: #e9e2d6; box-shadow: none; }
.email-template-card.is-module-inactive > .email-template-summary { background: linear-gradient(120deg, #fff, #fdfaf6); }
.email-template-card.is-module-inactive > .email-template-summary:hover { background: #fdf9f2; }
.email-editor.is-module-inactive { background: #fffdfa; }
.email-editor.is-module-inactive .email-toolbar { display: none; }
.email-editor.is-module-inactive .email-preview-subject-input,
.email-editor.is-module-inactive .email-preview-subject-input:hover,
.email-editor.is-module-inactive .email-preview-subject-input:focus {
    border-color: transparent;
    background: transparent;
    color: #665f55;
    cursor: default;
    box-shadow: none;
}
.email-editor.is-module-inactive .email-preview-status { background: #f4ead9; color: #846235 !important; }
.email-editor.is-module-inactive .email-template-test:disabled { opacity: 1; cursor: default; border-color: #e4d9c9; background: #f8f4ed; color: #82776a; }
.email-template-summary-meta {
    justify-items: end;
    text-align: right;
}
.email-template-summary-meta code {
    max-width: 100%;
    overflow-wrap: anywhere;
    border: 1px solid #d5e5ed;
    border-radius: 999px;
    background: #fff;
    color: #31576c;
    padding: 6px 9px;
    font-size: 11px;
}
.email-template-summary-meta small {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.email-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 20px;
    padding: 24px 18px;
    border-top: 1px solid var(--line);
}
.email-section-title + .email-editor { border-top: 0; }
.email-editor.is-demo-readonly {
    background: linear-gradient(135deg, rgba(247, 251, 253, 0.78), rgba(255, 255, 255, 0.96));
}

.email-editor.is-demo-readonly input[readonly],
.email-editor.is-demo-readonly input:disabled,
.email-editor.is-demo-readonly textarea:disabled,
.email-editor.is-demo-readonly select:disabled {
    color: #47657a;
    background: #f6fafc;
    border-color: #dcebf2;
    cursor: default;
}

.email-editor.is-demo-readonly .email-toolbar,
.email-editor.is-demo-readonly .email-rule-card {
    opacity: 0.72;
}

.email-editor.is-demo-readonly .email-toolbar button:disabled,
.email-editor.is-demo-readonly .btn:disabled {
    cursor: not-allowed;
    opacity: 0.78;
}

.email-editor.is-demo-readonly .email-visual-editor {
    background: #fbfdfe;
    cursor: default;
}

.email-editor.is-demo-readonly .btn.primary:disabled {
    border-color: #d8e8ef;
    background: #eef6f9;
    color: #45677d;
    box-shadow: none;
}
.email-edit-pane { display: grid; gap: 14px; }
.email-editor-intro {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid #d8e8ef;
    border-radius: 12px;
    background: #f7fbfd;
}
.email-editor-intro strong { color: var(--ink); }
.email-editor-intro p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}
.email-editor-intro > span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 9px;
    background: #eef4f7;
    color: #567286;
    font-size: 11px;
    font-weight: 850;
}
.email-template-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #d8e8ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fbfd, #fff);
}
.email-template-head span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff3df;
    color: #9b6924;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.email-template-head h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.12;
}
.email-template-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}
.email-template-head code {
    flex: 0 0 auto;
    max-width: 220px;
    overflow-wrap: anywhere;
    border: 1px solid #d5e5ed;
    border-radius: 999px;
    background: #fff;
    color: #31576c;
    padding: 7px 10px;
    font-size: 12px;
}
.email-rule-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, .9fr);
    gap: 22px;
    align-items: center;
    padding: 22px 24px;
    border: 1px solid #c7dfe9;
    border-radius: 20px;
    background: radial-gradient(circle at 100% 0%, #e4f3f8 0, transparent 42%), linear-gradient(130deg, #f4f9fc, #fff 70%);
    box-shadow: 0 12px 30px rgba(15, 57, 82, .06);
}
.email-rule-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #a57836;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.email-rule-card strong {
    display: block;
    color: #163e57;
    font-size: 18px;
}
.email-rule-card p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.email-rule-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.email-rule-fields:has(> :only-child) { grid-template-columns: 1fr; }
.email-rule-fields label {
    display: grid;
    gap: 8px;
    margin: 0;
}
.email-rule-fields label span {
    color: #5d7889;
    font-size: 13px;
}
.email-rule-fields .email-delay-field {
    padding: 12px 14px;
    border: 1px solid #d5e6ed;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
}
.email-rule-fields .email-delay-label { font-weight: 750; }
.email-delay-control { display: flex; align-items: baseline; gap: 9px; }
.email-rule-fields .email-delay-control input {
    width: 96px;
    min-height: 44px;
    padding: 5px 8px;
    border: 1px solid #bcd5e1;
    border-radius: 10px;
    background: #fff;
    color: #103950;
    font-size: 23px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.email-rule-fields .email-delay-control input:focus {
    outline: 3px solid #a8d9e8;
    outline-offset: 1px;
}
.email-template-delay-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid #c9dfeb;
    border-radius: 999px;
    background: #edf7fb;
    color: #175576;
    font-size: 11px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.email-rule-fields .check-row.compact {
    min-height: 54px;
    align-items: center;
    margin: 0;
}
.visual-email-field {
    display: grid;
    gap: 8px;
}
.visual-email-field > label {
    font-weight: 850;
}
.email-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbfd;
}
.email-toolbar button {
    min-height: 32px;
    border: 1px solid #cfe0e8;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.email-toolbar button:hover {
    border-color: #9dcbe4;
    color: var(--blue);
    background: var(--blue-soft);
}
.email-toolbar button[data-insert] {
    border-color: #e3cfad;
    background: #fffaf1;
    color: var(--gold);
}
.email-visual-editor {
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 16px;
    color: var(--ink);
    line-height: 1.55;
    outline: none;
    overflow: auto;
}
.email-visual-editor:focus {
    border-color: #9dcbe4;
    box-shadow: 0 0 0 4px rgba(13,95,147,.08);
}
.email-visual-editor p {
    margin: 0 0 12px;
}
.email-visual-editor h2 {
    margin: 0 0 12px;
    font-size: 22px;
}
.is-hidden-field {
    display: none;
}
.email-preview-pane {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    align-self: start;
    min-height: 560px;
    position: sticky;
    top: 18px;
}
.preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--blue-soft);
}
.preview-head > div { display: grid; gap: 2px; }
.preview-head span { color: var(--muted); font-size: 12px; }
.email-preview-status {
    align-self: center;
    border-radius: 999px;
    padding: 5px 8px;
    background: #edf8f3;
    color: var(--ok) !important;
    font-weight: 900;
    white-space: nowrap;
}
.email-preview-status.is-loading { background: #fff7e9; color: #9b6924 !important; }
.email-preview-status.is-error { background: #fff1f1; color: #b84242 !important; }
.email-preview-subject {
    display: grid;
    gap: 4px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.email-preview-subject span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.email-preview-subject strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
}
.email-template-test {
    border-color: #dfbd83;
    background: #fffaf1;
    color: #8c5d16;
}
.email-test-help {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.email-preview {
    width: 100%;
    height: 500px;
    border: 0;
    background: #fff;
}
.email-editor.is-direct-edit {
    display: block;
    padding: 20px;
}
html.email-direct-edit-page,
html.email-direct-edit-page body { overflow-x: clip; }
.email-section[open],
.email-template-card[open] { overflow: visible; }
.email-editor.is-direct-edit .email-edit-pane { display: none; }
.email-editor.is-direct-edit .email-preview-pane {
    position: relative;
    top: auto;
    width: 100%;
    min-height: 0;
    overflow: visible;
}
.email-editor.is-direct-edit .email-toolbar {
    position: sticky;
    top: var(--topbar-height, 0px);
    z-index: 4;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 10px 14px;
    box-shadow: 0 5px 12px rgba(11, 48, 72, .07);
}
.email-variable-menu { position: relative; }
.email-variable-menu summary {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cfe0e8;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.email-variable-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: min(420px, 80vw);
    max-height: 260px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(11, 48, 72, .16);
}
.email-variable-menu:not([open]) .email-variable-list { display: none; }
.email-preview-subject-input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
}
.email-preview-subject-input email-sample { border-bottom: 1px dotted #9fc6da; }
.email-preview-subject-input:hover,
.email-preview-subject-input:focus {
    border-color: #b9d7e5;
    background: #fff;
    outline: none;
}
.email-editor.is-direct-edit .email-preview {
    display: block;
    min-height: 500px;
    height: 500px;
}
.email-template-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
}
.email-template-tools .email-test-help { margin: 0; }
.email-template-options {
    padding: 0 14px 12px;
    border-top: 1px solid var(--line);
}
.email-template-options summary {
    padding: 12px 0;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}
.email-template-options .email-rule-card { margin-bottom: 10px; }
.email-template-options .note { margin: 7px 0; }
.email-preview-status.is-dirty { background: #eef4f7; color: #47657a !important; }
.email-preview-status.is-saved { background: #edf8f3; color: var(--ok) !important; }
.email-preview-retry { display: none; }
.email-preview-retry.is-visible { display: inline-flex; }
.document-row-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px auto;
    gap: 10px;
    align-items: center;
}
.missing-email-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
}
.missing-request-builder {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #c8e9d6;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f4fbf7, #fff);
}
.missing-request-builder strong {
    display: block;
    color: var(--ink);
}
.missing-request-builder p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.missing-selection-count {
    border-radius: 999px;
    padding: 8px 12px;
    background: #edf4f7;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}
.missing-selection-count.has-selection {
    background: #eaf7ef;
    color: #21744f;
}
.missing-selection-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    align-items: center;
}
.missing-selection-list > span {
    color: var(--muted);
    font-size: 14px;
}
.missing-selection-list button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #b9d8e9;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 8px 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}
.missing-selection-list button span {
    font-size: 16px;
    line-height: 1;
}
.missing-category-picker {
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fcfd, #fff);
    overflow: hidden;
}
.missing-category-picker summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.missing-category-picker summary::-webkit-details-marker {
    display: none;
}
.missing-category-picker .collapse-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    transition: transform .18s ease;
}
.missing-category-picker[open] .collapse-arrow {
    transform: rotate(90deg);
}
.missing-category-picker summary strong {
    display: block;
    color: var(--ink);
}
.missing-category-picker summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.missing-category-picker .missing-check-grid {
    padding: 0 16px 16px;
}
.missing-custom-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.missing-custom-builder label {
    margin: 0;
}
.missing-photo-builder {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 14px;
    border: 1px solid #f1d6a5;
    border-radius: var(--radius);
    background: #fffbf3;
}
.missing-photo-builder p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.missing-custom-list,
.missing-photo-list {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 6px;
}
.missing-photo-list .missing-custom-item {
    border-color: #f1d6a5;
    background: #fff3dc;
    color: #8b5b12;
}
.missing-custom-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #c8e9d6;
    border-radius: 999px;
    background: #f4fbf7;
    color: #21744f;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 900;
}
.missing-custom-item button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.missing-floating-bar[hidden] {
    display: none;
}
.missing-floating-bar {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(620px, calc(100vw - 48px));
    padding: 14px 16px;
    border: 1px solid #bfe2d1;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 60px rgba(16,43,66,.18);
    backdrop-filter: blur(12px);
}
.missing-floating-bar strong {
    display: block;
    color: var(--ink);
}
.missing-floating-bar small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 750;
}
.missing-floating-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.missing-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.missing-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.missing-check input { width: auto; min-height: auto; }
.missing-add-button.is-selected {
    border-color: #b8dfca;
    background: #f2fbf6;
    color: #21744f;
}
.missing-add-button.is-selected span {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 999px;
    background: #21744f;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}
.missing-email-preview {
    min-height: 260px;
    padding: 18px;
    line-height: 1.55;
}
.missing-request-dialog {
    display: flex;
    flex-direction: column;
    width: min(1680px, calc(100vw - 32px));
    height: min(96dvh, 1100px);
    max-height: 96dvh;
    border-radius: 20px;
    background: #f7fafc;
    overflow: hidden;
}
.missing-exit-modal { z-index: 2200; }
.missing-exit-dialog {
    width: min(520px, 100%);
    padding: clamp(24px, 4vw, 38px);
    border-radius: 22px;
    border-color: #d8e7ec;
    background: linear-gradient(155deg, #fff 55%, #f5fafb);
    box-shadow: 0 28px 80px rgba(7, 35, 49, .25);
}
.missing-exit-symbol {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #fff3df;
    color: #98651c;
    font-size: 24px;
}
.missing-exit-dialog .eyebrow { margin: 0 0 7px; }
.missing-exit-dialog h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.2;
}
.missing-exit-dialog > p:not(.eyebrow) {
    margin: 14px 0 0;
    color: #557083;
    line-height: 1.55;
}
.missing-exit-dialog > p strong { color: var(--ink); }
.missing-exit-hint { margin: 20px 0 14px; color: #35576b; font-weight: 750; }
.missing-exit-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.missing-exit-actions .btn { min-height: 46px; justify-content: center; text-align: center; }
.missing-exit-main .btn.primary { grid-column: 1 / -1; }
.missing-exit-discard {
    border: 0;
    background: transparent;
    color: #9e4850;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.missing-exit-confirm { margin-top: 18px; padding: 16px; border: 1px solid #efd5d5; border-radius: 14px; background: #fff8f7; }
.missing-exit-confirm p { margin: 0 0 15px; color: #76545a; line-height: 1.5; }
.missing-exit-main[hidden], .missing-exit-confirm[hidden], .missing-exit-error[hidden] { display: none; }
.missing-exit-error { padding: 10px 12px; border-radius: 10px; background: #fff3ef; color: #a64735 !important; font-size: 13px; }
.missing-exit-stay {
    display: block;
    margin: 18px auto 0;
    padding: 6px;
    border: 0;
    background: transparent;
    color: #4b6f82;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.missing-exit-dialog button:focus-visible { outline: 3px solid #2c83b3; outline-offset: 3px; }
.missing-request-dialog > .invoice-action-dialog-head {
    flex: 0 0 auto;
    padding: 12px 24px;
    background: #fff;
}
.missing-request-dialog > .invoice-action-dialog-head .eyebrow { margin-bottom: 2px; }
.missing-request-dialog > .invoice-action-dialog-head h2 { font-size: clamp(22px, 1.7vw, 28px); }
.missing-request-dialog > .invoice-action-dialog-head p:not(.eyebrow) { font-size: 14px; font-weight: 500; }
.missing-request-dialog .missing-email-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding: 12px 24px 0;
    overflow: hidden;
}
.missing-request-selection {
    align-content: start;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    padding: 0 4px 12px 0;
    overflow-y: auto;
}
.missing-step-label {
    display: block;
    color: #865a1e;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.missing-request-builder {
    align-items: flex-end;
    padding: 18px 20px;
    border: 1px solid #dce7ec;
    border-radius: 16px;
    background: #fff;
}
.missing-request-builder strong { margin-top: 6px; font-size: 20px; }
.missing-request-builder p { font-size: 13px; }
.missing-selection-count { white-space: normal; text-align: center; }
.missing-selection-list {
    min-height: 72px;
    align-content: center;
    padding: 10px 12px;
    border: 1px dashed #c9dce5;
    border-radius: 14px;
    background: #fff;
}
.missing-selection-list[hidden] { display: none; }
.missing-suggestion-group {
    padding: 14px;
    border: 1px solid #cfe1e9;
    border-radius: 14px;
    background: #fff;
}
.missing-suggestion-heading { display: flex; align-items: flex-start; gap: 11px; }
.missing-suggestion-heading > span {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    height: 30px;
    border-radius: 9px;
    background: #eaf4f8;
    color: #176582;
    font-size: 18px;
    font-weight: 800;
}
.missing-suggestion-heading strong { display: block; color: #113b53; font-size: 16px; }
.missing-suggestion-heading p { margin: 3px 0 0; color: #5d7989; font-size: 12px; line-height: 1.45; }
.missing-suggestion-options { display: grid; gap: 8px; min-width: 0; margin-top: 12px; }
.missing-suggestion-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid #dce8ed;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #f9fcfd);
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.missing-suggestion-choice:hover { border-color: #9cc9d9; box-shadow: 0 6px 18px rgba(14, 74, 99, .07); }
.missing-suggestion-choice:focus-within { outline: 3px solid rgba(44, 131, 179, .32); outline-offset: 2px; }
.missing-suggestion-choice:has(input:checked) { border-color: #76b5cc; background: #eef8fb; box-shadow: inset 0 0 0 1px rgba(47, 129, 165, .14); }
.missing-suggestion-choice > input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 2px 0 0;
    padding: 0;
    border-radius: 5px;
    accent-color: #0b7198;
}
.missing-suggestion-choice > span { flex: 1 1 auto; min-width: 0; }
.missing-suggestion-choice strong { display: block; color: #173d53; font-size: 14px; line-height: 1.4; overflow-wrap: break-word; }
.missing-suggestion-choice small { display: block; margin-top: 4px; color: #668090; font-size: 12px; line-height: 1.4; }
.missing-suggestion-empty { margin: 12px 0 0; color: #6b8290; font-size: 12px; }
.missing-suggestion-empty[hidden] { display: none; }
.missing-photo-builder {
    background: #fffaf1;
    border-radius: 14px;
}
.missing-photo-builder[hidden] { display: none; }
.missing-photo-builder .missing-suggestion-heading > span { background: #fff0d4; color: #96621b; }
.missing-photo-builder .missing-suggestion-choice:has(input:checked) { border-color: #e2bb72; background: #fff5df; }
.missing-photo-list:empty { display: none; }
.missing-category-picker { background: #fff; border-radius: 14px; }
.missing-category-picker summary { min-height: 68px; }
.missing-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.missing-check { line-height: 1.35; }
.missing-check:has(input:checked) { border-color: #a6cfdf; background: #edf7fb; color: #0b557c; }
.missing-custom-builder input { width: 100%; }
.missing-deadline-note {
    margin: 0;
    padding: 13px 16px;
    border-radius: 12px;
    background: #edf5f8;
    color: #365c70;
    font-size: 13px;
}
.missing-request-viewer {
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    border: 1px solid #dbe6eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(12, 49, 70, .06);
    overflow: hidden;
}
.missing-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e6edf1;
}
.missing-viewer-head strong { display: block; margin-top: 4px; color: #12394f; font-size: 19px; }
.missing-viewer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.missing-viewer-edit {
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #1679a7;
    border-radius: 9px;
    background: #eaf6fb;
    color: #0d597c;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.missing-viewer-edit:hover:not(:disabled) { background: #d9eff8; border-color: #0e638f; }
.missing-viewer-edit:disabled { opacity: .55; cursor: wait; }
.missing-preview-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef5f8;
    color: #365d73;
    font-size: 11px;
    font-weight: 800;
}
.missing-preview-status.is-error { background: #fff0ed; color: #9e3d2d; }
.missing-viewer-meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #edf1f3;
    overflow-wrap: anywhere;
}
.missing-viewer-meta span { color: #6d8490; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.missing-viewer-meta strong { color: #173d53; font-size: 13px; }
.missing-viewer-subject { display: block; margin: 0; padding: 8px 16px; color: #33566b; font-size: 12px; font-weight: 800; }
.missing-viewer-subject { border-bottom: 1px solid #edf1f3; }
.missing-viewer-subject input { margin-top: 6px; background: #fbfdfe; font-size: 14px; }
.missing-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 16px 8px;
    padding: 6px;
    border: 1px solid #dce9ef;
    border-radius: 10px;
    background: #f7fafc;
}
.missing-editor-toolbar[hidden] { display: none; }
.missing-editor-toolbar button {
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #cfdee6;
    border-radius: 7px;
    background: #fff;
    color: #173d53;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.missing-editor-toolbar button:hover { border-color: #7aafc9; background: #eef7fb; }
.missing-editor-toolbar span { margin-left: auto; color: #5f7987; font-size: 11px; }
.missing-viewer-frame { flex: 1 1 auto; min-height: 150px; margin: 0 16px; border: 1px solid #e1e9ee; border-radius: 12px; overflow: hidden; background: #f1f4f6; }
.missing-viewer-frame .missing-email-preview {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: #fff;
}
.missing-viewer-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
}
.missing-viewer-tools a { color: #115e88; font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.missing-request-footer {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -24px;
    padding: 10px 24px;
    border-top: 1px solid #dce6eb;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 24px rgba(12, 49, 70, .05);
}
.missing-request-footer p { display: grid; gap: 2px; margin: 0; color: #173d53; }
.missing-request-footer p span { color: #6d8490; font-size: 12px; }
.missing-request-footer > div { display: flex; gap: 10px; }
.missing-request-footer .btn { min-height: 44px; }
.missing-request-footer .btn:disabled { opacity: .5; cursor: not-allowed; }
.missing-request-dialog :is(button, input, textarea, summary, a):focus-visible {
    outline: 3px solid #2c83b3;
    outline-offset: 2px;
}
.missing-open-summary { max-height: 170px; overflow: auto; border-radius: 12px; background: #fffaf2; }
.missing-open-summary summary { color: #865c24; font-size: 13px; font-weight: 800; cursor: pointer; }
.missing-open-summary[open] .doc-list { padding-top: 8px; }
@media (max-width: 1080px) {
    .missing-request-dialog { overflow-y: auto; }
    .missing-request-dialog .missing-email-grid { flex: none; min-height: auto; grid-template-columns: 1fr; grid-template-rows: auto; overflow: visible; }
    .missing-request-selection { min-height: auto; overflow: visible; }
    .missing-request-viewer { min-height: 570px; }
    .missing-viewer-frame { min-height: 350px; }
    .missing-request-footer { position: sticky; bottom: 0; }
}
@media (max-width: 650px) {
    .missing-exit-modal { padding: 16px; }
    .missing-exit-dialog { border-radius: 18px; }
    .missing-exit-actions { grid-template-columns: 1fr; }
    .missing-exit-main .btn.primary { grid-column: auto; }
    .missing-exit-discard { min-height: 42px; }
    .missing-request-dialog { width: 100%; height: 96dvh; max-height: 96dvh; border-radius: 18px 18px 0 0; }
    .missing-request-dialog > .invoice-action-dialog-head { padding: 16px; }
    .missing-viewer-head { align-items: flex-start; flex-direction: column; }
    .missing-viewer-actions { width: 100%; justify-content: space-between; }
    .missing-request-dialog .missing-email-grid { padding: 16px 16px 0; }
    .missing-check-grid { grid-template-columns: 1fr; }
    .missing-request-builder { align-items: flex-start; }
    .missing-request-footer { margin: 0 -16px; padding: 12px 16px; align-items: stretch; flex-direction: column; }
    .missing-request-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
    .missing-request-footer .btn { width: 100%; }
    .missing-viewer-tools { align-items: flex-start; flex-direction: column; }
}
.check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.check-tile {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
}
.check-tile strong, .check-tile span { display: block; }
.check-tile span { color: var(--muted); margin-top: 6px; }
.check-tile.done { border-color: #b8dfca; background: #f2fbf6; }
.check-tile.open { border-color: #ecd1aa; background: #fff8ef; }
.check-tile.missing { border-color: #f0c2c2; background: #fff5f5; }
.code-block {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #0f2434;
    color: #fff;
    border-radius: var(--radius);
    padding: 16px;
    line-height: 1.5;
}
.check-row {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}
.check-row input { width: auto; min-height: auto; }

.invoice-branding-config {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid #d5e5ec;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbfc, #fff);
}
.invoice-branding-config-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.invoice-branding-config-head > div:first-child { max-width: 650px; }
.invoice-branding-config-head strong { color: var(--ink); font-size: 17px; }
.invoice-branding-config-head p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.invoice-branding-preview { display: flex; flex: 0 0 190px; min-height: 86px; align-items: center; justify-content: flex-start; padding: 14px; border: 1px solid #d7e5eb; border-radius: 12px; background: #fff; overflow: hidden; }
.invoice-branding-preview img { display: block; max-width: 160px; max-height: 58px; width: auto; height: auto; object-fit: contain; object-position: left center; }
.invoice-branding-preview strong { color: var(--tenant-primary, var(--navy)); font-size: 19px; line-height: 1.2; }
.invoice-contact-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 18px; }
.invoice-contact-options .check-row { margin: 0; padding: 10px 12px; border: 1px solid #deeaef; border-radius: 10px; background: #fff; color: #375d72; font-size: 13px; font-weight: 750; }
@media (max-width: 720px) {
    .invoice-branding-config-head { align-items: stretch; flex-direction: column; }
    .invoice-branding-preview { flex-basis: auto; width: 100%; min-height: 76px; }
    .invoice-contact-options { grid-template-columns: 1fr; }
}

.invoice { max-width: 920px; margin: 28px auto; padding: 34px; background: #fff; color: #102f45; }
.invoice-head { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 28px; align-items: flex-start; }
.invoice-head img { width: auto; max-width: 176px; max-height: 76px; object-fit: contain; object-position: left top; align-self: start; }
.invoice-brand-name { max-width: 280px; color: var(--tenant-primary, var(--navy)); font-size: 24px; line-height: 1.15; }
.invoice-head.without-identity .invoice-meta { margin-left: auto; }
.invoice-meta { text-align: right; }
.invoice-meta h1 { font-size: 30px; margin-bottom: 8px; }
.invoice-meta p { color: var(--muted); line-height: 1.45; margin: 0; }
.invoice-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}
.invoice-parties div,
.invoice-terms {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdfe;
}
.invoice-parties span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.invoice-parties strong { display: block; margin-bottom: 5px; }
.invoice-parties p,
.invoice-terms p { margin: 0 0 12px; line-height: 1.45; }
.invoice-parties.single-party { grid-template-columns: 1fr; }
.invoice-issuer-contacts { color: #486b7e; font-size: 13px; }
.invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.invoice-table th,
.invoice-table td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.invoice-table th:last-child,
.invoice-table td:last-child { text-align: right; }
.invoice-table tfoot th { font-weight: 850; }
.invoice-table .grand-total th { font-size: 18px; color: var(--blue); border-bottom: 0; padding-top: 16px; }
.invoice-terms { margin-bottom: 24px; }
.invoice-paid-banner {
    border: 1px solid #b8dfca;
    border-radius: 8px;
    background: #f2fbf6;
    padding: 14px 16px;
    margin: 0 0 22px;
}
.invoice-paid-banner strong {
    display: block;
    color: var(--ok);
    font-size: 18px;
    margin-bottom: 4px;
}
.invoice-paid-banner p {
    margin: 0;
    color: #385a72;
}
.invoice-demo-reminder-banner {
    margin: 0 0 22px;
    border: 1px solid rgba(13, 95, 147, .20);
    border-radius: 8px;
    background: linear-gradient(135deg, #eef7fb, #ffffff);
    padding: 14px 16px;
}
.invoice-demo-reminder-banner strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
    margin-bottom: 4px;
}
.invoice-demo-reminder-banner p {
    margin: 0;
    color: #385a72;
    line-height: 1.45;
}
.invoice-client-guidance {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    margin: 0 0 24px;
    border: 1px solid rgba(45, 138, 98, .28);
    border-left: 5px solid var(--ok);
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 0%, rgba(45, 138, 98, .14), transparent 34%),
        linear-gradient(135deg, #f3fbf7, #fff);
    box-shadow: 0 18px 44px rgba(13, 47, 72, .08);
}
.invoice-client-guidance::after {
    content: "";
    position: absolute;
    inset: -55% auto -55% -30%;
    width: 28%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
    transform: skewX(-16deg);
    animation: invoiceGuidanceSweep 5.4s ease-in-out infinite;
    pointer-events: none;
}
.invoice-client-guidance-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ok), #0d6698);
    box-shadow: 0 12px 28px rgba(45, 138, 98, .22);
}
.invoice-client-guidance-icon::before {
    content: "";
    display: block;
    width: 15px;
    height: 24px;
    margin: 9px 0 0 17px;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    transform: rotate(42deg);
}
.invoice-client-guidance strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
    margin-bottom: 5px;
}
.invoice-client-guidance p {
    margin: 0;
    color: var(--muted);
    line-height: 1.52;
    font-weight: 750;
}
.invoice-client-guidance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
@keyframes invoiceGuidanceSweep {
    0%, 48% { transform: translateX(0) skewX(-16deg); opacity: 0; }
    58% { opacity: 1; }
    82%, 100% { transform: translateX(470%) skewX(-16deg); opacity: 0; }
}
.qr-payment-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 26px;
    align-items: center;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #d8e3f1;
    border-radius: 18px;
    background: #fbfcff;
    color: #355987;
}
.qr-payment-card-image {
    width: 190px;
    min-height: 190px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e3f1;
    border-radius: 16px;
    background: #fff;
}
.qr-payment-card-image img {
    width: 168px;
    height: 168px;
    display: block;
}
.qr-payment-card-details {
    display: grid;
    gap: 8px;
    font-size: 19px;
    line-height: 1.35;
}
.qr-payment-card-details p {
    margin: 0;
}
.qr-payment-card-details strong {
    color: #355987;
    font-weight: 900;
}
.qr-payment-card-note {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    color: #355987;
    font-size: 15px;
}
.invoice-next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding: 18px 20px;
    border: 1px solid #bfe2d0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f2fbf6, #ffffff);
}
.invoice-next-step strong {
    display: block;
    color: #1f8c62;
    font-size: 18px;
    margin-bottom: 5px;
}
.invoice-next-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}
.qr-missing {
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 3px solid #111;
    font-weight: 900;
}
.qr-technical { margin-top: 18px; color: var(--muted); font-size: 12px; }
.qr-technical pre { white-space: pre-wrap; border: 1px solid var(--line); padding: 12px; }

/* Design system buttons: keeps actions distinct from static chips/cards. */
a.btn,
button.btn,
summary.billing-correction-button,
.oauth-provider-button,
.email-provider-button,
.case-tab-viewer,
.scroll-top-button,
.account-new-case-button,
.active-case-mini button,
.invoice-filter-tabs button,
.email-toolbar button {
    cursor: pointer;
}

.btn.client-access-btn,
.btn.success {
    border-color: rgba(45, 138, 98, .34);
    background: linear-gradient(180deg, #f4fbf7, #e9f7ef);
    color: #147653;
    box-shadow: 0 10px 22px rgba(45, 138, 98, .12);
}

.btn.client-access-btn:hover,
.btn.success:hover {
    border-color: rgba(45, 138, 98, .56);
    background: linear-gradient(180deg, #f7fdf9, #ddf2e7);
    color: #0f694a;
    box-shadow: 0 14px 28px rgba(45, 138, 98, .18);
}

.document-missing-request-btn,
.preview-eye-button {
    border-color: rgba(196, 142, 63, .34);
    background: linear-gradient(180deg, #fffbf3, #fff2dc);
    color: #8a5a15;
    box-shadow: 0 10px 22px rgba(196, 142, 63, .13);
}

.document-missing-request-btn:hover,
.preview-eye-button:hover {
    border-color: rgba(196, 142, 63, .62);
    background: linear-gradient(180deg, #fffefa, #ffe9bf);
    color: #72480e;
    box-shadow: 0 14px 30px rgba(196, 142, 63, .20);
}

.btn.danger-soft {
    border-color: #efc3c3;
    background: linear-gradient(180deg, #fffafa, #fff3f3);
    color: var(--danger);
}

.btn.danger-soft:hover {
    border-color: #e3a8a8;
    background: #ffecec;
    color: #9f3030;
}

.status-pill,
.summary-count,
.progress-pill,
.case-invoice-badge,
.missing-selection-count,
.invoice-state,
.nav-alert-dot {
    cursor: default;
    box-shadow: none;
    transform: none;
}

.btn[hidden],
button[hidden] {
    display: none !important;
}

@media (max-width: 1200px) {
    .document-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .case-workflow-panel {
        grid-template-columns: repeat(var(--workflow-step-count, 5), minmax(185px, 1fr));
    }
    .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 560px);
    }
    .public-access-panel.two-column {
        grid-template-columns: 1fr;
    }
    .upload-card .photo-upload-form {
        display: grid;
    }
    .wizard, .intake-shell, .grid.two, .grid.three, .trust-strip, .metrics, .summary-grid, .summary-cards, .email-editor, .field-check-grid, .check-grid, .document-row-form, .document-control-grid, .document-category-grid, .document-select-grid, .missing-email-grid, .missing-check-grid, .canton-grid, .client-type-grid, .two-choice, .three-choice, .four-choice, .income-grid, .summary-box, .cover-choice, .expected-documents-box ul, .documents-hero, .document-mode-choice, .securities-intro, .service-option-card, .delay-choice-grid, .transmission-card-grid, .payment-focus-head, .otp-explainer, .case-switcher-hero, .support-hero, .support-admin-grid, .support-workflow-form, .client-audit-row, .client-processing-note, .context-grid, .final-download-card, .postal-documents-head, .postal-document-list, .ai-settings-grid, .ai-policy-grid, .ai-case-head, .backend-user-row, .client-user-row, .permission-grid, .tax-appeal-create-form, .tax-appeal-document-form, .tax-appeal-close-form, .tax-appeal-row, .tax-appeal-hero, .tax-appeal-actions-grid, .tax-appeal-documents article { grid-template-columns: 1fr; }
    .email-template-summary { grid-template-columns: 32px minmax(0, 1fr); }
    .email-template-summary-meta {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }
    .email-preview-pane { position: static; }
    .section-title-actions,
    .document-control-actions,
    .case-invoice-actions,
    .invoice-client-guidance-actions,
    .modal-actions,
    .intake-builder-actions,
    .support-workflow-actions,
    .final-download-actions,
    .postal-documents-actions {
        align-items: stretch;
        justify-content: stretch;
    }
    .section-title-actions .btn,
    .document-control-actions .btn,
    .document-control-actions form,
    .case-invoice-actions .btn,
    .case-invoice-actions form,
    .invoice-client-guidance-actions .btn,
    .modal-actions .btn,
    .intake-builder-actions .btn,
    .support-workflow-actions .btn,
    .tax-appeal-actions-grid .btn,
    .final-download-actions .btn,
    .postal-documents-actions .btn,
    .postal-documents-actions form {
        width: 100%;
    }
    .category-primary-actions,
    .category-cover-action,
    .category-cover-select,
    .category-upload-form {
        grid-template-columns: 1fr;
    }
    .category-cover-action .btn {
        width: 100%;
    }
    .quick-review-head {
        grid-template-columns: 1fr;
    }
    .quick-review-meter {
        justify-items: start;
        width: 100%;
    }
    .quick-review-meter span {
        text-align: left;
    }
    .quick-review-simple-row {
        grid-template-columns: 1fr;
        text-align: left;
        width: 100%;
        justify-self: stretch;
    }
    .quick-review-simple-row .btn {
        width: 100%;
    }
    .quick-review-simple-row > div:first-child,
    .quick-review-simple-row small,
    .quick-review-simple-row .document-inline-actions {
        justify-self: stretch;
        text-align: left;
    }
    .quick-review-simple-row .document-inline-actions {
        justify-content: flex-start;
    }
    .document-viewer-modal {
        padding: 8px;
    }
    .document-viewer-shell,
    .document-viewer-shell.is-actions-collapsed {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(140px, .45fr) minmax(420px, 1fr) auto;
        overflow: auto;
    }
    .document-viewer-stage {
        min-height: 520px;
        padding: 0 10px 10px;
    }
    .admin-dashboard-hero,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-search {
        justify-self: stretch;
        width: 100%;
    }
    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .financial-kpi-grid,
    .consistency-grid,
    .print-info-grid,
    .print-check-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-action-row {
        grid-template-columns: 1fr;
        grid-template-areas: "identity" "focus" "context";
        align-items: start;
    }
    .dashboard-action-focus {
        padding: 0;
        border: 0;
    }
    .case-priority-card {
        flex-direction: column;
        align-items: stretch;
    }
    .case-priority-card .btn {
        width: 100%;
        justify-content: center;
    }
    .ai-settings-actions,
    .ai-case-empty {
        display: grid;
        justify-content: stretch;
    }
    .ai-settings-actions .btn,
    .ai-case-head .btn,
    .ai-case-head form,
    .ai-case-empty .btn {
        width: 100%;
    }
    .users-rights-intro,
    .client-user-row > div:last-child {
        display: grid;
        justify-content: stretch;
    }
    .users-rights-intro .btn,
    .users-rights-actions .btn,
    .backend-user-row label,
    .client-user-row .btn {
        width: 100%;
    }
    .role-rights-card summary {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .role-rights-card summary em {
        grid-column: 2;
        justify-self: start;
    }
    .missing-request-panel summary { grid-template-columns: 34px minmax(0, 1fr); }
    .summary-count { justify-self: start; grid-column: 2; }
    .choice-grid.client-type-grid { grid-template-columns: 1fr; }
    .intake-head {
        display: grid;
        align-items: stretch;
    }
    .intake-tools,
    .save-status {
        width: 100%;
        justify-items: stretch;
    }
    .save-status {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .oauth-login-actions,
    .intake-oauth-actions {
        width: 100%;
    }
    .oauth-provider-button {
        width: 100%;
        grid-template-columns: 28px minmax(0, 1fr) 18px;
        gap: 10px;
        padding-inline: 16px;
    }
    .oauth-provider-button span:not(.oauth-logo) {
        line-height: 1.18;
    }
    .coord-card-head {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .coord-field-grid.address .country-field,
    .coord-field-grid .wide-field,
    .coord-field-grid .account-email-locked {
        grid-column: auto;
    }
    .childcare-choice {
        grid-template-columns: 48px minmax(0, 1fr) 30px;
        gap: 14px;
        padding: 18px;
    }
    .account-settings-grid, .account-field-grid { grid-template-columns: 1fr; }
    .account-settings-main, .account-details-form { max-width: none; }
    .production-banner, .fiscal-summary-grid, .case-delivery-grid { grid-template-columns: 1fr; }
    .document-category-card header { min-height: auto; }
    .category-actions { grid-template-columns: 1fr; }
    .category-document-row { grid-template-columns: 1fr; }
    .category-document-row .btn { width: 100%; justify-content: center; }
    .removed-document-row { grid-template-columns: 1fr; }
    .removed-document-row .btn { width: 100%; justify-content: center; }
    .account-payment-summary { grid-template-columns: 1fr; }
    .account-invoice-card { align-items: stretch; flex-direction: column; }
    .account-invoice-card > div:last-child { justify-items: start; }
    .account-invoice-card .btn { width: 100%; justify-content: center; }
    .hero { grid-template-columns: 1fr; }
    .cover-actions { padding: 10px; }
    .choice-action { min-height: auto; }
    .choice-action.primary em {
        min-height: 58px;
        white-space: normal;
    }
    .install-card { grid-template-columns: 1fr; }
    .install-card { min-height: 0; }
    .install-submit { flex-direction: column; align-items: stretch; }
    .install-submit .btn { width: 100%; }
    .price-box { position: static; }
    .wizard-step-nav {
        display: none;
    }
    .wizard-mobile-step-nav {
        display: block;
    }
    .document-submit-bar {
        position: sticky;
        left: auto;
        right: auto;
        bottom: 10px;
        width: auto;
        transform: none;
        z-index: 5;
        justify-content: stretch;
    }
    .document-submit-bar form,
    .document-submit-bar .btn {
        width: 100%;
        border-radius: 14px;
    }
    .document-submit-bar form {
        display: grid;
    }
    .document-submit-bar span {
        max-width: none;
        text-align: center;
    }
    .email-template-head,
    .email-rule-card {
        grid-template-columns: 1fr;
    }
    .email-template-head {
        flex-direction: column;
    }
    .email-template-head code {
        max-width: 100%;
    }
    .email-rule-fields {
        grid-template-columns: 1fr;
    }
    .admin-head, .search, .inline-form, .quick-links { flex-direction: column; align-items: stretch; }
    .impersonation-banner {
        flex-direction: column;
        align-items: stretch;
        top: 68px;
    }
    .impersonation-banner .btn {
        width: 100%;
        justify-content: center;
    }
    .qr-payment-card { grid-template-columns: 1fr; }
    .qr-payment-card-note { grid-column: auto; }
    .topbar {
        height: auto;
        min-height: 68px;
        align-items: center;
        padding: 10px 16px;
        gap: 10px;
    }
    .brand img {
        width: 142px;
    }
    .topbar.is-module-only .brand {
        flex-basis: 198px;
        padding-inline: 8px;
    }
    .topbar.is-module-only .brand img {
        width: 180px;
    }
    .mobile-menu-toggle {
        position: relative;
        margin-left: auto;
        width: 48px;
        height: 44px;
        border: 1px solid #d8e8ef;
        border-radius: 14px;
        background: #fff;
        color: var(--ink);
        display: grid;
        place-items: center;
        gap: 3px;
        padding: 9px 10px;
        box-shadow: 0 10px 24px rgba(20,50,74,.08);
        cursor: pointer;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .18s ease, opacity .18s ease;
    }
    .mobile-menu-toggle strong {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .topbar.menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }
    .topbar.menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    .topbar.menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }
    .topbar nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: calc(100% + 8px);
        display: none;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        border: 1px solid #d8e8ef;
        border-radius: 18px;
        background: rgba(255,255,255,.98);
        box-shadow: 0 22px 60px rgba(16,43,66,.16);
        backdrop-filter: blur(14px);
    }
    .topbar.menu-open nav {
        display: grid;
    }
    .topbar:not(.is-client-account) nav .nav-link {
        color: var(--ink);
        font-size: .94rem;
        font-weight: 760;
    }
    .topbar:not(.is-client-account) nav .nav-link:hover,
    .topbar:not(.is-client-account) nav .nav-link.active {
        background: #fff8e8;
        color: #9b6924;
        box-shadow: none;
    }
    .topbar:not(.is-client-account) nav .admin-nav-group,
    .topbar:not(.is-client-account) nav .client-nav-group {
        border-color: #d8e8ef;
        background: #f7fbfd;
    }
    .topbar.is-client-account {
        align-items: flex-start;
        flex-wrap: wrap;
        min-height: 126px;
    }
    .topbar.is-client-account + main {
        padding-top: 126px;
    }
    .topbar.is-client-account .mobile-menu-toggle {
        display: none;
    }
    .topbar.is-client-account nav,
    .topbar.is-client-account.menu-open nav {
        position: static;
        display: flex;
        flex: 0 0 100%;
        align-items: center;
        gap: 8px;
        max-width: none;
        overflow-x: auto;
        padding: 8px 0 2px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        scroll-snap-type: x proximity;
    }
    .topbar.is-client-account .client-nav-group {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        scroll-snap-align: start;
    }
    .topbar.is-client-account .nav-link {
        min-height: 38px;
    }
    .status-help-panel {
        left: auto;
        right: -2px;
        width: min(360px, calc(100vw - 32px));
    }
    .status-help-panel::before {
        left: auto;
        right: 10px;
    }
    .client-nav-group,
    .admin-nav-group { flex-wrap: wrap; border-radius: 14px; }
    .nav-menu { position: static; width: 100%; }
    .nav-menu-trigger { width: 100%; justify-content: space-between !important; }
    .nav-menu-chevron { background: #eaf3f7; color: var(--blue); }
    .nav-submenu {
        position: static;
        width: 100%;
        max-height: min(52vh, 480px);
        margin-top: 6px;
        border-radius: 14px;
        box-shadow: inset 0 0 0 1px rgba(216,232,239,.5);
        background: #f9fcfd;
    }
    .settings-submenu {
        padding: 12px;
    }
    .settings-menu-grid {
        grid-template-columns: 1fr;
    }
    .process-summary { flex-direction: column; }
    .active-case-banner { flex-direction: column; align-items: stretch; }
    .active-case-banner .btn { width: 100%; justify-content: center; }
    .process-track {
        grid-template-columns: 1fr;
        gap: 0;
        margin-left: 4px;
    }
    .client-process { grid-template-columns: 1fr; }
    .correction-deadline { flex-direction: column; align-items: stretch; }
    .process-step {
        grid-template-columns: 42px 1fr;
        justify-items: start;
        text-align: left;
        min-height: 58px;
    }
    .process-step::before,
    .process-step::after {
        left: 18px;
        right: auto;
        width: 2px;
        height: 50%;
    }
    .process-step::before { top: 0; }
    .process-step::after { top: 36px; }
    .process-label { max-width: none; padding-top: 8px; }
    .client-invoice-card { align-items: stretch; flex-direction: column; }
    .client-invoice-card > div:last-child { justify-items: start; }
    .case-switcher-actions { justify-content: flex-start; }
    .case-switcher-actions strong { text-align: left; }
    .case-switcher-actions .btn { width: 100%; justify-content: center; }
    .case-switcher-hero .btn { width: 100%; justify-content: center; }
    .case-switcher-list { grid-template-columns: 1fr; }
    .draft-resume-banner {
        grid-template-columns: 1fr;
    }
    .draft-resume-actions {
        justify-content: flex-start;
    }
    .draft-resume-actions .btn,
    .draft-resume-actions form {
        width: 100%;
    }
    .draft-resume-actions .btn {
        justify-content: center;
    }
    .case-switcher-modal { padding: 12px; align-items: end; }
    .case-switcher-dialog {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 20px;
    }
    .case-switcher-dialog-head h2 { font-size: 28px; }
    .quick-case-grid { grid-template-columns: 1fr; }
    .missing-docs-modal,
    .draft-resume-modal { padding: 12px; align-items: end; }
    .missing-docs-dialog {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 20px;
    }
    .missing-docs-head {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 12px;
    }
    .missing-docs-icon {
        width: 46px;
        height: 46px;
    }
    .missing-docs-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .otp-app-links { justify-content: flex-start; }
    .otp-app-links a { flex: 1; }
    .payment-path-card { grid-template-columns: 1fr; }
.payment-actions-row .btn { width: 100%; justify-content: center; }
    .choice-grid { grid-template-columns: 1fr; }
    .health-insurance-details {
        grid-template-columns: 1fr;
    }
    .intake-head, .wizard-actions { flex-direction: column; align-items: stretch; }
    .dynamic-row,
    .dynamic-row.salary-row,
    .dynamic-row.child-row,
    .dynamic-row.dependent-row,
    .dynamic-row.estate-row {
        grid-template-columns: 1fr;
    }
    #salary-employer-fields,
    #salary-employer-fields .salary-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    #salary-employer-fields .salary-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    #salary-employer-fields .salary-row > * {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .dynamic-row input,
    .dynamic-row select,
    .dynamic-row textarea {
        width: 100%;
        min-width: 0;
    }
    h1 { font-size: 36px; }
    .topbar {
        flex-direction: row;
    }
    .client-nav-group,
    .admin-nav-group,
    .nav-link,
    .nav-new-case {
        width: 100%;
    }
    .client-nav-group,
    .admin-nav-group {
        justify-content: stretch;
    }
    .nav-link,
    .nav-new-case {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    main {
        padding: 0;
    }
    .topbar.is-client-account + main {
        padding-top: 126px;
    }
    .intake-shell,
    .dashboard-shell {
        width: 100%;
        max-width: 100vw;
        padding: 62px 12px 12px;
        overflow-x: hidden;
    }
    .admin-dashboard-hero {
        padding: 16px;
        border-radius: 14px;
    }
    .dashboard-metric-grid,
    .dashboard-performance-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-metric-card {
        min-height: 96px;
    }
    .panel-title-row {
        display: grid;
    }
    .dashboard-performance-grid .wide {
        grid-column: auto;
    }
    .dashboard-activity-row {
        border-radius: 12px;
    }
    .cockpit-panel {
        overflow-x: auto;
    }
    .mobile-price-float {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 78px;
        z-index: 30;
        display: grid;
        gap: 8px;
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
    }
    .topbar.menu-open + main .mobile-price-float {
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
    }
    .mobile-price-toggle {
        pointer-events: auto;
        width: 100%;
        min-height: 42px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border: 1px solid #c8e9d6;
        border-radius: 999px;
        background: rgba(255,255,255,.97);
        color: var(--ink);
        padding: 8px 10px 8px 14px;
        box-shadow: 0 14px 36px rgba(16,43,66,.13);
        backdrop-filter: blur(12px);
        font: inherit;
        cursor: pointer;
    }
    .mobile-price-toggle span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }
    .mobile-price-toggle strong {
        min-width: 0;
        color: #21744f;
        text-align: left;
        font-size: 17px;
        white-space: nowrap;
    }
    .mobile-price-toggle em {
        border-radius: 999px;
        background: #f2fbf6;
        color: #21744f;
        padding: 5px 9px;
        font-size: 12px;
        font-style: normal;
        font-weight: 950;
    }
    .mobile-price-float.is-open .mobile-price-toggle {
        border-radius: 18px;
    }
    .mobile-price-detail {
        pointer-events: auto;
        display: grid;
        gap: 8px;
        border: 1px solid #d8e8ef;
        border-radius: 18px;
        background: rgba(255,255,255,.98);
        padding: 12px;
        box-shadow: 0 18px 48px rgba(16,43,66,.16);
        backdrop-filter: blur(12px);
    }
    .mobile-price-detail > div {
        display: grid;
        gap: 7px;
    }
    .mobile-price-detail div div {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        color: var(--muted);
        font-size: 13px;
    }
    .mobile-price-detail div div strong {
        color: var(--ink);
        white-space: nowrap;
    }
    .mobile-price-detail .mobile-price-total-line {
        margin-top: 5px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
        color: var(--ink);
        font-weight: 950;
    }
    .mobile-price-detail .mobile-price-total-line strong {
        color: #21744f;
    }
    .mobile-price-detail p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }
    .intake-main.panel,
    .dashboard-shell > .panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-radius: 14px;
        padding: 18px;
        overflow-x: hidden;
    }
    .intake-head {
        gap: 12px;
    }
    .intake-head h1 {
        font-size: clamp(28px, 9vw, 34px);
        line-height: 1.05;
        overflow-wrap: anywhere;
    }
    .oauth-provider-button {
        min-height: 54px;
        font-size: clamp(14px, 4.6vw, 17px);
        border-radius: 14px;
    }
    .oauth-logo {
        width: 24px;
        height: 24px;
    }
    .public-oauth-actions .oauth-provider-button {
        min-height: 56px;
    }
    .coord-card,
    .intake-oauth-card {
        padding: 14px;
    }
    .coord-card-head h3 {
        font-size: 20px;
        line-height: 1.15;
    }
    .coord-card-head p,
    .intake-oauth-head span,
    .email-code-hint {
        font-size: 13px;
        line-height: 1.4;
    }
    .coord-field-grid,
    .coord-field-grid.two,
    .coord-field-grid.contact,
    .coord-field-grid.address,
    .previous-address-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .coord-field-grid input,
    .coord-field-grid select,
    .coord-field-grid textarea {
        width: 100%;
        min-width: 0;
    }
    .wizard-intro-note {
        font-size: 15px;
    }
    .mobile-intake-promise {
        display: grid;
        gap: 4px;
        margin-top: 12px;
        padding: 12px 14px;
        border: 1px solid #c8e9d6;
        border-radius: 14px;
        background: linear-gradient(135deg, #f2fbf6, #fff);
    }
    .mobile-intake-promise strong {
        color: #21744f;
        font-size: 16px;
    }
    .mobile-intake-promise span {
        color: var(--muted);
        font-weight: 750;
        line-height: 1.35;
    }
    .intake-tools {
        width: 100%;
        justify-content: space-between;
    }
    .draft-takeover-note {
        padding: 13px 14px;
        border-left-width: 4px;
    }
    .deposit-scope-note {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 11px;
        padding: 13px 14px;
        border-left-width: 4px;
    }
    .deposit-scope-note > span {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .deposit-scope-note strong {
        font-size: 15px;
    }
    .deposit-scope-note p {
        font-size: 13px;
        line-height: 1.45;
    }
    .final-validation-callout {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
        border-left-width: 5px;
    }
    .final-validation-pulse {
        width: 36px;
        height: 36px;
    }
    .final-validation-pulse::after {
        left: 12px;
        top: 8px;
        width: 9px;
        height: 15px;
        border-right-width: 3px;
        border-bottom-width: 3px;
    }
    .wizard-step.is-active {
        gap: 14px;
    }
    .wizard-step h2,
    .wizard-step-heading h2 {
        font-size: 28px;
        line-height: 1.08;
    }
    .wizard-step-heading .note,
    .gentle-step-banner p,
    .section-heading p {
        font-size: 15px;
        line-height: 1.45;
    }
    .fiscal-year-card,
    .choice-grid.premium-choice-grid label.choice-card,
    .flow-choice-card,
    .delay-card,
    .document-mode-card {
        min-height: 0;
        padding: 16px;
    }
    .flow-choice-card {
        gap: 12px;
        padding: 18px;
    }
    .flow-choice-card .document-mode-badge {
        position: static;
        justify-self: start;
        align-self: start;
        max-width: 100%;
        margin: 0 0 2px;
        padding: 7px 12px;
        background: linear-gradient(135deg, #fff4df, #fffaf0);
        border: 1px solid #f0d8af;
        box-shadow: 0 8px 20px rgba(185,139,69,.10);
        white-space: normal;
    }
    .flow-choice-card strong,
    .flow-choice-card small {
        max-width: calc(100% - 52px);
    }
    .choice-grid.premium-choice-grid label.choice-card,
    .income-grid .choice-card {
        grid-template-columns: 34px minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .choice-card,
    .choice-card strong,
    .choice-card span,
    .choice-grid.premium-choice-grid label.choice-card span,
    .income-grid .choice-card span,
    .gentle-step-banner,
    .gentle-step-banner strong,
    .gentle-step-banner p {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    .choice-grid.premium-choice-grid label.choice-card span,
    .income-grid .choice-card span {
        grid-column: 2;
        margin-left: 0;
    }
    .fiscal-year-card strong,
    .flow-choice-card strong,
    .delay-card strong,
    .document-mode-card strong {
        font-size: 21px;
        line-height: 1.12;
    }
    .flow-choice-card:has(input:checked)::after {
        right: 18px;
        bottom: 18px;
        width: 34px;
        height: 34px;
    }
    .document-select-grid,
    .document-select-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .document-select-group {
        padding: 12px;
        border: 1px solid #e1edf2;
        border-radius: 14px;
        background: #fbfdfe;
    }
    .document-select-group h3 {
        margin: 0;
        font-size: 17px;
    }
    .document-select-card {
        padding: 12px;
        border-radius: 12px;
    }
    .client-create-grid {
        grid-template-columns: 1fr;
    }
    .client-filter-tabs a {
        flex: 1 1 auto;
    }
    .dynamic-row,
    .dynamic-row.salary-row,
    .dynamic-row.child-row,
    .dynamic-row.dependent-row,
    .dynamic-row.estate-row {
        gap: 10px;
        padding: 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, #f7fbfd, #fff);
    }
    #salary-employer-fields .salary-row {
        gap: 12px;
        align-items: stretch;
    }
    .dynamic-row strong {
        display: block;
        color: var(--blue);
        font-size: 15px;
    }
    #salary-employer-fields .salary-row strong {
        color: var(--ink);
        font-size: 18px;
        line-height: 1.2;
    }
    .dynamic-row input,
    .dynamic-row select {
        min-height: 48px;
        font-size: 16px;
    }
    .summary-cards {
        grid-template-columns: 1fr;
    }
    .wizard-actions {
        position: sticky;
        bottom: 0;
        z-index: 35;
        grid-template-columns: 1fr;
        margin: 0 -18px -18px;
        padding: 12px;
        background: rgba(255,255,255,.96);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(10px);
    }
    .wizard-actions .btn {
        width: 100%;
        min-height: 52px;
    }
    .price-box {
        position: static;
        padding: 16px;
    }
    .today-action-panel {
        grid-template-columns: 1fr;
        padding: 12px;
        margin: 14px 0;
    }
    .client-home-head {
        flex-direction: column;
        align-items: stretch;
    }
    .client-case-fold summary {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 14px;
    }
    .client-case-summary-status {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 48px;
    }
    .client-case-fold-body {
        padding: 0 14px 14px;
    }
    .client-case-progress-line {
        display: grid;
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .client-case-progress-line span {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }
    .today-action-panel.compact {
        grid-template-columns: 1fr;
    }
    .client-case-fold-actions .btn {
        width: 100%;
    }
    .today-action-row {
        min-height: 64px;
    }
    .documents-hero {
        gap: 14px;
        padding: 18px;
    }
    .documents-hero h1 {
        font-size: 30px;
    }
    .document-category-grid {
        grid-template-columns: 1fr;
    }
    .upload-card {
        padding: 14px;
    }
    .upload-card header {
        gap: 10px;
    }
    .category-dropzone {
        min-height: 96px;
        padding: 16px;
    }
    .category-dropzone span {
        font-size: 18px;
    }
    .photo-capture {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    .document-submit-bar {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    .document-submit-bar form {
        padding: 10px;
    }
    .document-submit-bar span {
        font-size: 13px;
    }
    .missing-floating-bar {
        right: 12px;
        bottom: 12px;
        max-height: calc(100vh - 112px);
        overflow: auto;
        width: calc(100vw - 24px);
        flex-direction: column;
        align-items: stretch;
        border-radius: 14px;
    }
    .missing-floating-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .missing-floating-actions .btn {
        width: 100%;
    }
    .document-mode-card {
        padding: 74px 18px 20px;
    }
    .document-mode-icon {
        top: 22px;
        transform: none;
    }
    .document-mode-card strong {
        max-width: none;
        padding-right: 0;
    }
    .document-mode-badge {
        left: 74px;
        right: auto;
        top: 23px;
    }
    .billing-correction-panel {
        margin: 12px;
    }
    .billing-correction-panel.compact {
        margin: 12px;
    }
    .case-invoices-panel .billing-correction-button {
        width: auto;
        max-width: 100%;
    }
    .billing-correction-head {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }
    .billing-correction-icon {
        width: 44px;
        height: 44px;
        font-size: 12px;
    }
    .billing-correction-cta {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .billing-correction-summary,
    .billing-correction-form {
        grid-template-columns: 1fr;
    }
    .billing-correction-rule,
    .billing-correction-section-title,
    .billing-correction-submit {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
    .billing-lines-head {
        display: none;
    }
    .billing-line-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .billing-line-row strong {
        justify-content: flex-start;
        min-height: 34px;
    }
    .billing-line-active {
        position: static;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        order: -1;
    }
    .billing-line-active span {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
    .billing-lines-total {
        justify-content: space-between;
    }
    .billing-correction-submit .btn {
        width: 100%;
        justify-content: center;
    }
}

.coord-card-access .intake-oauth-card > .intake-email-disclosure.email-login-disclosure {
    width: min(100%, 480px) !important;
    max-width: 480px !important;
    justify-self: center !important;
    justify-items: stretch !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.coord-card-access .intake-oauth-card > .intake-email-disclosure.email-login-disclosure > .email-provider-button {
    box-sizing: border-box !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    list-style: none !important;
    width: 100% !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 76px !important;
    padding-right: 76px !important;
    text-align: center !important;
}

.coord-card-access .intake-oauth-card > .intake-email-disclosure.email-login-disclosure > .email-provider-button::-webkit-details-marker,
.coord-card-access .intake-oauth-card > .intake-email-disclosure.email-login-disclosure > .email-provider-button::marker {
    display: none !important;
    content: "" !important;
}

.coord-card-access .intake-oauth-card .oauth-provider-button {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: min(100%, 480px) !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 76px !important;
    padding-right: 76px !important;
    text-align: center !important;
}

.coord-card-access .intake-oauth-card .oauth-provider-button .oauth-logo {
    position: absolute !important;
    left: 52px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    flex: 0 0 auto !important;
}

.coord-card-access .intake-oauth-card .oauth-provider-button span:not(.oauth-logo) {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    text-align: center !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

@media (min-width: 641px) {
    .coord-card .coord-field-grid.address {
        grid-template-columns: minmax(220px, 1fr) minmax(82px, .22fr) minmax(110px, .28fr) minmax(190px, .7fr) !important;
    }
    .coord-card .coord-field-grid.address .street-field,
    .coord-card .coord-field-grid.address .number-field,
    .coord-card .coord-field-grid.address .postal-field,
    .coord-card .coord-field-grid.address .city-field {
        grid-column: auto !important;
    }
    .coord-card .coord-field-grid.address .country-field {
        grid-column: 1 / -1 !important;
    }
    .coord-card .previous-address-grid {
        grid-template-columns: minmax(220px, 1fr) minmax(82px, .22fr) minmax(110px, .28fr) minmax(190px, .7fr) !important;
    }
    .coord-card .previous-address-grid label:nth-child(1),
    .coord-card .previous-address-grid label:nth-child(2),
    .coord-card .previous-address-grid label:nth-child(3),
    .coord-card .previous-address-grid .previous-city-field {
        grid-column: auto !important;
    }
    .coord-card .previous-address-grid .previous-move-date-field {
        grid-column: 1 / span 2 !important;
    }
}

@media (min-width: 1100px) {
    .coord-card .coord-field-grid.address {
        grid-template-columns: minmax(220px, 1fr) minmax(82px, .2fr) minmax(110px, .25fr) minmax(190px, .55fr) minmax(180px, .45fr) !important;
    }
    .coord-card .coord-field-grid.address .country-field {
        grid-column: auto !important;
    }
    .coord-card .previous-address-grid {
        grid-template-columns: minmax(220px, 1fr) minmax(82px, .2fr) minmax(110px, .25fr) minmax(190px, .55fr) minmax(180px, .45fr) !important;
    }
    .coord-card .previous-address-grid .previous-move-date-field {
        grid-column: 1 / span 2 !important;
        max-width: 390px;
    }
}

@media (max-width: 640px) {
    .coord-card .coord-field-grid.address {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .coord-card .coord-field-grid.address label,
    .coord-card .coord-field-grid.address .city-field {
        grid-column: 1 / -1 !important;
    }
    .coord-card .previous-address-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .coord-card .previous-address-grid label,
    .coord-card .previous-address-grid .previous-city-field {
        grid-column: 1 / -1 !important;
    }
}

@media (min-width: 641px) and (max-width: 800px) {
    .coord-card .coord-field-grid.address,
    .coord-card .previous-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .coord-card .coord-field-grid.address .street-field,
    .coord-card .coord-field-grid.address .city-field,
    .coord-card .coord-field-grid.address .country-field,
    .coord-card .previous-address-grid label:nth-child(1),
    .coord-card .previous-address-grid .previous-city-field,
    .coord-card .previous-address-grid label:nth-child(5),
    .coord-card .previous-address-grid .previous-move-date-field { grid-column: 1 / -1 !important; max-width: none; }
}

@media print {
    .topbar { display: none; }
    .no-print { display: none !important; }
    body { background: #fff; }
    .print-case-page { max-width: none; gap: 10px; }
    .print-case-header,
    .print-info-grid article,
    .print-block,
    .print-check-grid article {
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .print-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .print-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice { margin: 0; max-width: none; box-shadow: none; padding: 22mm 18mm; }
    .invoice-head { margin-bottom: 14px; }
    .invoice-meta h1 { font-size: 22px; }
    .invoice-client-guidance {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
        border-radius: 14px;
    }
    .invoice-client-guidance-icon {
        width: 40px;
        height: 40px;
    }
    .invoice-client-guidance-icon::before {
        width: 12px;
        height: 20px;
        margin: 7px 0 0 14px;
        border-right-width: 3px;
        border-bottom-width: 3px;
    }
    .invoice-client-guidance-actions,
    .invoice-client-guidance-actions .btn {
        width: 100%;
    }
    .invoice-parties { margin-bottom: 14px; gap: 10px; }
    .invoice-parties div,
    .invoice-terms { padding: 10px; }
    .invoice-table { margin-bottom: 12px; }
    .invoice-table th,
    .invoice-table td { padding: 7px 0; }
    .invoice-terms { margin-bottom: 12px; }
    .qr-payment-card {
        grid-template-columns: 150px 1fr !important;
        gap: 18px;
        align-items: center;
        padding: 14px 16px;
        margin: 14px 0;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .qr-payment-card-image {
        width: 140px;
        min-height: 140px;
        border-radius: 12px;
    }
    .qr-payment-card-image img {
        width: 120px;
        height: 120px;
    }
    .qr-payment-card-details {
        gap: 4px;
        font-size: 12.5px;
        line-height: 1.25;
    }
    .qr-payment-card-note {
        grid-column: 1 / -1;
        font-size: 10.5px;
        line-height: 1.25;
        margin-top: 4px;
    }
    .qr-missing {
        width: 120px;
        height: 120px;
        font-size: 12px;
    }
    .qr-technical { display: none; }
}

/* Fiscalist inbox: intentionally isolated from the client document flow. */
.fiscalist-inbox,
.fiscalist-review-sheet {
    scroll-margin-top: 96px;
}

.fiscalist-inbox-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    padding: 12px 14px;
    margin: 0 0 16px;
    border: 1px solid #dce8f5;
    border-radius: 12px;
    background: #f7fbff;
    color: #42566b;
}

.fiscalist-inbox-context strong { color: #193854; }

.fiscalist-inbox-modes,
.fiscalist-inbox-document-statuses,
.fiscalist-inbox-document-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fiscalist-inbox-modes { margin: 0 0 16px; }
.fiscalist-inbox-ocr-mode {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 10px 14px;
    align-items: end;
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #d6e6ec;
    border-radius: 14px;
    background: #f7fbfc;
}
.fiscalist-inbox-ocr-mode label { margin: 0; }
.fiscalist-inbox-ocr-mode small { grid-column: 1 / -1; color: #607789; }
.fiscalist-inbox-processing-note { margin: 14px 0 18px; color: #526473; }
.fiscalist-inbox-processing-note p { margin: 8px 0; }
.fiscalist-inbox-ai-option { margin-top: 12px; }
.fiscalist-inbox-ai-option summary { cursor: pointer; font-weight: 600; }
.fiscalist-batch-note > small { color: #66798a; font-weight: 400; }
.fiscalist-inbox-document-actions { grid-column: 1 / -1; }
.fiscalist-inbox-document-actions form { margin: 0; }
.fiscalist-inbox-document-statuses .document-ocr-status { margin: 0; }
.fiscalist-batch-documents > li > a { overflow-wrap: anywhere; }

@media (max-width: 720px) {
    .fiscalist-inbox .fiscalist-batch-documents > li { grid-template-columns: minmax(0, 1fr); }
    .fiscalist-inbox-document-statuses .fiscalist-document-state { white-space: normal; }
}

.fiscalist-batch-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr) auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid #cfe1f5;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff, #eff8f5);
}

.fiscalist-upload-dropzone {
    display: grid;
    gap: 4px;
    min-height: 118px;
    padding: 20px;
    border: 2px dashed #75a8d8;
    border-radius: 12px;
    color: #315672;
    text-align: center;
    cursor: pointer;
}

.fiscalist-upload-dropzone:hover,
.fiscalist-upload-dropzone:focus-within {
    border-color: #1668a6;
    background: #fff;
}

.fiscalist-upload-dropzone.dragging,
.fiscalist-upload-dropzone.has-files {
    border-color: #177b62;
    background: #f3fcf8;
}

.fiscalist-upload-dropzone input {
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    position: absolute;
}

.fiscalist-upload-dropzone strong { color: #153f60; }
.fiscalist-upload-dropzone small { color: #66798a; }

.fiscalist-batch-note { display: grid; gap: 6px; }
.fiscalist-batch-note em { color: #788896; font-style: normal; font-weight: 400; }
.fiscalist-batch-note textarea { min-height: 88px; resize: vertical; }

.fiscalist-ai-not-ready {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 16px 0;
    padding: 12px 14px;
    border-left: 4px solid #d8911c;
    border-radius: 8px;
    background: #fff8e8;
    color: #765110;
}

.fiscalist-batch-list,
.fiscalist-review-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.fiscalist-batch-card,
.fiscalist-review-card {
    padding: 16px;
    border: 1px solid #dce5ed;
    border-radius: 14px;
    background: #fff;
}

.fiscalist-batch-card.processing { border-left: 4px solid #447ec0; }
.fiscalist-batch-card.ready_for_review { border-left: 4px solid #d8911c; }
.fiscalist-batch-card.failed { border-left: 4px solid #bd5252; }

.fiscalist-batch-head,
.fiscalist-review-card > header,
.fiscalist-extraction-final-actions,
.fiscalist-field-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fiscalist-batch-head > div,
.fiscalist-review-card > header > div { display: grid; gap: 3px; }
.fiscalist-batch-head small,
.fiscalist-review-card header small { color: #6d7d89; }
.fiscalist-batch-note-preview { margin: 10px 0 0; color: #526473; }

.fiscalist-batch-documents {
    display: grid;
    gap: 7px;
    padding: 0;
    margin: 14px 0 0;
    list-style: none;
}

.fiscalist-batch-documents li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #edf1f4;
}

.fiscalist-batch-documents li small { grid-column: 1 / -1; color: #a03e3e; }
.fiscalist-document-state { padding: 3px 7px; border-radius: 999px; background: #edf1f4; color: #526473; font-size: .82rem; white-space: nowrap; }
.fiscalist-document-state.needs_review { background: #fff2d8; color: #815800; }
.fiscalist-document-state.processing,
.fiscalist-document-state.queued { background: #eaf4ff; color: #1d5f92; }
.fiscalist-document-state.failed { background: #fff0f0; color: #a13a3a; }

.fiscalist-historical-approval {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #ead8b5;
    border-radius: 12px;
    background: #fffbf3;
}

.fiscalist-historical-approval summary { cursor: pointer; color: #765110; font-weight: 700; }
.fiscalist-historical-approval form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 12px; }
.fiscalist-historical-approval label { display: grid; gap: 5px; }

.fiscalist-empty-state {
    padding: 18px;
    border: 1px dashed #cbd9e4;
    border-radius: 12px;
    background: #fafcfd;
    color: #617481;
}

.fiscalist-empty-state strong { color: #3b566c; }

.fiscalist-review-card > header {
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf1;
}

.fiscalist-review-card > header p {
    margin: 0;
    color: #1f6a93;
    font-weight: 700;
}

.fiscalist-review-card > header h3 { margin: 0; font-size: 1.05rem; }
.fiscalist-extraction-fields { display: grid; gap: 10px; margin-top: 14px; }

.fiscalist-extraction-field {
    display: grid;
    grid-template-columns: minmax(180px, .55fr) minmax(230px, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    padding: 11px;
    border: 1px solid #e2e9ee;
    border-radius: 10px;
    background: #fbfdfe;
}

.fiscalist-extraction-field.confirmed { background: #f2fbf5; border-color: #c7e8d0; }
.fiscalist-extraction-field.corrected { background: #f5faff; border-color: #c9ddf3; }
.fiscalist-extraction-field.rejected { opacity: .72; background: #fcf5f5; }

.fiscalist-field-label { display: grid; gap: 3px; }
.fiscalist-field-label label { color: #263f53; font-weight: 700; }
.fiscalist-field-label span,
.fiscalist-field-evidence { color: #6c7c88; font-size: .84rem; }
.fiscalist-field-evidence { grid-column: 2 / -1; }
.fiscalist-field-actions { justify-content: flex-start; }

.fiscalist-extraction-final-actions {
    justify-content: flex-start;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e7edf1;
}

.fiscalist-extraction-final-actions input { flex: 1 1 260px; }
.fiscalist-extraction-audit { margin-top: 14px; color: #586b79; }
.fiscalist-extraction-audit summary { cursor: pointer; font-size: .9rem; }
.fiscalist-extraction-audit ul { display: grid; gap: 6px; padding: 10px 0 0; margin: 0; list-style: none; }
.fiscalist-extraction-audit li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: .88rem; }
.fiscalist-extraction-audit span { color: #74838e; }

@media (max-width: 820px) {
    .fiscalist-batch-upload-form,
    .fiscalist-historical-approval form,
    .fiscalist-extraction-field {
        grid-template-columns: minmax(0, 1fr);
    }
    .fiscalist-batch-upload-form > .btn { width: 100%; }
    .fiscalist-field-evidence { grid-column: auto; }
    .fiscalist-field-actions { justify-content: flex-start; }
}
/* Cabinet mail settings */
.mail-settings-page .mail-mode-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.mail-settings-page .mail-mode-actions form {
    margin: 0;
}

.mail-settings-page .mail-mode-actions .btn:disabled,
.mail-settings-page .mail-settings-test .btn:disabled {
    opacity: .52;
    cursor: not-allowed;
    box-shadow: none;
}

.mail-settings-page .mail-settings-test hr {
    border: 0;
    border-top: 1px solid #d9e7ef;
    margin: 28px 0;
}

.mail-settings-page .mail-settings-test h3 {
    margin-top: 0;
}

.mail-settings-page .mail-oauth-callback {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    border: 1px solid #d9e7ef;
    background: #f7fbfd;
    color: #14324a;
}

.mail-settings-page .mail-oauth-connect h3 {
    margin-top: 0;
}

/* Unified document control: the same rubric and document forms in both views. */
[data-document-control-views] .document-control-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 16px clamp(16px, 2vw, 22px);
    border-top: 1px solid #e1ebf1;
    background: rgba(255, 255, 255, .75);
}

[data-document-control-views] .document-control-view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d8e6ed;
    border-radius: 12px;
    background: #eef5f8;
}

[data-document-control-views] [data-document-view-choice] {
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #526e80;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

[data-document-control-views] [data-document-view-choice]:hover {
    color: var(--blue);
    background: #f8fcfe;
}

[data-document-control-views] [data-document-view-choice][aria-pressed="true"] {
    border-color: #cbdfe8;
    background: #fff;
    color: var(--blue);
    box-shadow: 0 2px 6px rgba(20, 50, 74, .08);
}

[data-document-control-views] .document-control-toolbar > p,
[data-document-control-views] .document-control-toolbar > small {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

[data-document-control-views] .document-control-feedback {
    flex-basis: 100%;
    padding: 10px 12px;
    border: 1px solid #d2e5ee;
    border-radius: 8px;
    background: #f1f8fc;
    color: #245c7b;
    overflow-wrap: anywhere;
}

[data-document-control-views] .document-control-feedback.is-error,
[data-document-control-views] .document-control-feedback[data-state="error"] {
    border-color: #efcccc;
    background: #fff3f2;
    color: #a03636;
}

[data-document-control-views] [hidden] { display: none !important; }

[data-document-control-views] .document-control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    padding-top: 4px;
    border-top: 0;
}

[data-document-control-views] .document-category-card {
    display: block;
    min-width: 0;
}

[data-document-control-views] .document-category-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    align-items: start;
    gap: 10px;
    min-height: 118px;
    padding: 16px 14px;
    border-left: 4px solid #d8e8ef;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

[data-document-control-views] .document-category-heading::-webkit-details-marker { display: none; }
[data-document-control-views] .document-category-heading::marker { content: ""; }
[data-document-control-views] .document-category-card.ok > .document-category-heading { border-left-color: #4f9d75; }
[data-document-control-views] .document-category-card.missing > .document-category-heading { border-left-color: #b24b4b; }
[data-document-control-views] .document-category-card.review > .document-category-heading { border-left-color: var(--gold); }
[data-document-control-views] .document-category-heading:hover { background: #f8fbfd; }
[data-document-control-views] .document-category-heading > div { min-width: 0; }

[data-document-control-views] .document-category-heading > div > span {
    display: block;
    margin-bottom: 5px;
    color: #a57b3d;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
}

[data-document-control-views] .document-category-heading h3 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    hyphens: auto;
}

[data-document-control-views] .document-category-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

[data-document-control-views] .document-category-heading > strong {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f1f5f8;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.3;
    text-align: center;
}

[data-document-control-views] .document-category-card.ok > .document-category-heading > strong { background: #eaf7ef; color: #207d58; }
[data-document-control-views] .document-category-card.missing > .document-category-heading > strong { background: #fff0f0; color: #a93e3e; }
[data-document-control-views] .document-category-card.review > .document-category-heading > strong { background: #fff4e3; color: #99601f; }

[data-document-control-views] .document-rubric-chevron {
    display: block;
    width: 8px;
    height: 8px;
    margin: 9px 2px 0;
    border-right: 2px solid #78909f;
    border-bottom: 2px solid #78909f;
    transform: rotate(-45deg);
    transition: transform .15s ease;
}

[data-document-control-views] .document-category-card[open] > .document-category-heading .document-rubric-chevron { transform: rotate(45deg); }
[data-document-control-views] .document-category-body { min-width: 0; }

[data-document-control-views] .category-document-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 12px;
    color: #43677d;
    font-size: 13px;
    font-weight: 800;
}

[data-document-control-views] .category-document-list-head > strong {
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf5f9;
    color: var(--blue);
    font-size: 12px;
}

[data-document-control-views] .document-card-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    box-shadow: none;
}

[data-document-control-views] .document-card-row .document-format-icon {
    width: 40px !important;
    min-width: 40px !important;
    height: 44px;
    border-radius: 9px;
    font-size: 10px;
}

[data-document-control-views] .document-card-row .document-file-name strong { font-size: 14px; line-height: 1.4; }
[data-document-control-views] .document-card-row .document-file-name small { font-size: 12px; }

[data-document-control-views] .document-card-primary-actions {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

[data-document-control-views] .document-card-primary-actions > .btn { width: 100%; max-width: none; min-height: 40px; }

[data-document-control-views] .document-category-move-label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 1px 0 0;
    color: #5c7383;
    font-size: 12px;
    font-weight: 750;
}

[data-document-control-views] .document-category-move-label select {
    min-width: 0;
    max-width: 100%;
    min-height: 38px;
    padding: 7px 28px 7px 10px;
    font-size: 12px;
    text-overflow: ellipsis;
    background-color: #fff;
}

[data-document-control-views] .document-card-more > summary {
    min-width: 0;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
}

[data-document-control-views] .document-card-more > summary::after { content: none; }
[data-document-control-views] .document-card-more > div { grid-template-columns: minmax(0, 1fr); }
[data-document-control-views] .document-card-more > div input[name="internal_note"] { grid-column: 1 / -1; }

[data-document-control-views] :is(button, select, summary, a, input):focus-visible {
    outline: 3px solid #4c96ba;
    outline-offset: 3px;
}

[data-document-control-views] .document-category-heading:focus-visible { outline-offset: -4px; }
[data-document-control-views] .document-card-row[aria-busy="true"] { opacity: .7; cursor: progress; }
[data-document-control-views] :is(button, select):disabled { opacity: .6; cursor: wait; }

[data-document-control-views][data-document-view="list"] .document-control-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
[data-document-control-views][data-document-view="list"] .document-category-heading { min-height: 80px; align-items: center; padding: 14px 18px; }
[data-document-control-views][data-document-view="list"] .document-rubric-chevron { margin-top: 0; }
[data-document-control-views][data-document-view="list"] .document-category-card { box-shadow: 0 4px 12px rgba(20, 50, 74, .035); }
[data-document-control-views][data-document-view="list"] .category-actions { padding: 12px 18px; }
[data-document-control-views][data-document-view="list"] .category-primary-actions { max-width: 620px; }

@media (min-width: 1100px) {
    [data-document-control-views][data-document-view="list"] .document-category-heading > div {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr) minmax(160px, .5fr);
        gap: 16px;
        align-items: center;
    }
    [data-document-control-views][data-document-view="list"] .document-category-heading > div > span,
    [data-document-control-views][data-document-view="list"] .document-category-heading p { margin: 0; }
    [data-document-control-views][data-document-view="list"] .document-card-row { grid-template-columns: 42px minmax(0, 1fr) minmax(320px, .7fr); }
    [data-document-control-views][data-document-view="list"] .document-card-primary-actions { grid-column: 3; grid-row: 1; grid-template-columns: 42px 112px minmax(140px, 1fr); }
    [data-document-control-views][data-document-view="list"] .document-category-move-label { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; }
    [data-document-control-views][data-document-view="list"] .document-card-more { grid-column: 2 / -1; }
    [data-document-control-views][data-document-view="list"] .document-card-more > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    [data-document-control-views] .document-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    [data-document-control-views] .document-control-grid { grid-template-columns: minmax(0, 1fr); }
    [data-document-control-views] .document-category-heading { min-height: 0; }
    [data-document-control-views] .document-control-toolbar { gap: 10px; }
    [data-document-control-views] .document-control-view-switch { width: 100%; }
    [data-document-control-views] [data-document-view-choice] { flex: 1; padding-inline: 12px; }
    [data-document-control-views] .quick-review-head { gap: 10px; grid-template-columns: 18px minmax(0, 1fr); }
    [data-document-control-views] .quick-review-head .quick-review-meter { grid-column: 2; min-width: 0; justify-items: start; padding: 0; border: 0; box-shadow: none; background: transparent; }
    [data-document-control-views] .quick-review-head .quick-review-meter strong { font-size: 20px; }
    [data-document-control-views] .quick-review-head .quick-review-meter span { text-align: left; }
    [data-document-control-views] .category-actions { padding-inline: 12px; }
    [data-document-control-views] .category-primary-actions { grid-template-columns: minmax(0, 1fr); }
    [data-document-control-views] .category-document-details { margin-inline: 10px; }
    [data-document-control-views] .category-document-list { padding: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    [data-document-control-views] .document-rubric-chevron { transition: none; }
}

/* Accès public unifié */
.hero.access-landing {
    grid-template-columns: minmax(0, 780px);
    gap: clamp(18px, 3vw, 34px);
    padding-top: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(circle at 18% 12%, rgba(31, 150, 116, .10), transparent 30%),
        radial-gradient(circle at 84% 14%, rgba(13, 95, 147, .12), transparent 28%),
        linear-gradient(155deg, #fbfdfd 0%, #f5fafc 48%, #fbf8f1 100%);
}
.public-access-shell {
    position: relative;
    width: 100%;
    gap: 0;
    padding: clamp(22px, 4vw, 38px);
    overflow: hidden;
    border: 1px solid rgba(177, 207, 218, .78);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 30px 90px rgba(11, 48, 72, .14), 0 3px 12px rgba(11, 48, 72, .05);
    backdrop-filter: blur(18px);
}
.public-access-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--tenant-primary, var(--blue)), #159276 58%, var(--tenant-accent, var(--gold)));
}
.public-access-intro {
    display: grid;
    justify-items: center;
    gap: 7px;
    margin-bottom: 24px;
    text-align: center;
}
.public-access-kicker {
    color: var(--gold);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.public-access-intro h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 4.5vw, 46px);
    letter-spacing: -.025em;
}
.public-access-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}
.public-access-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid #dce9ef;
    border-radius: 18px;
    background: #f3f7f9;
}
.public-access-tab {
    display: grid;
    gap: 2px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #627789;
    cursor: pointer;
    text-align: left;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.public-access-tab span { font-size: 16px; font-weight: 950; }
.public-access-tab small { font-size: 12px; font-weight: 700; }
.public-access-tab:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.public-access-tab.is-active {
    border-color: rgba(13, 95, 147, .16);
    background: #fff;
    color: var(--blue);
    box-shadow: 0 8px 22px rgba(20, 50, 74, .10);
    transform: translateY(-1px);
}
.public-access-tab:focus-visible { outline: 3px solid rgba(13, 95, 147, .18); outline-offset: 2px; }
.public-access-content {
    width: min(100%, 570px);
    margin: 0 auto;
    padding: clamp(26px, 4vw, 34px) 0 8px;
}
.public-access-content[hidden] { display: none !important; }
.access-panel-heading {
    display: grid;
    justify-items: center;
    gap: 7px;
    margin-bottom: 22px;
    text-align: center;
}
.access-panel-heading h2 { margin: 0; color: var(--ink); font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -.02em; }
.access-panel-heading p { max-width: 500px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.access-step-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf9f3;
    color: #1c7856;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.access-step-badge.existing { background: #edf6fb; color: var(--blue); }
.access-primary-form { display: grid; gap: 10px; }
.access-primary-form > label { margin: 0; color: var(--ink); font-size: 13px; font-weight: 900; }
.access-email-field { position: relative; }
.access-email-field svg {
    position: absolute;
    left: 17px;
    top: 50%;
    width: 23px;
    height: 23px;
    color: var(--blue);
    transform: translateY(-50%);
    pointer-events: none;
}
.access-email-field input {
    width: 100%;
    min-height: 60px;
    padding: 0 18px 0 54px;
    border: 1px solid #cbdce4;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 17px;
    box-shadow: inset 0 1px 2px rgba(20, 50, 74, .03), 0 8px 22px rgba(20, 50, 74, .04);
}
.access-email-field input:focus,
.access-code-input:focus { border-color: #58a4c5; outline: 3px solid rgba(13, 95, 147, .12); box-shadow: 0 10px 26px rgba(13, 95, 147, .09); }
.access-main-button {
    width: 100%;
    min-height: 60px;
    justify-content: center;
    margin-top: 3px;
    border-radius: 14px;
    font-size: 17px;
    box-shadow: 0 15px 32px rgba(13, 95, 147, .20);
}
.access-main-button span { margin-left: 7px; font-size: 20px; }
.access-form-hint { color: var(--muted); font-size: 12px; font-weight: 650; text-align: center; }
.access-secondary-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 24px 0 15px;
    color: #8293a1;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.access-secondary-divider::before,
.access-secondary-divider::after { content: ""; height: 1px; flex: 1; background: #dfebf0; }
.access-oauth-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.access-oauth-compact .oauth-provider-button {
    grid-template-columns: 24px minmax(0, auto);
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-color: #d8e2e7;
    border-radius: 12px;
    color: #384956;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 7px 18px rgba(20, 50, 74, .05);
}
.access-oauth-compact .oauth-logo { justify-self: center; width: 21px; height: 21px; }
.access-feedback {
    width: min(100%, 570px);
    margin: 18px auto 0;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}
.access-feedback-success { border-color: #bfe2cf; background: #eef9f3; color: #196947; }
.access-feedback-notice { border-color: #d7e5ec; background: #f3f8fb; color: #315c73; }
.access-feedback-error { border-color: #ecc5c5; background: #fff3f3; color: #9a3535; }
.access-code-form { width: min(100%, 430px); margin: 0 auto; }
.access-code-input {
    min-height: 64px;
    border: 1px solid #cbdce4;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 27px;
    font-weight: 900;
    letter-spacing: .24em;
    text-align: center;
}
.access-code-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 15px; }
.access-code-actions button,
.access-code-actions a { padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; font-size: 13px; font-weight: 850; text-decoration: none; }
.access-password-disclosure { margin-top: 18px; text-align: center; }
.access-password-disclosure summary { color: var(--blue); cursor: pointer; font-size: 13px; font-weight: 850; }
.access-password-form { display: grid; gap: 10px; margin-top: 15px; padding: 16px; border: 1px solid #dce8ed; border-radius: 14px; background: #f8fbfc; text-align: left; }
.access-password-form label { margin: 0; }
.access-password-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.access-password-actions a { color: var(--blue); font-size: 13px; font-weight: 850; }
.access-trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e6eef2; color: #667b8b; font-size: 12px; font-weight: 750; }
.access-trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.access-trust-row i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e8f7ef; color: #1b7c57; font-style: normal; font-size: 11px; font-weight: 950; }

@media (max-width: 640px) {
    .hero.access-landing { padding: 14px 10px 18px; }
    .public-access-shell { padding: 22px 14px 20px; border-radius: 20px; }
    .public-access-intro { margin-bottom: 18px; }
    .public-access-intro h1 { font-size: 30px; }
    .public-access-intro p { font-size: 14px; }
    .public-access-tabs { border-radius: 15px; }
    .public-access-tab { min-height: 58px; padding: 9px 10px; border-radius: 11px; }
    .public-access-tab span { font-size: 14px; }
    .public-access-tab small { font-size: 10px; }
    .public-access-content { padding-top: 24px; }
    .access-panel-heading h2 { font-size: 26px; }
    .access-panel-heading p { font-size: 14px; }
    .access-email-field input,
    .access-main-button { min-height: 56px; }
    .access-oauth-compact { grid-template-columns: 1fr; }
    .access-oauth-compact .oauth-provider-button { min-height: 46px; }
    .access-trust-row { align-items: center; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .public-access-tab,
    .access-oauth-compact .oauth-provider-button { transition: none; }
}

/* Accès public compact à volet coulissant */
.hero.access-landing {
    grid-template-columns: minmax(0, 920px);
    align-content: center;
    gap: 18px;
    min-height: calc(100vh - var(--topbar-height, 78px));
    padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 30px) 20px;
}
.public-access-shell {
    position: relative;
    display: block;
    width: 100%;
    min-height: 540px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(186, 207, 216, .86);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 64px rgba(14, 49, 72, .12), 0 2px 8px rgba(14, 49, 72, .04);
    isolation: isolate;
}
.public-access-shell::before { display: none; }
.access-form-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.public-access-pane {
    position: absolute;
    inset-block: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    margin: 0;
    padding: clamp(28px, 4vw, 48px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, transform .46s cubic-bezier(.2, .75, .2, 1), visibility 0s linear .46s;
}
.access-pane-new {
    right: 0;
    transform: translateX(24px);
}
.access-pane-existing {
    left: 0;
    transform: translateX(-24px);
}
.public-access-shell[data-access-mode="new"] .access-pane-new,
.public-access-shell[data-access-mode="existing"] .access-pane-existing {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: .12s, 0s, 0s;
}
.access-switch-panel {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 3;
    width: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 18%, rgba(255,255,255,.17) 0 3px, transparent 4px),
        radial-gradient(circle at 86% 80%, rgba(255,255,255,.12) 0 42px, transparent 43px),
        linear-gradient(145deg, var(--tenant-primary, #0d5f93), #167f83 58%, #1a9375);
    color: #fff;
    transform: translateX(0);
    transition: transform .52s cubic-bezier(.2, .78, .2, 1), border-radius .52s ease;
}
.access-switch-panel::before,
.access-switch-panel::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.16);
    transform: rotate(38deg);
}
.access-switch-panel::before { top: -72px; right: -38px; width: 176px; height: 176px; }
.access-switch-panel::after { bottom: -48px; left: -22px; width: 118px; height: 118px; border-radius: 28px; }
.public-access-shell[data-access-mode="existing"] .access-switch-panel { transform: translateX(100%); }
.access-switch-message {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: clamp(34px, 5vw, 64px);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: opacity .25s ease, transform .38s ease, visibility 0s linear .4s;
}
.access-switch-message[data-access-switch-message="existing"] { transform: translateX(20px); }
.public-access-shell[data-access-mode="new"] .access-switch-message[data-access-switch-message="new"],
.public-access-shell[data-access-mode="existing"] .access-switch-message[data-access-switch-message="existing"] {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition-delay: .2s, .14s, 0s;
}
.access-switch-kicker {
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .82;
}
.access-switch-message[data-access-switch-message="new"] .access-switch-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 999px;
    background: #fff;
    color: var(--tenant-primary, #0d5f93);
    box-shadow: 0 10px 24px rgba(7,42,63,.18);
    font-size: 16px;
    letter-spacing: .01em;
    line-height: 1;
    text-transform: none;
    opacity: 1;
}
.access-switch-message h2 {
    max-width: 320px;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3.3vw, 40px);
    letter-spacing: -.025em;
}
.access-switch-message p {
    max-width: 330px;
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: 15px;
    line-height: 1.55;
}
.access-switch-action {
    min-width: 190px;
    min-height: 48px;
    margin-top: 8px;
    padding: 0 24px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .035em;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.access-switch-action:hover {
    background: #fff;
    color: var(--tenant-primary, var(--blue));
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(7, 42, 63, .18);
}
.access-switch-action:focus-visible { outline: 3px solid rgba(255,255,255,.38); outline-offset: 3px; }
.public-access-pane .access-panel-heading {
    gap: 5px;
    margin-bottom: 20px;
}
.public-access-pane .access-panel-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 3.2vw, 38px);
    letter-spacing: -.025em;
}
.public-access-pane .access-panel-heading h1:focus { outline: none; }
.public-access-pane .access-panel-heading p { max-width: 390px; font-size: 14px; }
.public-access-pane .access-step-badge { min-height: 25px; padding: 0 10px; font-size: 10px; }
.public-access-pane .access-primary-form { gap: 8px; }
.public-access-pane .access-email-field input { min-height: 52px; border-radius: 11px; font-size: 15px; }
.public-access-pane .access-email-field svg { left: 15px; width: 20px; height: 20px; }
.public-access-pane .access-main-button {
    min-height: 52px;
    margin-top: 2px;
    border-radius: 11px;
    font-size: 15px;
    box-shadow: 0 12px 26px rgba(13, 95, 147, .17);
}
.public-access-pane .access-secondary-divider { margin: 18px 0 12px; }
.public-access-pane .access-oauth-compact { gap: 8px; }
.public-access-pane .access-oauth-compact .oauth-provider-button { min-height: 44px; border-radius: 10px; }
.public-access-pane .access-feedback { width: 100%; margin: -7px 0 13px; padding: 9px 11px; }
.public-access-pane .access-code-form { width: 100%; }
.public-access-pane .access-code-input { min-height: 56px; }
.public-access-pane .access-password-disclosure { margin-top: 14px; }
.public-access-pane .access-password-form { margin-top: 10px; padding: 12px; }
.public-access-pane .access-trust-row {
    gap: 8px 14px;
    margin-top: 18px;
    padding-top: 14px;
    font-size: 11px;
}
.hero.access-landing .cover-footer.minimal { width: min(100%, 900px); }

@media (max-width: 760px) {
    .hero.access-landing {
        display: grid;
        min-height: 0;
        padding: 20px 10px 18px;
    }
    .public-access-shell {
        display: grid;
        min-height: 0;
        border-radius: 22px;
    }
    .access-switch-panel {
        position: relative;
        inset: auto;
        order: 1;
        width: 100%;
        min-height: 252px;
        transform: none !important;
        transition: none;
    }
    .access-switch-message {
        gap: 11px;
        padding: 28px 24px 30px;
        transform: translateY(-10px);
    }
    .access-switch-message[data-access-switch-message="existing"] { transform: translateY(10px); }
    .public-access-shell[data-access-mode="new"] .access-switch-message[data-access-switch-message="new"],
    .public-access-shell[data-access-mode="existing"] .access-switch-message[data-access-switch-message="existing"] { transform: translateY(0); }
    .access-switch-message h2 { font-size: 25px; }
    .access-switch-message[data-access-switch-message="new"] .access-switch-kicker { min-height: 36px; padding-inline: 16px; font-size: 15px; }
    .access-switch-message p { max-width: 420px; font-size: 13px; line-height: 1.4; }
    .access-switch-action { min-width: 210px; min-height: 46px; margin: 8px 0 4px; }
    .access-form-stage {
        position: relative;
        inset: auto;
        order: 2;
        display: grid;
    }
    .public-access-pane {
        position: relative;
        inset: auto;
        grid-area: 1 / 1;
        align-self: start;
        width: 100%;
        min-width: 0;
        padding: 26px clamp(18px, 6vw, 34px) 24px;
        overflow: visible;
        transform: translateX(18px);
    }
    .access-pane-existing { transform: translateX(-18px); }
    .public-access-shell[data-access-mode="new"] .access-pane-new,
    .public-access-shell[data-access-mode="existing"] .access-pane-existing { transform: translateX(0); }
    .public-access-pane .access-panel-heading { margin-bottom: 17px; }
    .public-access-pane .access-panel-heading h1 { font-size: 29px; }
    .public-access-pane .access-trust-row { margin-top: 16px; }
}

@media (max-width: 390px) {
    .access-switch-panel { min-height: 266px; }
    .access-switch-message { padding: 28px 18px 32px; }
    .access-switch-message h2 { font-size: 23px; }
    .public-access-pane { padding-inline: 16px; }
    .public-access-pane .access-oauth-compact { grid-template-columns: 1fr; }
    .public-access-pane .access-trust-row { align-items: center; flex-direction: column; }
}

/* Keep the desktop menu beside the brand at intermediate widths. */
@media (min-width: 1361px) and (max-width: 1800px) {
    .topbar:not(.is-client-account):not(.is-module-only) {
        gap: clamp(12px, 1.2vw, 20px);
        padding-inline: clamp(20px, 2vw, 34px);
    }
    .topbar:not(.is-client-account):not(.is-module-only) .brand {
        flex: 0 0 auto;
    }
    .topbar:not(.is-client-account):not(.is-module-only) .brand img {
        width: clamp(112px, 9vw, 150px);
    }
    .topbar:not(.is-client-account):not(.is-module-only) nav {
        justify-content: center;
        gap: 6px;
    }
    .topbar:not(.is-client-account):not(.is-module-only) nav .admin-nav-group {
        gap: 3px;
        padding: 3px;
    }
    .topbar:not(.is-client-account):not(.is-module-only) nav .nav-link {
        padding-inline: 7px;
        font-size: .82rem;
    }
}

/* On narrower desktops, align the navigation with the header edges. */
@media (min-width: 901px) and (max-width: 1360px) {
    .topbar:not(.is-client-account):not(.is-module-only) {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        row-gap: 6px;
        padding-block: 8px;
    }
    .topbar:not(.is-client-account):not(.is-module-only) .brand {
        flex: 0 1 auto;
        max-width: min(48vw, 340px);
    }
    .topbar:not(.is-client-account):not(.is-module-only) nav {
        order: 10;
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        overflow: visible;
    }
}
@media (max-width: 900px) {
    body.mobile-navigation-open { overflow: hidden; }
    .topbar:not(.is-client-account) .brand,
    .topbar:not(.is-client-account) .mobile-menu-toggle {
        position: relative;
        z-index: 5;
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle {
        display: block;
        width: 52px;
        height: 48px;
        padding: 10px 12px;
        border: 1px solid rgba(205, 225, 234, .92);
        border-radius: 16px;
        background: linear-gradient(145deg, #fff, #f5fafc);
        color: #0b3048;
        cursor: pointer;
        box-shadow: 0 12px 28px rgba(4, 30, 47, .16), inset 0 1px 0 #fff;
        transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle strong {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 15px 32px rgba(4, 30, 47, .2), inset 0 1px 0 #fff;
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle:focus-visible {
        outline: 3px solid var(--tenant-accent, #f1c77d);
        outline-offset: 2px;
    }
    .topbar:not(.is-client-account).menu-open .mobile-menu-toggle {
        background: #fff;
        box-shadow: 0 12px 30px rgba(4, 30, 47, .2);
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle span {
        position: absolute;
        left: 15px;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: top .18s ease, transform .18s ease, opacity .18s ease;
    }
    .topbar:not(.is-client-account) .mobile-menu-toggle span:nth-child(1) { top: 16px; }
    .topbar:not(.is-client-account) .mobile-menu-toggle span:nth-child(2) { top: 23px; }
    .topbar:not(.is-client-account) .mobile-menu-toggle span:nth-child(3) { top: 30px; }
    .topbar:not(.is-client-account).menu-open .mobile-menu-toggle span:nth-child(1) { top: 23px; transform: rotate(45deg); }
    .topbar:not(.is-client-account).menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    .topbar:not(.is-client-account).menu-open .mobile-menu-toggle span:nth-child(3) { top: 23px; transform: rotate(-45deg); }
    .topbar:not(.is-client-account) nav {
        position: fixed;
        top: calc(var(--topbar-height, 68px) + 10px);
        left: 50%;
        right: auto;
        z-index: 4;
        display: grid;
        width: min(calc(100vw - 24px), 480px);
        max-height: calc(100vh - var(--topbar-height, 68px) - 22px);
        max-height: calc(100dvh - var(--topbar-height, 68px) - 22px);
        align-items: stretch;
        justify-content: stretch;
        gap: 10px;
        padding: 18px;
        overflow-x: hidden;
        overflow-y: auto;
        border: 1px solid rgba(203, 222, 230, .94);
        border-radius: 24px;
        background:
            radial-gradient(circle at 92% 3%, rgba(33, 143, 121, .1), transparent 32%),
            linear-gradient(180deg, rgba(255,255,255,.995), rgba(247,251,252,.995));
        box-shadow: 0 28px 80px rgba(3, 27, 43, .28), 0 8px 24px rgba(3, 27, 43, .1);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate(-50%, -12px) scale(.985);
        transform-origin: top center;
        transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
        overscroll-behavior: contain;
    }
    .topbar:not(.is-client-account) nav::before {
        content: "";
        justify-self: center;
        width: 42px;
        height: 4px;
        margin: -7px 0 1px;
        border-radius: 999px;
        background: #d7e5eb;
    }
    .topbar:not(.is-client-account).menu-open nav {
        display: grid;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
        transition-delay: 0s;
    }
    .mobile-menu-backdrop {
        position: fixed;
        inset: var(--topbar-height, 68px) 0 0;
        z-index: 2;
        width: 100%;
        height: auto;
        padding: 0;
        border: 0;
        background: rgba(3, 24, 38, .38);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        backdrop-filter: blur(4px);
        transition: opacity .22s ease, visibility 0s linear .22s;
    }
    .topbar:not(.is-client-account).menu-open .mobile-menu-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }
    .mobile-nav-heading {
        display: grid;
        gap: 2px;
        padding: 2px 4px 10px;
        border-bottom: 1px solid #e2ecef;
    }
    .mobile-nav-heading > span {
        color: #a8752b;
        font-size: 10px;
        font-weight: 950;
        letter-spacing: .14em;
        text-transform: uppercase;
    }
    .mobile-nav-heading strong {
        color: #0b3048;
        font-size: 20px;
        letter-spacing: -.015em;
    }
    .mobile-nav-heading small {
        color: #6a808e;
        font-size: 12px;
        font-weight: 650;
    }
    .public-nav-group {
        display: grid;
        gap: 8px;
    }
    .topbar:not(.is-client-account) nav .public-nav-link {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 24px;
        align-items: center;
        min-height: 66px;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid #deeaee;
        border-radius: 16px;
        background: rgba(255,255,255,.9);
        color: #173b52;
        box-shadow: 0 8px 20px rgba(14, 49, 72, .045);
        transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
    }
    .topbar:not(.is-client-account) nav .public-nav-link:hover,
    .topbar:not(.is-client-account) nav .public-nav-link.active {
        border-color: #bcd8df;
        background: #f5fbfa;
        color: #0b5f73;
        box-shadow: 0 11px 24px rgba(14, 73, 88, .08);
        transform: translateY(-1px);
    }
    .public-nav-icon {
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border-radius: 13px;
        background: linear-gradient(145deg, #eaf5f7, #edf8f3);
        color: #117b79;
    }
    .public-nav-icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .public-nav-copy {
        display: grid;
        gap: 2px;
        min-width: 0;
    }
    .public-nav-copy strong {
        color: inherit;
        font-size: 15px;
        font-weight: 900;
    }
    .public-nav-copy small {
        display: block;
        color: #758995;
        font-size: 11px;
        font-weight: 650;
    }
    .public-nav-arrow {
        display: grid;
        width: 24px;
        height: 24px;
        place-items: center;
        border-radius: 50%;
        background: #edf5f7;
        color: #356477;
        font-size: 14px;
        font-weight: 900;
    }
    .mobile-nav-assurance {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 6px 4px 0;
        color: #718692;
        font-size: 11px;
        font-weight: 750;
    }
    .mobile-nav-assurance span {
        display: grid;
        width: 18px;
        height: 18px;
        place-items: center;
        border-radius: 50%;
        background: #e8f6ef;
        color: #15825c;
        font-size: 11px;
        font-weight: 950;
    }
    .topbar:not(.is-client-account) nav .admin-nav-group,
    .topbar:not(.is-client-account) nav .client-nav-group {
        display: grid;
        gap: 5px;
        width: 100%;
        padding: 7px;
        border-color: #dce8ed;
        border-radius: 16px;
        background: #f6fafb;
    }
    .topbar:not(.is-client-account) nav .nav-link {
        color: var(--ink);
        font-size: .94rem;
        font-weight: 760;
    }
    .topbar:not(.is-client-account) nav .nav-link:hover,
    .topbar:not(.is-client-account) nav .nav-link.active {
        background: #fff8e8;
        color: #9b6924;
        box-shadow: none;
    }
    .topbar:not(.is-client-account) nav .nav-menu {
        position: static;
        width: 100%;
    }
    .topbar:not(.is-client-account) nav .nav-menu-trigger {
        width: 100%;
        justify-content: space-between;
    }
    .topbar:not(.is-client-account) nav .nav-menu-chevron {
        background: #eaf3f7;
        color: var(--blue);
    }
    .topbar:not(.is-client-account) nav .nav-submenu {
        position: static;
        width: 100%;
        max-height: min(52vh, 480px);
        margin-top: 6px;
        border-radius: 14px;
        background: #f9fcfd;
        box-shadow: inset 0 0 0 1px rgba(216,232,239,.5);
    }
    .topbar:not(.is-client-account) nav .settings-menu-grid {
        grid-template-columns: 1fr;
    }
    .topbar:not(.is-client-account) nav > .nav-link,
    .topbar:not(.is-client-account) nav .admin-nav-group .nav-link,
    .topbar:not(.is-client-account) nav .client-nav-group .nav-link,
    .topbar:not(.is-client-account) nav .nav-menu > .nav-link {
        min-height: 44px;
        justify-content: flex-start;
        padding: 0 13px;
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar nav,
    .mobile-menu-backdrop,
    .mobile-menu-toggle,
    .public-nav-link { transition: none !important; }
}

@media (max-width: 900px) {
    .topbar.is-module-only .mobile-menu-toggle { display: none; }
    .topbar > .app-launcher {
        position: relative;
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        z-index: 6;
    }
    .topbar > .app-launcher > .app-launcher-trigger {
        width: auto;
        justify-content: center !important;
    }
    .topbar.is-client-account > .app-launcher { order: 1; }
    .topbar.is-client-account > nav { order: 2; }
    .topbar > .app-launcher .app-launcher-menu {
        position: fixed;
        top: calc(var(--topbar-height, 68px) + 8px);
        right: 12px;
        left: auto;
        width: min(320px, calc(100vw - 24px));
        max-height: calc(100dvh - var(--topbar-height, 68px) - 20px);
        overflow-y: auto;
        margin: 0;
        background: #fff;
        box-shadow: 0 24px 64px rgba(8,35,54,.24);
    }
}

@media (max-width: 460px) {
    .topbar > .app-launcher .app-launcher-label,
    .topbar > .app-launcher .nav-menu-chevron { display: none; }
    .topbar > .app-launcher .app-launcher-trigger {
        width: 46px;
        height: 44px;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-access-pane,
    .access-switch-panel,
    .access-switch-message,
    .access-switch-action { transition: none !important; }
}

/* Fiscalist quick intake */
.dashboard-new-case {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding-inline: 20px;
    width: max-content;
    max-width: 100%;
    margin-top: 22px;
    box-shadow: 0 12px 30px rgba(17, 111, 163, .2);
}
.dashboard-new-case span { font-size: 21px; line-height: 1; }
.admin-intake-page {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 70px;
    color: #10344d;
}
.admin-intake-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
    align-items: end;
    padding: 34px 38px;
    border: 1px solid #d4e5ed;
    border-radius: 26px;
    background: linear-gradient(135deg, #fff 45%, #edf8f7 100%);
    box-shadow: 0 20px 55px rgba(19, 54, 76, .08);
}
.admin-intake-back {
    display: inline-flex;
    margin-bottom: 22px;
    color: #4f7185;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}
.admin-intake-hero h1 {
    margin: 4px 0 10px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.04;
    letter-spacing: -.035em;
}
.admin-intake-hero p:last-child { margin: 0; color: #61798a; font-size: 17px; }
.admin-intake-steps {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.admin-intake-steps li {
    display: grid;
    min-width: 76px;
    justify-items: center;
    gap: 6px;
    color: #668091;
    font-size: 12px;
    font-weight: 800;
}
.admin-intake-steps a { display: grid; justify-items: center; gap: 6px; color: inherit; text-decoration: none; }
.admin-intake-steps a:hover { color: #0d6e70; }
.admin-intake-steps a:focus-visible { outline: 3px solid #168b82; outline-offset: 4px; border-radius: 8px; }
.admin-intake-steps strong {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #cfe1e8;
    border-radius: 50%;
    background: #fff;
    color: #087e75;
    font-size: 15px;
}
.admin-intake-errors {
    margin: 18px 0 0;
    padding: 18px 22px;
    border: 1px solid #efc5c1;
    border-left: 5px solid #bd433c;
    border-radius: 16px;
    background: #fff8f7;
    color: #7f302c;
}
.admin-intake-errors ul { margin: 8px 0 0; padding-left: 20px; }
.admin-intake-form { display: grid; gap: 20px; margin-top: 20px; }
.admin-intake-card {
    padding: 30px 34px;
    border: 1px solid #d7e6ed;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 53, 77, .055);
}
.admin-intake-card-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}
.admin-intake-card-heading .eyebrow { margin: 0 0 3px; }
.admin-intake-card-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.02em; }
.admin-intake-number {
    display: grid;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #0c516a, #168b82);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 9px 22px rgba(18, 110, 110, .2);
}
.admin-intake-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(580px, 100%);
    padding: 6px;
    border-radius: 16px;
    background: #eef4f6;
}
.admin-intake-segmented label { cursor: pointer; }
.admin-intake-segmented input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    clip-path: inset(50%);
}
.admin-intake-segmented span {
    display: grid;
    min-height: 46px;
    place-items: center;
    border-radius: 12px;
    color: #5d7586;
    font-weight: 850;
}
.admin-intake-segmented input:checked + span {
    background: #fff;
    color: #0b4e69;
    box-shadow: 0 6px 18px rgba(16, 52, 77, .1);
}
.admin-intake-segmented input:focus-visible + span { outline: 3px solid #168b82; outline-offset: 2px; }
.admin-intake-mode-panel { margin-top: 22px; }
.admin-intake-client-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    position: relative;
}
.admin-intake-client-picker > label { margin: 0; }
.admin-intake-client-picker > input[type="search"] { margin-top: 0; }
.admin-intake-client-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    max-height: 340px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid #cfe0e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(20, 54, 76, .16);
}
.admin-intake-client-results[hidden] { display: none; }
.admin-intake-client-results button {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #173a52;
    text-align: left;
    cursor: pointer;
}
.admin-intake-client-results button:hover,
.admin-intake-client-results button:focus-visible {
    outline: none;
    background: #eef7fa;
}
.admin-intake-client-results button span { color: #627987; font-size: 13px; }
.admin-intake-client-results p { margin: 0; padding: 12px 13px; color: #6b8190; }
.admin-intake-fields { gap: 16px; }
.admin-intake-new-client {
    padding: 16px;
    border: 1px solid #e0ebef;
    border-radius: 16px;
    background: linear-gradient(145deg, #fbfdfe 0%, #f7fbfc 100%);
}
.admin-intake-new-client > .admin-intake-fields,
.admin-intake-new-client .admin-intake-details > .admin-intake-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}
.admin-intake-new-client label { gap: 4px; }
.admin-intake-new-client input:not([type="radio"]):not([type="checkbox"]),
.admin-intake-new-client select {
    min-height: 44px;
    margin-top: 2px;
    padding: 9px 12px;
}
.admin-intake-new-client .admin-intake-details { margin-top: 14px; background: rgba(255, 255, 255, .72); }
.admin-intake-new-client .admin-intake-details summary { min-height: 46px; padding-inline: 15px; }
.admin-intake-new-client .admin-intake-details > .admin-intake-fields { margin: 14px; }
.admin-intake-case-pricing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr);
    gap: 20px;
    align-items: start;
}
.admin-intake-case-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.admin-intake-case-inputs .admin-intake-numbers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.admin-intake-pricing-choice { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.admin-intake-pricing-choice legend { width: 100%; color: #123b54; font-size: 17px; font-weight: 850; }
.admin-intake-pricing-choice > p { margin: 5px 0 13px; color: #657d8a; font-size: 13px; line-height: 1.5; }
.admin-intake-pricing-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-intake-pricing-options label { position: relative; min-width: 0; cursor: pointer; }
.admin-intake-pricing-options input { position: absolute; top: 19px; left: 16px; width: 19px; height: 19px; accent-color: #168b82; }
.admin-intake-pricing-options span { display: grid; min-height: 132px; align-content: start; gap: 8px; padding: 17px 15px 17px 47px; border: 1px solid #d2e2e8; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(18, 58, 75, .035); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.admin-intake-pricing-options strong { color: #123b54; font-size: 14px; line-height: 1.3; }
.admin-intake-pricing-options small { color: #617b89; font-size: 12px; font-weight: 550; line-height: 1.48; }
.admin-intake-pricing-options input:checked + span { border-color: #168b82; background: #effaf7; box-shadow: inset 0 0 0 1px #168b82, 0 10px 24px rgba(22, 139, 130, .08); }
.admin-intake-pricing-options input:focus-visible + span { outline: 3px solid rgba(18, 111, 165, .45); outline-offset: 2px; }
.admin-intake-deferred-card { position: sticky; top: 88px; padding: 21px; border: 1px solid #cce2e3; border-radius: 18px; background: linear-gradient(155deg, #f3fbfa, #fff); box-shadow: 0 15px 34px rgba(18, 82, 91, .09); }
.admin-intake-deferred-card .eyebrow { margin: 19px 0 5px; color: #168078; }
.admin-intake-deferred-card h3 { margin: 0 0 10px; color: #123b54; font-size: clamp(23px, 2.3vw, 29px); line-height: 1.15; }
.admin-intake-deferred-card > p:not(.eyebrow) { margin: 0; color: #5d7785; font-size: 13px; line-height: 1.55; }
.admin-intake-deferred-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #147f79; color: #fff; font-size: 25px; font-weight: 700; }
.admin-intake-deferred-card > div { display: grid; gap: 4px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #dcebea; font-size: 12px; line-height: 1.5; }
.admin-intake-deferred-card > div strong { color: #176c66; }
.admin-intake-deferred-card > div span { color: #617b89; }
.admin-intake-deferred-billing { max-width: 760px; padding: 19px 21px; border: 1px solid #b9dcd5; border-radius: 16px; background: #f0faf6; }
.admin-intake-deferred-billing strong { color: #135d58; font-size: 16px; }
.admin-intake-deferred-billing p { margin: 6px 0 0; color: #526f7a; font-size: 13px; line-height: 1.5; }
.admin-intake-price-card[hidden], .admin-intake-deferred-card[hidden], .admin-intake-billing-options[hidden], .admin-intake-deferred-billing[hidden] { display: none !important; }
.admin-intake-price-card {
    position: sticky;
    top: 88px;
    overflow: hidden;
    border: 1px solid #cce2e3;
    border-radius: 18px;
    background: linear-gradient(155deg, #f3fbfa 0%, #fff 58%, #f7fbfd 100%);
    box-shadow: 0 15px 34px rgba(18, 82, 91, .11);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.admin-intake-price-card.is-updating {
    transform: translateY(-2px);
    border-color: #8fc9c4;
    box-shadow: 0 18px 38px rgba(18, 110, 105, .16);
}
.admin-intake-price-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 16px 17px 13px;
}
.admin-intake-price-heading > div { display: grid; gap: 1px; }
.admin-intake-price-heading small { color: #66808d; font-size: 11px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.admin-intake-price-heading strong { color: #123f58; font-size: 17px; }
.admin-intake-price-heading .status-pill { grid-column: 1 / -1; width: fit-content; margin-top: 2px; }
.admin-intake-price-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #147f79;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
    box-shadow: 0 8px 18px rgba(20, 127, 121, .2);
}
.admin-intake-price-total {
    display: grid;
    gap: 3px;
    padding: 16px 17px;
    border-top: 1px solid #dbeaec;
    border-bottom: 1px solid #dbeaec;
    background: rgba(255, 255, 255, .72);
}
.admin-intake-price-total span { color: #617988; font-size: 12px; font-weight: 750; }
.admin-intake-price-total strong { color: #0d5968; font-size: clamp(27px, 3vw, 35px); line-height: 1.05; letter-spacing: -.025em; }
.admin-intake-price-lines { display: grid; gap: 0; margin: 0; padding: 7px 17px; list-style: none; }
.admin-intake-price-lines li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed #dce9eb; color: #536d7b; font-size: 12px; }
.admin-intake-price-lines li:last-child { border-bottom: 0; }
.admin-intake-price-lines strong { flex: 0 0 auto; color: #183f55; font-size: 12px; }
.admin-intake-price-footer { display: grid; gap: 5px; padding: 12px 17px 15px; background: #edf7f6; }
.admin-intake-price-footer span { color: #1c6e69; font-size: 12px; font-weight: 850; }
.admin-intake-price-footer small { color: #657d89; font-size: 11px; line-height: 1.45; }
.admin-intake-card label,
.admin-intake-files-meta > label {
    color: #173a52;
    font-size: 14px;
    font-weight: 800;
}
.admin-intake-card input:not([type="radio"]):not([type="checkbox"]),
.admin-intake-card select,
.admin-intake-card textarea {
    width: 100%;
    margin-top: 8px;
    border-color: #cadde6;
    border-radius: 12px;
    background: #fbfdfe;
}
.admin-intake-card input:focus,
.admin-intake-card select:focus,
.admin-intake-card textarea:focus {
    border-color: #168b82;
    box-shadow: 0 0 0 4px rgba(22, 139, 130, .1);
}
.admin-intake-subject-row {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) 1.1fr;
    gap: 22px;
    align-items: end;
    margin-top: 16px;
    padding: 17px;
    border: 1px solid #dbe8ed;
    border-radius: 15px;
    background: #f7fbfc;
}
.admin-intake-subject-row p { margin: 0 0 10px; color: #677f90; font-size: 13px; }
.admin-intake-empty { margin: 0; padding: 18px; border-radius: 14px; background: #f5fafb; color: #60798a; }
.admin-intake-details {
    margin-top: 18px;
    border: 1px solid #d9e7ed;
    border-radius: 15px;
    background: #fbfdfe;
}
.admin-intake-details summary {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    cursor: pointer;
    color: #1a4c66;
    font-size: 14px;
    font-weight: 850;
}
.admin-intake-details summary span { color: #718998; font-size: 12px; font-weight: 700; }
.admin-intake-details[open] summary { border-bottom: 1px solid #e0ebef; }
.admin-intake-details > .admin-intake-fields,
.admin-intake-details > .admin-intake-inline-checks { margin: 18px; }
.admin-intake-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d7e6ec;
    border-radius: 14px;
    background: #f9fcfd;
    cursor: pointer;
}
.admin-intake-check input { flex: 0 0 auto; width: 19px; height: 19px; margin: 2px 0 0; accent-color: #168b82; }
.admin-intake-check span { display: grid; gap: 3px; }
.admin-intake-check strong { color: #143b54; font-size: 14px; }
.admin-intake-check small { color: #6d8392; font-size: 12px; line-height: 1.45; }
.admin-intake-other-subject { width: min(620px, 100%); margin-top: 18px; }
.admin-intake-other-fields { margin-top: 14px; padding: 18px; border-radius: 16px; background: #f5fafb; }
.admin-intake-inline-checks { display: flex; flex-wrap: wrap; gap: 11px 22px; }
.admin-intake-inline-checks label { display: flex; align-items: center; gap: 8px; }
.admin-intake-inline-checks input { width: 18px; height: 18px; margin: 0; accent-color: #168b82; }
.admin-intake-files-intro { margin: -4px 0 18px; color: #607b8c; font-size: 14px; line-height: 1.55; }
.admin-intake-upload {
    position: relative;
    display: grid;
    min-height: 205px;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 22px;
    border: 2px dashed #79add0;
    border-radius: 18px;
    background: linear-gradient(135deg, #f6fbfe, #eff9f7);
    text-align: center;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.admin-intake-upload.dragging,
.admin-intake-upload.has-files { border-color: #168b82; background: #eaf8f4; }
.admin-intake-upload.dragging { transform: scale(1.006); }
.admin-intake-page .admin-intake-upload input[type="file"] {
    position: absolute;
    width: 1px !important;
    height: 1px;
    padding: 0;
    margin: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    clip-path: inset(50%);
}
.admin-intake-upload-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #fff; color: #126fa5; font-size: 27px; box-shadow: 0 8px 22px rgba(15, 77, 107, .13); }
.admin-intake-upload strong { margin-top: 6px; font-size: 18px; }
.admin-intake-upload > span:not(.admin-intake-upload-icon) { color: #5f788a; }
.admin-intake-upload-copy-mobile { display: none; }
.admin-intake-upload.is-smartphone .admin-intake-upload-copy-desktop { display: none; }
.admin-intake-upload.is-smartphone .admin-intake-upload-copy-mobile { display: block; }
.admin-intake-camera-action[hidden] { display: none !important; }
.admin-intake-upload small { margin-top: 7px; color: #758b99; }
.admin-intake-upload-fallback { display: grid; gap: 8px; margin-top: 12px; color: #173a52; font-weight: 800; }
.admin-intake-upload-fallback input[type="file"] { width: 100%; min-height: 48px; padding: 10px; border: 1px solid #cadde6; border-radius: 10px; background: #fff; }
.admin-intake-upload-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 13px 0 2px; }
.admin-intake-upload-actions .btn { min-height: 48px; padding: 11px 17px; font-size: 14px; }
.admin-intake-upload-review { margin-top: 14px; padding: 16px; border: 1px solid #cfe5e2; border-radius: 16px; background: #f7fcfa; }
.admin-intake-upload-review[hidden], .admin-intake-upload-error[hidden] { display: none; }
.admin-intake-upload-review-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 18px; color: #4d7180; font-size: 12px; }
.admin-intake-upload-review-heading strong { color: #125b5d; font-size: 15px; }
.admin-intake-upload-review ul { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.admin-intake-upload-review li { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px 10px; border: 1px solid #dcebe8; border-radius: 11px; background: #fff; }
.admin-intake-upload-review li > img, .admin-intake-upload-file-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #eaf3f5; }
.admin-intake-upload-file-icon { display: grid; place-items: center; color: #206785; font-size: 11px; font-weight: 850; }
.admin-intake-upload-file-copy { display: grid; min-width: 0; flex: 1; gap: 2px; }
.admin-intake-upload-file-copy strong { overflow: hidden; color: #183d51; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-intake-upload-file-copy small { color: #67808d; font-size: 11px; }
.admin-intake-upload-review li button { flex: 0 0 auto; min-height: 42px; padding: 7px 10px; border: 1px solid #d7e3e8; border-radius: 9px; background: #fff; color: #285b70; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.admin-intake-upload-review li button:hover { background: #edf6f7; }
.admin-intake-upload-review li button:focus-visible { outline: 3px solid #168b82; outline-offset: 2px; }
.admin-intake-upload-error { margin: 10px 0 0; padding: 11px 13px; border: 1px solid #e9c9bd; border-radius: 10px; background: #fff5f1; color: #8c3a2a; font-size: 13px; font-weight: 700; }
.admin-intake-processing-note { margin: 17px 0 0; padding: 12px 15px; border-left: 3px solid #73b9a8; border-radius: 0 10px 10px 0; background: #f4faf8; color: #496b76; font-size: 13px; line-height: 1.6; }
.admin-intake-processing-note strong { color: #174f5a; }
.admin-intake-processing-note.is-manual { border-left-color: #d8b579; background: #fff9ef; }
.admin-intake-files-meta { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 18px; align-items: start; margin-top: 20px; }
.admin-intake-note { min-width: 0; padding: 19px 20px 16px; border: 1px solid #dbe8ed; border-radius: 17px; background: #fbfdfe; }
.admin-intake-note-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.admin-intake-note-heading label { color: #143b54; font-size: 14px; font-weight: 850; }
.admin-intake-note-heading span { padding: 4px 9px; border: 1px solid #dde9ee; border-radius: 999px; background: #fff; color: #6b8190; font-size: 11px; font-weight: 750; }
.admin-intake-note textarea { min-height: 108px; margin-top: 12px !important; padding: 12px 14px; background: #fff !important; resize: vertical; }
.admin-intake-note p { margin: 9px 0 0; color: #718999; font-size: 12px; font-weight: 500; line-height: 1.45; }
.admin-intake-files-meta .admin-intake-complete-check { gap: 14px; min-height: 0; margin: 0; padding: 19px 20px 17px; border: 1px solid #d8e8e9; border-left: 3px solid #82bcb4; border-radius: 17px; background: #fff; box-shadow: 0 9px 24px rgba(18, 58, 75, .045); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.admin-intake-files-meta .admin-intake-complete-check:hover { border-color: #9accc2; box-shadow: 0 12px 28px rgba(18, 58, 75, .08); }
.admin-intake-files-meta .admin-intake-complete-check:has(input:checked) { border-color: #77bba6; background: #f5fbf8; }
.admin-intake-files-meta .admin-intake-complete-check:focus-within { outline: 3px solid rgba(22, 139, 130, .16); outline-offset: 2px; }
.admin-intake-complete-check input { width: 21px; height: 21px; margin-top: 20px; }
.admin-intake-complete-check .admin-intake-complete-copy { min-width: 0; gap: 5px; }
.admin-intake-complete-check .admin-intake-complete-eyebrow { color: #50847e; font-size: 10px; font-weight: 900; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }
.admin-intake-complete-check strong { color: #123b54; font-size: 16px; line-height: 1.3; }
.admin-intake-complete-check small { color: #607b89; font-size: 12px; font-weight: 550; line-height: 1.45; }
.admin-intake-complete-check .admin-intake-complete-impact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.admin-intake-complete-impact > span { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border: 1px solid #dbe9eb; border-radius: 8px; background: #f5f9fa; color: #3a6572; font-size: 11px; font-weight: 750; line-height: 1.35; }
.admin-intake-complete-check .admin-intake-complete-footnote { margin-top: 7px; padding-top: 10px; border-top: 1px solid #e4edef; color: #718794; }
.admin-intake-tech-note { margin: 16px 0 0; padding: 12px 15px; border-radius: 12px; background: #eef7fa; color: #527185; font-size: 13px; }
.admin-intake-billing-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.admin-intake-billing-options label { position: relative; cursor: pointer; }
.admin-intake-billing-options input { position: absolute; top: 18px; left: 17px; width: 18px; height: 18px; accent-color: #168b82; }
.admin-intake-billing-options span {
    display: grid;
    min-height: 116px;
    align-content: start;
    gap: 7px;
    padding: 18px 18px 18px 48px;
    border: 1px solid #d4e3e9;
    border-radius: 16px;
    background: #fbfdfe;
}
.admin-intake-billing-options strong { font-size: 16px; }
.admin-intake-billing-options small { color: #6d8290; font-weight: 650; line-height: 1.45; }
.admin-intake-billing-options input:checked + span { border-color: #168b82; background: #eef9f6; box-shadow: inset 0 0 0 1px #168b82; }
.admin-intake-billing-options .is-disabled { opacity: .58; cursor: not-allowed; }
.admin-intake-notify { width: min(680px, 100%); margin-top: 18px; }
.admin-intake-submit {
    position: sticky;
    z-index: 10;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 20px;
    border: 1px solid #cfe1e7;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 46px rgba(15, 52, 75, .18);
    backdrop-filter: blur(14px);
}
.admin-intake-submit > div { display: grid; gap: 3px; }
.admin-intake-submit strong { color: #174158; }
.admin-intake-submit span { color: #6b8190; font-size: 13px; }
.admin-intake-submit .btn { min-height: 52px; padding-inline: 24px; white-space: nowrap; }
.admin-intake-submit .btn span { color: inherit; font-size: 18px; }

@media (max-width: 900px) {
    .admin-dashboard-hero.has-finance { grid-template-columns: 1fr; }
    .admin-dashboard-hero .dashboard-month-revenue { justify-self: stretch; }
    .dashboard-new-case { justify-content: center; }
    .admin-intake-hero { grid-template-columns: 1fr; align-items: start; }
    .admin-intake-steps { justify-content: space-between; }
    .admin-intake-client-picker,
    .admin-intake-subject-row,
    .admin-intake-files-meta { grid-template-columns: 1fr; }
    .admin-intake-case-pricing-layout { grid-template-columns: 1fr; }
    .admin-intake-price-card, .admin-intake-deferred-card { position: static; }
    .admin-intake-pricing-options { grid-template-columns: 1fr; }
    .admin-intake-pricing-options span { min-height: 98px; }
    .admin-intake-billing-options { grid-template-columns: 1fr; }
    .admin-intake-billing-options span { min-height: 86px; }
}

@media (max-width: 640px) {
    .admin-intake-page { width: min(100% - 16px, 1220px); margin-top: 8px; margin-bottom: 30px; }
    .admin-intake-hero { gap: 18px; padding: 22px 17px; border-radius: 18px; }
    .admin-intake-back { margin-bottom: 14px; min-height: 44px; align-items: center; }
    .admin-intake-hero h1 { font-size: clamp(29px, 8vw, 36px); }
    .admin-intake-hero p:last-child { font-size: 14px; line-height: 1.45; }
    .admin-intake-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
    .admin-intake-steps li { min-width: 0; font-size: 10px; text-align: center; overflow-wrap: anywhere; }
    .admin-intake-steps a { width: 100%; min-height: 62px; align-content: start; }
    .admin-intake-steps strong { width: 34px; height: 34px; }
    .admin-intake-form { gap: 12px; margin-top: 12px; }
    .admin-intake-card { min-width: 0; padding: 20px 15px; border-radius: 18px; scroll-margin-top: 72px; }
    .admin-intake-card-heading { align-items: flex-start; }
    .admin-intake-card-heading h2 { font-size: clamp(20px, 5.5vw, 23px); line-height: 1.18; }
    .admin-intake-card-heading h2[id] { scroll-margin-top: 16px; }
    .admin-intake-number { width: 40px; height: 40px; border-radius: 13px; }
    .admin-intake-segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; }
    .admin-intake-segmented span { min-height: 48px; padding: 7px; font-size: 13px; text-align: center; }
    .admin-intake-client-results { position: relative; top: auto; max-height: min(38dvh, 280px); margin-top: 4px; box-shadow: 0 8px 20px rgba(20, 54, 76, .1); }
    .admin-intake-client-results button { min-height: 54px; }
    .admin-intake-card input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    .admin-intake-card select, .admin-intake-card textarea { min-height: 48px; font-size: 16px; }
    .admin-intake-new-client { padding: 14px; border-radius: 15px; }
    .admin-intake-new-client > .admin-intake-fields,
    .admin-intake-new-client .admin-intake-details > .admin-intake-fields {
        grid-template-columns: 1fr;
        gap: 13px;
    }
    .admin-intake-new-client input:not([type="radio"]):not([type="checkbox"]),
    .admin-intake-new-client select {
        min-height: 50px;
        padding: 12px 13px;
        font-size: 16px;
    }
    .admin-intake-new-client .admin-intake-details { margin-top: 16px; }
    .admin-intake-new-client .admin-intake-details summary { min-height: 50px; }
    .admin-intake-new-client .admin-intake-details > .admin-intake-fields { margin: 13px; }
    .admin-intake-case-fields,
    .admin-intake-case-inputs .admin-intake-numbers { grid-template-columns: 1fr; gap: 13px; }
    .admin-intake-price-card { border-radius: 16px; }
    .admin-intake-price-total strong { font-size: 30px; }
    .admin-intake-price-lines li { align-items: flex-start; }
    .admin-intake-upload { min-height: 0; gap: 5px; padding: 20px 13px; border-radius: 15px; }
    .admin-intake-upload-icon { width: 38px; height: 38px; }
    .admin-intake-upload strong { font-size: 16px; }
    .admin-intake-upload > span:not(.admin-intake-upload-icon) { font-size: 12px; line-height: 1.4; }
    .admin-intake-upload-actions { display: grid; grid-template-columns: 1fr; width: 100%; gap: 8px; margin-top: 13px; }
    .admin-intake-upload-actions .btn { width: 100%; min-height: 52px; justify-content: center; }
    .admin-intake-upload small { font-size: 11px; line-height: 1.4; }
    .admin-intake-upload-review { padding: 12px; }
    .admin-intake-upload-review li { gap: 8px; }
    .admin-intake-upload-review li button { font-size: 11px; }
    .admin-intake-note { padding: 17px; }
    .admin-intake-files-meta .admin-intake-complete-check { padding: 17px; }
    .fiscalist-inbox-ocr-mode { grid-template-columns: 1fr; align-items: stretch; }
    .fiscalist-inbox-ocr-mode small { grid-column: auto; }
    .admin-intake-submit { position: static; display: grid; padding: 16px; }
    .admin-intake-submit .btn { width: 100%; white-space: normal; }
}

@media (max-width: 640px) {
    .email-inactive-message { align-items: flex-start; flex-direction: column; padding: 16px; }
    .email-inactive-message > div { flex-basis: auto; }
    .email-inactive-message .btn { width: 100%; justify-content: center; }
    .email-section-title {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 12px;
    }
    .email-section-count { grid-column: 2; justify-self: start; }
    .email-template-card { margin: 10px 8px; border-radius: 12px; }
    .email-template-summary {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
        padding: 14px 12px;
    }
    .email-template-toggle { width: 28px; height: 28px; }
    .email-template-summary-main strong { font-size: 16px; }
    .email-template-summary-meta small { white-space: normal; }
    .email-editor { gap: 15px; padding: 16px 11px; }
    .email-editor-intro { align-items: flex-start; flex-direction: column; }
    .email-visual-editor { min-height: 300px; padding: 13px; }
    .email-editor .inline-form { display: grid; grid-template-columns: 1fr; }
    .email-editor .inline-form .btn { width: 100%; white-space: normal; }
    .email-preview-pane { min-height: 520px; }
    .email-preview { height: 450px; }
}

.company-offer-public-lines { display: grid; border: 1px solid #dce8ed; border-radius: 12px; overflow: hidden; }
.company-offer-public-lines > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 17px; border-top: 1px solid #e8eef1; }
.company-offer-public-lines > div:first-child { border-top: 0; background: #f2f7f9; color: #47687b; }
.company-offer-public-lines strong { white-space: nowrap; color: #14384f; }
.company-invoice-page { max-width: 930px; margin: 28px auto 70px; padding: 0 18px; }
.company-invoice-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.company-invoice-document { padding: 54px; background: #fff; border: 1px solid #dae6eb; border-radius: 18px; box-shadow: 0 18px 45px rgba(13, 46, 67, .09); }
.company-invoice-header { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 30px; border-bottom: 2px solid #14384f; }
.company-invoice-header h1 { margin: 0 0 9px; color: #14384f; font-size: 29px; }
.company-invoice-header p { color: #607b89; line-height: 1.55; }
.company-invoice-number { display: grid; align-content: start; gap: 7px; text-align: right; white-space: nowrap; color: #607b89; }
.company-invoice-number strong { color: #14384f; font-size: 18px; }
.company-invoice-recipient { margin: 32px 0 36px; color: #607b89; }
.company-invoice-recipient > span { display: block; margin-bottom: 8px; color: #a0783a; font-weight: 850; text-transform: uppercase; font-size: 12px; }
.company-invoice-recipient strong { color: #14384f; font-size: 20px; }
.company-invoice-recipient p { margin: 7px 0; }
.company-invoice-lines > div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #e1e9ed; }
.company-invoice-lines-head { color: #617a88; font-size: 12px; font-weight: 850; text-transform: uppercase; }
.company-invoice-lines strong { color: #14384f; white-space: nowrap; }
.company-invoice-total { display: flex; justify-content: space-between; gap: 20px; margin: 20px 0 0 auto; max-width: 380px; padding: 19px 22px; background: #14384f; border-radius: 11px; color: #fff; font-weight: 850; }
.company-invoice-total strong { color: #fff; font-size: 20px; }
.company-invoice-note { color: #607b89; font-size: 13px; }
.company-invoice-payment { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 45px; padding-top: 24px; border-top: 1px solid #dce8ed; }
.company-invoice-payment h2 { margin: 0 0 10px; color: #14384f; font-size: 17px; }
.company-invoice-payment p { color: #607b89; line-height: 1.7; }
.company-invoice-payment strong { color: #14384f; }
.company-invoice-payment img { width: 170px; height: 170px; object-fit: contain; }
@media (max-width: 650px) { .company-invoice-document { padding: 24px; } .company-invoice-header, .company-invoice-payment { flex-direction: column; } .company-invoice-number { text-align: left; } .company-invoice-payment img { align-self: center; } }
@media print { .company-invoice-page { max-width: none; margin: 0; padding: 0; } .company-invoice-actions { display: none; } .company-invoice-document { border: 0; border-radius: 0; box-shadow: none; padding: 0; } }
.company-offers-mandate-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 14px; padding: 15px; border: 1px solid #d9e7ec; border-radius: 12px; background: #f8fbfc; }
.company-offers-mandate-form > label:first-of-type { min-width: 160px; }
.company-offers-mandate-form .check-row { margin: 0; }
.company-offers-revision-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.company-offers-revision-form small { color: #718895; }
.company-client-mandates { margin: 18px 0; }
.company-client-mandates h1 { margin: 0 0 7px; color: #14384f; }
.company-client-mandate-list { display: grid; gap: 10px; margin-top: 17px; }
.company-client-mandate { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px; border: 1px solid #dce8ed; border-radius: 13px; background: #f8fbfc; }
.company-client-mandate strong { color: #14384f; font-size: 17px; }
.company-client-mandate p { margin: 5px 0; color: #607b89; }
.company-client-mandate small { color: #607b89; }
@media (max-width: 600px) { .company-client-mandate { align-items: flex-start; flex-direction: column; } }
.company-offers-page .company-offers-create { padding: 0; }
.company-offers-page .company-offers-inbox { padding: 18px; }
.company-offers-page .company-offers-detail { padding: 28px; }
@media (max-width: 600px) { .company-offers-page .company-offers-detail { padding: 18px; } }

/* Offres société : saisie rapide et composition guidée */
.company-offers-page { gap: 18px; }
.company-offers-page .company-offers-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}
.company-offers-page .company-offers-stats > div { padding: 15px 20px; }
.company-offers-page .company-offers-stats strong { font-size: 28px; }
.company-offers-page .company-offers-create {
    margin: 0;
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(14, 49, 70, .07);
}
.company-offers-page .company-offers-create:not([open]) { display: none; }
.company-offers-page .company-offers-create > summary {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 22px 26px;
    list-style: none;
    background: linear-gradient(115deg, #fff, #f3f9fa);
}
.company-offers-page .company-offers-create > summary::-webkit-details-marker { display: none; }
.company-offers-page .company-offers-create > summary::marker { content: ""; }
.company-offers-create-mark {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #145c70, #16877f);
    color: #fff;
    font-size: 31px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(16, 105, 104, .18);
}
.company-offers-create-summary { display: grid; gap: 3px; min-width: 0; }
.company-offers-create-summary small {
    color: #ad7a31 !important;
    font-size: 11px;
    font-weight: 900 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.company-offers-create-summary strong { color: #123d54; font-size: clamp(17px, 1.5vw, 21px); }
.company-offers-create-summary > span { color: #718795; font-size: 13px; font-weight: 500; }
.company-offers-create-chevron { margin-left: auto; color: #4e7284; font-size: 28px; transition: transform .2s; }
.company-offers-create[open] .company-offers-create-chevron { transform: rotate(180deg); }
.company-offers-page .company-offers-create-form { gap: 22px; padding: clamp(22px, 3vw, 34px); }
.company-offers-create-intro { display: flex; gap: 14px; align-items: flex-start; }
.company-offers-step-number {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #e8f2f3;
    color: #22687a;
    font-size: 12px;
    font-weight: 900;
}
.company-offers-create-intro h2 { margin: 0; color: #14354a; font-size: 22px; }
.company-offers-create-intro p { margin: 4px 0 0; color: #708694; font-size: 14px; }
.company-offers-create-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.company-offers-create-fields label,
.company-offers-create-note,
.company-offers-form-top label,
.company-offers-editor-card label { display: grid; gap: 7px; min-width: 0; color: #21455a; font-size: 13px; font-weight: 800; }
.company-offers-create-fields label small,
.company-offers-create-note small { display: inline; color: #8999a2; font-size: 12px; font-weight: 500; }
.company-offers-create-fields input,
.company-offers-create-note textarea,
.company-offers-form-top input,
.company-offers-editor-card :is(input, textarea) { width: 100%; min-height: 46px; border-radius: 11px; background: #fff; }
.company-offers-page .required-mark { color: #b2782b; }
.company-offers-create-optional { padding: 0; border: 1px solid #dce8ec; border-radius: 14px; background: #f9fcfc; }
.company-offers-create-optional summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    list-style: none;
    cursor: pointer;
}
.company-offers-create-optional summary::-webkit-details-marker { display: none; }
.company-offers-create-optional summary > span:first-child { display: grid; gap: 2px; }
.company-offers-create-optional summary strong { color: #21455a; font-size: 14px; }
.company-offers-create-optional summary small { color: #778e9a; font-size: 12px; font-weight: 500; }
.company-offers-create-optional summary > span:last-child { color: #668497; font-size: 25px; }
.company-offers-create-optional[open] summary > span:last-child { transform: rotate(180deg); }
.company-offers-create-optional .company-offers-create-fields { padding: 0 18px 18px; }
.company-offers-create-note textarea { min-height: 82px; }
.company-offers-page .company-offers-create-footer { padding-top: 18px; border-top: 1px solid #e4edef; }
.company-offers-create-footer p { max-width: 440px; font-size: 13px; line-height: 1.45; }
.company-offers-create-footer .btn { min-height: 46px; }
.company-offers-page .company-offers-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.company-offers-page .company-offers-inbox { position: static; min-width: 0; padding: 18px 22px 20px; }
.company-offers-page .company-offers-inbox-head { align-items: center; padding: 0 0 12px; }
.company-offers-page .company-offers-inbox-head h2 { font-size: 19px; }
.company-offers-pipeline-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 13px; }
.company-offers-pipeline-controls .company-offers-search { flex: 1 1 270px; max-width: 400px; }
.company-offers-pipeline-controls .company-offers-search input { min-height: 42px; }
.company-offers-pipeline-controls .company-offers-filters { flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 7px; padding: 0; }
.company-offers-page .company-offers-items { display: flex; gap: 10px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 9px; scroll-snap-type: x proximity; scrollbar-color: #b9ced9 transparent; }
.company-offers-page .company-offers-item { flex: 0 0 clamp(260px, 24vw, 335px); min-width: 0; gap: 7px; padding: 14px 16px; scroll-snap-align: start; }
.company-offers-page .company-offers-item.active { box-shadow: inset 0 3px 0 var(--offer-gold); }
.company-offers-page .company-offers-item-top { align-items: center; }
.company-offers-page .company-offers-item-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-offers-page .company-offers-item-contact { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-offers-page .company-offers-item-bottom { gap: 12px; white-space: nowrap; }
.company-offers-page .company-offers-item-bottom span:last-child { overflow: hidden; text-overflow: ellipsis; }
.company-offers-page .company-offers-detail { min-width: 0; padding: clamp(24px, 2.5vw, 38px); }
.company-offers-detail-head h2 { font-size: clamp(29px, 2.3vw, 39px); }
.company-offers-detail-head .company-offers-contact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    font-size: 14px;
}
.company-offers-contact-line strong { color: #294e62; }
.company-offers-contact-line > span { color: #9bb0bb; }
.company-offers-contact-line a { color: #396a83 !important; text-decoration: none; }
.company-offers-contact-line a:hover { text-decoration: underline; }
.company-offers-page .company-offers-section { padding: 20px 0; }
.company-offers-page .company-offers-context { border-bottom: 1px solid var(--offer-border); }
.company-offers-page .company-offers-facts {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    margin: 0;
}
.company-offers-page .company-offers-facts > div { padding: 13px 16px; background: #f8fbfc; }
.company-offers-facts dt { color: #718b99; font-size: 12px; }
.company-offers-facts dd { margin: 5px 0 0; color: #173e56; font-size: 14px; font-weight: 850; }
.company-offers-page .company-offer-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 20px; }
.company-offers-page .company-offer-form > :is(.company-offers-section-title, .company-offers-form-top, .company-offers-validation, .company-offers-form-actions),
.company-offers-page .company-offer-form > [aria-labelledby="offer-services-title"] { grid-column: 1 / -1; }
.company-offers-page .company-offer-form > .company-offers-section-title { margin: 0; }
.company-offers-form-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(205px, .6fr); gap: 16px; }
.company-offers-editor-card {
    display: grid;
    gap: 17px;
    padding: clamp(18px, 2vw, 24px);
    border: 1px solid #deeaee;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 55, 73, .035);
}
.company-offers-editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.company-offers-editor-head h4 { margin: 0; color: #173a50; font-size: 17px; }
.company-offers-editor-head p { margin: 3px 0 0; color: #788e9a; font-size: 12px; }
.company-offers-editor-head .btn { margin: 0; min-height: 38px; }
.company-offers-page .company-offers-lines { gap: 10px; }
.company-offers-page .company-offers-line {
    grid-template-columns: minmax(0, 1fr) 74px 145px 118px 28px;
    gap: 9px;
    padding: 12px;
    border: 1px solid #e4edef;
    border-radius: 12px;
    background: #f8fbfc;
}
.company-offers-page .company-offers-line input { min-height: 42px; }
.company-offers-page .company-offers-line output { padding-bottom: 12px; font-size: 12px; }
.company-offers-page .company-offers-remove-line { margin-bottom: 8px; }
.company-offers-page .company-offers-total { padding: 17px 20px; border-radius: 12px; }
.company-offers-total span { font-weight: 800; }
.company-offers-total small { opacity: .65; font-size: 11px; }
.company-offers-address-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(95px, .5fr); gap: 15px; }
.company-offers-terms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.company-offers-conditions textarea { min-height: 100px; }
.company-offers-attachment { border-top: 1px solid #e5edef; padding-top: 12px; }
.company-offers-attachment summary { width: fit-content; color: #226781; font-size: 13px; font-weight: 800; cursor: pointer; }
.company-offers-attachment summary span { color: #8a9ba4; font-weight: 500; }
.company-offers-attachment input { margin-top: 11px; }
.company-offers-attachment p { color: #627f8d; font-size: 12px; }
.company-offers-page .company-offers-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 2px -8px -8px;
    padding: 17px 18px;
    border: 1px solid #dce8ed;
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -10px 28px rgba(13, 49, 67, .075);
}
.company-offers-form-actions p { display: grid; gap: 3px; }
.company-offers-form-actions p strong { color: #284e61; }
.company-offers-form-actions p span { color: #718894; }
.company-offers-form-actions .btn { min-height: 43px; }
.company-offers-validation {
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #ebc6bd;
    border-radius: 11px;
    background: #fff6f3;
    color: #a34938;
    font-size: 13px;
    font-weight: 750;
}
.company-offers-validation[hidden] { display: none; }
.company-offers-page [aria-invalid="true"] { border-color: #c3604c !important; box-shadow: 0 0 0 3px rgba(195,96,76,.12); }
.company-offer-send-dialog { width: min(1080px, 100%); max-height: min(94vh, 1080px); display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; }
.company-offer-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex: none; padding: 19px clamp(20px, 3vw, 34px); border-bottom: 1px solid #dce8ed; background: #fff; }
.company-offer-preview-head .eyebrow { margin: 0 0 5px; }
.company-offer-preview-head h3 { margin: 0; color: #14374c; font-size: clamp(21px, 2vw, 27px); }
.company-offer-preview-head p:last-child { margin: 5px 0 0; color: #6c8593; font-size: 13px; line-height: 1.45; }
.company-offer-preview-close { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #d5e5eb; border-radius: 50%; background: #fff; color: #2d566b; font-size: 27px; cursor: pointer; }
.company-offer-preview-scroll { min-height: 0; overflow-y: auto; padding: clamp(15px, 3vw, 30px); background: #f2f7f8; }
.company-offer-preview-document { display: grid; gap: 21px; max-width: 960px; margin: 0 auto; padding: clamp(24px, 4vw, 42px); border: 1px solid #dce7eb; border-radius: 15px; background: #fff; box-shadow: 0 15px 35px rgba(14, 49, 70, .07); }
.company-offer-preview-document .public-offer-head { grid-template-columns: 155px minmax(0, 1fr); }
.company-offer-preview-document .public-offer-head img { width: 145px; }
.company-offer-preview-document .public-offer-head h4 { margin: 3px 0 6px; color: #12394f; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
.company-offer-preview-document .public-offer-head p:last-child { margin: 0; color: #648090; }
.public-offer-page .company-offer-summary,
.company-offer-preview-document .company-offer-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 0; }
.company-offer-preview-document .company-offer-summary div { min-width: 0; padding: 14px; border-radius: 12px; }
.company-offer-preview-document .company-offer-summary span { font-size: 12px; }
.company-offer-preview-document .company-offer-summary strong { font-size: 14px; overflow-wrap: anywhere; }
.company-offer-preview-document .offer-readable-block { padding: 0; border: 0; }
.company-offer-preview-document .offer-readable-block h4 { margin: 0 0 12px; color: #14384f; font-size: 19px; }
.company-offer-preview-document .offer-readable-block p { margin: 0; white-space: pre-line; line-height: 1.6; color: #526e7d; }
.company-offer-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex: none; padding: 15px clamp(20px, 3vw, 34px); border-top: 1px solid #dce8ed; background: #fff; }
.company-offer-preview-footer p { display: grid; gap: 3px; margin: 0; color: #617d8c; font-size: 13px; }
.company-offer-preview-footer strong { color: #193f55; overflow-wrap: anywhere; }
.company-offer-preview-footer p span { color: #8a9ca6; }
.company-offer-send-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin: 0; }
.company-offer-send-actions .btn { min-height: 44px; }
.company-offer-send-actions [hidden] { display: none !important; }
.company-offers-page :is(summary, button, input, textarea, a):focus-visible { outline: 3px solid #3288ae; outline-offset: 3px; }
@media (max-width: 1350px) {
    .company-offers-pipeline-controls .company-offers-filters { justify-content: flex-start; }
}
@media (max-width: 1050px) {
    .company-offers-page .company-offer-form { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .company-offers-page .company-offers-stats { gap: 8px; }
    .company-offers-page .company-offers-stats > div { padding: 13px; }
    .company-offers-page .company-offers-stats strong { font-size: 23px; }
    .company-offers-create-fields, .company-offers-form-top, .company-offers-address-grid, .company-offers-terms-grid { grid-template-columns: 1fr; }
    .company-offers-page .company-offers-line { grid-template-columns: repeat(2, minmax(0, 1fr)) 28px; }
    .company-offers-page .company-offers-line label:first-child { grid-column: 1 / -1; }
    .company-offers-page .company-offers-line label:nth-child(2) { grid-column: 1; grid-row: 2; }
    .company-offers-page .company-offers-line label:nth-child(3) { grid-column: 2; grid-row: 2; }
    .company-offers-page .company-offers-line output { grid-column: 1 / 3; grid-row: 3; padding: 0; text-align: left; }
    .company-offers-page .company-offers-line button { grid-column: 3; grid-row: 2; }
    .company-offer-preview-document .company-offer-summary,
    .public-offer-page .company-offer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .company-offer-preview-document .public-offer-head { grid-template-columns: 1fr; gap: 12px; }
    .company-offer-preview-document .public-offer-head img { width: 125px; }
}
@media (max-width: 600px) {
    .company-offers-page .company-offers-create > summary { padding: 18px; gap: 12px; }
    .company-offers-create-summary > span { display: none; }
    .company-offers-create-mark { flex-basis: 40px; width: 40px; height: 40px; }
    .company-offers-page .company-offers-detail { padding: 18px; }
    .company-offers-page .company-offers-stats small { display: none; }
    .company-offers-page .company-offers-form-actions { flex-direction: column; align-items: stretch; margin: 0; }
    .company-offers-form-actions > div { display: grid; grid-template-columns: 1fr; }
    .company-offers-page .company-offers-line { grid-template-columns: repeat(2, minmax(0, 1fr)) 25px; }
    .company-offer-send-actions { display: grid; grid-template-columns: 1fr; }
    .company-offers-page .company-offers-inbox { padding: 16px; }
    .company-offers-page .company-offers-item { flex-basis: min(78vw, 315px); }
    .company-offers-pipeline-controls .company-offers-search { max-width: none; }
    .company-offers-pipeline-controls .company-offers-filters { width: 100%; }
    .company-offer-send-modal { padding: 0; }
    .company-offer-send-dialog { max-height: 100vh; border-radius: 0; }
    .company-offer-preview-document { padding: 19px; }
    .company-offer-preview-document .company-offer-summary { grid-template-columns: 1fr 1fr; }
    .company-offer-preview-footer { align-items: stretch; flex-direction: column; }
}

/* Dossier fiscal : échéance et transmission de la confirmation */
.case-workstation-shell .deadline-collapsible-panel {
    margin: 18px 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(18, 48, 69, .065);
}
.case-workstation-shell .deadline-collapsible-panel > summary {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto 36px;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    background: linear-gradient(110deg, #fff 48%, #f4f9fa);
    transition: background .18s ease;
}
.case-workstation-shell .deadline-collapsible-panel > summary:hover { background: #f7fafb; }
.case-workstation-shell .deadline-collapsible-panel > summary:focus-visible { outline: 3px solid #81b5ca; outline-offset: -4px; }
.case-workstation-shell .deadline-collapsible-panel[open] > summary { border-bottom: 1px solid #e4ecef; }
.deadline-summary-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: #eaf2f5;
    color: #1b6483;
}
.deadline-summary-icon svg { width: 26px; height: 26px; }
.deadline-summary-copy { display: grid; gap: 4px; min-width: 0; }
.deadline-summary-copy .eyebrow { margin: 0; color: #805d2d; font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.deadline-summary-title { margin: 0; color: #14364c; font-size: clamp(21px, 2vw, 27px); line-height: 1.15; letter-spacing: -.025em; }
.deadline-summary-description { color: #536d7b; font-size: 13px; line-height: 1.4; }
.deadline-summary-meta { display: grid; justify-items: end; gap: 3px; min-width: 164px; }
.deadline-summary-meta > span:first-child { color: #5e7886; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .055em; }
.deadline-summary-meta > strong { color: #14364c; font-size: 23px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deadline-state { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border-radius: 999px; color: #257455; background: #eaf6f0; font-size: 11px; font-weight: 850; }
.deadline-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.deadline-state.is-overdue { color: #a84742; background: #fdf0ed; }
.deadline-state.is-soon { color: #966518; background: #fff5e2; }
.case-workstation-shell .deadline-collapsible-panel .collapse-arrow { width: 36px; height: 36px; background: #edf4f6; color: #285b73; font-size: 23px; }
.deadline-panel-body { padding: 27px 28px 30px; }
.deadline-context-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0 0 25px; margin-bottom: 25px; border-bottom: 1px solid #e4ebee; }
.deadline-context-item { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.deadline-context-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: #e9f5ef; color: #247854; font-size: 17px; font-weight: 850; }
.deadline-context-icon.is-document { background: #eaf2f7; color: #1c668b; }
.deadline-context-label { display: block; margin: 0 0 4px; color: #596f7b; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.deadline-context-item strong { display: block; color: #193e53; font-size: 15px; }
.deadline-context-item p { margin: 5px 0 0; color: #536d7b; font-size: 13px; line-height: 1.5; }
.deadline-action-card { padding: 24px; border: 1px solid #dfe9ec; border-radius: 17px; background: #f8fbfc; }
.deadline-action-heading { margin-bottom: 22px; }
.deadline-action-heading .eyebrow { display: block; margin: 0 0 5px; color: #805d2d; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.deadline-action-heading h3 { margin: 0; color: #173b51; font-size: 21px; letter-spacing: -.02em; }
.deadline-action-heading p { margin: 5px 0 0; color: #536d7b; font-size: 13px; }
.deadline-collapsible-panel .deadline-confirmation-current { display: flex; align-items: center; gap: 12px; margin: 0 0 21px; padding: 13px 15px; border: 1px solid #cde3d6; border-radius: 12px; background: #fff; }
.deadline-confirmation-current > span { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #e9f6ee; color: #22784f; font-weight: 900; }
.deadline-confirmation-current > div { display: grid; gap: 3px; min-width: 0; margin-right: auto; }
.deadline-confirmation-current small { color: #758d83; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.deadline-confirmation-current strong { color: #1d5741; font-size: 13px; overflow-wrap: anywhere; }
.deadline-collapsible-panel .deadline-confirmation-form { display: grid; grid-template-columns: minmax(210px, .85fr) minmax(300px, 1.15fr); align-items: start; gap: 17px; margin: 0; }
.deadline-collapsible-panel .deadline-field { display: grid; align-content: start; gap: 8px; min-width: 0; color: #28485c; font-size: 13px; font-weight: 800; }
.deadline-field > span small { margin-left: 5px; padding: 3px 6px; border-radius: 5px; background: #e9f1f4; color: #5d7b8b; font-size: 10px; font-weight: 850; }
.deadline-collapsible-panel .deadline-field input:not([type="hidden"]), .deadline-collapsible-panel .deadline-field select { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #d4e1e7; border-radius: 11px; background: #fff; color: #183a50; font: inherit; font-weight: 700; }
.deadline-collapsible-panel .deadline-field input:disabled { opacity: 1; background: #eef4f6; color: #385b6e; }
.deadline-field > small { color: #7c909b; font-size: 11px; font-weight: 500; }
.deadline-collapsible-panel .deadline-field input[type="file"] { min-height: 52px; padding: 7px 10px; border-style: dashed; color: #657e8c; font-size: 12px; font-weight: 600; cursor: pointer; }
.deadline-field input[type="file"]::file-selector-button { margin-right: 12px; padding: 9px 13px; border: 0; border-radius: 8px; background: #e7f1f5; color: #1c607f; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.deadline-field input[type="file"]:hover::file-selector-button { background: #d8eaf1; }
.deadline-form-footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 3px; padding-top: 17px; border-top: 1px solid #e2eaee; }
.deadline-form-footer p { max-width: 480px; margin: 0; color: #536d7b; font-size: 12px; line-height: 1.5; }
.deadline-form-footer .btn { min-height: 46px; padding: 11px 17px; border-radius: 10px; white-space: nowrap; box-shadow: 0 8px 18px rgba(13, 95, 147, .15); }
.deadline-form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.deadline-form-actions .final-declaration-preview-button { box-shadow: none; }
.deadline-form-footer .btn span { padding-left: 8px; font-size: 16px; }
@media (max-width: 850px) {
    .deadline-context-row { grid-template-columns: 1fr; gap: 18px; }
    .deadline-form-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 690px) {
    .case-workstation-shell .deadline-collapsible-panel > summary { grid-template-columns: 42px minmax(0, 1fr) 34px; gap: 11px; padding: 18px; }
    .deadline-summary-icon { width: 42px; height: 42px; border-radius: 12px; }
    .deadline-summary-icon svg { width: 22px; height: 22px; }
    .deadline-summary-description { display: none; }
    .deadline-summary-meta { grid-column: 2; grid-row: 2; justify-items: start; min-width: 0; margin-top: 7px; }
    .deadline-summary-meta > strong { font-size: 19px; }
    .deadline-summary-meta > span:first-child { display: none; }
    .case-workstation-shell .deadline-collapsible-panel .collapse-arrow { grid-column: 3; grid-row: 1 / 3; }
    .deadline-panel-body { padding: 19px; }
    .deadline-action-card { padding: 18px; }
    .deadline-collapsible-panel .deadline-confirmation-form { grid-template-columns: 1fr; }
    .deadline-form-footer { grid-column: 1; }
    .deadline-form-actions { width: 100%; }
    .deadline-form-footer .btn { width: 100%; white-space: normal; }
    .deadline-collapsible-panel .deadline-confirmation-current { flex-wrap: wrap; }
}

/* Finalisation du dossier : saisie des montants et modules secondaires */
.case-workstation-shell .case-delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.case-delivery-grid > .final-declaration-panel,
.case-delivery-grid > .correction-admin-panel { grid-column: 1 / -1; }
.case-delivery-grid > .internal-files-panel,
.case-delivery-grid > .case-invoices-panel { min-width: 0; }
.case-delivery-grid .internal-file-upload-form { grid-template-columns: minmax(0, 1fr); }
.case-delivery-grid .internal-file-upload-form .btn { justify-self: start; }
.case-delivery-grid .case-invoice-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.case-delivery-grid .case-invoice-actions { grid-column: 1 / -1; justify-content: flex-start; }
.case-delivery-grid .case-invoice-row > strong { justify-self: end; white-space: nowrap; }
.case-delivery-grid .case-invoice-list { padding: 0 16px 16px; }
.case-delivery-grid .case-invoices-panel > .note { margin: 0 18px 18px; }
.case-delivery-grid .case-invoices-panel summary h2,
.case-delivery-grid .internal-files-panel summary h2 { font-size: clamp(18px, 1.4vw, 22px); }
.case-delivery-grid .final-declaration-panel { padding: clamp(20px, 2.5vw, 30px); border-radius: 20px; box-shadow: 0 16px 38px rgba(22, 73, 66, .06); }
.case-delivery-grid .final-declaration-panel .section-title-row { margin-bottom: 21px; }
.case-delivery-grid .final-declaration-panel .section-title-row .note { max-width: 760px; }
.final-declaration-primary-form { display: block; }
.final-declaration-entry-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: stretch; }
.final-declaration-upload,
.final-tax-fields { min-width: 0; padding: 23px; border: 1px solid #dbe8e5; border-radius: 16px; background: #fff; }
.final-declaration-upload { display: flex; flex-direction: column; }
.final-declaration-step { display: block; color: #24775a; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.final-declaration-upload h3 { margin: 7px 0 5px; color: #173e44; font-size: 21px; letter-spacing: -.02em; }
.final-declaration-upload > p { margin: 0 0 22px; color: #567078; font-size: 13px; line-height: 1.5; }
.final-declaration-primary-form .final-declaration-fields { grid-template-columns: 1fr; gap: 19px; }
.final-declaration-primary-form .final-declaration-fields label { display: grid; gap: 8px; color: #214551; font-weight: 750; }
.final-file-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.final-file-label .required-hint,
.final-file-label .optional-hint { margin-left: 0; }
.final-declaration-primary-form .final-declaration-fields input[type="file"] { width: 100%; min-height: 52px; padding: 10px; border: 1px dashed #bfd5d1; border-radius: 10px; background: #f9fcfb; font-size: 12px; }
.final-declaration-primary-form .final-declaration-fields input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 0; border-radius: 7px; background: #e7f3ef; color: #1f7054; font: inherit; font-weight: 800; cursor: pointer; }
.final-tax-fields { margin: 0; background: #f8fbfc; }
.final-tax-fields legend { padding: 0 8px; color: #173e4b; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }
.final-tax-intro { margin: 0 0 16px; color: #526e7b; font-size: 13px; line-height: 1.5; }
.final-tax-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.final-tax-input-grid label { display: grid; gap: 4px; min-width: 0; color: #214453; font-size: 13px; font-weight: 800; }
.final-tax-input-grid label small { color: #708b98; font-size: 11px; font-weight: 600; }
.final-tax-input { display: flex; align-items: center; min-height: 46px; margin-top: 3px; overflow: hidden; border: 1px solid #d1e1e7; border-radius: 10px; background: #fff; }
.final-tax-input:focus-within { border-color: #3c91b0; box-shadow: 0 0 0 3px rgba(60, 145, 176, .13); }
.final-tax-input input { width: 100%; min-width: 0; padding: 11px 12px; border: 0; outline: 0; background: transparent; color: #173a4c; font: inherit; font-size: 14px; font-weight: 750; }
.final-tax-input > span { padding: 0 12px; color: #5e7885; font-size: 11px; font-weight: 850; }
.final-tax-footnote { margin: 15px 0 0; color: #5d7783; font-size: 12px; line-height: 1.5; }
.final-declaration-submit { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #dcebe4; }
.final-declaration-submit .btn { min-height: 50px; border-radius: 10px; }
.final-declaration-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.final-declaration-preview-button { border: 1px solid #cbdde4; background: #f2f7f9; color: #2a5b70; box-shadow: none; }
.final-declaration-preview-button:hover { border-color: #a9c9d7; background: #e7f1f5; color: #174b63; box-shadow: none; }
.final-email-preview-dialog { width: min(900px, 100%); }
.final-email-preview-content { padding: 22px; }
.final-email-preview-status { margin: 0; color: #526e7b; font-size: 14px; }
.final-email-preview-status.is-error { color: #a63e3e; }
.final-email-preview-meta { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5eef1; color: #173a4c; font-size: 14px; }
.final-email-preview-meta span { color: #6d8792; font-weight: 700; }
.final-email-preview-meta strong { overflow-wrap: anywhere; }
.final-email-subject-label { display: grid; gap: 7px; margin-top: 16px; color: #173a4c; font-size: 13px; font-weight: 800; }
.final-email-subject-label input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #ccdde5; border-radius: 9px; background: #fff; color: #173a4c; font: inherit; font-size: 15px; }
.final-email-subject-label input:focus { outline: 3px solid rgba(13,95,147,.13); border-color: #5b9db9; }
.final-email-preview-note { margin: 18px 0; padding: 12px 14px; border: 1px solid #d8e8ee; border-radius: 10px; background: #f5fafb; color: #536f7b; font-size: 13px; line-height: 1.5; }
.final-email-client-preview iframe { display: block; width: 100%; height: min(66vh, 760px); min-height: 440px; border: 1px solid #dbe8ee; border-radius: 12px; background: #fff; }
.final-email-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #e2ebef; }
.final-email-preview-footer > span { color: #607b8b; font-size: 12px; }
.final-email-preview-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.final-email-preview-footer .btn { min-height: 42px; }
.correction-resolution-form .final-tax-fields { grid-column: 1 / -1; }
@media (max-width: 1150px) {
    .case-workstation-shell .case-delivery-grid { grid-template-columns: 1fr; }
    .case-delivery-grid > .final-declaration-panel,
    .case-delivery-grid > .correction-admin-panel { grid-column: 1; }
}
@media (max-width: 850px) {
    .final-declaration-entry-grid { grid-template-columns: 1fr; }
    .final-declaration-submit { align-items: stretch; flex-direction: column; }
    .final-declaration-actions { width: 100%; }
    .final-email-client-preview iframe { height: 58vh; min-height: 360px; }
}
@media (max-width: 560px) {
    .final-tax-input-grid { grid-template-columns: 1fr; }
    .final-declaration-upload,
    .final-tax-fields { padding: 18px; }
    .final-declaration-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .final-declaration-submit .btn { width: 100%; padding: 10px; white-space: normal; font-size: 13px; line-height: 1.3; }
    .final-email-preview-content { padding: 16px; }
    .final-email-preview-footer { align-items: stretch; flex-direction: column; }
    .final-email-preview-footer > div { display: grid; grid-template-columns: 1fr; }
    .final-email-preview-footer .btn { white-space: normal; }
    .case-delivery-grid .case-invoice-row { grid-template-columns: 1fr; }
.case-delivery-grid .case-invoice-row > strong { justify-self: start; }
}

.document-verification-exceptions {
    margin: 20px 0 24px;
    padding: 22px 24px;
    border: 1px solid #e7d2a9;
    border-left: 5px solid #bd8732;
    border-radius: 17px;
    background: linear-gradient(115deg, #fff8eb, #fffdf8 58%, #fff);
    box-shadow: 0 8px 24px rgba(100, 70, 25, .06);
}
.document-verification-exceptions h3 { margin: 0 0 16px; color: #714911; font-size: 1.15rem; }
.document-verification-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.document-verification-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-height: 78px; padding: 15px 17px; border: 1px solid #eadbbd;
    border-radius: 12px; background: #fff; text-decoration: none; color: #0b3048;
}
.document-verification-list a:only-child { grid-column: 1 / -1; }
.document-verification-list a:hover, .document-verification-list a:focus-visible { border-color: #bd8732; box-shadow: 0 4px 16px rgba(100, 70, 25, .1); }
.document-verification-list a span { display: grid; gap: 4px; min-width: 0; }
.document-verification-list a strong { font-size: .96rem; line-height: 1.35; }
.document-verification-list a small { font-size: .8rem; color: #617c8d; line-height: 1.4; }
.document-verification-list a em { flex: none; padding: 6px 9px; border-radius: 999px; background: #fff3dd; color: #895b16; font-size: .76rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.document-priority-upload-link {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 16px;
    padding: 9px 13px; border: 1px solid #a9cfdf; border-radius: 10px;
    background: #f2f9fc; color: #115b7c; font-size: .88rem; font-weight: 800; text-decoration: none;
}
.document-priority-upload-link:hover, .document-priority-upload-link:focus-visible { border-color: #5797b3; background: #e7f4f9; }
.document-priority-upload-link span { font-size: 1.15rem; line-height: 1; }
.document-verification-exceptions + .document-admin-intake { margin-top: 12px; }
@media (max-width: 640px) {
    .document-verification-exceptions { padding: 18px; }
    .document-verification-list { grid-template-columns: 1fr; }
    .document-verification-list a { align-items: flex-start; flex-direction: column; min-height: 0; }
}
.document-upload-duplicate-notice{margin:14px 0;padding:15px 18px;border:1px solid #e9cc95;border-radius:13px;background:#fff9ee;color:#805713;font-size:.88rem;line-height:1.5}
.document-upload-duplicate-notice[hidden]{display:none}
.document-free-upload{display:grid;grid-template-columns:minmax(0,.9fr) minmax(300px,1.1fr);gap:18px;align-items:start;padding:24px;margin:20px 0 27px;border:1px solid #cae0e9;border-radius:20px;background:linear-gradient(130deg,#f7fbfd,#fff);box-shadow:0 12px 35px #0b30480b}
.document-free-upload-intro{grid-column:1;grid-row:1;align-self:center;min-width:0;padding:6px 4px}
.document-free-upload>.category-upload-form{grid-column:2;grid-row:1;min-width:0;align-self:stretch}
.document-free-upload>.personalized-document-list{grid-column:1/-1;grid-row:2;min-width:0;margin:0}
.document-free-upload h2{margin:3px 0 9px;color:#0b3048;font-size:1.4rem}
.document-free-upload p:not(.eyebrow){max-width:53ch;margin:0;color:#5d7888;line-height:1.6;font-size:.9rem}
.document-free-upload .category-dropzone{min-height:135px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-style:dashed;border-color:#9fc2d1;background:#fff}
.document-free-upload .category-dropzone span{color:#0d6189;font-size:1rem}
/* A slow highlight guides the eye to the simplified upload without competing with its content. */
.document-free-upload .category-dropzone{
    position:relative;
    isolation:isolate;
    min-height:155px;
    padding:24px;
    border:2px solid transparent;
    border-radius:18px;
    background:linear-gradient(145deg,#fff 22%,#f8fcfd) padding-box,
        linear-gradient(105deg,#b4d5df,#348dac,#d1aa73,#338fa9,#b4d5df) border-box;
    background-size:100% 100%,260% 100%;
    background-position:0 0,0 50%;
    box-shadow:0 12px 28px rgba(20,76,99,.075),inset 0 0 0 1px rgba(255,255,255,.8);
    animation:simplified-upload-border 9s ease-in-out infinite alternate;
    transition:box-shadow .2s ease,transform .2s ease;
}
.document-free-upload .category-dropzone:hover,
.document-free-upload .category-dropzone:focus-within{
    transform:translateY(-1px);
    box-shadow:0 16px 34px rgba(20,76,99,.13),0 0 0 4px rgba(98,170,191,.12);
}
.document-free-upload .category-dropzone.is-guided{
    border-color:#318da8;
    background:linear-gradient(145deg,#f5fbfd,#fff);
    box-shadow:0 0 0 6px rgba(49,141,168,.17),0 18px 36px rgba(20,76,99,.16);
    animation:upload-dropzone-guide 1.6s ease-out 1;
}
@keyframes upload-dropzone-guide{
    0%{box-shadow:0 0 0 0 rgba(49,141,168,.24),0 12px 28px rgba(20,76,99,.075)}
    55%{box-shadow:0 0 0 9px rgba(49,141,168,.19),0 18px 36px rgba(20,76,99,.16)}
    100%{box-shadow:0 0 0 6px rgba(49,141,168,.17),0 18px 36px rgba(20,76,99,.16)}
}
.document-free-upload .category-dropzone span{color:#095b7d;font-size:clamp(1rem,1.3vw,1.13rem);line-height:1.3}
.document-free-upload .category-dropzone small{margin-top:3px;line-height:1.45}
.document-free-upload .category-dropzone input[type=file]{
    display:block;
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:0;
    overflow:hidden;
    opacity:0;
    clip-path:inset(50%);
}
.document-free-upload .category-dropzone.dragging{
    animation:none;
    background:linear-gradient(#f0faf8,#f0faf8) padding-box,linear-gradient(110deg,#258f90,#61b9a7) border-box;
    box-shadow:0 0 0 5px rgba(70,166,154,.16),0 18px 36px rgba(20,76,99,.12);
}
.document-free-upload .category-upload-form.is-uploading .category-dropzone{animation:none;transform:none}
@keyframes simplified-upload-border{
    from{background-position:0 0,0 50%}
    to{background-position:0 0,100% 50%}
}
.document-camera-action{position:relative;display:none;align-items:center;justify-content:center;min-height:48px;margin-top:10px;padding:10px 16px;border:1px solid #9fc2d1;border-radius:12px;background:#eef7fb;color:#0d6189;font-weight:800;text-align:center;cursor:pointer}
.document-camera-action input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.document-camera-action:focus-within{outline:3px solid #86c5df;outline-offset:2px}
.document-free-uploaded,.document-free-upload-note{grid-column:1/-1}
.document-free-uploaded>strong{display:block;color:#0b3048;margin-bottom:8px;font-size:.85rem}
.document-free-upload-note{color:#637d8b;line-height:1.5}
@media(max-width:760px){.document-free-upload{grid-template-columns:1fr;padding:19px;gap:16px}.document-free-upload-intro{grid-column:1;grid-row:1;padding:0}.document-free-upload>.category-upload-form{grid-column:1;grid-row:2}.document-free-upload>.personalized-document-list{grid-column:1;grid-row:3}}
@media(max-width:760px){.document-free-upload .category-dropzone{min-height:150px;padding:22px 18px}}
@media(max-width:760px), (max-width:1024px) and (pointer:coarse){.document-camera-action{display:flex}}
@media(prefers-reduced-motion:reduce){.document-free-upload .category-dropzone{animation:none;transition:none}.document-free-upload .category-dropzone:hover,.document-free-upload .category-dropzone:focus-within{transform:none}.document-free-upload .category-dropzone.is-guided{animation:none}}
.upload-wait-progress,.file-upload-progress{width:100%;display:grid;gap:7px;color:#526f81;font-size:.78rem}
.upload-wait-progress[hidden],.file-upload-progress[hidden]{display:none}
.upload-wait-progress [role="progressbar"],.file-upload-progress [role="progressbar"]{display:block;height:8px;width:100%;overflow:hidden;border-radius:999px;background:#deebf1}
.upload-wait-progress i,.file-upload-progress i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#0b6c9a,#258a69);transition:width .16s ease}
.upload-file-status{display:grid;gap:6px;max-height:240px;overflow:auto;margin:10px 0;padding:0;list-style:none}
.upload-file-status li{display:flex;justify-content:space-between;gap:14px;padding:8px 11px;border:1px solid #d9e6eb;border-radius:9px;background:#f7fafb;color:#24465b;font-size:.82rem}
.upload-file-status li span{overflow-wrap:anywhere;min-width:0}
.upload-file-status li strong{flex:0 0 auto;color:#527084}
.upload-file-status li.is-success strong{color:#177857}
.upload-file-status li.is-error{background:#fff8f7;border-color:#efcec8}
.upload-file-status li.is-error strong{color:#a43e37;max-width:50%;overflow-wrap:anywhere}
@media(max-width:640px){.upload-file-status li{display:grid;gap:3px}.upload-file-status li.is-error strong{max-width:none}}

.client-import-page{max-width:1600px}
.client-import-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:30px;padding:36px 40px;margin:0 0 24px;border:1px solid #d4e4e9;border-radius:25px;background:linear-gradient(120deg,#f3f9fb 0%,#fff 62%,#fbf7ef 100%);box-shadow:0 18px 42px #0b30480c}
.client-import-hero h1{margin:8px 0 12px;color:#0b3048;font-size:clamp(2rem,3.3vw,3.2rem);letter-spacing:-.035em}
.client-import-hero p:not(.eyebrow){max-width:72ch;margin:0;color:#567486;line-height:1.6}
.client-import-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.client-import-choice{display:grid;align-content:start;gap:13px;padding:31px;border:1px solid #d3e5e9;border-radius:22px;background:linear-gradient(150deg,#fff 40%,#f2f9fa);box-shadow:0 12px 34px #0b30480c}
.client-import-choice.is-cabinet{background:linear-gradient(150deg,#fff 40%,#f9f4ec)}
.client-import-choice-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#e8f4f6;color:#0b7190;font-size:29px;font-weight:700}
.client-import-choice.is-cabinet .client-import-choice-icon{background:#f5ead7;color:#a8762c}
.client-import-choice h2{margin:0;color:#0b3048;font-size:1.48rem;line-height:1.25}
.client-import-choice p{margin:0 0 5px;color:#5d7888;line-height:1.55}
.client-import-choice label{display:grid;gap:8px;font-weight:700;color:#1d4359}
.client-import-choice input[type=file]{width:100%;padding:13px;border:1px dashed #bad3dc;border-radius:11px;background:#fff;color:#34566b;font:inherit}
.client-import-choice .btn{justify-self:start;margin-top:6px}
.client-import-template-link{margin:14px 2px 30px;color:#5e7a89;font-size:.88rem}
.client-import-section{margin:20px 0;padding:27px 30px;border-radius:20px}
.client-import-section .section-title-row{align-items:flex-start;margin-bottom:22px}
.client-import-section h2{margin:3px 0 7px;font-size:1.55rem;color:#0b3048}
.client-import-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.client-import-stats>div{display:grid;gap:2px;padding:18px 21px;border:1px solid #dce9ed;border-radius:14px;background:#f7fafb}
.client-import-stats strong{color:#0c5575;font-size:1.9rem;line-height:1.15}
.client-import-stats span{color:#627e8d;font-size:.85rem}
.client-import-ready-action{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px;padding:18px 20px;border:1px solid #cde6da;border-radius:14px;background:#f3faf6}
.client-import-ready-action p{margin:0;color:#526f64;line-height:1.55}
.client-import-ready-action strong{color:#175c45}
.client-import-review-list{display:grid;gap:13px}
.client-import-review-row{padding:18px;border:1px solid #e3e8eb;border-radius:14px;background:#fbfcfc}
.client-import-row-title{display:flex;gap:16px;align-items:center;margin-bottom:13px;color:#5e7786}
.client-import-row-title strong{color:#0b3048}
.client-import-review-fields{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px}
.client-import-review-fields label,.client-import-preview-panel>label{display:grid;gap:6px;color:#26485d;font-size:.84rem;font-weight:700}
.client-import-review-fields input,.client-import-preview-panel>label input{width:100%;padding:10px 12px;border:1px solid #ccdfe7;border-radius:9px;background:#fff;font:inherit;color:#0b3048}
.client-import-row-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.client-import-mail-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:25px;align-items:start}
.client-import-preview-panel{display:grid;gap:15px}
.client-import-mail-preview{overflow:hidden;border:1px solid #d8e5e9;border-radius:18px;background:#fff;box-shadow:0 12px 35px #0b304812}
.client-import-mail-brand{display:grid;gap:3px;padding:27px 32px;border-top:5px solid #c59447;border-bottom:1px solid #e5edf0;color:#0b3048}
.client-import-mail-brand strong{font-size:1.45rem}
.client-import-mail-brand small{color:#718795}
.client-import-mail-body{padding:32px;color:#264b60;line-height:1.65}
.client-import-mail-body h3{margin:5px 0 20px;color:#0b3048;font-size:1.85rem}
.client-import-editable{min-height:200px;padding:13px 15px;margin:0 -15px 20px;border:1px dashed #bed7e1;border-radius:12px;background:#f9fcfd;white-space:pre-wrap;outline:none}
.client-import-editable:focus{border-color:#12829b;box-shadow:0 0 0 3px #12829b1c}
.client-import-email-button{display:inline-block;padding:12px 19px;border-radius:9px;background:#0b6c95;color:#fff;font-weight:700}
.client-import-mail-small{font-size:.78rem;color:#698291;line-height:1.55}
.client-import-mail-footer{padding:19px 32px;border-top:1px solid #e5edf0;color:#234a60;font-size:.9rem;font-weight:700}
.client-import-recipients{padding:24px;border:1px solid #dbe8ec;border-radius:17px;background:#f7fafb}
.client-import-recipients h3{margin:0 0 6px;color:#0b3048}
.client-import-recipients>p{margin:0 0 17px;color:#627d8b;line-height:1.5}
.client-import-recipient-list{display:grid;gap:5px;max-height:345px;overflow:auto;padding:5px}
.client-import-recipient-list label{display:flex;gap:10px;align-items:flex-start;padding:10px;border-radius:10px;background:#fff;color:#143b50}
.client-import-recipient-list input{margin-top:4px}
.client-import-recipient-list span{display:grid;gap:3px;min-width:0}
.client-import-recipient-list small{font-size:.75rem;color:#6a8390;overflow-wrap:anywhere}
.client-import-consent{display:flex;gap:10px;align-items:flex-start;margin:21px 0;color:#34596d;font-size:.85rem;line-height:1.45}
.client-import-consent input{margin-top:4px}
.client-import-recipients>.btn{width:100%}
.client-import-recipients>.muted{margin:12px 0 0;font-size:.78rem}
.client-import-pending{padding:11px 13px;border:1px solid #e7d5a7;border-radius:9px;background:#fffaec;color:#765922!important;font-size:.84rem}
.client-import-email-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:18px;color:#557486}
.cockpit-panel-details{overflow:visible;padding:0}
.cockpit-panel-details>summary{display:flex;align-items:center;justify-content:space-between;gap:20px;list-style:none;cursor:pointer;padding:29px 34px;margin:0}
.cockpit-panel-details>summary::-webkit-details-marker{display:none}
.cockpit-panel-details>summary>span:first-child{display:grid;gap:5px}
.cockpit-panel-details>summary .eyebrow{margin:0}
.cockpit-panel-details>summary strong{font-size:clamp(1.5rem,2vw,2rem);color:var(--ink);line-height:1.15}
.cockpit-summary-side{display:flex;align-items:center;gap:16px;color:var(--muted)}
.cockpit-summary-side small{font-size:.85rem;font-weight:700}
.cockpit-panel-details[open]>summary .collapse-arrow{transform:rotate(90deg);background:#e5f3fa}
.cockpit-panel-content{padding:0 34px 30px}
.cockpit-list-search{display:grid;gap:8px;max-width:710px;margin:0 0 20px}
.cockpit-list-search label{font-size:.82rem;font-weight:800;color:#4d6e80}
.cockpit-list-search>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cockpit-list-search input{min-width:240px;flex:1;padding:11px 14px;border:1px solid #cfe0e8;border-radius:11px;background:#fff;color:var(--ink);font:inherit}
.cockpit-list-search input:focus{outline:3px solid #0b79a024;border-color:#54a4bf}
.cockpit-table-scroll{overflow-x:auto}
.cockpit-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:17px;color:#597688;font-size:.87rem}
.cockpit-pagination nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.cockpit-page-link{display:grid;place-items:center;min-width:34px;height:34px;border:1px solid #d5e5ec;border-radius:9px;background:#fff;color:#315c75;text-decoration:none;font-weight:800}
.cockpit-page-link.active{border-color:#0b7199;background:#0b7199;color:#fff}
@media(max-width:620px){.cockpit-panel-details>summary{padding:22px}.cockpit-summary-side small{display:none}.cockpit-panel-content{padding:0 18px 23px}.cockpit-list-search input{min-width:0;width:100%}}
.admin-home-dashboard{grid-template-columns:minmax(0,1fr)}
.admin-home-dashboard .cockpit-panel-details{min-width:0;border-color:#d8e8ed;border-radius:23px;background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);box-shadow:0 18px 48px rgba(23,65,88,.06)}
.admin-home-dashboard .cockpit-panel-details>summary{padding:28px 32px 24px}
.admin-home-dashboard .cockpit-panel-content{min-width:0;padding:0 32px 32px}
.admin-home-dashboard .cockpit-list-search{max-width:none;margin:0 0 19px;padding:20px;border:1px solid #e3edf1;border-radius:17px;background:#f6fafb}
.admin-home-dashboard .cockpit-list-search label{color:#3d6275;font-size:.78rem;letter-spacing:.02em}
.admin-home-dashboard .cockpit-list-search>div{gap:10px}
.admin-home-dashboard .cockpit-list-search input{min-height:44px;border-color:#cfdee5;box-shadow:0 2px 8px rgba(19,67,91,.025)}
.admin-home-dashboard .cockpit-list-search .btn{min-height:44px}
.admin-home-dashboard .cockpit-priority-strip{min-width:0;gap:8px;margin:0 0 21px}
.admin-home-dashboard .cockpit-priority-strip a{padding:8px 13px;border-color:#d7e5eb;background:#fff;color:#506f7e;font-size:.78rem;font-weight:800;line-height:1.25}
.admin-home-dashboard .cockpit-priority-strip a.active{border-color:#8dc2d7;background:#e9f5f9;color:#11597a;box-shadow:0 5px 14px rgba(18,105,152,.08)}
.cockpit-case-list{display:grid;min-width:0;gap:15px}
.cockpit-case-card{position:relative;overflow:hidden;padding:23px 25px 16px;border:1px solid #d4e5eb;border-radius:21px;background:linear-gradient(110deg,#fff 0%,#fff 62%,#f7fbfc 100%);box-shadow:0 9px 27px rgba(24,66,85,.045);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.cockpit-case-card::before{position:absolute;inset:0 auto 0 0;width:5px;background:#76a5ba;content:""}
.cockpit-case-card.tone-danger::before{background:#c96b68}
.cockpit-case-card.tone-warning::before{background:#d2a156}
.cockpit-case-card.tone-review::before{background:#5d98b2}
.cockpit-case-card.tone-success::before{background:#5ea583}
.cockpit-case-card.tone-neutral::before{background:#9aadb7}
.cockpit-case-card:hover{transform:translateY(-1px);border-color:#aacddc;box-shadow:0 16px 34px rgba(24,66,85,.09)}
.cockpit-case-card:focus-visible,.cockpit-case-empty:focus-visible{outline:3px solid #83bad1;outline-offset:3px}
.cockpit-case-main{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(245px,.88fr);gap:22px;align-items:center}
.cockpit-case-identity{min-width:0;padding-left:7px}
.cockpit-case-kicker{display:block;margin-bottom:8px;color:#678495;font-size:.72rem;font-weight:850;letter-spacing:.055em;text-transform:uppercase}
.cockpit-case-kicker span{margin:0 3px;color:#9bb0ba}
.cockpit-case-identity h3{margin:0 0 5px;color:#123750;font-size:clamp(1.25rem,1.45vw,1.55rem);line-height:1.2;letter-spacing:-.025em}
.cockpit-case-identity p{margin:3px 0 0;color:#648093;font-size:.88rem;line-height:1.35;overflow-wrap:anywhere}
.cockpit-case-focus{display:grid;align-content:center;justify-items:start;gap:5px;min-width:0;min-height:93px;padding-left:25px;border-left:1px solid #dce8ed}
.cockpit-case-focus>span:first-child{color:#6b8492;font-size:.72rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}
.cockpit-case-focus strong{color:#165879;font-size:clamp(1.05rem,1.25vw,1.27rem);line-height:1.3}
.cockpit-case-card.tone-warning .cockpit-case-focus strong{color:#966015}
.cockpit-case-card.tone-danger .cockpit-case-focus strong{color:#a84949}
.cockpit-case-card.tone-success .cockpit-case-focus strong{color:#267251}
.cockpit-case-focus .cockpit-case-open{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:40px;margin-top:10px;padding:8px 10px 8px 15px;border:1px solid #0b618a;border-radius:10px;background:linear-gradient(135deg,#0c719c,#09577f);box-shadow:0 5px 13px rgba(8,88,129,.17);color:#fff;font-size:.84rem;font-weight:850;line-height:1.2;text-decoration:none;transition:background .18s ease,box-shadow .18s ease,transform .18s ease}
.cockpit-case-focus .cockpit-case-open:hover{background:linear-gradient(135deg,#095e87,#07496e);box-shadow:0 8px 17px rgba(8,88,129,.22);transform:translateY(-1px)}
.cockpit-case-focus .cockpit-case-open:focus-visible{outline:3px solid #83bad1;outline-offset:3px}
.cockpit-case-focus .cockpit-case-open span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:rgba(255,255,255,.18);font-size:17px;line-height:1}
.cockpit-case-context{display:flex;flex-wrap:wrap;gap:7px;margin-top:21px;padding:16px 0;border-top:1px solid #e5eef1;border-bottom:1px solid #e5eef1}
.cockpit-case-context>span{display:inline-flex;align-items:center;min-height:29px;padding:5px 10px;border-radius:8px;background:#eef4f6;color:#4e6c7b;font-size:.78rem;font-weight:800;line-height:1.25}
.cockpit-case-context>.is-success{background:#e8f6ee;color:#1d805a}
.cockpit-case-context>.is-warning,.cockpit-case-context>.is-attention{background:#fff4e6;color:#98611d}
.cockpit-case-context>.is-review{background:#eaf3f7;color:#226785}
.cockpit-case-context>.is-urgent{background:#fff0f0;color:#ac3f43}
.cockpit-case-context>.is-express{background:#f7f0e6;color:#8b611d}
.cockpit-case-context>.is-muted{background:#eff3f5;color:#647985}
.cockpit-case-footer{display:flex;align-items:end;justify-content:space-between;gap:14px;min-height:62px;padding:14px 0 0}
.cockpit-case-footer .cockpit-assign-form{display:flex;align-items:center;gap:10px;min-width:0;margin:0}
.cockpit-case-footer .cockpit-assign-form label{color:#68808d;font-size:.75rem;font-weight:800;white-space:nowrap}
.cockpit-case-footer .cockpit-assign-form select{width:auto;max-width:min(240px,52vw);min-height:37px;padding:6px 10px;border-color:#d3e2e8;border-radius:9px;background:#fff;color:#244c61;font-size:.8rem}
.cockpit-case-quick-action form{margin:0}
.cockpit-case-quick-action .btn{min-height:37px;padding:7px 13px;border-radius:9px;font-size:.8rem;white-space:nowrap}
.cockpit-case-empty{display:grid;justify-items:start;gap:6px;padding:28px;border:1px dashed #c5dce6;border-radius:18px;background:#f8fbfc;color:#244b5e}
.cockpit-case-empty strong{font-size:1.1rem}
.cockpit-case-empty p{margin:0 0 7px;color:#638091}
.cockpit-case-card.dashboard-search-result.is-search-arrival,.cockpit-case-empty.dashboard-search-result.is-search-arrival{animation:cockpit-card-arrival 2.2s ease-out}
@keyframes cockpit-card-arrival{0%,30%{border-color:#65afc7;box-shadow:0 0 0 5px rgba(66,165,196,.15)}100%{border-color:#d4e5eb;box-shadow:0 9px 27px rgba(24,66,85,.045)}}
@media(max-width:820px){.cockpit-case-main{grid-template-columns:1fr;gap:15px}.cockpit-case-focus{min-height:0;margin-left:7px;padding:0;border:0}.cockpit-case-footer{align-items:start}}
@media(max-width:620px){.admin-home-dashboard .cockpit-panel-details>summary{padding:22px 20px}.admin-home-dashboard .cockpit-panel-content{padding:0 17px 24px}.admin-home-dashboard .cockpit-list-search{padding:15px}.admin-home-dashboard .cockpit-list-search>div{display:grid;grid-template-columns:minmax(0,1fr)}.admin-home-dashboard .cockpit-list-search input,.admin-home-dashboard .cockpit-list-search>div>.btn{width:100%;min-width:0}.admin-home-dashboard .cockpit-priority-strip{flex-wrap:nowrap;overflow-x:auto;padding-bottom:9px;scrollbar-width:thin;scroll-snap-type:x proximity}.admin-home-dashboard .cockpit-priority-strip a{flex:none;white-space:nowrap;scroll-snap-align:start}.cockpit-case-card{padding:19px 17px 15px}.cockpit-case-identity{padding-left:5px}.cockpit-case-focus{margin-left:5px}.cockpit-case-footer{flex-wrap:wrap}.cockpit-case-footer .cockpit-assign-form{width:100%;justify-content:space-between}.cockpit-case-footer .cockpit-assign-form select{width:min(230px,64%);max-width:none}.cockpit-case-quick-action,.cockpit-case-quick-action form,.cockpit-case-quick-action .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.cockpit-case-card{transition:none}.cockpit-case-card:hover{transform:none}.cockpit-case-card.dashboard-search-result.is-search-arrival,.cockpit-case-empty.dashboard-search-result.is-search-arrival{animation:none}}
.client-import-result-details>summary{display:flex;justify-content:space-between;align-items:center;gap:20px;cursor:pointer;color:#5b7888}
.client-import-result-details>summary>span:first-child{display:grid;gap:3px}
.client-import-result-details>summary strong{font-size:1.2rem;color:#0b3048}
.client-import-result-details[open]>summary{margin-bottom:22px}
.client-import-table-wrap{overflow:auto}
.client-import-table-wrap table{width:100%;min-width:720px}
.client-import-table-wrap small{color:#69828f}
.client-import-table-wrap td form{margin-top:7px}
.client-import-batch-list{display:grid;gap:8px}
.client-import-batch-list a{display:grid;gap:4px;padding:12px 15px;border:1px solid #e0e9ed;border-radius:10px;text-decoration:none;background:#f9fbfc;color:#0b587c}
.client-import-batch-list small{color:#607e8b}
@media(max-width:900px){.client-import-choices,.client-import-mail-grid{grid-template-columns:1fr}.client-import-review-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.client-import-hero,.client-import-ready-action{display:grid}.client-import-hero,.client-import-choice,.client-import-section{padding:20px}.client-import-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.client-import-review-fields{grid-template-columns:1fr}}
/* Vaud intake: the list explains requirements, it is not a category picker. */
.document-list-automatic .document-select-card { cursor: default; }
.document-list-automatic .document-select-card input { pointer-events: none; }
.housing-fields { align-items: start; }
.housing-status-field, .rent-field { min-width: 0; align-self: start; }
.rent-field { display: grid; align-content: start; gap: 12px; }
.rent-field[hidden], .rent-amount-wrap[hidden] { display: none; }
.rent-field.is-unknown { padding: 14px; border: 1px solid #cfe4ed; border-radius: 14px; background: linear-gradient(135deg, #f5fafc, #fff); }
.rent-unknown-choice { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 12px 14px; border: 1px solid #dce8ee; border-radius: 11px; background: #fff; color: #153c53; font-weight: 700; line-height: 1.35; cursor: pointer; }
.rent-unknown-choice:hover { border-color: #a6ccdc; }
.rent-unknown-choice:focus-within { outline: 3px solid rgba(39, 130, 172, .22); outline-offset: 2px; }
.rent-unknown-choice input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: #126c92; }
.rent-field.is-unknown .rent-unknown-choice { border-color: #a9d0df; background: #eef7fa; }
.rent-unknown-hint { margin: 0; padding: 2px 3px 2px 14px; border-left: 3px solid #8abfd2; color: #536f80; font-size: 14px; line-height: 1.45; }
.rent-unknown-hint strong { display: block; margin-bottom: 3px; color: #123b53; font-size: 14px; }
.rent-unknown-hint p { margin: 0; }
.rent-unknown-choice[hidden], .rent-unknown-hint[hidden] { display: none; }
.dynamic-row.estate-row { container-type: inline-size; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; padding: clamp(16px, 2vw, 22px); border-color: #d7e7ee; border-radius: 16px; background: linear-gradient(135deg, #f8fbfd, #fff); }
.estate-row-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; }
.estate-row-head > strong { color: #123b53; font-size: 17px; }
.estate-nature-field { width: min(100%, 350px); color: #476879; font-size: 13px; }
.estate-domicile-choice { display: flex; align-items: center; gap: 11px; width: fit-content; max-width: 100%; padding: 11px 14px; border: 1px solid #cbdfe8; border-radius: 11px; background: #fff; color: #164862; font-weight: 750; cursor: pointer; }
.estate-domicile-choice:hover { border-color: #91c2d5; background: #f5fafc; }
.estate-domicile-choice:focus-within { outline: 3px solid rgba(39, 130, 172, .2); outline-offset: 2px; }
.dynamic-row.estate-row .estate-domicile-choice input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: #126c92; }
.estate-domicile-choice[hidden], .estate-address-fields[hidden], .estate-domicile-address[hidden] { display: none; }
.estate-domicile-address { display: grid; gap: 3px; padding: 11px 14px; border-left: 3px solid #65a7c2; border-radius: 0 9px 9px 0; background: #eef7fa; color: #4d6f80; font-size: 13px; }
.estate-domicile-address strong { color: #123b53; }
.estate-address-fields { display: grid; grid-template-columns: minmax(160px, 1.5fr) minmax(84px, .55fr) minmax(98px, .72fr) minmax(150px, 1.2fr) minmax(145px, 1fr); gap: 12px; align-items: start; }
.estate-address-fields label { min-width: 0; color: #476879; font-size: 13px; }
.housing-estate-line.is-tax-domicile { border-color: #b9dbe7; background: #f5fbfd; }
.housing-estate-line .estate-domicile-tag { margin-top: 4px; color: #176487; font-size: 11px; font-weight: 850; }
@container (max-width: 900px) { .estate-address-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } .estate-address-fields label:first-child, .estate-address-fields label:nth-child(4), .estate-address-fields label:nth-child(5) { grid-column: span 2; } }
@container (max-width: 570px) { .estate-address-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .estate-address-fields label:first-child, .estate-address-fields label:nth-child(4), .estate-address-fields label:nth-child(5) { grid-column: 1 / -1; } }
@container (max-width: 390px) { .estate-address-fields { grid-template-columns: minmax(0, 1fr); } .estate-address-fields label { grid-column: auto; } }
@media (max-width: 620px) { .estate-row-head { display: grid; align-items: start; } .estate-nature-field { width: 100%; } }
.alimony-details { margin-top: 1rem; padding: 1.1rem; border: 1px solid #d6e7ed; border-radius: 16px; background: #f7fbfc; }
.alimony-details > strong { display: block; margin-bottom: .8rem; color: #12374e; }
.alimony-details-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.alimony-details-heading strong { color: #12374e; font-size: 17px; }
.alimony-details-heading span { color: #176487; font-size: 13px; font-weight: 800; }
.alimony-person-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(112px, .45fr) minmax(0, 1fr); gap: 12px; }
.alimony-person-grid label, .alimony-period-grid label, .alimony-concerned-field { min-width: 0; }
.alimony-period-grid { margin-top: 14px; }
.alimony-concerned-field { display: block; margin-top: 14px; }
.alimony-concerned-field span { color: #698494; font-size: .85em; font-weight: 500; }
.alimony-concerned-field input { max-width: 620px; }
@media (max-width: 850px) { .alimony-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .alimony-person-grid { grid-template-columns: 1fr; } }
.personalized-document-list { margin: 1.25rem 0; padding: 1.25rem; border: 1px solid #d5e6ec; border-radius: 18px; background: #fff; }
.personalized-document-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: .85rem; }
.personalized-document-list-head strong { color: #123b53; }
.personalized-document-list-head small, .personalized-document-list > p { color: #617e8e; }
.personalized-document-list ul { list-style: none; padding: 0; margin: 0; }
.personalized-document-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid #e9f0f3; }
.personalized-document-list li span { font-weight: 600; color: #173f55; }
.personalized-document-list li em { font-style: normal; white-space: nowrap; font-size: .85rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px; background: #fbf1e4; color: #92601d; }
.personalized-document-list li em.checking { background: #e8f2f8; color: #1b6487; }
.personalized-document-list li em.validated { background: #e7f5ed; color: #1d7954; }
.personalized-document-list > p { margin: .9rem 0 0; font-size: .88rem; }
.document-free-upload .personalized-document-list { padding: 20px; }
.document-free-upload .personalized-document-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.document-free-upload .personalized-document-list li { min-width: 0; min-height: 62px; padding: 10px 13px; border: 1px solid #e2ecf0; border-radius: 10px; background: #fbfdfe; }
.document-free-upload .personalized-document-list li span { min-width: 0; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.35; }
.document-free-upload .personalized-document-list li em { flex: none; font-size: .76rem; }
.document-free-upload .personalized-document-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 880px) { .document-free-upload .personalized-document-list ul { grid-template-columns: 1fr; } }
.document-journey-note { margin: 1rem 0; color: #5b7788; }
.document-admin-intake { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(300px, 1.1fr); align-items: center; gap: 1.5rem; margin: 1.25rem 0; padding: 1.5rem; border: 1px solid #b9d7e4; border-radius: 20px; background: linear-gradient(135deg, #f1f8fb, #fff); scroll-margin-top: 100px; }
.document-admin-intake:target { outline: 3px solid rgba(38, 128, 169, .28); outline-offset: 3px; }
.document-admin-intake strong { display: block; color: #123b53; font-size: 1.2rem; }
.document-admin-intake p:not(.eyebrow) { color: #607d8d; margin: .4rem 0 0; }
.document-admin-intake .category-dropzone { min-height: 120px; margin: 0; border: 2px dashed #6cadc9; background: #fff; }
.document-admin-intake .category-dropzone:hover, .document-admin-intake .category-dropzone:focus-within { border-color: #247da5; background: #f5fbfe; }
@media (max-width: 700px) { .personalized-document-list li { align-items: flex-start; flex-direction: column; gap: .35rem; } }
@media (max-width: 800px) { .document-admin-intake { grid-template-columns: 1fr; } }

/* A calm, readable checklist before the case exists. Uploads happen in the case itself. */
.document-checklist-step { gap: 20px; }
.document-checklist-intro {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 24px 28px; border: 1px solid #cfe2ec; border-radius: 20px;
    background: linear-gradient(115deg, #eef7fb 0%, #f8fcfd 58%, #fff 100%);
}
.document-checklist-intro .eyebrow { margin: 0 0 5px; }
.document-checklist-intro strong { display: block; color: #10374f; font-size: clamp(21px, 2.1vw, 29px); line-height: 1.2; }
.document-checklist-intro p { max-width: 66ch; margin: 8px 0 0; color: #557387; line-height: 1.55; }
.document-checklist-intro .document-personal-count { flex: 0 0 auto; margin: 0; padding: 11px 15px; font-size: 14px; }
.document-checklist-reassurance {
    position: relative; overflow: hidden;
    display: flex; gap: 16px; align-items: flex-start; padding: 20px 23px;
    border: 1px solid #c6e3d6; border-radius: 17px;
    background: linear-gradient(110deg, #ecf8f2, #f9fdfb);
}
.document-checklist-reassurance::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0; bottom: 0; left: -42%; width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
    transform: skewX(-16deg);
    animation: documentChecklistGlimmer 8s ease-in-out infinite;
    pointer-events: none;
}
.document-checklist-reassurance > span,
.document-checklist-reassurance > div { position: relative; z-index: 1; }
.document-checklist-reassurance > span { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: #d8f0e3; color: #187952; font-weight: 900; }
.document-checklist-reassurance strong { color: #176b4a; font-size: 18px; }
.document-checklist-reassurance p { margin: 5px 0 0; color: #496e60; line-height: 1.5; }
@keyframes documentChecklistGlimmer {
    0%, 60% { transform: translateX(0) skewX(-16deg); opacity: 0; }
    66% { opacity: .65; }
    92%, 100% { transform: translateX(440%) skewX(-16deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .document-checklist-reassurance::before { animation: none; }
}
.document-checklist-step .document-select-data { display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; }
.document-checklist-step .document-select-group {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    padding: 21px; border: 1px solid #dce8ee; border-radius: 19px;
    background: #fff; box-shadow: 0 12px 32px rgba(14, 62, 85, .04);
}
.document-checklist-step .document-select-group[hidden],
.document-checklist-step .document-select-card[hidden] { display: none; }
.document-checklist-step .document-select-group h3 { margin: 0 0 6px; font-size: 17px; color: #214c63; }
.document-checklist-step .document-select-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 14px 15px; border: 1px solid #e4edf1; border-radius: 12px; background: #f9fcfd;
}
.document-checklist-step .document-select-card:not(.is-selected) { display: none; }
.document-checklist-step .document-select-card strong { grid-column: 1; grid-row: 1; line-height: 1.35; font-size: 15px; }
.document-checklist-step .document-select-card span { grid-column: 2; grid-row: 1; white-space: nowrap; }
.document-checklist-step .document-select-card.obligatoire { background: #f6fafc; border-color: #d6e7ef; }

.case-created-welcome {
    display: grid; gap: 20px; margin-bottom: 30px; padding: 27px 30px;
    border: 1px solid #c9e1e9; border-top: 4px solid #ba8c43; border-radius: 20px;
    background: linear-gradient(120deg, #f3fafc, #fff 67%);
    box-shadow: 0 18px 38px rgba(17, 57, 80, .08);
}
.case-created-welcome-copy { display: flex; gap: 20px; align-items: flex-start; }
.case-created-welcome-icon { display: grid; place-items: center; flex: 0 0 50px; width: 50px; height: 50px; border-radius: 15px; background: #e4f5ec; color: #168058; font-size: 27px; font-weight: 900; }
.case-created-welcome .eyebrow { margin: 1px 0 7px; }
.case-created-welcome h1 { margin: 0; color: #10364f; font-size: clamp(25px, 2.6vw, 34px); line-height: 1.2; }
.case-created-welcome-copy p:not(.eyebrow) { max-width: 70ch; margin: 10px 0 0; color: #577487; line-height: 1.55; }
.case-created-welcome address { display: inline-block; margin-top: 15px; padding: 13px 17px; border: 1px solid #dce9ef; border-radius: 12px; background: #fff; color: #173f55; font-style: normal; font-weight: 700; line-height: 1.5; }
.case-created-welcome-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-left: 70px; }
.case-created-later { color: #3e6b80; font-weight: 750; text-underline-offset: 4px; }
.case-created-payment-note { margin: 0 0 0 70px; padding-top: 13px; border-top: 1px solid #e3edf1; color: #587486; font-size: 14px; }
.case-created-payment-note a { margin-left: 5px; color: #12688d; font-weight: 800; }
#depot-libre, #envoi-postal { scroll-margin-top: 115px; }
@media (max-width: 760px) {
    .document-checklist-intro { display: grid; padding: 20px; }
    .document-checklist-intro .document-personal-count { justify-self: start; }
    .document-checklist-step .document-select-group { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .document-checklist-step .document-select-card { padding: 13px; }
    .case-created-welcome { padding: 21px; }
    .case-created-welcome-copy { gap: 12px; }
    .case-created-welcome-icon { flex-basis: 42px; width: 42px; height: 42px; }
    .case-created-welcome-actions, .case-created-payment-note { margin-left: 0; }
    .case-created-welcome-actions .btn { width: 100%; text-align: center; }
}
/* SaaS AI control center: scoped to avoid changing cabinet pages. */
.ai-control-center .saas-admin-card { margin-bottom: 1.25rem; }
.ai-control-center .ai-provider-form + .ai-provider-form { border-top: 1px solid #dbe8e8; margin-top: 1.25rem; padding-top: 1.25rem; }
.ai-control-center .ai-task-section { background: #fff; }
.ai-control-center .ai-task-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid #e7edf0; }
.ai-control-center .ai-task-section-heading .eyebrow { margin: 0 0 7px; color: #168b8a; font-size: 11px; letter-spacing: .1em; }
.ai-control-center .ai-task-section-heading h2 { margin: 0; color: #14364b; font-size: clamp(24px, 2vw, 29px); letter-spacing: -.035em; }
.ai-control-center .ai-task-section-heading p:not(.eyebrow) { max-width: 690px; margin: 9px 0 0; color: #657b89; font-size: 13px; line-height: 1.55; }
.ai-control-center .ai-task-section-count { flex: none; padding: 9px 13px; border: 1px solid #cfe5e3; border-radius: 999px; background: #f1faf8; color: #167b77; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ai-control-center .ai-task-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 27px 0 13px; }
.ai-control-center .ai-task-group-head h3 { margin: 0; color: #193c4f; font-size: 16px; letter-spacing: -.015em; }
.ai-control-center .ai-task-group-head p { margin: 0; color: #718592; font-size: 12px; line-height: 1.45; }
.ai-control-center .ai-task-policy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.ai-control-center .ai-task-policy-list.is-locked-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ai-control-center .ai-task-policy { display: flex; flex-direction: column; min-width: 0; gap: 0; margin: 0; padding: 22px; border: 1px solid #dce6e9; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(19, 49, 65, .035); }
.ai-control-center .ai-task-policy.is-enabled { border-color: #a6d9d3; background: linear-gradient(155deg, #f6fcfb 0, #fff 40%); }
.ai-control-center .ai-task-policy.is-locked { border-color: #e2e7ea; background: #fafbfc; box-shadow: none; }
.ai-control-center .ai-task-policy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-control-center .ai-task-policy-title { min-width: 0; }
.ai-control-center .ai-task-policy-family { display: block; margin-bottom: 8px; color: #188982; font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.ai-control-center .ai-task-policy.is-locked .ai-task-policy-family { color: #7c8e98; }
.ai-control-center .ai-task-policy-title h3 { margin: 0; color: #18394d; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.3; letter-spacing: -.025em; }
.ai-control-center .ai-task-policy-state { flex: none; max-width: 45%; padding: 6px 9px; border: 1px solid #dce5ea; border-radius: 999px; background: #f5f7f9; color: #607786; font-size: 10px; font-weight: 800; line-height: 1.2; text-align: center; }
.ai-control-center .ai-task-policy-state.is-enabled { border-color: #bce6dc; background: #e7f7f1; color: #147762; }
.ai-control-center .ai-task-policy-state.is-locked { border-color: #eadfce; background: #fff8ed; color: #966733; }
.ai-control-center .ai-task-policy-description { min-height: 38px; margin: 13px 0 17px; color: #657e8b; font-size: 12px; line-height: 1.55; }
.ai-control-center .ai-task-toggle { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 11px 13px; border: 1px solid #deebe9; border-radius: 10px; background: #f6faf9; cursor: pointer; }
.ai-control-center .ai-task-toggle input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.ai-control-center .ai-task-toggle-track { position: relative; flex: 0 0 40px; width: 40px; height: 23px; border-radius: 999px; background: #adbec7; transition: background .16s ease; }
.ai-control-center .ai-task-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.17); content: ''; transition: transform .16s ease; }
.ai-control-center .ai-task-toggle input:checked + .ai-task-toggle-track { background: #238e89; }
.ai-control-center .ai-task-toggle input:checked + .ai-task-toggle-track::after { transform: translateX(17px); }
.ai-control-center .ai-task-toggle input:focus-visible + .ai-task-toggle-track { outline: 3px solid #67c9c2; outline-offset: 3px; }
.ai-control-center .ai-task-toggle-copy { display: grid; min-width: 0; gap: 2px; }
.ai-control-center .ai-task-toggle-copy strong { color: #23495a; font-size: 12px; line-height: 1.3; }
.ai-control-center .ai-task-toggle-copy small { color: #728995; font-size: 11px; font-weight: 500; line-height: 1.35; }
.ai-control-center .ai-task-policy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 17px; }
.ai-control-center .ai-task-policy-fields label { min-width: 0; gap: 6px; color: #38576a; font-size: 11px; font-weight: 750; }
.ai-control-center .ai-task-policy-fields label:last-child { grid-column: 1 / -1; }
.ai-control-center .ai-task-policy-fields input, .ai-control-center .ai-task-policy-fields select { min-height: 40px; padding: 8px 11px; border-color: #d5e2e8; border-radius: 8px; font-size: 12px; font-weight: 650; }
.ai-control-center .ai-task-policy-fields input:focus-visible, .ai-control-center .ai-task-policy-fields select:focus-visible { outline: 2px solid #62c7bd; outline-offset: 1px; }
.ai-control-center .ai-task-policy-fields small { color: #81939d; font-size: 10px; font-weight: 500; }
.ai-control-center .ai-task-policy-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.ai-control-center .ai-task-policy-footer .btn { min-height: 39px; padding: 9px 14px; border-color: #b7d9dc; border-radius: 8px; background: #fff; color: #126d78; font-size: 11px; font-weight: 800; box-shadow: none; }
.ai-control-center .ai-task-policy-footer .btn:hover { border-color: #228e91; background: #edf8f7; }
.ai-control-center .ai-task-policy-notice { display: grid; gap: 6px; margin-top: auto; padding: 12px 13px; border: 1px solid #e9e1d3; border-radius: 9px; background: #fffaf2; }
.ai-control-center .ai-task-policy-notice strong { color: #875d30; font-size: 11px; }
.ai-control-center .ai-task-policy-notice span { color: #796d5e; font-size: 11px; line-height: 1.45; }
.ai-control-center .ai-task-policy-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: auto 0 0; padding-top: 18px; }
.ai-control-center .ai-task-policy-summary dt { color: #7b909a; font-size: 10px; }
.ai-control-center .ai-task-policy-summary dd { margin: 4px 0 0; color: #2d4c5d; font-size: 11px; font-weight: 750; }
.ai-control-center .ai-control-table-wrap { overflow-x: auto; margin: .75rem 0 1.25rem; }
.ai-control-center .ai-control-table { border-collapse: collapse; min-width: 620px; width: 100%; }
.ai-control-center .ai-control-table th, .ai-control-center .ai-control-table td { border-bottom: 1px solid #e1eaea; padding: .6rem .7rem; text-align: left; vertical-align: top; }
.ai-control-center .ai-control-table th { color: #36615f; font-weight: 650; }
@media (max-width: 1120px) { .ai-control-center .ai-task-policy-list, .ai-control-center .ai-task-policy-list.is-locked-group { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .ai-control-center .ai-task-section-heading, .ai-control-center .ai-task-group-head { flex-direction: column; align-items: flex-start; gap: 10px; } .ai-control-center .ai-task-policy { padding: 17px; } .ai-control-center .ai-task-policy-head { flex-direction: column; align-items: flex-start; } .ai-control-center .ai-task-policy-state { max-width: 100%; } .ai-control-center .ai-task-policy-fields { grid-template-columns: 1fr; } .ai-control-center .ai-task-policy-fields label:last-child { grid-column: auto; } .ai-control-center .ai-task-policy-summary { grid-template-columns: 1fr 1fr; } }
/* Fiscalist-only intelligent review. */
.intelligent-control-panel .intelligent-control-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.intelligent-control-panel .intelligent-control-stats > div { padding: .85rem; border: 1px solid #d7e8e5; border-radius: 8px; background: #f7fcfb; }
.intelligent-control-panel .intelligent-control-stats strong { display: block; color: #218f87; font-size: 1.55rem; }
.intelligent-control-panel .intelligent-control-stats span { display: block; color: #49615f; }
.intelligent-control-panel .intelligent-control-anomaly { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 1rem; border: 1px solid #f0d8ad; border-radius: 8px; padding: 1rem; margin: .75rem 0; background: #fffcf5; }
.intelligent-control-panel .intelligent-control-anomaly p { margin: .4rem 0; }
.intelligent-control-panel .intelligent-control-sources { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.intelligent-control-panel .intelligent-control-history { margin-top: 1.5rem; }
.intelligent-control-panel .intelligent-control-table-wrap { overflow-x: auto; }
.intelligent-control-panel table { border-collapse: collapse; width: 100%; min-width: 640px; }
.intelligent-control-panel th, .intelligent-control-panel td { border-bottom: 1px solid #e4eded; text-align: left; padding: .55rem; vertical-align: top; }
@media (max-width: 760px) { .intelligent-control-panel .intelligent-control-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .intelligent-control-panel .intelligent-control-anomaly { grid-template-columns: 1fr; } }

.document-analysis-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin: 0 0 .7rem; padding: 1rem 1.15rem; border: 1px solid #dbe8e8; border-radius: 14px; background: #f7fbfb; }
.document-analysis-tools-copy { display: grid; gap: .15rem; min-width: 0; }
.document-analysis-tools-copy .eyebrow { margin: 0; color: #39717a; font-size: .69rem; }
.document-analysis-tools-copy strong { color: #173f50; font-size: .97rem; }
.document-analysis-tools-copy small { color: #607883; font-size: .79rem; line-height: 1.4; }
.document-analysis-tools-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.document-analysis-tools-actions .btn { white-space: nowrap; }
.document-analysis-tools-actions .btn[aria-expanded="true"] { border-color: #84b9b3; color: #135a60; background: #e7f5f2; }
.document-analysis-drawer { margin: 0 0 1.5rem; border: 1px solid #dbe8e8; border-radius: 12px; background: #fff; scroll-margin-top: 110px; }
.document-analysis-drawer-summary { display: flex; align-items: center; gap: .65rem; min-height: 45px; padding: .65rem 1rem; color: #245568; cursor: pointer; list-style: none; }
.document-analysis-drawer-summary::-webkit-details-marker { display: none; }
.document-analysis-drawer-summary > span:first-child { font-size: .82rem; font-weight: 800; }
.document-analysis-drawer-summary small { color: #68818b; font-size: .76rem; }
.document-analysis-drawer-summary:hover { background: #f7fbfb; }
.document-analysis-drawer-summary:focus-visible { outline: 3px solid #81b5ca; outline-offset: 2px; }
.document-analysis-drawer-chevron { margin-left: auto; color: #49747c; font-size: 1.15rem; transition: transform .15s ease; }
.document-analysis-drawer[open] .document-analysis-drawer-chevron { transform: rotate(180deg); }
.document-analysis-drawer[open] > .document-analysis-drawer-summary { border-bottom: 1px solid #dbe8e8; background: #f7fbfb; }
.document-analysis-drawer-content { padding: 1.25rem; }
.fiscal-analysis-workspace { scroll-margin-top: 110px; }
.fiscal-analysis-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.fiscal-analysis-head h2 { margin: .15rem 0 .45rem; }
.fiscal-analysis-head p:last-child { margin: 0; max-width: 68ch; color: #58717b; line-height: 1.5; }
.fiscal-analysis-count { flex: 0 0 auto; display: grid; min-width: 128px; padding: .8rem 1rem; border: 1px solid #e6d6b5; border-radius: 14px; background: #fff9ed; text-align: center; }
.fiscal-analysis-count strong { color: #8c6117; font-size: 1.75rem; line-height: 1.1; }
.fiscal-analysis-count span { color: #705a32; font-size: .78rem; font-weight: 700; }
.fiscal-analysis-points, .fiscal-analysis-data { scroll-margin-top: 110px; }
.fiscal-analysis-data { margin-top: 2rem; }
.fiscal-analysis-subhead { margin-bottom: 1rem; }
.fiscal-analysis-subhead h3 { margin: 0 0 .25rem; }
.fiscal-analysis-subhead p { margin: 0; color: #607883; line-height: 1.5; }
.fiscal-analysis-empty { padding: 1rem; border: 1px dashed #bed4d7; border-radius: 12px; color: #536d75; background: #f8fbfb; }
.fiscal-analysis-point { display: grid; grid-template-columns: minmax(0, 1fr) minmax(205px, 270px); gap: 1rem; margin: .7rem 0; padding: 1rem; border: 1px solid #e9d7b8; border-radius: 14px; background: #fffdf8; }
.fiscal-analysis-kind { display: inline-block; margin-bottom: .35rem; color: #93641a; font-size: .72rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.fiscal-analysis-point h4 { margin: 0 0 .35rem; font-size: 1rem; line-height: 1.4; }
.fiscal-analysis-point p { margin: .4rem 0; color: #526d78; line-height: 1.45; }
.fiscal-analysis-point small { color: #71848b; }
.fiscal-analysis-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .75rem; }
.fiscal-analysis-actions .btn { white-space: normal; text-align: center; }
.fiscal-analysis-decision { display: grid; align-content: start; gap: .55rem; padding-left: 1rem; border-left: 1px solid #eadfca; }
.fiscal-analysis-decision label { display: grid; gap: .35rem; font-size: .79rem; font-weight: 700; color: #4c6870; }
.fiscal-analysis-decision input { width: 100%; min-width: 0; }
.fiscal-analysis-decision .btn { justify-self: start; }
.fiscal-analysis-decision-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.fiscal-analysis-derived-note { align-self: start; padding-left: 1rem; border-left: 1px solid #eadfca; color: #6a7b81; font-size: .8rem; line-height: 1.45; }
.fiscal-analysis-uncertain-list { margin: .45rem 0; padding-left: 1.2rem; color: #506d79; font-size: .86rem; line-height: 1.5; }
.fiscal-analysis-year-values { display: flex; flex-wrap: wrap; gap: .5rem; margin: .55rem 0; }
.fiscal-analysis-year-values > div { display: grid; gap: .15rem; min-width: 135px; padding: .55rem .7rem; border: 1px solid #dce7e8; border-radius: 10px; background: #fff; }
.fiscal-analysis-year-values span { color: #69808a; font-size: .72rem; font-weight: 750; }
.fiscal-analysis-year-values strong { color: #173f50; font-size: .95rem; }
.fiscal-analysis-category { margin: .65rem 0; border: 1px solid #dce7e8; border-radius: 13px; background: #fff; overflow: hidden; }
.fiscal-analysis-category > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; cursor: pointer; list-style: none; }
.fiscal-analysis-category > summary::-webkit-details-marker { display: none; }
.fiscal-analysis-category > summary > span:first-child { display: grid; gap: .2rem; }
.fiscal-analysis-category > summary strong { color: #244d5a; }
.fiscal-analysis-category > summary small { color: #647e87; }
.fiscal-analysis-category[open] > summary { border-bottom: 1px solid #dce7e8; background: #f8fbfb; }
.fiscal-analysis-document-list { display: grid; gap: .75rem; padding: .8rem; }
.fiscal-analysis-document { padding: .9rem; border: 1px solid #e0eaeb; border-radius: 11px; }
.fiscal-analysis-document header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fiscal-analysis-document h4 { margin: 0; overflow-wrap: anywhere; font-size: .95rem; }
.fiscal-analysis-document header small { color: #69808a; }
.fiscal-analysis-document header .fiscal-analysis-actions { margin-top: 0; justify-content: flex-end; }
.fiscal-analysis-no-values { margin: .8rem 0 0; color: #68818b; font-size: .85rem; }
.fiscal-analysis-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .85rem 0 0; }
.fiscal-analysis-values > div { min-width: 0; padding: .65rem .75rem; border: 1px solid #e6eeee; border-radius: 9px; background: #fbfdfd; }
.fiscal-analysis-values dt { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; color: #58727d; font-size: .76rem; }
.fiscal-analysis-values dd { margin: .25rem 0 0; overflow-wrap: anywhere; color: #193f4e; font-size: .94rem; font-weight: 700; }
.fiscal-analysis-values dd small { display: block; margin-top: .15rem; color: #71858c; font-size: .72rem; font-weight: 500; }
.fiscal-analysis-source-link { padding: 0; border: 0; color: #176b83; background: none; font: inherit; font-weight: 750; text-decoration: underline; cursor: pointer; }
.fiscal-analysis-validated, .fiscal-analysis-proposed { padding: .15rem .4rem; border-radius: 999px; font-size: .66rem; font-weight: 800; }
.fiscal-analysis-validated { color: #167065; background: #e1f5ef; }
.fiscal-analysis-proposed { color: #8d681f; background: #fff1d5; }
.fiscal-analysis-correct-link { display: inline-block; margin-top: .7rem; font-size: .8rem; font-weight: 750; }
.fiscal-analysis-history { margin-top: 1.3rem; padding: .8rem 1rem; border: 1px solid #dce7e8; border-radius: 12px; }
.fiscal-analysis-history summary { color: #285260; font-weight: 750; cursor: pointer; }
.fiscal-analysis-history p { color: #647c84; font-size: .84rem; }
.fiscal-analysis-history-scroll { overflow-x: auto; }
.fiscal-analysis-history table { border-collapse: collapse; width: 100%; min-width: 650px; }
.fiscal-analysis-history th, .fiscal-analysis-history td { padding: .55rem; border-bottom: 1px solid #e5eded; text-align: left; vertical-align: top; }
@media (max-width: 850px) {
  .document-analysis-tools { align-items: stretch; flex-direction: column; }
  .document-analysis-tools-actions { justify-content: flex-start; }
  .fiscal-analysis-point { grid-template-columns: 1fr; }
  .fiscal-analysis-decision { padding: .75rem 0 0; border-left: 0; border-top: 1px solid #eadfca; }
  .fiscal-analysis-derived-note { padding: .75rem 0 0; border-left: 0; border-top: 1px solid #eadfca; }
  .fiscal-analysis-document header { display: block; }
  .fiscal-analysis-document header .fiscal-analysis-actions { justify-content: flex-start; margin-top: .65rem; }
}
@media (max-width: 600px) {
  .document-analysis-tools-actions { display: grid; grid-template-columns: 1fr; }
  .document-analysis-tools-actions .btn { width: 100%; white-space: normal; text-align: center; }
  .document-analysis-drawer-summary { flex-wrap: wrap; }
  .document-analysis-drawer-summary small { order: 3; flex-basis: 100%; }
  .document-analysis-drawer-content { padding: 1rem; }
  .fiscal-analysis-head { display: block; }
  .fiscal-analysis-count { display: inline-grid; margin-top: .9rem; }
  .fiscal-analysis-values { grid-template-columns: 1fr; }
}

/* Velensio SaaS console */
.saas-admin-body { background: #f5f7fa; color: #173044; }
.saas-admin-body .saas-admin-header { position: sticky; z-index: 30; top: 0; min-height: 78px; padding: 0 28px; background: #fff; border-bottom: 1px solid #e0e8ec; box-shadow: 0 2px 18px rgba(10, 35, 54, .035); }
.saas-admin-body .saas-admin-header .platform-entry-brand-logo { width: 182px; }
.saas-admin-header-actions { gap: 22px; }
.saas-admin-body .saas-admin-header-label { color: #496276; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.saas-admin-logout { padding: 9px 13px; border: 1px solid #d6e3ea; border-radius: 9px; background: #fff; color: #164c6a; font: inherit; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; }
.saas-admin-logout:hover { background: #eff6f8; color: #073f62; }
.saas-admin-shell { display: flex; min-height: calc(100vh - 78px); }
.saas-admin-sidebar { display: flex; flex: 0 0 252px; flex-direction: column; min-height: calc(100vh - 78px); padding: 30px 16px 18px; background: #102c41; color: #eaf4f7; }
.saas-sidebar-intro { display: grid; gap: 2px; padding: 0 15px 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.saas-sidebar-intro span { color: #8eb2c4; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.saas-sidebar-intro strong { font-size: 24px; letter-spacing: -.04em; }
.saas-sidebar-intro small { color: #9ab5c5; font-size: 12px; }
.saas-sidebar-nav { display: grid; align-content: start; gap: 3px; margin-top: 20px; }
.saas-sidebar-nav p { margin: 22px 13px 8px; color: #8aa9bb; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.saas-sidebar-nav a { display: block; padding: 10px 13px; border-radius: 9px; color: #d9e8ee; font-size: 13px; font-weight: 730; line-height: 1.35; text-decoration: none; transition: background .15s ease, color .15s ease; }
.saas-sidebar-nav a:hover, .saas-sidebar-nav a:focus-visible { background: rgba(255,255,255,.11); color: #fff; outline-offset: 2px; }
.saas-sidebar-nav a[aria-current="page"] { background: #eaf7f7; color: #0b4a59; box-shadow: inset 3px 0 #31b5b0; font-weight: 850; }
.saas-sidebar-subnav { display: grid; padding-left: 13px; border-left: 1px solid rgba(255,255,255,.13); margin-left: 15px; }
.saas-sidebar-subnav a { padding: 7px 11px; color: #a9c6d3; font-size: 12px; }
.saas-sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 18px 13px 0; margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); color: #a7c2d0; font-size: 11px; }
.saas-sidebar-status { width: 7px; height: 7px; border-radius: 50%; background: #55cfae; }
.saas-admin-body .saas-admin-main { width: min(100%, 1680px); flex: 1 1 auto; min-width: 0; margin: 0; padding: clamp(28px, 3vw, 48px); }
.saas-admin-body .saas-admin-heading h1 { font-size: clamp(34px, 3vw, 44px); letter-spacing: -.04em; }
.saas-admin-body .saas-admin-card, .saas-admin-body .saas-admin-table-wrap, .saas-admin-body .saas-admin-metrics { border-color: #e1e8ed; border-radius: 15px; box-shadow: 0 8px 28px rgba(15, 42, 61, .045); }
.saas-admin-body .saas-admin-card { padding: clamp(20px, 2.5vw, 30px); }

.saas-billing-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:20px; }
.saas-billing-intro p { max-width:64ch; }
.saas-billing-heading-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.saas-billing-jump { display:flex; gap:8px; flex-wrap:wrap; }
.saas-billing-jump a { padding:9px 13px; border:1px solid #d8e4ea; border-radius:999px; color:#244c63; background:#fff; font-size:13px; font-weight:750; text-decoration:none; }
.saas-billing-jump a:hover { background:#eaf4f8; }
.saas-billing-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:20px; }
.saas-mail-layout { display:grid; gap:22px; margin-top:24px; min-width:0; }
.saas-mail-toolbar { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:17px 20px; border:1px solid #dfe9ed; border-radius:16px; background:#fff; box-shadow:0 8px 28px rgba(15,42,61,.045); }
.saas-mail-picker { display:flex; align-items:end; flex-wrap:wrap; gap:10px; min-width:0; }
.saas-mail-picker label { display:grid; gap:6px; min-width:min(100%,360px); color:#31556b; font-size:13px; font-weight:800; }
.saas-mail-picker select { width:100%; min-height:44px; padding:9px 35px 9px 12px; border:1px solid #cbdce4; border-radius:8px; background:#fff; color:#16364b; font:inherit; }
.saas-mail-picker .btn { min-height:44px; }
.saas-mail-smtp-link { flex-shrink:0; color:#07658a; font-weight:700; text-decoration:none; }
.saas-mail-picker select:focus-visible { outline:3px solid #71bfd3; outline-offset:2px; }
.saas-mail-intro { display:flex; justify-content:space-between; align-items:start; gap:18px; }
.saas-mail-intro h2 { margin:4px 0 6px; font-size:clamp(22px,2.5vw,30px); color:#123850; }
.saas-mail-intro p { margin:0; color:#698394; line-height:1.5; }
.saas-mail-inline-editor { display:grid; gap:18px; width:100%; max-width:1120px; min-width:0; margin:0; padding:clamp(19px,2vw,28px); border:1px solid #dfe9ed; border-radius:16px; background:#fff; box-shadow:0 8px 28px rgba(15,42,61,.045); }
.saas-mail-inline-editor h3 { margin:0; color:#123850; font-size:19px; }
.saas-mail-edit-hint { margin:0; padding:10px 14px; border-left:3px solid #3da8bf; border-radius:7px; background:#eff8fa; color:#31556b; font-size:13px; line-height:1.5; }
.saas-mail-profile { display:grid; gap:6px; min-width:240px; color:#31556b; font-size:12px; font-weight:800; }
.saas-mail-profile select { min-height:40px; padding:8px 12px; border:1px solid #cbdce4; border-radius:8px; background:#fff; color:#16364b; font:inherit; }
.saas-mail-fields { padding:15px 18px; border:1px solid #dce8ed; border-radius:10px; color:#31556b; }
.saas-mail-fields summary { cursor:pointer; font-weight:800; }
.saas-mail-fields[open] { display:grid; gap:14px; }
.saas-mail-fields p { margin:0; color:#698394; font-size:13px; }
.saas-mail-fields label { display:grid; gap:6px; font-weight:700; }
.saas-mail-fields textarea { resize:vertical; min-height:150px; line-height:1.55; }
.saas-mail-variables { background:#f1f7f9; border-radius:11px; padding:14px 16px; color:#31556b; }
.saas-mail-variables p { margin:6px 0; color:#09648b; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.saas-mail-variables small { color:#698394; }
.saas-mail-editor-actions { position:sticky; bottom:12px; z-index:2; display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px; border:1px solid #dce8ed; border-radius:11px; background:rgba(255,255,255,.97); box-shadow:0 8px 26px rgba(15,42,61,.12); }
.saas-mail-editor-actions span { font-size:12px; color:#647e8e; }
.saas-mail-preview-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.saas-mail-envelope { margin:0; padding:15px 18px; border-radius:11px; background:#f4f8fa; display:grid; gap:8px; }
.saas-mail-envelope div { display:grid; grid-template-columns:46px minmax(0,1fr); gap:10px; font-size:13px; }
.saas-mail-envelope dt { align-self:center; color:#7891a0; font-weight:700; }
.saas-mail-envelope dd { margin:0; overflow-wrap:anywhere; color:#29495f; }
.saas-mail-envelope input[name="subject"] { min-height:38px; padding:6px 8px; border:1px dashed #9bc7d2; border-radius:6px; background:#fff; color:#29495f; }
.saas-mail-inline-editor iframe { display:block; width:100%; height:360px; border:1px solid #dde8ec; border-radius:12px; background:#f3f7f9; }
.saas-mail-text { color:#31556b; }
.saas-mail-text summary { cursor:pointer; font-weight:700; }
.saas-mail-text pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:15px; border-radius:10px; background:#f4f8fa; font:13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; }
.saas-mail-preview-note { margin:0; font-size:12px; color:#7891a0; line-height:1.5; }
@media(max-width:850px) { .saas-mail-picker { width:100%; } .saas-mail-picker label { flex:1 1 260px; } }
@media(max-width:600px) { .saas-mail-toolbar { padding:14px; } .saas-mail-profile { width:100%; } .saas-mail-editor-actions .btn { flex:1 1 100%; } .saas-mail-editor-actions span { width:100%; } }
.saas-billing-settings .saas-admin-card { min-width:0; }
.saas-billing-settings .saas-admin-card:first-child { grid-column:1 / -1; }
.saas-billing-status { display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border-radius:999px; background:#eef5f7; color:#2b5668; font-size:12px; font-weight:800; }
.saas-billing-status.ready { background:#e8f6ef; color:#176445; }
.saas-billing-status.pending { background:#fff5e7; color:#875d17; }
.saas-billing-help { margin:8px 0 0; color:#647d8c; font-size:13px; line-height:1.5; }
.saas-billing-settings .saas-admin-form { margin-top:0; }
.saas-billing-settings .saas-admin-form fieldset { display:grid; gap:13px; }
.saas-billing-settings .saas-admin-form label.check { display:flex; align-items:center; gap:10px; }
.saas-billing-settings .saas-admin-form label.check input { width:auto; min-height:0; }
.saas-billing-settings .saas-admin-form .secret-state { font-size:12px; color:#5c7686; }
.saas-billing-beneficiary { margin:18px 0; padding:17px; border:1px solid #d9e8ed; border-radius:13px; background:#f7fbfc; }
.saas-billing-beneficiary > strong { display:block; color:#173d51; font-size:15px; }
.saas-billing-beneficiary .saas-form-grid { margin-top:15px; }
.saas-billing-save { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.saas-billing-save span { color:#647d8c; font-size:12px; }
.saas-invoice-page { max-width:900px; margin:auto; padding:36px; background:#fff; border:1px solid #dce8ed; border-radius:16px; color:#17364a; box-shadow:0 12px 32px rgba(15,42,61,.07); }
.saas-invoice-actions { display:flex; justify-content:space-between; gap:10px; margin-bottom:30px; }
.saas-invoice-preview-notice { display:grid; gap:4px; margin-bottom:26px; padding:14px 17px; border:1px solid #e8d4a7; border-left:4px solid #bd8b37; border-radius:10px; background:#fffaf0; color:#674a1f; font-size:12px; line-height:1.45; }
.saas-invoice-preview-notice strong { font-size:13px; letter-spacing:.07em; }
.saas-invoice-head,.saas-invoice-parties,.saas-invoice-line,.saas-invoice-total { display:flex; justify-content:space-between; gap:24px; }
.saas-invoice-head { align-items:flex-start; padding-bottom:22px; border-bottom:2px solid #0e3852; }
.saas-invoice-head h1 { margin:8px 0; font-size:30px; }
.saas-invoice-head p,.saas-invoice-parties p { color:#597180; line-height:1.5; }
.saas-invoice-issuer,.saas-invoice-heading { min-width:0; max-width:50%; }
.saas-invoice-company-logo { display:block; width:min(100%,285px); height:auto; margin:0 0 22px; object-fit:contain; }
.saas-invoice-issuer small { display:block; margin-bottom:8px; color:#68818e; font-size:11px; font-weight:850; letter-spacing:.08em; }
.saas-invoice-issuer strong { display:block; color:#143b52; font-size:20px; line-height:1.2; overflow-wrap:anywhere; }
.saas-invoice-issuer p { margin:8px 0 0; font-size:12px; }
.saas-invoice-heading { text-align:right; }
.saas-invoice-heading .saas-status { margin-top:5px; }
.saas-invoice-parties { padding:28px 0; }
.saas-invoice-parties section { width:48%; }
.saas-invoice-parties small,.saas-invoice-qr-section small { display:block; margin-bottom:7px; color:#69818d; font-size:11px; font-weight:800; letter-spacing:.05em; }
.saas-invoice-parties strong { font-size:17px; }
.saas-invoice-line { padding:19px 0; border-top:1px solid #dce7eb; border-bottom:1px solid #dce7eb; }
.saas-invoice-line small { display:block; margin-top:5px; color:#647b8a; }
.saas-invoice-total { align-items:center; justify-content:flex-end; margin:20px 0 34px; font-size:19px; }
.saas-invoice-total strong { min-width:145px; text-align:right; font-size:23px; }
.saas-invoice-qr-section { display:grid; grid-template-columns:42% 58%; min-height:105mm; margin-top:28px; border-top:1px dashed #8397a3; }
.saas-invoice-qr-receipt,.saas-invoice-qr-payment { padding:15px 16px 10px 0; }
.saas-invoice-qr-receipt { border-right:1px dashed #8397a3; }
.saas-invoice-qr-payment { padding-left:17px; }
.saas-invoice-qr-section strong { display:block; margin-bottom:16px; font-size:17px; }
.saas-invoice-qr-section p { margin:0 0 12px; font-size:12px; line-height:1.36; overflow-wrap:anywhere; }
.saas-invoice-qr-content { display:flex; align-items:flex-start; gap:14px; }
.saas-invoice-qr-content img { width:46mm; height:46mm; flex:none; image-rendering:auto; }
.saas-invoice-qr-placeholder { display:grid; place-content:center; justify-items:center; gap:5px; width:46mm; height:46mm; flex:none; border:1px dashed #9aaeb8; border-radius:8px; background:repeating-linear-gradient(45deg,#f1f5f6 0,#f1f5f6 6px,#fff 6px,#fff 12px); color:#345b70; text-align:center; }
.saas-invoice-qr-placeholder span { font-size:48px; line-height:1; }
.saas-invoice-qr-placeholder strong { margin:0; font-size:13px; }
.saas-invoice-qr-placeholder small { margin:0; letter-spacing:0; }
.saas-invoice-qr-content div { min-width:0; }
.saas-invoice-qr-unavailable { padding:15px; color:#9a3c2e; background:#fff3ee; }
.saas-invoice-card-payment { padding:20px; border-radius:12px; background:#eef5f7; }
@media(max-width:820px) { .saas-billing-settings { grid-template-columns:1fr; } .saas-billing-intro { flex-wrap:wrap; } .saas-billing-heading-actions { justify-content:flex-start; } .saas-invoice-page { padding:20px; } .saas-invoice-head { flex-wrap:wrap; } .saas-invoice-issuer,.saas-invoice-heading { max-width:none; width:100%; text-align:left; } .saas-invoice-qr-section { grid-template-columns:1fr; } .saas-invoice-qr-receipt { border-right:0; border-bottom:1px dashed #8397a3; } }
@media(max-width:600px) { .saas-invoice-qr-content { flex-direction:column; } .saas-invoice-qr-content img,.saas-invoice-qr-placeholder { margin-inline:auto; } .saas-invoice-qr-content > div:last-child { width:100%; } }
@media print {
  @page { size:A4; margin:10mm; }
  .saas-admin-header,.saas-admin-sidebar,.saas-sidebar-footer,.saas-invoice-actions,.platform-entry-header,.no-print,.flash { display:none !important; }
  .saas-admin-shell,.saas-admin-main,.platform-entry-main { display:block !important; width:auto !important; max-width:none !important; margin:0 !important; padding:0 !important; background:#fff !important; }
  .saas-invoice-page { max-width:none; border:0; border-radius:0; box-shadow:none; padding:0; }
  .saas-invoice-qr-section { break-inside:avoid; }
}
.saas-admin-body .saas-admin-nav a { color: #17445e; }
.saas-admin-body .saas-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.saas-admin-body .saas-page-heading h1 { margin: 5px 0 8px; color: #15384d; font-size: clamp(34px, 3vw, 44px); letter-spacing: -.045em; }
.saas-admin-body .saas-page-heading .muted { max-width: 740px; margin: 0; line-height: 1.5; }
.saas-admin-body .ai-control-center > .saas-section-nav { margin-bottom: 22px; }
.saas-admin-body .saas-section-nav { top: 86px; border-color: #e1e8ed; border-radius: 11px; box-shadow: 0 6px 18px rgba(15,42,61,.045); }
.saas-admin-body [id^="produit-"], .saas-admin-body #configuration-ia, .saas-admin-body #produits-ia, .saas-admin-body #regles-communes, .saas-admin-body #credits-ia, .saas-admin-body #fournisseurs, .saas-admin-body #modeles, .saas-admin-body #taches, .saas-admin-body #activite { scroll-margin-top: 150px; }
.velensio-ai-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.velensio-ai-product-grid article { min-width: 0; padding: 18px; border: 1px solid #e1e9ed; border-radius: 11px; background: #f9fbfc; }
.velensio-ai-product-grid strong { display: block; margin-bottom: 10px; color: #193d51; }
.velensio-ai-product-grid p { color: #657e8b; font-size: 12px; line-height: 1.5; }
.velensio-ai-product-grid a { color: #12677a; font-size: 12px; font-weight: 800; text-decoration: none; }
@media (max-width: 980px) { .velensio-ai-product-grid { grid-template-columns: 1fr; } }
.velensio-overview, .velensio-support-page { display: grid; gap: 28px; }
.velensio-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: clamp(28px, 3.5vw, 44px); border-radius: 20px; color: #fff; background: radial-gradient(circle at 87% 18%, rgba(79,202,194,.28), transparent 32%), linear-gradient(120deg, #102c41 0%, #174d65 70%, #1b6774 100%); box-shadow: 0 20px 36px rgba(18, 55, 74, .14); }
.velensio-hero .eyebrow { color: #95e2d9; }
.velensio-hero h1 { margin: 7px 0 12px; color: #fff; font-size: clamp(35px, 3.3vw, 49px); letter-spacing: -.05em; }
.velensio-hero p:last-child { max-width: 650px; margin: 0; color: #d8ebf0; font-size: 15px; line-height: 1.55; }
.velensio-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.velensio-role-chip { padding: 9px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.09); color: #eaf5f5; font-size: 12px; font-weight: 800; white-space: nowrap; }
.velensio-hero .btn.primary { background: #fff; border-color: #fff; color: #0d4a5c; white-space: nowrap; }
.velensio-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.velensio-stat { display: grid; align-content: start; gap: 8px; min-height: 136px; padding: 20px 22px; border: 1px solid #e2e9ed; border-radius: 14px; background: #fff; color: #16364b; text-decoration: none; box-shadow: 0 8px 24px rgba(16,43,66,.04); }
.velensio-stat:hover:is(a) { border-color: #afd6d8; transform: translateY(-1px); }
.velensio-stat span { font-size: 12px; font-weight: 800; color: #627786; }
.velensio-stat strong { font-size: 36px; letter-spacing: -.06em; line-height: 1; color: #143b55; }
.velensio-stat small { color: #67808e; font-size: 12px; }
.velensio-stat.is-attention strong { color: #ad6537; }
.velensio-stat-grid.compact .velensio-stat { min-height: 110px; }
.velensio-overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, 1fr); gap: 18px; }
.velensio-panel { min-width: 0; padding: 26px; border: 1px solid #e1e8ed; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(16,43,66,.045); }
.velensio-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.velensio-panel-heading .eyebrow { margin: 0 0 5px; }
.velensio-panel-heading h2, .velensio-panel > h2 { margin: 0; color: #14364c; font-size: 22px; letter-spacing: -.035em; }
.velensio-panel-heading > a { color: #12677a; font-size: 12px; font-weight: 850; white-space: nowrap; text-decoration: none; }
.velensio-product-list { display: grid; }
.velensio-product-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 17px 0; border-top: 1px solid #e9eef1; color: inherit; text-decoration: none; }
.velensio-product-row:hover strong { color: #086981; }
.velensio-product-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eaf6f6; color: #14747a; font-size: 20px; font-weight: 900; }
.velensio-product-mark.courtage { background: #eef1fb; color: #5569ad; }
.velensio-product-mark.time { background: #fff3e8; color: #b46e34; }
.velensio-product-title strong, .velensio-product-title small, .velensio-product-volume strong, .velensio-product-volume small { display: block; }
.velensio-product-title strong { color: #17384b; font-size: 14px; }
.velensio-product-title small { max-width: 420px; margin-top: 4px; color: #6b8190; font-size: 12px; line-height: 1.35; }
.velensio-product-volume { text-align: right; }
.velensio-product-volume strong { color: #17384b; font-size: 22px; }
.velensio-product-volume small { color: #6b8190; font-size: 10px; }
.velensio-operation-list { display: grid; }
.velensio-operation-list a { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 12px; padding: 17px 0; border-top: 1px solid #e9eef1; color: #12576a; text-decoration: none; }
.velensio-operation-list strong, .velensio-operation-list small { display: block; }
.velensio-operation-list strong { color: #17384b; font-size: 13px; }
.velensio-operation-list small { margin-top: 4px; color: #6c8290; font-size: 12px; }
.velensio-operation-dot { width: 9px; height: 9px; border-radius: 50%; background: #b7c8ce; }
.velensio-operation-dot.ok { background: #2baa82; }
.velensio-operation-dot.critical { background: #d46a52; }
.velensio-ticket-preview { display: grid; }
.velensio-ticket-preview a { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(160px, .5fr) 14px; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #e9eef1; color: #12677a; text-decoration: none; }
.velensio-ticket-preview strong { overflow: hidden; color: #183a4f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.velensio-ticket-preview small { color: #708593; font-size: 11px; }
.velensio-priority { display: inline-flex; justify-content: center; width: fit-content; padding: 5px 7px; border-radius: 6px; background: #edf3f6; color: #526c79; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.velensio-priority.urgent { background: #fff0ed; color: #aa493a; }
.velensio-priority.high { background: #fff5e8; color: #a16823; }
.velensio-empty { padding: 22px; border: 1px dashed #cfdee5; border-radius: 10px; background: #f9fbfc; color: #627989; line-height: 1.5; }
.velensio-support-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px; border: 1px solid #e1e8ed; border-radius: 13px; background: #fff; }
.velensio-support-filters label, .velensio-ticket-controls label { display: grid; gap: 5px; min-width: 145px; color: #405e70; font-size: 12px; font-weight: 800; }
.velensio-support-filters select, .velensio-ticket-controls select { min-height: 40px; padding: 8px 10px; border: 1px solid #cbdce4; border-radius: 7px; background: #fff; color: #17384b; }
.velensio-support-filters input { min-height: 40px; padding: 8px 10px; border: 1px solid #cbdce4; border-radius: 7px; background: #fff; color: #17384b; }
.velensio-support-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.4fr); align-items: start; gap: 18px; }
.velensio-support-list { padding: 16px 0; }
.velensio-support-list .velensio-panel-heading { padding: 0 20px; }
.velensio-support-list .velensio-panel-heading span { color: #718794; font-size: 12px; }
.velensio-support-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid #e9eef1; color: #193b50; text-decoration: none; }
.velensio-support-item:hover, .velensio-support-item.active { background: #eff7f8; }
.velensio-support-item strong, .velensio-support-item small { display: block; }
.velensio-support-item strong { font-size: 13px; line-height: 1.4; }
.velensio-support-item small { margin-top: 5px; color: #708795; font-size: 11px; }
.velensio-support-item-meta { display: grid; justify-items: end; flex: 0 0 auto; }
.velensio-support-item-meta .velensio-overdue { color: #ad4c3e; font-weight: 850; }
.velensio-pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px 3px; color: #657e8c; font-size: 12px; }
.velensio-pagination a { color: #12677a; font-weight: 800; text-decoration: none; }
.velensio-support-detail > .muted { margin-bottom: 20px; }
.velensio-ticket-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 16px; border: 1px solid #e0e9ec; border-radius: 10px; background: #f8fbfc; }
.velensio-conversation { display: grid; gap: 12px; max-height: 640px; overflow-y: auto; margin: 22px 0; }
.velensio-message { max-width: 88%; padding: 14px 16px; border: 1px solid #e0e8eb; border-radius: 12px; background: #f8fafb; }
.velensio-message.staff { justify-self: end; border-color: #cae7e3; background: #eefaf7; }
.velensio-message small { color: #597584; font-size: 11px; font-weight: 800; }
.velensio-message p { margin: 8px 0 0; color: #26465a; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.velensio-reply-form { border-top: 1px solid #e4ecf0; padding-top: 16px; }
.organization-support-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; margin-bottom: 18px; border: 1px solid #cbe5e5; border-radius: 14px; background: linear-gradient(110deg, #effafa, #fff); }
.organization-support-callout strong { color: #174e5c; }
.organization-support-callout p { margin: 6px 0 0; color: #607987; font-size: 13px; line-height: 1.45; }
.organization-support-callout .btn { flex: 0 0 auto; }
.velensio-customer-ticket-list { display: grid; margin-top: 14px; }
.velensio-customer-ticket-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 13px 0; border-top: 1px solid #e7eef1; color: #174d67; text-decoration: none; }
.velensio-customer-ticket-list span { color: #6a8190; font-size: 12px; }
.velensio-product-page { display: grid; gap: 24px; }
.velensio-product-hero { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 30px; border-radius: 17px; background: #fff; border: 1px solid #e1e9ed; box-shadow: 0 10px 30px rgba(16,43,66,.045); }
.velensio-product-hero h1 { margin: 4px 0 8px; color: #15384d; font-size: clamp(34px, 3vw, 46px); letter-spacing: -.05em; }
.velensio-product-hero p:last-child { max-width: 650px; margin: 0; color: #637c8a; line-height: 1.5; }
.velensio-stat .velensio-stat-word { font-size: 24px; letter-spacing: -.035em; }
.velensio-product-columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: start; gap: 18px; }
.velensio-product-links { display: grid; }
.velensio-product-links a, .velensio-product-link-note { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 0; border-top: 1px solid #e7edf0; color: #12677a; text-decoration: none; }
.velensio-product-links a strong, .velensio-product-link-note strong { color: #17394e; font-size: 13px; }
.velensio-product-links a small, .velensio-product-link-note small { grid-column: 1; color: #708491; font-size: 12px; line-height: 1.4; }
.velensio-product-links a span { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.velensio-readonly-settings { padding: 17px; border-radius: 10px; background: #f8fbfc; }
.velensio-maintenance-notice { padding: 18px 20px; margin-bottom: 16px; border: 1px solid #f0d5a9; border-left: 4px solid #d89542; border-radius: 10px; background: #fffbf4; }
.velensio-maintenance-notice strong { color: #835624; }
.velensio-maintenance-notice p { margin: 8px 0 0; color: #755f47; line-height: 1.5; }
.saas-admin-body .velensio-mail-warning { border-left-color: #c6813b; background: #fff9f0; }
.saas-admin-body .velensio-mail-warning strong { color: #855525; }
.velensio-support-workspace { gap: 20px; color: #183b50; }
.velensio-support-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.velensio-support-header h1 { margin: 2px 0 5px; font-size: clamp(34px, 3vw, 44px); letter-spacing: -.045em; }
.velensio-support-header p:last-child { margin: 0; color: #66808e; font-size: 14px; }
.velensio-support-profile-link { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; border: 1px solid #dce8ea; border-radius: 999px; background: #fff; color: #183b50; text-decoration: none; box-shadow: 0 7px 20px rgba(18,57,73,.05); }
.velensio-support-profile-link strong, .velensio-support-profile-link small { display: block; }
.velensio-support-profile-link strong { font-size: 12px; }
.velensio-support-profile-link small { color: #647d89; font-size: 11px; }
.velensio-agent-avatar { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, #d9eee9, #d8e9f5); color: #176274; font-size: 13px; font-weight: 900; }
.velensio-agent-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.velensio-support-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.velensio-support-metrics a { display: grid; gap: 5px; padding: 17px 20px; border: 1px solid #dfebeb; border-radius: 13px; background: #fff; color: #173d51; text-decoration: none; box-shadow: 0 8px 22px rgba(18,57,73,.035); }
.velensio-support-metrics a:hover { border-color: #9bcfd0; }
.velensio-support-metrics span { color: #5e7a87; font-size: 12px; font-weight: 800; }
.velensio-support-metrics strong { font-size: 30px; line-height: 1; letter-spacing: -.05em; }
.velensio-support-metrics small { color: #78909b; font-size: 11px; }
.velensio-support-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 4px; border: 1px solid #dfebeb; border-radius: 12px; background: #f8fbfb; white-space: nowrap; }
.velensio-support-tabs a { padding: 10px 14px; border-radius: 8px; color: #567484; font-size: 12px; font-weight: 800; text-decoration: none; }
.velensio-support-tabs a[aria-current="page"] { background: #fff; color: #135c6a; box-shadow: 0 3px 12px rgba(18,57,73,.08); }
.velensio-support-layout { display: grid; grid-template-columns: minmax(290px, .85fr) minmax(420px, 1.45fr) minmax(235px, .7fr); align-items: stretch; min-height: 680px; overflow: hidden; border: 1px solid #dce7eb; border-radius: 17px; background: #fff; box-shadow: 0 16px 38px rgba(18,57,73,.055); }
.velensio-support-inbox { min-width: 0; border-right: 1px solid #e7eef0; }
.velensio-support-inbox-head { padding: 20px 19px 12px; }
.velensio-support-inbox-head h2 { margin: 0; font-size: 18px; }
.velensio-support-inbox-head h2 span { margin-left: 5px; color: #7a929c; font-size: 13px; }
.velensio-support-inbox-head p { margin: 5px 0 0; color: #8296a0; font-size: 11px; }
.velensio-support-search { display: flex; margin: 0 17px 13px; border: 1px solid #d6e3e8; border-radius: 9px; background: #f8fafb; }
.velensio-support-search:focus-within { border-color: #58aeb4; }
.velensio-support-search input { min-width: 0; flex: 1; padding: 10px 11px; border: 0; outline: 0; background: transparent; color: #173b50; font-size: 12px; }
.velensio-support-search button { width: 38px; border: 0; background: transparent; color: #366c79; font-size: 23px; cursor: pointer; }
.velensio-visually-hidden { position: absolute!important; width: 1px!important; height: 1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; }
.velensio-support-filter-panel { margin: 0 17px 14px; color: #47717d; font-size: 12px; }
.velensio-support-filter-panel summary { width: fit-content; cursor: pointer; font-weight: 800; }
.velensio-support-filter-panel form { display: grid; gap: 9px; margin-top: 12px; }
.velensio-support-filter-panel label, .velensio-support-settings label, .velensio-support-agent-profile-forms label { display: grid; gap: 5px; color: #45616e; font-size: 11px; font-weight: 800; }
.velensio-support-filter-panel select, .velensio-support-settings select, .velensio-support-agent-profile-forms input { width: 100%; min-height: 37px; padding: 7px 10px; border: 1px solid #d1e0e5; border-radius: 7px; background: #fff; color: #193a4d; }
.velensio-support-row { display: grid; gap: 6px; padding: 14px 18px; border-top: 1px solid #edf1f3; border-left: 3px solid transparent; color: #254759; text-decoration: none; }
.velensio-support-row:hover, .velensio-support-row.is-selected { border-left-color: #30a49d; background: #f0f8f8; }
.velensio-support-row-top, .velensio-support-row-meta, .velensio-support-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.velensio-support-row-top strong, .velensio-support-row-subject, .velensio-support-row-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.velensio-support-row-top strong { font-size: 12px; }
.velensio-support-row-top time, .velensio-support-row-preview, .velensio-support-row-meta, .velensio-support-row-bottom small { color: #7b919b; font-size: 10px; }
.velensio-support-row-subject { color: #173b51; font-size: 13px; font-weight: 800; }
.velensio-support-row-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.velensio-support-row-bottom { justify-content: flex-start; }
.velensio-support-row-bottom small { margin-left: auto; white-space: nowrap; }
.velensio-support-state { display: inline-flex; flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; background: #edf3f5; color: #496d79; font-size: 10px; font-weight: 850; white-space: nowrap; }
.velensio-support-state.state-open { background: #e6f5f1; color: #16735c; }
.velensio-support-state.state-in_progress { background: #e8f3fa; color: #246c95; }
.velensio-support-state.state-waiting_customer { background: #fff3e3; color: #95631e; }
.velensio-overdue { color: #ad4c3e; font-size: 10px; font-weight: 850; }
.velensio-support-empty { padding: 35px 22px; color: #778d99; text-align: center; }
.velensio-support-empty strong { color: #345468; }
.velensio-support-empty p { font-size: 12px; }
.velensio-support-thread { display: flex; flex-direction: column; min-width: 0; }
.velensio-support-thread-empty { display: grid; align-content: center; justify-items: center; min-height: 600px; padding: 30px; color: #8096a0; text-align: center; }
.velensio-support-thread-empty > span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: #eaf6f4; color: #22807d; font-size: 29px; }
.velensio-support-thread-empty h2 { margin-bottom: 0; color: #23475a; font-size: 20px; }
.velensio-support-thread-empty p { max-width: 280px; font-size: 13px; }
.velensio-support-thread-head { padding: 22px 24px 19px; border-bottom: 1px solid #e8eff1; }
.velensio-support-thread-kicker { display: flex; align-items: center; gap: 8px; color: #6c8894; font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.velensio-support-thread-head h2 { margin: 11px 0 7px; font-size: 21px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.velensio-support-thread-head p { margin: 0; color: #738b96; font-size: 12px; }
.velensio-support-back { display: none; margin-bottom: 12px; color: #217080; font-size: 12px; font-weight: 800; text-decoration: none; }
.velensio-support-thread-scroll { display: grid; align-content: start; gap: 13px; flex: 1; max-height: 750px; overflow-y: auto; padding: 23px 24px; background: #fcfdfd; }
.velensio-support-thread-label { display: flex; justify-content: space-between; color: #426271; font-size: 12px; font-weight: 900; }
.velensio-support-thread-label span { color: #8297a0; font-size: 11px; font-weight: 600; }
.velensio-support-notice { padding: 11px 13px; border-radius: 8px; background: #f3f6f7; color: #607b88; font-size: 12px; }
.velensio-support-message { padding: 14px; border: 1px solid #e3ecef; border-radius: 11px; background: #fff; }
.velensio-support-message.is-staff { border-color: #cce7e3; background: #f0faf8; }
.velensio-support-message.is-note { border-color: #eadab9; background: #fffaf0; }
.velensio-support-message header { display: flex; align-items: center; gap: 9px; }
.velensio-support-message header strong, .velensio-support-message header small { display: block; }
.velensio-support-message header strong { font-size: 12px; }
.velensio-support-message header small, .velensio-support-message header time { color: #7b919b; font-size: 10px; }
.velensio-support-message header time { margin-left: auto; white-space: nowrap; }
.velensio-support-message-body { margin: 11px 0 0 47px; color: #2d4b5b; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.velensio-support-composer { padding: 18px 24px 22px; border-top: 1px solid #e5edef; }
.velensio-support-compose-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.velensio-support-compose-heading strong { font-size: 13px; }
.velensio-support-compose-heading span { color: #7b919b; font-size: 10px; }
.velensio-support-composer textarea { display: block; width: 100%; padding: 12px; border: 1px solid #cfdee4; border-radius: 9px; color: #1e3f50; resize: vertical; }
.velensio-support-compose-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.velensio-support-inspector { min-width: 0; padding: 22px 17px; border-left: 1px solid #e7eef0; background: #fbfcfc; }
.velensio-support-inspector h2 { margin: 0 0 20px; font-size: 17px; }
.velensio-support-inspector > p { color: #8196a0; font-size: 12px; line-height: 1.5; }
.velensio-support-inspector-section { display: grid; gap: 6px; padding: 15px 0; border-top: 1px solid #e6edef; }
.velensio-support-inspector-section > span { margin-top: 9px; color: #8196a0; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.velensio-support-inspector-section > span:first-child { margin-top: 0; }
.velensio-support-inspector-section strong { font-size: 12px; overflow-wrap: anywhere; }
.velensio-support-inspector-section a { color: #217084; font-size: 11px; overflow-wrap: anywhere; }
.velensio-support-agent-line { display: flex; align-items: center; gap: 8px; }
.velensio-support-settings { display: grid; gap: 11px; padding-top: 16px; border-top: 1px solid #e6edef; }
.velensio-support-inspector-foot { margin-top: 22px; color: #8a9ca4; font-size: 10px; }
.velensio-support-agent-profile { padding: 24px; border: 1px solid #dce7eb; border-radius: 15px; background: #fff; }
.velensio-support-agent-profile-head { display: flex; justify-content: space-between; align-items: center; }
.velensio-support-agent-profile-head h2 { margin: 2px 0 5px; font-size: 19px; }
.velensio-support-agent-profile-head p:not(.eyebrow) { margin: 0; color: #78909b; font-size: 12px; }
.velensio-support-agent-profile-head .velensio-agent-avatar { width: 53px; height: 53px; }
.velensio-support-agent-profile-forms { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) auto; align-items: end; gap: 16px; margin-top: 20px; }
.velensio-support-agent-profile-forms form { display: grid; justify-items: start; gap: 9px; }
.velensio-support-agent-profile-forms label { width: 100%; }
.velensio-support-agent-profile-forms small { color: #8296a0; font-size: 10px; }
.velensio-support-text-button { border: 0; background: none; color: #9c514c; font-size: 11px; font-weight: 800; cursor: pointer; }
.velensio-customer-agent { display: flex; align-items: center; gap: 10px; width: fit-content; margin-top: 15px; padding: 10px 14px; border: 1px solid #d8e9e8; border-radius: 11px; background: #f4faf9; }
.velensio-customer-agent small, .velensio-customer-agent strong { display: block; }
.velensio-customer-agent small { color: #718b94; font-size: 10px; }
.velensio-customer-agent strong { color: #1e5260; font-size: 12px; }
.velensio-customer-message-head { display: flex; align-items: center; gap: 8px; }
.velensio-customer-message-head .velensio-agent-avatar { width: 30px; height: 30px; font-size: 11px; }
.velensio-customer-message-head small strong { color: #31596a; }
.velensio-public-grade { display: inline-flex; width: fit-content; margin-top: 7px; padding: 5px 8px; border: 1px solid #cbe6e2; border-radius: 999px; background: #eef8f6; color: #1b6c68; font-size: 11px; font-weight: 850; white-space: nowrap; }
.velensio-agent-grade { display: block; margin-top: 3px; color: #698793; font-size: 10px; }
.velensio-customer-agent-grade { display: block; margin-top: 3px; color: #487c84; font-size: 11px; font-style: normal; font-weight: 700; }
.velensio-customer-message-head .velensio-customer-agent-grade { display: inline; margin: 0 3px; }
.velensio-support-agent-profile { overflow: hidden; padding: clamp(24px, 3vw, 42px); border-color: #d7e4e8; border-radius: 24px; background: linear-gradient(145deg, #fff 0%, #f8fbfb 65%, #f2f8f7 100%); box-shadow: 0 24px 70px rgba(16, 53, 70, .08); }
.velensio-support-agent-profile-head { align-items: flex-start; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid #e0eaeb; }
.velensio-support-agent-profile-head h2 { margin: 9px 0 7px; color: #0c3349; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; }
.velensio-support-agent-profile-head p:not(.eyebrow) { max-width: 620px; color: #66818d; font-size: 14px; line-height: 1.55; }
.velensio-agent-profile-portrait { display: grid; justify-items: center; gap: 8px; min-width: 116px; color: #7e9aa2; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.velensio-support-agent-profile-head .velensio-agent-avatar { width: 78px; height: 78px; border: 4px solid #fff; box-shadow: 0 12px 28px rgba(11, 54, 71, .16); font-size: 24px; }
.velensio-agent-profile-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); align-items: start; gap: 20px; margin-top: 26px; }
.velensio-agent-profile-details, .velensio-agent-profile-photo, .velensio-agent-profile-public { min-width: 0; padding: 25px; border: 1px solid #dce8e9; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(18, 61, 73, .055); }
.velensio-agent-profile-side { display: grid; gap: 20px; }
.velensio-agent-profile-card-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.velensio-agent-profile-step { display: inline-grid; flex: none; place-items: center; width: 33px; height: 33px; border-radius: 11px; background: #e9f5f2; color: #166c6a; font-size: 11px; font-weight: 900; }
.velensio-agent-profile-card-heading h3 { margin: 0 0 4px; color: #10394e; font-size: 18px; letter-spacing: -.02em; }
.velensio-agent-profile-card-heading p { margin: 0; color: #81969e; font-size: 12px; line-height: 1.45; }
.velensio-agent-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.velensio-agent-profile-field { display: grid; grid-template-rows: auto minmax(48px, 1fr) auto; gap: 10px; min-width: 0; padding: 16px; border: 1px solid #e0eaeb; border-radius: 15px; background: #f9fcfb; }
.velensio-agent-profile-field.is-wide { grid-column: 1 / -1; }
.velensio-agent-profile-field-head { min-height: 18px; }
.velensio-agent-profile-field-head > label, .velensio-agent-profile-field-head > span { color: #3f6070; font-size: 12px; font-weight: 800; }
.velensio-agent-visibility { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #dbe4e6; border-radius: 999px; background: #f5f8f9; color: #526c76; font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.velensio-agent-visibility:has(input:checked) { border-color: #c8e5de; background: #eaf7f3; color: #176e67; }
.velensio-agent-visibility input { width: 14px; height: 14px; margin: 0; accent-color: #117a74; cursor: pointer; }
.velensio-agent-profile-field > .velensio-agent-visibility { justify-self: start; align-self: end; max-width: 100%; white-space: normal; }
.velensio-agent-profile-field > input, .velensio-agent-profile-field > textarea { box-sizing: border-box; align-self: start; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #d5e2e6; border-radius: 12px; background: #fff; color: #10394e; font: inherit; font-size: 13px; font-weight: 650; }
.velensio-agent-profile-field > textarea { min-height: 84px; resize: vertical; font-weight: 500; line-height: 1.45; }
.velensio-agent-profile-field > input:focus, .velensio-agent-profile-field > textarea:focus { outline: 3px solid rgba(28, 145, 135, .14); border-color: #5bb2aa; }
.velensio-agent-profile-readonly { display: flex; flex-wrap: wrap; align-content: start; align-items: center; gap: 6px 10px; min-height: 48px; }
.velensio-agent-profile-readonly .velensio-public-grade { margin: 0; }
.velensio-agent-profile-readonly small { color: #92a5aa; font-size: 10px; }
.velensio-agent-profile-save { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 25px; padding-top: 21px; border-top: 1px solid #e7eeee; }
.velensio-agent-profile-save span { max-width: 320px; color: #7a9099; font-size: 11px; line-height: 1.5; }
.velensio-agent-profile-save .btn { white-space: nowrap; }
.velensio-agent-profile-photo-preview { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid #e1ebec; border-radius: 14px; background: #f7faf9; }
.velensio-agent-profile-photo-preview .velensio-agent-avatar { flex: none; width: 58px; height: 58px; font-size: 19px; }
.velensio-agent-profile-photo-preview strong, .velensio-agent-profile-photo-preview small { display: block; }
.velensio-agent-profile-photo-preview strong { color: #21495a; font-size: 12px; }
.velensio-agent-profile-photo-preview small { margin-top: 3px; color: #8a9da3; font-size: 10px; }
.velensio-agent-profile-photo-visibility { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 15px 0; }
.velensio-agent-profile-photo-visibility > button { padding: 0; border: 0; background: none; color: #256e77; font: inherit; font-size: 10px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.velensio-agent-profile-upload { display: grid; gap: 10px; }
.velensio-agent-profile-upload > label { color: #45616e; font-size: 11px; font-weight: 800; }
.velensio-agent-profile-upload input { box-sizing: border-box; width: 100%; padding: 9px; border: 1px dashed #bdd4d9; border-radius: 11px; background: #fbfdfd; color: #365c69; font-size: 11px; }
.velensio-agent-profile-upload .btn { justify-self: start; }
.velensio-agent-profile-remove { margin-top: 12px; }
.velensio-agent-profile-public { border-color: #244f5c; background: linear-gradient(145deg, #123a4c, #0d2f40); color: #fff; box-shadow: 0 18px 40px rgba(11, 48, 63, .16); }
.velensio-agent-profile-public .velensio-agent-profile-step { background: rgba(225, 190, 118, .16); color: #e4bf77; }
.velensio-agent-profile-public .velensio-agent-profile-card-heading h3 { color: #fff; }
.velensio-agent-profile-public .velensio-agent-profile-card-heading p { color: #a9c0c7; }
.velensio-agent-profile-public-card { display: flex; align-items: center; gap: 12px; }
.velensio-agent-profile-public-card .velensio-agent-avatar { flex: none; width: 49px; height: 49px; border: 2px solid rgba(255, 255, 255, .45); }
.velensio-agent-profile-public-card strong, .velensio-agent-profile-public-card small { display: block; }
.velensio-agent-profile-public-card strong { font-size: 14px; }
.velensio-agent-profile-public-card small { margin-top: 3px; color: #b2d3d4; font-size: 11px; }
.velensio-agent-profile-public-contact { display: grid; gap: 8px; margin-top: 17px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .18); }
.velensio-agent-profile-public-contact span { color: #d8e7e7; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.velensio-agent-profile-public-empty { margin: 15px 0 0; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .18); color: #b2c9ce; font-size: 11px; }
.velensio-customer-agent { display: block; width: min(100%, 720px); padding: 17px 20px; border-color: #d4e6e4; border-radius: 16px; background: linear-gradient(125deg, #f5faf8, #fff); box-shadow: 0 9px 25px rgba(19, 68, 72, .045); }
.velensio-customer-agent-main { display: flex; align-items: center; gap: 12px; }
.velensio-customer-agent-main .velensio-agent-avatar { flex: none; width: 45px; height: 45px; }
.velensio-customer-agent-contacts { display: flex; flex-wrap: wrap; gap: 9px 19px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #dcebe8; }
.velensio-customer-agent-contacts > * { color: #235c63; font-size: 11px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.velensio-customer-agent-contacts > * > span { display: block; margin-bottom: 3px; color: #82999a; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
@media (max-width: 1080px) { .velensio-agent-profile-layout { grid-template-columns: 1fr; } .velensio-agent-profile-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .velensio-agent-profile-side { grid-template-columns: 1fr; } .velensio-agent-profile-fields { grid-template-columns: 1fr; } .velensio-agent-profile-field.is-wide { grid-column: auto; } .velensio-agent-profile-save { align-items: stretch; flex-direction: column; } .velensio-agent-profile-save .btn { width: 100%; } }
@media (max-width: 480px) { .velensio-support-agent-profile-head { flex-direction: column-reverse; align-items: flex-start; } .velensio-agent-profile-portrait { justify-items: start; } .velensio-agent-profile-details, .velensio-agent-profile-photo, .velensio-agent-profile-public { padding: 20px; } .velensio-agent-profile-field { padding: 14px; } }
.velensio-grade-form { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.velensio-grade-form select { min-width: 125px; padding: 6px 8px; border: 1px solid #d4e2e8; border-radius: 7px; background: #fff; color: #17394e; font-size: 11px; }
.velensio-grade-form .btn { padding: 6px 9px; font-size: 10px; }
@media (max-width: 1450px) { .velensio-support-layout { grid-template-columns: minmax(290px, .85fr) minmax(380px, 1.3fr); } .velensio-support-inspector { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-top: 1px solid #e7eef0; border-left: 0; } .velensio-support-inspector h2 { grid-column: 1 / -1; margin: 0; } .velensio-support-inspector-section { border-top: 0; padding: 0; } }
@media (max-width: 880px) { .velensio-support-layout { grid-template-columns: 1fr; } .velensio-support-inbox { border-right: 0; border-bottom: 1px solid #e7eef0; } .velensio-support-thread { min-height: 400px; } .velensio-support-back { display: inline-block; } .velensio-support-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .velensio-support-agent-profile-forms { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .velensio-support-header { align-items: flex-start; flex-direction: column; } .velensio-support-layout { border-radius: 10px; } .velensio-support-inspector { display: block; } .velensio-support-inspector-section { padding: 13px 0; border-top: 1px solid #e6edef; } .velensio-support-agent-profile-forms { grid-template-columns: 1fr; } .velensio-support-thread-head, .velensio-support-thread-scroll, .velensio-support-composer { padding-right: 16px; padding-left: 16px; } .velensio-support-compose-heading { display: grid; } }
@media (max-width: 1050px) { .velensio-product-columns { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .saas-admin-body .saas-page-heading { align-items: flex-start; flex-direction: column; } }
@media (max-width: 580px) { .velensio-product-hero { flex-direction: column; padding: 22px; } }
@media (max-width: 1160px) { .velensio-overview-grid, .velensio-support-grid { grid-template-columns: 1fr; } .velensio-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .saas-admin-shell { display: block; } .saas-admin-sidebar { width: 100%; min-height: 0; padding: 12px 16px; } .saas-sidebar-intro, .saas-sidebar-footer { display: none; } .saas-sidebar-nav { display: flex; gap: 4px; overflow-x: auto; margin: 0; white-space: nowrap; } .saas-sidebar-nav p, .saas-sidebar-subnav { display: none; } .saas-sidebar-nav a { flex: 0 0 auto; } .saas-admin-body .saas-admin-main { padding: 22px 16px 44px; } .velensio-hero { align-items: flex-start; flex-direction: column; } .velensio-product-row { grid-template-columns: 44px 1fr auto; } .velensio-product-row > .saas-status { grid-column: 2 / 4; justify-self: start; } }
@media (max-width: 580px) { .saas-admin-body .saas-admin-header { min-height: 65px; padding: 10px 16px; align-items: center; flex-direction: row; } .saas-admin-body .saas-admin-header .platform-entry-brand-logo { width: 135px; } .saas-admin-header-actions { align-items: flex-end; gap: 4px; } .saas-admin-body .saas-admin-header-label { display: none; } .saas-admin-logout { padding: 7px 9px; font-size: 11px; } .velensio-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .velensio-stat { min-height: 110px; padding: 14px; } .velensio-stat strong { font-size: 28px; } .velensio-panel { padding: 18px; } .velensio-product-volume { display: none; } .velensio-product-row { grid-template-columns: 44px 1fr; } .velensio-product-row > .saas-status { grid-column: 2; } .velensio-ticket-preview a { grid-template-columns: 70px 1fr 14px; } .velensio-ticket-preview small { display: none; } .organization-support-callout { flex-direction: column; align-items: flex-start; } }

.velensio-team-page { display: grid; gap: 20px; }
.saas-client-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-top: -12px; }
.saas-client-filters a { display: inline-flex; align-items: center; gap: 8px; min-height: 39px; padding: 7px 13px; border: 1px solid #d7e5ea; border-radius: 999px; background: #fff; color: #31596a; font-size: 13px; font-weight: 800; }
.saas-client-filters a:hover { border-color: #8dbdc2; background: #f2f9f8; }
.saas-client-filters a[aria-current="page"] { border-color: #14777d; background: #e9f6f4; color: #115e65; }
.saas-client-filters a span { color: #688390; font-size: 12px; }
.saas-client-affiliations { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.saas-client-affiliations span:not(.muted) { display: inline-flex; padding: 5px 9px; border: 1px solid #c8e4e0; border-radius: 999px; background: #edf8f6; color: #176766; font-size: 11px; font-weight: 850; white-space: nowrap; }
.saas-client-pending-note { margin: 0; padding: 12px 15px; border: 1px solid #e8d7b3; border-radius: 9px; background: #fff8ea; color: #76581d; font-size: 13px; line-height: 1.5; }
.saas-client-empty { padding: 28px !important; color: #627b88 !important; text-align: center !important; }
.velensio-team-page .velensio-hero { margin-bottom: 0; }
.velensio-team-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.velensio-team-count { color: #617b8b; font-size: 13px; font-weight: 750; white-space: nowrap; }
.velensio-team-add { min-height: 42px; padding: 0 16px; border-radius: 11px; white-space: nowrap; }
.velensio-team-add span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.18); font-size: 21px; font-weight: 500; line-height: 1; }
.velensio-team-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid #dce8ed; border-radius: 18px; background: #fff; color: #17394e; box-shadow: 0 30px 80px rgba(4, 20, 32, .28); }
.velensio-team-dialog::backdrop { background: rgba(8, 29, 44, .58); }
.velensio-team-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #e3edf0; background: #f8fbfc; }
.velensio-team-dialog-head .eyebrow { margin: 0 0 5px; }
.velensio-team-dialog-head h2 { margin: 0; color: #14364c; font-size: 24px; letter-spacing: -.035em; }
.velensio-team-dialog-body { padding: 22px 24px 26px; }
.velensio-team-dialog-body > p { margin: 0; line-height: 1.5; }
.velensio-team-dialog .saas-admin-form { margin-top: 22px; }
.velensio-team-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.velensio-team-page .saas-admin-table th, .velensio-team-page .saas-admin-table td { vertical-align: top; }
.velensio-team-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.velensio-team-identity .velensio-agent-avatar { width: 46px; height: 46px; font-size: 17px; }
.velensio-team-identity-details { min-width: 0; overflow-wrap: anywhere; }
.velensio-team-user-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.velensio-team-user-form select { min-width: 110px; max-width: 180px; padding: 8px; border: 1px solid #d4e2e8; border-radius: 9px; background: #fff; color: #17394e; }
.velensio-team-invite-form { margin-top: 7px; }
.velensio-team-invitation { display: grid; gap: 12px; padding: 20px; border: 1px solid #b7d8cc; border-radius: 15px; background: #f2faf6; }
.velensio-team-invitation strong { color: #185947; }
.velensio-team-invitation p { margin: 5px 0 0; color: #517164; }
.velensio-team-invitation input { width: 100%; padding: 11px; border: 1px solid #b7d8cc; border-radius: 9px; background: #fff; color: #17394e; }
.velensio-team-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.velensio-team-group { min-width: 0; padding: 20px; border: 1px solid #dfebef; border-radius: 15px; background: #fbfdfe; }
.velensio-team-group-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.velensio-team-group-head .velensio-role-chip { flex: 0 0 auto; border-color: #b9d8dc; background: #e8f4f5; color: #164d60; font-weight: 850; }
.velensio-team-group h3 { margin: 5px 0 4px; color: #183a4d; font-size: 20px; }
.velensio-team-group p { margin: 0; color: #66808e; font-size: 13px; line-height: 1.5; }
.velensio-team-rights-summary { margin-top: 16px !important; font-weight: 700; color: #256b72 !important; }
.velensio-team-group .saas-admin-form { margin-top: 16px; }
.velensio-team-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.velensio-team-presets span { width: 100%; font-size: 12px; font-weight: 750; color: #527181; }
.velensio-team-rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.velensio-team-rights-grid label { display: flex; align-items: start; gap: 7px; min-width: 0; padding: 9px 10px; border: 1px solid #e1eaee; border-radius: 9px; background: #fff; font-size: 12px; line-height: 1.4; }
.velensio-team-rights-grid input { flex: 0 0 auto; width: auto; margin-top: 2px; }
.velensio-team-matrix td { text-align: center; font-weight: 800; color: #206c6e; }
.velensio-team-matrix th:first-child { min-width: 240px; }
.velensio-team-new-group .saas-admin-form { margin-top: 15px; }
@media (max-width: 1150px) { .velensio-team-groups { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .velensio-team-rights-grid { grid-template-columns: 1fr; } .velensio-team-group-head { flex-direction: column; } .velensio-team-page #utilisateurs .velensio-panel-heading { flex-direction: column; } .velensio-team-heading-actions { justify-content: flex-start; } .velensio-team-dialog-head, .velensio-team-dialog-body { padding-right: 18px; padding-left: 18px; } }

/* Compact controls shared by the SaaS settings pages. */
.saas-admin-body label:not(.ai-task-toggle):not(.saas-setting-toggle) > input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    accent-color: #16877d;
    box-shadow: none;
}
.saas-admin-body label.saas-setting-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 68px;
    padding: 13px 16px;
    border: 1px solid #d6e4e8;
    border-radius: 12px;
    background: linear-gradient(115deg, #f8fbfc, #fff);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.saas-admin-body label.saas-setting-toggle:hover { border-color: #a8cfcc; }
.saas-admin-body label.saas-setting-toggle:has(> input:checked) {
    border-color: #a8d7cf;
    background: linear-gradient(115deg, #f1faf7, #fff);
}
.saas-admin-body .saas-setting-toggle > input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    clip-path: inset(50%);
}
.saas-setting-toggle-track {
    position: relative;
    display: block;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #aebec7;
    transition: background .18s ease;
}
.saas-setting-toggle-track::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 43, 66, .2);
    content: '';
    transition: transform .18s ease;
}
.saas-setting-toggle > input:checked + .saas-setting-toggle-track { background: #16877d; }
.saas-setting-toggle > input:checked + .saas-setting-toggle-track::after { transform: translateX(18px); }
.saas-setting-toggle > input:focus-visible + .saas-setting-toggle-track { outline: 3px solid #57bcb3; outline-offset: 3px; }
.saas-setting-toggle-copy { display: grid; min-width: 0; gap: 3px; }
.saas-setting-toggle-copy strong { color: #183d50; font-size: 14px; line-height: 1.35; }
.saas-admin-body .saas-setting-toggle-copy small { color: #667e8c; font-size: 12px; font-weight: 500; line-height: 1.45; }
.saas-setting-toggle-status {
    padding: 6px 9px;
    border: 1px solid #dbe5e9;
    border-radius: 999px;
    background: #f3f6f7;
    color: #627b89;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.saas-setting-toggle-status::after { content: 'Désactivé'; }
.saas-setting-toggle > input:checked ~ .saas-setting-toggle-status { border-color: #b9dfd4; background: #eaf7f2; color: #1c7568; }
.saas-setting-toggle > input:checked ~ .saas-setting-toggle-status::after { content: 'Activé'; }
.saas-setting-toggle.is-approval .saas-setting-toggle-status::after { content: 'Non approuvé'; }
.saas-setting-toggle.is-approval > input:checked ~ .saas-setting-toggle-status::after { content: 'Approuvé'; }
.saas-admin-body label.saas-setting-toggle.is-danger:has(> input:checked) { border-color: #e4b6ad; background: #fff7f5; }
.saas-setting-toggle.is-danger .saas-setting-toggle-status::after { content: 'Conserver'; }
.saas-setting-toggle.is-danger > input:checked + .saas-setting-toggle-track { background: #bd6556; }
.saas-setting-toggle.is-danger > input:checked ~ .saas-setting-toggle-status { border-color: #ecc9c2; background: #fff0ed; color: #a34b3f; }
.saas-setting-toggle.is-danger > input:checked ~ .saas-setting-toggle-status::after { content: 'À supprimer'; }
.saas-admin-body .saas-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 9px; }
.saas-admin-body .saas-check-grid label {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 50px;
    padding: 10px 13px;
    border-color: #dce7eb;
    border-radius: 9px;
    background: #fff;
    color: #315469;
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
}
.saas-admin-body .saas-check-grid label:has(> input:checked),
.saas-admin-body .saas-entitlement-product label:has(> input:checked),
.saas-admin-body .velensio-team-rights-grid label:has(> input:checked) { border-color: #b5dcd3; background: #f1faf7; }
.saas-admin-body .saas-check-grid label:focus-within,
.saas-admin-body .saas-entitlement-product label:focus-within,
.saas-admin-body .velensio-team-rights-grid label:focus-within { outline: 2px solid #57bcb3; outline-offset: 2px; }
.saas-admin-body .saas-check-grid label.disabled { background: #f4f6f7; color: #718591; cursor: not-allowed; }
.saas-admin-body .saas-check-grid label span { min-width: 0; }
.saas-admin-body .saas-check-grid label small { display: block; margin-top: 2px; font-size: 10px; }
.saas-admin-body .saas-inline-form label.check { align-items: center; min-height: 44px; padding: 8px 11px; border: 1px solid #dce7eb; border-radius: 9px; background: #fff; }
@media (max-width: 600px) {
    .saas-admin-body label.saas-setting-toggle { grid-template-columns: 42px minmax(0, 1fr); gap: 8px 12px; }
    .saas-admin-body .saas-setting-toggle-status { grid-column: 2; justify-self: start; }
    .saas-admin-body .saas-check-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
}

/* Tax dossier: one clear next step, based on the cabinet's recorded state. */
.client-next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 20px;
    padding: 19px 22px;
    border: 1px solid #c8dde5;
    border-left: 4px solid #bf8c3c;
    border-radius: 16px;
    background: #f8fbfc;
    box-shadow: 0 8px 24px rgb(15 52 72 / 5%);
}
.client-next-step-review { border-left-color: #3b8f8d; }
.client-next-step-complete { border-left-color: #27806f; }
.client-next-step h2 { margin: 2px 0 7px; color: #113c52; font-size: clamp(18px, 2vw, 23px); }
.client-next-step p:not(.eyebrow) { margin: 0; color: #466575; line-height: 1.55; }
.client-next-step ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 0; padding: 0; list-style: none; }
.client-next-step li { padding: 5px 9px; border-radius: 7px; background: #e8f1f4; color: #17465a; font-size: 13px; font-weight: 650; }
.client-next-step > .btn { flex: none; }
.queue-daily-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.queue-daily-summary span { display: inline-flex; align-items: baseline; gap: 6px; padding: 10px 14px; border: 1px solid #d8e5ea; border-radius: 10px; background: #f8fbfc; color: #436477; }
.queue-daily-summary strong { color: #123f54; font-size: 19px; }
.queue-next-action { min-width: 190px; }
.queue-next-action strong, .queue-next-action small { display: block; }
.queue-next-action strong { color: #16475b; }
.queue-next-action small { margin-top: 4px; color: #587383; line-height: 1.35; }
@media (max-width: 680px) {
    .client-next-step { align-items: stretch; flex-direction: column; padding: 17px; }
    .client-next-step > .btn { align-self: flex-start; }
}

/* Cabinet statistics: a distinct analytical layer, driven by recorded events. */
.statistics-dashboard { max-width: 1680px; margin-inline: auto; gap: 28px; }
.statistics-dashboard .admin-head h1 { letter-spacing: -.035em; }
.statistics-dashboard .statistics-filter-panel { border: 1px solid #dce7e9; border-radius: 22px; background: #f9fcfb; }
.statistics-dashboard .stats-kpi-grid { gap: 13px; }
.statistics-dashboard .stats-kpi-card { min-height: 128px; border-radius: 20px; border-color: #dce8e8; background: #fff; box-shadow: 0 12px 30px rgb(21 54 66 / 5%); }
.statistics-dashboard .stats-kpi-card span { color: #4a6a72; font-size: 12px; letter-spacing: .075em; }
.statistics-dashboard .stats-kpi-card strong { color: #143443; letter-spacing: -.04em; }
.statistics-dashboard .stats-kpi-card.success { background: #effaf5; }
.statistics-dashboard .stats-kpi-card.warning { background: #fff9ef; }
.stats-insights { display: grid; gap: 18px; padding: clamp(16px, 2vw, 28px); border: 1px solid #e1e8e5; border-radius: 30px; background: linear-gradient(145deg, #f2f8f6, #f7faf9 56%, #f9f8f4); }
.stats-insights-heading { display: flex; justify-content: space-between; align-items: end; gap: 22px; padding: 4px 3px 8px; }
.stats-insights-heading .eyebrow { margin: 0 0 7px; color: #17806f; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.stats-insights-heading h2 { margin: 0; color: #153b43; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -.035em; }
.stats-insights-heading p:not(.eyebrow) { margin: 10px 0 0; color: #5c7479; line-height: 1.5; }
.stats-period-pill, .stats-card-badge { white-space: nowrap; padding: 9px 13px; border: 1px solid #d9e7e4; border-radius: 999px; background: #fff; color: #47716e; font-size: 12px; font-weight: 800; }
.stats-insights-grid { display: grid; gap: 18px; min-width: 0; }
.stats-insights-lead { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.stats-insights-tempo { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
.stats-insights-bottom, .stats-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-insight-card { min-width: 0; padding: clamp(20px, 2vw, 28px); border: 1px solid #dfe8e7; border-radius: 24px; background: #fff; box-shadow: 0 15px 38px rgb(20 64 64 / 5%); }
.stats-insight-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 22px; }
.stats-card-kicker { display: block; margin-bottom: 7px; color: #1b907a; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.stats-insight-card h3 { margin: 0; color: #173943; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.22; letter-spacing: -.028em; }
.stats-insight-note { margin: 19px 0 0; color: #71868a; font-size: 12px; line-height: 1.5; }
.stats-insight-empty { display: grid; place-items: center; min-height: 160px; padding: 24px; border: 1px dashed #cadbd8; border-radius: 18px; background: #f8fbfa; color: #688188; text-align: center; }
.stats-text-link { color: #147866; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.stats-text-link:hover { text-decoration: underline; }
.stats-trend-card { overflow: hidden; border-color: #123a41; background: radial-gradient(circle at 90% 8%, #245a5a 0, transparent 38%), linear-gradient(130deg, #143941, #102a37); box-shadow: 0 20px 45px rgb(12 49 58 / 18%); }
.stats-trend-card .stats-card-kicker { color: #7ce0c4; }
.stats-trend-card h3 { color: #fff; }
.stats-trend-card .stats-card-badge { border-color: rgb(189 241 226 / 25%); background: rgb(255 255 255 / 8%); color: #d2f3e8; }
.stats-trend-total { display: flex; align-items: baseline; gap: 13px; color: #bfd4d6; }
.stats-trend-total strong { color: #fff; font-size: clamp(44px, 5vw, 68px); line-height: 1; letter-spacing: -.07em; }
.stats-trend-total span { font-size: 13px; font-weight: 700; }
.stats-trend-graph { min-height: 190px; margin-top: 14px; }
.stats-trend-graph svg { display: block; width: 100%; height: auto; max-height: 215px; overflow: visible; }
.stats-trend-grid { fill: none; stroke: rgb(219 248 239 / 16%); stroke-width: 1; stroke-dasharray: 5 8; }
.stats-trend-line { fill: none; stroke: #83ebcc; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.stats-trend-point { fill: #d9fff1; stroke: #1d756b; stroke-width: 2; }
.stats-trend-card .stats-insight-empty { border-color: rgb(255 255 255 / 20%); background: rgb(255 255 255 / 5%); color: #c6dedf; }
.stats-trend-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #b8d1d1; font-size: 11px; font-weight: 750; }
.stats-mix-list { display: grid; gap: 20px; }
.stats-mix-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #385760; font-size: 13px; font-weight: 750; }
.stats-mix-row strong { color: #173943; font-size: 15px; white-space: nowrap; }
.stats-mix-row small { margin-left: 5px; color: #809497; font-size: 12px; font-weight: 700; }
.stats-mix-track, .stats-missing-track { height: 8px; overflow: hidden; border-radius: 999px; background: #edf2f1; }
.stats-mix-track i, .stats-missing-track i { display: block; height: 100%; border-radius: inherit; background: #48bf9b; }
.stats-mix-row.tone-blue i { background: #5b97d2; }
.stats-mix-row.tone-amber i { background: #e4ac62; }
.stats-mix-row.tone-violet i { background: #9b83d6; }
.stats-mix-row.tone-teal i { background: #4eb8b2; }
.stats-weekday-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: clamp(8px, 1.5vw, 17px); min-height: 235px; padding: 4px 0 0; }
.stats-weekday-column { display: grid; justify-items: center; align-items: end; gap: 8px; color: #627c82; font-size: 12px; font-weight: 800; }
.stats-weekday-count { color: #1a575a; font-size: 13px; }
.stats-weekday-track { width: 100%; height: 160px; display: flex; align-items: end; padding: 0 2px; border-bottom: 1px solid #d3dfdf; }
.stats-weekday-track i { display: block; width: 100%; min-height: 0; border-radius: 9px 9px 3px 3px; background: linear-gradient(180deg, #60c7ac, #168a7d); box-shadow: 0 8px 16px rgb(32 137 119 / 12%); }
.stats-weekday-column:nth-child(6) i, .stats-weekday-column:nth-child(7) i { background: linear-gradient(180deg, #8cc6d4, #5a93a6); }
.stats-heat-scroll { overflow-x: auto; }
.stats-heatmap { display: grid; grid-template-columns: 36px repeat(12, minmax(0, 1fr)); gap: 5px; min-width: 530px; align-items: center; }
.stats-heat-hour, .stats-heat-day { color: #6d8588; font-size: 10px; font-weight: 800; text-align: center; }
.stats-heat-day { text-align: left; }
.stats-heat-cell { display: block; height: 25px; border-radius: 6px; background: #edf3f1; }
.stats-heat-cell.level-1, .stats-heat-legend .level-1 { background: #cdece1; }
.stats-heat-cell.level-2, .stats-heat-legend .level-2 { background: #8dd7bd; }
.stats-heat-cell.level-3, .stats-heat-legend .level-3 { background: #43ae91; }
.stats-heat-cell.level-4, .stats-heat-legend .level-4 { background: #147d72; }
.stats-heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 16px; color: #7e9393; font-size: 11px; font-weight: 800; }
.stats-heat-legend i { display: inline-block; width: 16px; height: 14px; border-radius: 4px; }
.stats-heat-legend .level-0 { background: #edf3f1; }
.stats-response-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stats-response-summary > div { padding: 12px; border: 1px solid #e1ebe9; border-radius: 14px; background: #f8fbfa; }
.stats-response-summary strong, .stats-response-summary span { display: block; }
.stats-response-summary strong { color: #143b43; font-size: 25px; line-height: 1.1; letter-spacing: -.04em; }
.stats-response-summary span { margin-top: 4px; color: #698185; font-size: 11px; line-height: 1.3; }
.stats-response-summary .is-warning { background: #fff8ed; border-color: #f2d9b7; }
.stats-response-summary .is-warning strong { color: #b76c25; }
.stats-response-chart { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; min-height: 195px; }
.stats-response-column { display: grid; justify-items: center; gap: 8px; min-width: 0; color: #6a8186; font-size: 11px; text-align: center; }
.stats-response-value { color: #234d57; font-size: 13px; font-weight: 900; }
.stats-response-track { display: flex; align-items: end; width: min(100%, 58px); height: 130px; }
.stats-response-track i { display: block; width: 100%; border-radius: 9px 9px 3px 3px; background: linear-gradient(180deg, #59c8aa, #188b78); }
.stats-response-column:nth-child(4) i { background: linear-gradient(180deg, #efc686, #d99643); }
.stats-response-column:nth-child(5) i { background: linear-gradient(180deg, #e6a38f, #ca735d); }
.stats-missing-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.stats-missing-bars li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; }
.stats-missing-rank { color: #9fb0b1; font-size: 12px; font-weight: 900; }
.stats-missing-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.stats-missing-label strong { overflow: hidden; color: #23434c; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.stats-missing-label span { color: #1d5f61; font-size: 13px; font-weight: 900; }
.stats-missing-track i { background: linear-gradient(90deg, #e7b877, #cf8653); }
.stats-reference-grid > .panel { min-width: 0; }
.stats-status-grid { gap: 18px; }
.stats-status-layout { display: flex; align-items: center; gap: clamp(20px, 3vw, 54px); }
.stats-status-donut { flex: none; width: clamp(150px, 16vw, 220px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; }
.stats-status-donut > div { width: 63%; aspect-ratio: 1; border-radius: 50%; display: grid; align-content: center; justify-items: center; background: #fff; box-shadow: inset 0 0 0 1px #e3ecea; }
.stats-status-donut strong { color: #173d44; font-size: clamp(29px, 3vw, 42px); line-height: 1; letter-spacing: -.05em; }
.stats-status-donut span { margin-top: 4px; color: #7b9091; font-size: 11px; font-weight: 700; }
.stats-status-legend, .stats-payment-legend { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stats-status-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: #526d73; font-size: 13px; }
.stats-status-legend i { width: 10px; height: 10px; border-radius: 50%; }
.stats-status-legend strong, .stats-payment-legend strong { color: #193e46; }
.stats-payment-stack { display: flex; height: 22px; overflow: hidden; border-radius: 999px; background: #edf2f1; }
.stats-payment-stack span { display: block; min-width: 0; background: #7eb4c4; }
.stats-payment-stack .state-paye { background: #28a37f; }
.stats-payment-stack .state-en_attente { background: #e8b263; }
.stats-payment-stack .state-refuse { background: #cc765e; }
.stats-payment-stack .state-rembourse { background: #9d89c5; }
.stats-payment-legend { margin-top: 21px; }
.stats-payment-legend li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #edf2f1; color: #526d73; font-size: 13px; }
@media (max-width: 1200px) {
    .stats-insights-lead, .stats-insights-tempo, .stats-insights-bottom, .stats-status-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .statistics-dashboard .stats-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-insights { padding: 14px; border-radius: 22px; }
    .stats-insights-heading { display: block; }
    .stats-period-pill { display: inline-block; margin-top: 14px; }
    .stats-insight-card { padding: 19px; border-radius: 20px; }
    .stats-insight-card-heading { flex-wrap: wrap; }
    .stats-status-layout { flex-wrap: wrap; }
    .stats-trend-graph { min-height: 0; }
    .stats-trend-graph svg { height: 148px; max-height: none; }
}
@media (max-width: 470px) {
    .statistics-dashboard .stats-kpi-grid { grid-template-columns: 1fr; }
    .stats-response-summary { gap: 5px; }
    .stats-response-summary > div { padding: 9px; }
    .stats-response-summary strong { font-size: 19px; }
    .stats-response-chart { gap: 4px; }
    .stats-response-column { font-size: 10px; }
    .stats-trend-foot span:nth-child(2) { display: none; }
}

/* Parcours client: focused editing workspace for cabinet administrators. */
.dashboard-shell.intake-builder-shell {
    width: min(100%, 1580px);
    margin-inline: auto;
    gap: 24px;
    padding: clamp(20px, 3vw, 46px);
}
.intake-builder-shell .admin-head {
    align-items: flex-start;
}
.intake-builder-form.panel,
.intake-builder-shell .intake-builder-preview.panel {
    border: 1px solid #dce8ed;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(20, 51, 68, .065);
}
.intake-builder-form.panel {
    display: block;
    min-width: 0;
    padding: clamp(22px, 3vw, 42px);
}
.intake-builder-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 22px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5edf0;
}
.intake-builder-toolbar-copy { min-width: 0; }
.intake-builder-kicker {
    display: block;
    margin-bottom: 8px;
    color: #167080;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.intake-builder-toolbar h2 {
    margin: 0;
    color: #173b4e;
    font-size: clamp(27px, 2.4vw, 36px);
    line-height: 1.15;
    letter-spacing: -.035em;
}
.intake-builder-toolbar p {
    max-width: 760px;
    margin: 10px 0 0;
    line-height: 1.55;
}
.intake-builder-toolbar .intake-builder-actions {
    align-self: center;
    justify-content: flex-end;
}
.intake-builder-actions .btn {
    min-height: 44px;
    border-radius: 12px;
    white-space: nowrap;
}
.intake-builder-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 16px;
}
.intake-builder-overview > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid #dfeaec;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbfb, #fff);
}
.intake-builder-overview span {
    color: #597481;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.3;
}
.intake-builder-overview strong {
    flex: none;
    color: #135e77;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
}
.intake-builder-overview small {
    color: #8298a1;
    font-size: 14px;
    letter-spacing: 0;
}
.intake-builder-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5edf0;
}
.intake-builder-nav a {
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #456878;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.intake-builder-nav a:hover,
.intake-builder-nav a:focus-visible {
    border-color: #cbdfe5;
    background: #f1f8fa;
    color: #0e6189;
}
.intake-standard-steps,
.intake-custom-elements,
.intake-category-editor,
.intake-builder-preview {
    scroll-margin-top: 28px;
}
.intake-standard-steps,
.intake-custom-elements {
    margin-top: 32px;
}
.intake-builder-shell .section-title-row.compact {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.intake-builder-shell .section-title-row.compact h3 {
    margin: 0;
    color: #173b4e;
    font-size: clamp(21px, 2vw, 27px);
    line-height: 1.2;
    letter-spacing: -.025em;
}
.intake-builder-shell .section-title-row.compact p {
    max-width: 830px;
    margin: 8px 0 0;
    line-height: 1.5;
}
.intake-section-count {
    flex: none;
    padding: 8px 12px;
    border: 1px solid #dce9ed;
    border-radius: 999px;
    background: #f7fbfc;
    color: #456e7c;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.intake-builder-shell .intake-builder-list { gap: 11px; }
.intake-builder-shell .intake-builder-card {
    display: block;
    min-width: 0;
    border-color: #dce8ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 51, 68, .045);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.intake-builder-shell .intake-builder-card:hover,
.intake-builder-shell .intake-builder-card[open] {
    border-color: #bed6e0;
    box-shadow: 0 12px 30px rgba(20, 51, 68, .075);
}
.intake-builder-shell .intake-builder-card-summary {
    grid-template-columns: 34px 34px minmax(0, 1fr);
    gap: 12px;
    min-height: 82px;
    padding: 17px 135px 17px 20px;
    background: transparent;
}
.intake-builder-shell .standard-step-card .intake-builder-card-summary {
    grid-template-columns: 34px 34px minmax(0, 1fr) auto;
    padding: 17px 20px;
}
.intake-builder-shell .intake-builder-card:not([open]) .intake-builder-card-summary {
    background: #fff;
}
.intake-builder-shell .intake-builder-card-summary > div { min-width: 0; }
.intake-builder-shell .intake-builder-card-summary strong {
    max-width: 100%;
    color: #173b4e;
    font-size: clamp(17px, 1.4vw, 21px);
    font-weight: 850;
    line-height: 1.28;
    letter-spacing: -.018em;
    overflow-wrap: anywhere;
}
.intake-builder-shell .intake-builder-card-summary small {
    margin-top: 5px;
    color: #68818d;
    font-size: 12px;
    font-weight: 680;
    line-height: 1.35;
}
.intake-step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eef5f7;
    color: #3e7181;
    font-size: 12px;
    font-weight: 900;
}
.intake-builder-shell .intake-builder-card-summary .collapse-arrow {
    width: 34px;
    height: 34px;
    background: #eaf4f9;
}
.intake-builder-shell .intake-builder-card-summary em {
    justify-self: end;
    border-color: #cae8dc;
    background: #f0faf5;
    color: #21805d;
    font-size: 11px;
    letter-spacing: .035em;
}
.intake-builder-shell .intake-builder-card-summary em.is-hidden {
    border-color: #dce4e8;
    background: #f5f7f8;
    color: #667d88;
}
.intake-builder-shell .intake-builder-card.is-new-item .intake-builder-card-summary {
    grid-template-columns: 34px minmax(0, 1fr);
}
.intake-builder-shell .intake-builder-card.is-new-item {
    border-color: #bedacf;
    background: #f8fcfa;
}
.intake-builder-shell .intake-builder-card[open] > .intake-builder-card-body {
    padding: 18px 20px 22px;
    background: #fcfefe;
}
.intake-builder-shell .intake-category-editor {
    margin-top: 32px;
    border-color: #dce8ec;
    border-radius: 18px;
    background: #fff;
}
.intake-builder-shell .intake-category-editor > summary {
    min-height: 66px;
    padding-inline: 20px;
    color: #173b4e;
    font-size: 17px;
}
.intake-builder-shell .intake-category-editor > p,
.intake-builder-shell .intake-category-editor > .intake-category-list {
    margin-inline: 20px;
}
.intake-builder-shell .intake-category-editor > .intake-category-list { margin-bottom: 20px; }
.intake-builder-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e5edf0;
}
.intake-builder-footer p {
    max-width: 520px;
    margin: 0;
    color: #65808b;
    font-size: 13px;
    line-height: 1.5;
}
.intake-builder-footer .intake-builder-actions.bottom { padding: 0; }
.intake-builder-shell .intake-builder-preview.panel {
    padding: clamp(22px, 3vw, 36px);
}
@media (max-width: 1120px) {
    .intake-builder-toolbar { grid-template-columns: 1fr; }
    .intake-builder-toolbar .intake-builder-actions { justify-content: flex-start; }
    .intake-builder-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
    .intake-builder-shell .admin-head { align-items: flex-start; flex-direction: column; }
    .intake-builder-overview { grid-template-columns: 1fr; }
    .intake-builder-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 13px; }
    .intake-builder-nav a { flex: none; white-space: nowrap; }
    .intake-builder-shell .section-title-row.compact { align-items: flex-start; flex-direction: column; }
    .intake-builder-shell .intake-builder-card-summary,
    .intake-builder-shell .intake-builder-card.is-new-item .intake-builder-card-summary {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 9px;
        padding: 15px 115px 15px 15px;
    }
    .intake-builder-shell .standard-step-card .intake-builder-card-summary {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        padding: 15px;
    }
    .intake-builder-shell .intake-step-number,
    .intake-builder-shell .intake-builder-card-summary > .drag-handle { display: none; }
    .intake-builder-shell .intake-builder-card-summary .collapse-arrow { width: 30px; height: 30px; }
    .intake-builder-shell .intake-builder-card-summary em { padding: 6px 8px; font-size: 10px; }
    .intake-builder-shell .intake-builder-card[open] > .intake-builder-card-body { padding: 16px; }
    .intake-builder-footer .intake-builder-actions,
    .intake-builder-toolbar .intake-builder-actions { width: 100%; }
    .intake-standard-item-head { flex-direction: column; }
    .intake-standard-item-actions { width: 100%; justify-content: space-between; }
    .intake-step-custom-row { flex-wrap: wrap; }
    .intake-step-custom-row > span { flex-basis: 100%; }
    .intake-standard-item-card summary { padding-right: 112px; }
    .intake-item-active-pill { right: 9px; padding: 6px 8px; font-size: 11px; }
}

/* Cabinet support and public contact protection settings. */
.dashboard-shell.support-settings-shell {
    width: min(100%, 1580px);
    margin-inline: auto;
    gap: 22px;
    padding: clamp(20px, 3vw, 46px);
}
.support-settings-head { align-items: flex-start; }
.support-settings-head h1 { margin-bottom: 8px; letter-spacing: -.035em; }
.support-settings-head .muted { max-width: 730px; line-height: 1.5; }
.support-settings-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.support-settings-overview article {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    padding: 19px;
    border: 1px solid #dce8ec;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #f8fbfc);
    box-shadow: 0 9px 26px rgba(17, 54, 73, .04);
}
.support-settings-overview-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 11px;
    background: #e8f4f4;
    color: #137e80;
    font-size: 21px;
    font-weight: 850;
}
.support-settings-overview article:nth-child(2) .support-settings-overview-icon { background: #eef4fb; color: #286f9b; }
.support-settings-overview article:nth-child(4) .support-settings-overview-icon { background: #eef8ef; color: #29845e; }
.support-settings-overview article > div { display: grid; min-width: 0; gap: 4px; }
.support-settings-overview small { color: #748b98; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.support-settings-overview strong { color: #183e52; font-size: 17px; line-height: 1.25; }
.support-settings-overview article > div > span { color: #617d8a; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.support-settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 17px;
    border-bottom: 1px solid #dfe9ec;
}
.support-settings-nav a {
    padding: 9px 14px;
    border: 1px solid #dce8ec;
    border-radius: 999px;
    background: #fff;
    color: #3f6577;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.support-settings-nav a:hover,
.support-settings-nav a:focus-visible { border-color: #9bc9d0; background: #f2fbfa; color: #116877; }
.support-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.support-settings-form { display: grid; min-width: 0; gap: 17px; }
.support-settings-card,
.support-settings-advanced,
.support-settings-aside > .panel {
    border: 1px solid #dce8ec;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(18, 53, 72, .055);
}
.support-settings-card { padding: clamp(22px, 2.5vw, 32px); scroll-margin-top: 20px; }
.support-settings-card-head { display: flex; align-items: flex-start; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid #e6eef0; }
.support-settings-card-head > div { min-width: 0; flex: 1; }
.support-settings-section-number { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: #1e7080; background: #eaf5f5; font-size: 13px; font-weight: 900; }
.support-settings-card-head .eyebrow { margin: 1px 0 5px; color: #b38342; font-size: 11px; }
.support-settings-card-head h2 { margin: 0 0 5px; color: #173b4e; font-size: clamp(22px, 2vw, 27px); line-height: 1.2; letter-spacing: -.025em; }
.support-settings-card-head .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.support-settings-card-content { display: grid; gap: 18px; padding-top: 22px; }
.support-settings-card-content label,
.support-settings-advanced-content label { min-width: 0; color: #244758; font-size: 13px; font-weight: 800; }
.support-settings-card-content label > small,
.support-settings-advanced-content label > small { color: #708896; font-size: 12px; font-weight: 560; line-height: 1.45; }
.support-settings-card-content input:not([type="checkbox"]),
.support-settings-card-content textarea,
.support-settings-advanced-content input,
.support-settings-advanced-content textarea { width: 100%; border-radius: 11px; background: #fbfdfe; }
.support-settings-card-content input:focus,
.support-settings-card-content textarea:focus,
.support-settings-advanced-content input:focus,
.support-settings-advanced-content textarea:focus { background: #fff; }
.support-settings-unit { color: #8297a1; font-size: 12px; font-weight: 600; }
.support-settings-switch,
.support-settings-check { display: flex !important; align-items: flex-start; gap: 13px !important; cursor: pointer; }
.support-settings-switch { padding: 15px 17px; border: 1px solid #d3e8df; border-radius: 14px; background: #f4faf7; }
.support-settings-switch input,
.support-settings-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #187c72; }
.support-settings-switch span { display: grid; gap: 4px; }
.support-settings-switch strong { color: #1b5346; font-size: 14px; }
.support-settings-switch small { color: #5f7d70; font-size: 12px; font-weight: 560; line-height: 1.45; }
.support-settings-check { color: #9b4f44 !important; font-size: 12px !important; }
.support-settings-inline-note { margin: 0; padding: 12px 15px; border-radius: 12px; background: #f1f7f9; color: #587688; font-size: 12px; line-height: 1.5; }
.support-settings-state { flex: none; border: 1px solid #dfe6e9; border-radius: 999px; padding: 7px 11px; background: #f5f7f8; color: #6d8490; font-size: 11px; font-weight: 850; }
.support-settings-state.is-ready { border-color: #b7decf; background: #eaf8f2; color: #257753; }
.support-settings-advanced { padding: 0; scroll-margin-top: 20px; }
.support-settings-advanced > summary { display: flex; align-items: center; gap: 15px; padding: 22px 28px; cursor: pointer; list-style: none; }
.support-settings-advanced > summary::-webkit-details-marker { display: none; }
.support-settings-advanced > summary > span:nth-child(2) { display: grid; flex: 1; gap: 4px; min-width: 0; }
.support-settings-advanced > summary small { color: #b38342; font-size: 11px; font-style: normal; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.support-settings-advanced > summary strong { color: #173b4e; font-size: 19px; }
.support-settings-advanced > summary em { color: #6d8793; font-size: 12px; font-style: normal; }
.support-settings-chevron { color: #3c7181; font-size: 26px; transition: transform .2s ease; }
.support-settings-advanced[open] .support-settings-chevron { transform: rotate(180deg); }
.support-settings-advanced-content { display: grid; gap: 18px; padding: 22px 28px 28px; border-top: 1px solid #e6eef0; }
.support-settings-savebar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border: 1px solid #d2e5e8; border-radius: 16px; background: linear-gradient(135deg, #f3faf9, #fff); }
.support-settings-savebar p { margin: 0; color: #547380; font-size: 12px; line-height: 1.45; }
.support-settings-savebar .btn { flex: none; }
.support-settings-aside { display: grid; gap: 16px; }
.support-settings-guide { padding: 24px; }
.support-settings-guide-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 17px; border-radius: 13px; background: #e9f5f3; color: #167d77; font-size: 24px; }
.support-settings-guide .eyebrow,
.support-settings-platform .eyebrow { margin: 0 0 5px; color: #b38342; font-size: 11px; }
.support-settings-guide h2,
.support-settings-platform h3 { margin: 0 0 8px; color: #173b4e; font-size: 21px; }
.support-settings-guide > p:not(.eyebrow),
.support-settings-platform > p:not(.eyebrow) { margin: 0; color: #66818e; font-size: 13px; line-height: 1.55; }
.support-settings-guide-links { display: grid; margin-top: 19px; border-top: 1px solid #e7eef0; }
.support-settings-guide-links a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #e7eef0; color: #1d647c; font-size: 13px; font-weight: 800; text-decoration: none; }
.support-settings-guide-links a:hover { color: #0e91a1; }
.support-settings-platform { padding: 23px; background: linear-gradient(145deg, #fff, #f6faf9) !important; }
@media (max-width: 1140px) {
    .support-settings-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .support-settings-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 900px) {
    .support-settings-layout { grid-template-columns: 1fr; }
    .support-settings-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .support-settings-shell .admin-head { align-items: stretch; flex-direction: column; }
    .support-settings-overview { grid-template-columns: 1fr; }
    .support-settings-nav { flex-wrap: nowrap; overflow-x: auto; }
    .support-settings-nav a { flex: none; white-space: nowrap; }
    .support-settings-card { padding: 20px 16px; }
    .support-settings-card-head { gap: 11px; }
    .support-settings-card-head .support-settings-state { display: none; }
    .support-settings-advanced > summary { padding: 19px 16px; gap: 11px; }
    .support-settings-advanced-content { padding: 18px 16px 22px; }
    .support-settings-savebar { align-items: stretch; flex-direction: column; }
    .support-settings-savebar .btn { width: 100%; }
    .support-settings-aside { grid-template-columns: 1fr; }
}
+
/* Client OAuth configuration */
.dashboard-shell.oauth-settings-shell {
    width: min(100%, 1540px);
    margin-inline: auto;
    gap: 21px;
    padding: clamp(20px, 3vw, 46px);
}
.oauth-settings-head { align-items: flex-start; }
.oauth-settings-head h1 { margin: 2px 0 8px; letter-spacing: -.035em; }
.oauth-settings-head .muted { max-width: 720px; margin: 0; line-height: 1.55; }
.oauth-settings-head > .btn { flex: none; }
.oauth-settings-overview { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 13px; }
.oauth-settings-overview > * {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 19px;
    border: 1px solid #dce7ea;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(19, 53, 69, .045);
    text-decoration: none;
}
.oauth-settings-overview > .oauth-overview-lead { background: linear-gradient(130deg, #173e50, #245c68); border-color: #245866; color: #fff; }
.oauth-settings-overview > * > div { display: grid; min-width: 0; gap: 4px; }
.oauth-settings-overview small { color: #6b8692; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .075em; }
.oauth-settings-overview strong { color: #173a4e; font-size: 18px; line-height: 1.25; }
.oauth-settings-overview div > span:last-child { color: #66808e; font-size: 12px; line-height: 1.4; }
.oauth-overview-lead small, .oauth-overview-lead strong, .oauth-overview-lead div > span:last-child { color: #fff; }
.oauth-overview-lead div > span:last-child { opacity: .78; }
.oauth-overview-symbol, .oauth-mini-mark { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 12px; }
.oauth-overview-symbol { background: rgba(255,255,255,.13); color: #f0d29b; font-size: 26px; }
.oauth-mini-mark { background: #f3f7f9; }
.oauth-mini-microsoft, .oauth-provider-mark-microsoft { display: grid !important; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; padding: 10px; }
.oauth-mini-microsoft i, .oauth-provider-mark-microsoft i { display: block; width: 100%; height: 100%; min-height: 8px; border-radius: 1px; }
.oauth-mini-microsoft i:nth-child(1), .oauth-provider-mark-microsoft i:nth-child(1) { background: #f25022; }
.oauth-mini-microsoft i:nth-child(2), .oauth-provider-mark-microsoft i:nth-child(2) { background: #7fba00; }
.oauth-mini-microsoft i:nth-child(3), .oauth-provider-mark-microsoft i:nth-child(3) { background: #00a4ef; }
.oauth-mini-microsoft i:nth-child(4), .oauth-provider-mark-microsoft i:nth-child(4) { background: #ffb900; }
.oauth-mini-google, .oauth-provider-mark-google { color: #4285f4; font-family: Arial, sans-serif; font-size: 27px; font-weight: 800; }
.oauth-overview-provider:hover, .oauth-overview-provider:focus-visible { border-color: #93c0ca; background: #f8fcfc; box-shadow: 0 12px 26px rgba(19, 53, 69, .09); outline-offset: 3px; }
.oauth-settings-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #e0e9ec; }
.oauth-settings-nav a { padding: 9px 14px; border: 1px solid #dce7ea; border-radius: 999px; background: #fff; color: #3c6474; font-size: 13px; font-weight: 800; text-decoration: none; }
.oauth-settings-nav a:hover, .oauth-settings-nav a:focus-visible { border-color: #8fc7c8; background: #f2faf8; color: #0c6974; outline-offset: 3px; }
.oauth-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.oauth-settings-providers, .oauth-settings-aside { display: grid; min-width: 0; gap: 20px; }
.oauth-provider-card, .oauth-settings-aside > .panel, .oauth-settings-demo-card, .oauth-settings-demo-providers > .panel { border: 1px solid #dce7ea; border-radius: 22px; background: #fff; box-shadow: 0 14px 36px rgba(18, 53, 72, .055); }
.oauth-provider-card { padding: 0; overflow: hidden; scroll-margin-top: 22px; }
.oauth-provider-head { display: flex; align-items: flex-start; gap: 16px; padding: 26px 28px 22px; border-bottom: 1px solid #e8eef0; }
.oauth-provider-mark { display: grid; flex: none; place-items: center; width: 53px; height: 53px; border: 1px solid #e1eaed; border-radius: 15px; background: #f9fbfc; }
.oauth-provider-heading { flex: 1; min-width: 0; }
.oauth-provider-heading .eyebrow { margin: 1px 0 5px; color: #a77a40; font-size: 11px; }
.oauth-provider-heading h2, .oauth-settings-demo-card h2 { margin: 0 0 5px; color: #17394c; font-size: clamp(23px, 2.5vw, 28px); letter-spacing: -.025em; }
.oauth-provider-heading > p:last-child { margin: 0; color: #66818e; font-size: 13px; line-height: 1.5; }
.oauth-state { display: inline-flex; align-items: center; flex: none; gap: 6px; padding: 7px 11px; border: 1px solid #dce5e9; border-radius: 999px; background: #f4f7f8; color: #617c88; font-size: 11px; font-weight: 850; white-space: nowrap; }
.oauth-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.oauth-state-on { border-color: #b9dfce; background: #ebf8f1; color: #21784f; }
.oauth-state-warn { border-color: #ead8b1; background: #fff8ea; color: #976719; }
.oauth-provider-form { display: grid; gap: 0; }
.oauth-provider-switch { display: flex !important; align-items: flex-start; gap: 13px !important; margin: 23px 28px 0; padding: 16px 18px; border: 1px solid #d6e9e2; border-radius: 14px; background: #f4faf7; cursor: pointer; }
.oauth-provider-switch input { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: #157c71; }
.oauth-provider-switch span { display: grid; gap: 3px; min-width: 0; }
.oauth-provider-switch strong { color: #215447; font-size: 14px; }
.oauth-provider-switch small { color: #617f71; font-size: 12px; font-weight: 560; line-height: 1.45; }
.oauth-provider-switch:focus-within { outline: 3px solid rgba(17, 126, 131, .2); outline-offset: 2px; }
.oauth-provider-fields { display: grid; gap: 18px; padding: 23px 28px 27px; }
.oauth-provider-fields > div:not(.oauth-callback), .oauth-provider-grid { display: grid; gap: 18px; }
.oauth-provider-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.oauth-provider-fields label { display: grid; gap: 7px; min-width: 0; color: #244a5b; font-size: 13px; font-weight: 800; }
.oauth-provider-fields label small { color: #6f8996; font-size: 12px; font-weight: 550; line-height: 1.4; }
.oauth-provider-fields input:not([type="checkbox"]) { width: 100%; min-width: 0; border-radius: 11px; background: #fbfdfe; font-size: 14px; }
.oauth-provider-fields input:focus { background: #fff; }
.oauth-callback { display: grid; gap: 10px; padding: 16px; border: 1px solid #dbe9ed; border-radius: 14px; background: #f6fafb; }
.oauth-callback label { margin: 0; }
.oauth-callback p { margin: 4px 0 0; color: #668391; font-size: 12px; line-height: 1.45; }
.oauth-callback-control { display: flex; min-width: 0; gap: 8px; }
.oauth-callback-control input { flex: 1; }
.oauth-copy-button { flex: none; min-width: 72px; padding: 9px 13px; border: 1px solid #bed8df; border-radius: 10px; background: #fff; color: #17627a; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.oauth-copy-button:hover, .oauth-copy-button:focus-visible { border-color: #67afbb; background: #eaf6f5; outline-offset: 2px; }
.oauth-copy-feedback { min-height: 1em; color: #21784f; font-size: 12px; font-weight: 700; }
.oauth-provider-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-top: 1px solid #e8eef0; background: #fbfdfd; }
.oauth-provider-footer p { margin: 0; color: #6d8793; font-size: 12px; line-height: 1.4; }
.oauth-provider-footer .btn { flex: none; }
.oauth-settings-aside { position: sticky; top: 20px; scroll-margin-top: 20px; }
.oauth-guide-card, .oauth-safety-card { padding: 24px; }
.oauth-guide-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 18px; border-radius: 13px; background: #eaf5f2; color: #187d76; font-size: 23px; }
.oauth-settings-aside .eyebrow { margin: 0 0 5px; color: #a77a40; font-size: 11px; }
.oauth-guide-card h2, .oauth-safety-card h3 { margin: 0; color: #17394c; font-size: 20px; line-height: 1.25; }
.oauth-guide-card ol { display: grid; gap: 0; margin: 17px 0 0; padding: 0; list-style: none; counter-reset: oauth-step; }
.oauth-guide-card li { position: relative; display: grid; gap: 4px; padding: 13px 0 13px 35px; border-top: 1px solid #e8eef0; counter-increment: oauth-step; }
.oauth-guide-card li::before { content: counter(oauth-step); position: absolute; top: 13px; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #e9f4f3; color: #177b78; font-size: 12px; font-weight: 900; }
.oauth-guide-card li strong { color: #244b5b; font-size: 13px; }
.oauth-guide-card li span, .oauth-safety-card p:last-child { color: #66818e; font-size: 12px; line-height: 1.5; }
.oauth-safety-card { background: linear-gradient(140deg, #fff, #f6faf9) !important; }
.oauth-safety-card p:last-child { margin: 10px 0 0; }
.oauth-settings-demo-card { display: flex; align-items: flex-start; gap: 16px; padding: 28px; }
.oauth-settings-demo-icon { display: grid; flex: none; place-items: center; width: 49px; height: 49px; border-radius: 14px; background: #edf5f5; color: #1b7b80; font-size: 23px; }
.oauth-settings-demo-card > div { flex: 1; }
.oauth-settings-demo-card .eyebrow { margin: 0 0 5px; }
.oauth-settings-demo-card p:last-child { margin: 0; color: #66818e; line-height: 1.5; }
.oauth-settings-demo-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.oauth-settings-demo-providers > .panel { padding: 0 24px 24px; }
.oauth-settings-demo-providers .oauth-provider-head { padding-inline: 0; margin-bottom: 20px; }
.oauth-settings-demo-providers .oauth-provider-head h2 { margin: 0; }
@media (max-width: 1100px) {
    .oauth-settings-layout { grid-template-columns: minmax(0, 1fr) 250px; }
    .oauth-guide-card, .oauth-safety-card { padding: 20px; }
}
@media (max-width: 850px) {
    .oauth-settings-layout { grid-template-columns: 1fr; }
    .oauth-settings-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .oauth-settings-head { flex-direction: column; align-items: stretch; }
    .oauth-settings-overview { grid-template-columns: 1fr; }
    .oauth-settings-nav { flex-wrap: nowrap; overflow-x: auto; }
    .oauth-settings-nav a { flex: none; white-space: nowrap; }
    .oauth-provider-head { flex-wrap: wrap; gap: 12px; padding: 20px 17px; }
    .oauth-provider-heading { flex-basis: calc(100% - 70px); }
    .oauth-provider-head .oauth-state { margin-left: 65px; }
    .oauth-provider-switch { margin: 17px 17px 0; padding: 14px; }
    .oauth-provider-fields { padding: 18px 17px 22px; }
    .oauth-provider-grid { grid-template-columns: 1fr; }
    .oauth-provider-footer { flex-direction: column; align-items: stretch; padding: 17px; }
    .oauth-provider-footer .btn { width: 100%; }
    .oauth-settings-aside, .oauth-settings-demo-providers { grid-template-columns: 1fr; }
    .oauth-settings-demo-card { flex-wrap: wrap; padding: 21px; }
    .oauth-settings-demo-card .oauth-state { margin-left: 65px; }
}
@media (max-width: 420px) {
    .oauth-callback-control { flex-wrap: wrap; }
    .oauth-callback-control input, .oauth-copy-button { width: 100%; }
}

/* Cabinet document verification settings */
.dashboard-shell.document-settings-page { width: min(100%, 1560px); margin-inline: auto; gap: 21px; padding: clamp(20px, 3vw, 46px); }
.document-settings-head { align-items: flex-start; }
.document-settings-head h1 { margin: 2px 0 8px; letter-spacing: -.035em; }
.document-settings-head .muted { max-width: 760px; margin: 0; line-height: 1.55; }
.document-settings-head .quick-links { flex: none; }
.document-settings-overview { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 12px; }
.document-settings-overview article { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 18px; border: 1px solid #dce7ea; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(19, 53, 69, .045); }
.document-settings-overview article > div { display: grid; min-width: 0; gap: 4px; }
.document-settings-overview small { color: #718b96; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .075em; }
.document-settings-overview strong { color: #193e50; font-size: 17px; line-height: 1.3; }
.document-settings-overview article div > span { color: #66818e; font-size: 12px; line-height: 1.35; }
.document-overview-icon { display: grid; flex: none; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: #eaf5f3; color: #147d78; font-size: 23px; font-weight: 800; }
.document-settings-overview article:nth-child(3) .document-overview-icon { background: #ecf3f9; color: #3276a0; }
.document-settings-overview article:nth-child(4) .document-overview-icon { background: #f8f3e9; color: #aa813b; }
.document-settings-overview .document-overview-primary { border-color: #245966; background: linear-gradient(130deg, #173e50, #245c68); }
.document-overview-primary .document-overview-icon { background: rgba(255,255,255,.13); color: #f1d29a; }
.document-settings-overview .document-overview-primary small, .document-settings-overview .document-overview-primary strong, .document-settings-overview .document-overview-primary div > span { color: #fff; }
.document-settings-overview .document-overview-primary div > span { opacity: .78; }
.document-settings-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #e0e9ec; }
.document-settings-nav a { padding: 9px 14px; border: 1px solid #dce7ea; border-radius: 999px; background: #fff; color: #3c6474; font-size: 13px; font-weight: 800; text-decoration: none; }
.document-settings-nav a:hover, .document-settings-nav a:focus-visible { border-color: #8fc7c8; background: #f2faf8; color: #0c6974; outline-offset: 3px; }
.document-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.document-settings-form, .document-settings-aside { display: grid; min-width: 0; gap: 20px; }
.document-settings-card, .document-settings-aside > .panel, .document-settings-demo, .document-settings-demo-preview > .panel { border: 1px solid #dce7ea; border-radius: 22px; background: #fff; box-shadow: 0 14px 36px rgba(18, 53, 72, .055); }
.document-settings-card { padding: clamp(22px, 2.5vw, 29px); scroll-margin-top: 20px; }
.document-settings-card-head { display: flex; align-items: flex-start; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid #e7eef0; }
.document-settings-step { display: grid; flex: none; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: #e9f4f3; color: #177e7a; font-size: 12px; font-weight: 900; }
.document-settings-card-head > div { flex: 1; min-width: 0; }
.document-settings-card-head .eyebrow { margin: 0 0 5px; color: #aa7c3f; font-size: 11px; }
.document-settings-card-head h2 { margin: 0 0 5px; color: #173b4e; font-size: clamp(22px, 2vw, 27px); letter-spacing: -.025em; }
.document-settings-card-head p:last-child { margin: 0; color: #66818e; font-size: 13px; line-height: 1.5; }
.document-settings-state { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 11px; border: 1px solid #dce5e9; border-radius: 999px; background: #f4f7f8; color: #617c88; font-size: 11px; font-weight: 850; white-space: nowrap; }
.document-settings-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.document-settings-state.is-on { border-color: #b9dfce; background: #ebf8f1; color: #21784f; }
.document-settings-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 20px; }
.document-settings-option { position: relative; display: flex !important; align-items: flex-start; gap: 13px !important; min-width: 0; margin-top: 20px; padding: 19px; border: 1px solid #dce8eb; border-radius: 16px; background: #f9fcfc; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.document-settings-option-grid .document-settings-option { margin: 0; min-height: 145px; }
.document-settings-option:hover { border-color: #9ec8c9; background: #f6fbfa; }
.document-settings-option:has(input:checked) { border-color: #b8ddd1; background: #f1f9f5; }
.document-settings-option:focus-within { outline: 3px solid rgba(16, 125, 130, .22); outline-offset: 3px; }
.document-settings-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.document-settings-option-copy { display: grid; flex: 1; min-width: 0; gap: 5px; }
.document-settings-option-copy strong { color: #214858; font-size: 15px; line-height: 1.3; }
.document-settings-option-copy small { color: #698491; font-size: 12px; font-weight: 550; line-height: 1.5; }
.document-settings-toggle { position: relative; display: block; flex: none; width: 38px; height: 22px; border: 1px solid #c2d2d8; border-radius: 999px; background: #dce6e9; transition: background .15s ease; }
.document-settings-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(17, 53, 68, .2); transition: transform .15s ease; }
.document-settings-option input:checked ~ .document-settings-toggle { background: #218678; border-color: #218678; }
.document-settings-option input:checked ~ .document-settings-toggle::after { transform: translateX(16px); }
.document-settings-inline-note { margin: 17px 0 0; padding: 12px 15px; border-radius: 12px; background: #f1f7f9; color: #587788; font-size: 12px; line-height: 1.5; }
.document-settings-savebar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border: 1px solid #d2e5e8; border-radius: 16px; background: linear-gradient(135deg, #f3faf9, #fff); }
.document-settings-savebar > div { display: grid; gap: 3px; }
.document-settings-savebar strong { color: #244858; font-size: 14px; }
.document-settings-savebar span { color: #6b8591; font-size: 12px; }
.document-settings-savebar .btn { flex: none; }
.document-settings-aside { position: sticky; top: 20px; scroll-margin-top: 20px; }
.document-settings-aside > .panel { padding: 24px; }
.document-guide-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 17px; border-radius: 13px; background: #e9f5f3; color: #167d77; font-size: 23px; }
.document-settings-aside .eyebrow { margin: 0 0 5px; color: #a77a40; font-size: 11px; }
.document-settings-aside h2, .document-settings-aside h3 { margin: 0; color: #17394c; font-size: 20px; line-height: 1.25; }
.document-settings-guide ol { display: grid; gap: 0; margin: 17px 0 0; padding: 0; list-style: none; counter-reset: document-step; }
.document-settings-guide li { position: relative; display: grid; gap: 4px; padding: 13px 0 13px 35px; border-top: 1px solid #e8eef0; counter-increment: document-step; }
.document-settings-guide li::before { content: counter(document-step); position: absolute; top: 13px; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #e9f4f3; color: #177b78; font-size: 12px; font-weight: 900; }
.document-settings-guide li strong { color: #244b5b; font-size: 13px; }
.document-settings-guide li span { color: #66818e; font-size: 12px; line-height: 1.5; }
.document-settings-platform { background: linear-gradient(145deg, #fff, #f8fbfc) !important; }
.document-settings-platform > p:not(.eyebrow), .document-settings-privacy p:last-child { margin: 10px 0 0; color: #66818e; font-size: 12px; line-height: 1.5; }
.document-settings-platform ul { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.document-settings-platform li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid #e6eef0; font-size: 12px; }
.document-settings-platform li span { color: #3b5b6a; }
.document-settings-platform li strong { color: #577789; text-align: right; }
.document-settings-privacy { background: linear-gradient(145deg, #fff, #f4faf6) !important; }
.document-settings-demo { display: flex; align-items: flex-start; gap: 16px; padding: 28px; }
.document-settings-demo-icon { display: grid; flex: none; place-items: center; width: 49px; height: 49px; border-radius: 14px; background: #eaf5f3; color: #187c76; font-size: 25px; }
.document-settings-demo > div { flex: 1; }
.document-settings-demo .eyebrow { margin: 0 0 5px; }
.document-settings-demo h2 { margin: 0 0 7px; color: #173b4e; font-size: 25px; }
.document-settings-demo p:last-child { margin: 0; color: #66818e; line-height: 1.5; }
.document-settings-demo-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.document-settings-demo-preview .panel { padding: 24px; }
.document-settings-demo-preview h2 { margin: 14px 0 7px; color: #173b4e; }
.document-settings-demo-preview p { max-width: 55ch; margin: 0; color: #66818e; font-size: 13px; line-height: 1.5; }
@media (max-width: 1150px) {
    .document-settings-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-settings-layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .document-settings-aside > .panel { padding: 20px; }
}
@media (max-width: 900px) {
    .document-settings-layout { grid-template-columns: 1fr; }
    .document-settings-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-settings-privacy { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
    .document-settings-head { flex-direction: column; align-items: stretch; }
    .document-settings-head .quick-links { justify-content: stretch; }
    .document-settings-head .quick-links .btn { flex: 1; }
    .document-settings-overview { grid-template-columns: 1fr; }
    .document-settings-nav { flex-wrap: nowrap; overflow-x: auto; }
    .document-settings-nav a { flex: none; white-space: nowrap; }
    .document-settings-card { padding: 20px 16px; }
    .document-settings-card-head { flex-wrap: wrap; gap: 11px; }
    .document-settings-card-head > div { flex-basis: calc(100% - 52px); }
    .document-settings-card-head .document-settings-state { margin-left: 50px; }
    .document-settings-option-grid { grid-template-columns: 1fr; }
    .document-settings-option-grid .document-settings-option { min-height: 0; }
    .document-settings-option { padding: 16px; }
    .document-settings-savebar { flex-direction: column; align-items: stretch; }
    .document-settings-savebar .btn { width: 100%; }
    .document-settings-aside, .document-settings-demo-preview { grid-template-columns: 1fr; }
    .document-settings-privacy { grid-column: auto; }
    .document-settings-demo { flex-wrap: wrap; padding: 21px; }
    .document-settings-demo .document-settings-state { margin-left: 65px; }
}
@media (prefers-reduced-motion: reduce) {
    .document-settings-option, .document-settings-toggle, .document-settings-toggle::after { transition: none; }
}
/* Standard parcours steps: inline order, visibility and status controls. */
.intake-builder-shell .standard-step-card .intake-builder-card-summary {
    grid-template-columns: 34px 34px minmax(0, 1fr) auto;
}
.intake-builder-shell .standard-step-card .intake-step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    margin-left: 28px;
    white-space: nowrap;
}
.intake-builder-shell .intake-step-order-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 6px 0 0;
    padding-right: 17px;
    border-right: 1px solid #dce8ec;
    color: #557381;
    font-size: 12px;
    font-weight: 850;
    cursor: text;
}
.intake-builder-shell .intake-step-order-control input {
    width: 62px;
    min-width: 62px;
    min-height: 36px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #cbdde4;
    border-radius: 9px;
    background: #fff;
    color: #173b4e;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.intake-builder-shell .intake-step-order-control input:disabled {
    background: #f5f8f9;
    color: #7b929c;
}
.intake-builder-shell .intake-step-visibility-control {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border: 1px solid #d6e8e0;
    border-radius: 10px;
    background: #f5faf7;
    cursor: pointer;
}
.intake-builder-shell .intake-step-visibility-control input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #168459;
    cursor: pointer;
}
.intake-builder-shell .intake-step-visibility-control:has(input:disabled) {
    opacity: .72;
    cursor: not-allowed;
}
.intake-builder-shell .intake-step-visibility-control input:disabled { cursor: not-allowed; }
.intake-builder-shell .intake-step-order-control:focus-within,
.intake-builder-shell .intake-step-visibility-control:focus-within {
    outline: 3px solid rgba(17, 127, 131, .22);
    outline-offset: 2px;
}
.intake-builder-shell .standard-step-card .intake-step-actions em { margin: 0; }
@media (max-width: 760px) {
    .intake-builder-shell .standard-step-card .intake-builder-card-summary {
        grid-template-columns: 30px minmax(0, 1fr);
        padding: 15px;
    }
    .intake-builder-shell .standard-step-card .intake-step-actions {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: flex-end;
        width: 100%;
        margin: 7px 0 0;
        padding-top: 12px;
        border-top: 1px solid #edf2f4;
    }
}
@media (max-width: 420px) {
    .intake-builder-shell .standard-step-card .intake-step-actions { gap: 8px; }
    .intake-builder-shell .intake-step-order-control { gap: 6px; margin-right: 2px; padding-right: 10px; }
    .intake-builder-shell .intake-step-order-control input { width: 54px; min-width: 54px; }
}
.extraction-quality-filter{display:flex;align-items:end;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.extraction-quality-filter label{display:grid;gap:.35rem;min-width:10rem}
.extraction-quality-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:1rem;margin:1rem 0}
.extraction-quality-cards article{display:grid;gap:.35rem}
.extraction-quality-cards strong{font-size:1.9rem;line-height:1.1}
.extraction-quality-cards small{color:var(--muted,#60717b)}
.extraction-quality-panel{margin:1rem 0}
.extraction-quality-panel h2{margin-top:0}
.extraction-quality-scroll{overflow-x:auto}
.extraction-quality-scroll table{width:100%;border-collapse:collapse}
.extraction-quality-scroll th,.extraction-quality-scroll td{text-align:left;padding:.65rem .8rem;border-bottom:1px solid var(--border,#dce4e8);vertical-align:top}
.extraction-quality-scroll thead th{white-space:nowrap}
.extraction-quality-split{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,28rem),1fr));gap:1rem}
.enrollment-page { width: min(1080px, 100%); margin: 36px auto 72px; }
.enrollment-intro { text-align: center; margin-bottom: 32px; }
.enrollment-intro h1 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3.3rem); }
.enrollment-intro p:last-child { color: #56667a; font-size: 1.08rem; }
.enrollment-plans { margin: 0 0 30px; }
.enrollment-plans h2 { font-size: 1.25rem; margin: 0 0 14px; }
.enrollment-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.enrollment-plan-card { display: flex; flex-direction: column; gap: 10px; min-height: 278px; padding: 20px; border: 1px solid #cbd7df; border-radius: 16px; background: #fff; }
.enrollment-plan-card.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,260px); column-gap: 28px; min-height: 0; border: 2px solid #126b83; box-shadow: 0 8px 24px #126b8322; }
.enrollment-plan-card.is-featured > :not(.enrollment-plan-cta) { grid-column: 1; }
.enrollment-plan-card.is-featured .enrollment-plan-cta { grid-column: 2; grid-row: 1 / 6; align-self: center; margin-top: 0; }
.enrollment-plan-card.is-unavailable { background: #f9fbfc; }
.enrollment-plan-card h3 { font-size: 1.22rem; margin: 0; }
.enrollment-plan-card p { margin: 0; font-weight: 600; line-height: 1.4; }
.enrollment-plan-card small { color: #596a79; line-height: 1.4; }
.enrollment-plan-tag { width: fit-content; padding: 3px 9px; border-radius: 50px; background: #e6f4f6; color: #075064; font-size: .75rem; font-weight: 700; }
.enrollment-plan-cta { width: 100%; margin-top: auto; text-align: center; justify-content: center; white-space: normal; }
.enrollment-plan-cta:disabled { cursor: not-allowed; opacity: .65; }
.enrollment-login { text-align: center; }
.enrollment-choice-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 690px; margin: 0 auto 18px; padding: 16px 20px; border: 1px solid #bad4db; border-radius: 14px; background: #f0f8fa; }
.enrollment-choice-summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.enrollment-choice-summary a { white-space: nowrap; }
.enrollment-account { max-width: 690px; margin: 0 auto; padding: 32px; }
.enrollment-account h2 { margin-top: 0; }
.enrollment-account .enrollment-wide { grid-column: 1 / -1; }
.enrollment-account .btn { margin-top: 20px; }
.enrollment-honeypot { position: absolute; left: -10000px; }
.enrollment-message { margin: 48px auto; text-align: center; }
.enrollment-message ol { text-align: left; max-width: 510px; margin: 26px auto; padding: 20px 24px 20px 46px; background: #f4f8fa; border-radius: 12px; }
.enrollment-message li + li { margin-top: 10px; }
.enrollment-message-icon { display: inline-flex; width: 62px; height: 62px; align-items: center; justify-content: center; background: #e6f4f6; border-radius: 50%; font-size: 28px; }
.enrollment-setup-backdrop { padding: 28px; background: #e8eef2; min-height: 78vh; }
.enrollment-setup-dialog { max-width: 1120px; margin: auto; background: #fff; border-radius: 20px; box-shadow: 0 22px 70px #1f344528; overflow: hidden; }
.enrollment-setup-header { display: flex; justify-content: space-between; gap: 24px; padding: 28px 32px; border-bottom: 1px solid #dce5e9; }
.enrollment-setup-header h1 { margin: 0 0 5px; font-size: clamp(1.6rem,3vw,2.3rem); }
.enrollment-setup-header p:last-child { color: #56667a; margin-bottom: 0; }
.enrollment-close { font-size: 30px; line-height: 1; text-decoration: none; color: #53687b; padding: 4px 10px; }
.enrollment-setup-body { display: grid; grid-template-columns: 270px minmax(0,1fr); min-height: 530px; }
.enrollment-setup-nav { background: #f5f9fa; padding: 24px 14px; border-right: 1px solid #dce5e9; }
.enrollment-setup-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 11px; text-decoration: none; color: #263747; }
.enrollment-setup-nav a.is-current { background: #e0f2f5; color: #075064; }
.enrollment-setup-nav a span:last-child { display: flex; flex-direction: column; gap: 2px; }
.enrollment-setup-nav small { color: #617386; font-size: .76rem; }
.enrollment-step-mark { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border: 1px solid #a7b5bf; border-radius: 50%; font-size: .85rem; }
.enrollment-setup-nav a.is-done .enrollment-step-mark { background: #12845c; border-color: #12845c; color: #fff; }
.enrollment-setup-optional { margin: 24px 12px; border-top: 1px solid #d5e0e4; padding-top: 18px; display: grid; gap: 5px; }
.enrollment-setup-optional small { line-height: 1.45; }
.enrollment-setup-content { padding: 30px 36px 44px; }
.enrollment-setup-content h2 { margin: 0 0 8px; }
.enrollment-setup-content > p { max-width: 660px; }
.enrollment-setup-form { margin-top: 24px; }
.enrollment-setup-form label { display: grid; gap: 6px; }
.enrollment-setup-form label small { display: inline; color: #697a89; font-size: .75rem; }
.enrollment-setup-form .saas-form-grid { gap: 14px 18px; }
.enrollment-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.enrollment-type-options { display: grid; gap: 12px; max-width: 530px; }
.enrollment-type-options label { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border: 1px solid #ccd9df; border-radius: 10px; font-weight: 600; }
.enrollment-type-options input { width: 19px; height: 19px; accent-color: #126b83; }
.enrollment-review { margin: 24px 0; display: grid; gap: 12px; }
.enrollment-review div { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid #e3eaed; }
.enrollment-review dt { color: #607282; }
.enrollment-review dd { margin: 0; font-weight: 600; text-align: right; }
.enrollment-complete-note { padding: 15px 18px; color: #126644; background: #e5f6ed; border-radius: 10px; }
.enrollment-dashboard-reminder { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 16px; border: 1px solid #a9dce5; border-radius: 14px; text-decoration: none; color: #104f62; background: linear-gradient(115deg,#e7f8fa,#f8fdff); box-shadow: 0 5px 16px #197d9a18; }
.enrollment-payment-reminder { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 20px; margin-bottom: 16px; border: 1px solid #efd395; background: #fff9eb; border-radius: 14px; }
.enrollment-payment-reminder p { margin: 5px 0 0; color: #6b5c39; }
.enrollment-dashboard-reminder > span:nth-child(2) { display: grid; gap: 4px; flex: 1; }
.enrollment-dashboard-reminder small { color: #526b79; }
.enrollment-reminder-spark { font-size: 24px; animation: enrollment-spark 3s ease-in-out infinite; }
@keyframes enrollment-spark { 0%, 100% { transform: scale(1); opacity: .72; } 50% { transform: scale(1.17); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .enrollment-reminder-spark { animation: none; } }
@media (max-width: 900px) { .enrollment-setup-body { grid-template-columns: 1fr; } .enrollment-setup-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-right: 0; border-bottom: 1px solid #dce5e9; } .enrollment-setup-optional { grid-column: 1 / -1; } }
@media (max-width: 760px) { .enrollment-plan-grid { grid-template-columns: 1fr; } .enrollment-plan-card { min-height: 0; } .enrollment-plan-card.is-featured { display: flex; } .enrollment-plan-card.is-featured .enrollment-plan-cta { margin-top: 12px; } }
@media (max-width: 600px) { .enrollment-choice-summary { align-items: flex-start; flex-direction: column; } .enrollment-setup-backdrop { padding: 0; } .enrollment-setup-dialog { border-radius: 0; } .enrollment-setup-header,.enrollment-setup-content { padding: 24px 18px; } .enrollment-setup-nav { grid-template-columns: 1fr; } .enrollment-dashboard-reminder { flex-wrap: wrap; } }

/* Platform organization dashboard */
.platform-dashboard-body { background: radial-gradient(circle at 96% 2%, #e5f5f2 0, transparent 32%), #f4f7f8; }
.platform-dashboard-body .platform-entry-header { gap: 24px; min-height: 78px; padding: 12px clamp(20px, 4vw, 64px); box-shadow: 0 4px 24px rgba(19, 48, 69, .04); }
.platform-dashboard-body .platform-entry-actions { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.platform-dashboard-body .platform-entry-actions a,
.platform-dashboard-body .platform-entry-actions button { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 13px; border: 0; border-radius: 10px; color: #355669; background: none; font-size: 13px; font-weight: 750; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .18s ease, color .18s ease; }
.platform-dashboard-body .platform-entry-actions a:hover,
.platform-dashboard-body .platform-entry-actions button:hover { color: #0c5f8a; background: #eef6f8; }
.platform-dashboard-body .platform-entry-actions a[aria-current="page"] { color: #075b82; background: #e9f5f7; }
.platform-dashboard-body .platform-entry-actions a:focus-visible, .organization-dashboard a:focus-visible, .organization-dashboard button:focus-visible, .organization-dashboard select:focus-visible { outline: 3px solid #f2be68; outline-offset: 3px; }
.platform-dashboard-body .platform-entry-main { width: min(100%, 1440px); padding: 1px clamp(16px, 3vw, 42px) 58px; }
.organization-dashboard { max-width: none; margin: clamp(22px, 3vw, 42px) auto 0; }
.organization-mfa-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 18px 22px; border: 1px solid #b9dce6; border-radius: 16px; background: #f1f9fb; color: #143b50; text-align: left; }
.organization-mfa-callout p { margin: 0; font-weight: 700; }
.organization-mfa-callout .btn { flex: 0 0 auto; }
.payment-security-confirmation { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); align-items: end; gap: 16px; padding: 18px 20px; border: 1px solid #c8dfe7; border-radius: 14px; background: #f3f9fb; }
.payment-security-confirmation p { margin: 0 0 7px; color: #546d7c; font-size: 14px; line-height: 1.45; }
.organization-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: clamp(24px, 4vw, 48px); border: 1px solid #d6e8ea; border-radius: 24px; background: radial-gradient(circle at 100% 0, #dff3ee 0, transparent 37%), linear-gradient(120deg, #fff, #f8fcfc); box-shadow: 0 18px 48px rgba(24, 58, 76, .06); }
.organization-dashboard .organization-heading { min-width: 0; margin: 0; }
.organization-dashboard .organization-heading .eyebrow { margin: 0 0 12px; color: #b37b30; font-size: 12px; letter-spacing: .12em; }
.organization-dashboard .organization-heading h1 { max-width: 760px; margin: 0; color: #10344b; font-size: clamp(34px, 4vw, 58px); letter-spacing: -.045em; line-height: 1.08; }
.organization-dashboard .organization-heading > p:last-child { max-width: 690px; margin: 18px 0 0; color: #617b8a; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; }
.organization-language { display: grid; flex: 0 0 auto; gap: 7px; min-width: 220px; margin: 0; }
.organization-language label { color: #537181; font-size: 12px; font-weight: 800; }
.organization-language-controls { display: flex; gap: 7px; }
.organization-language select { flex: 1; min-width: 0; min-height: 44px; padding: 8px 32px 8px 12px; border: 1px solid #bdd5df; border-radius: 10px; color: #163a50; background: #fff; font: inherit; font-weight: 700; }
.organization-language button { min-height: 44px; padding: 8px 13px; border: 1px solid #b9d6df; border-radius: 10px; color: #0c6487; background: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.organization-language button:hover { background: #edf7f8; }
.organization-dashboard .organization-support-callout { display: flex; align-items: center; gap: 17px; margin: 18px 0 28px; padding: 19px 22px; border-color: #cde5e6; border-radius: 17px; background: #f1faf9; box-shadow: none; }
.organization-support-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #06717c; background: #dff2ef; font-size: 23px; font-weight: 800; }
.organization-support-copy { flex: 1; min-width: 0; }
.organization-dashboard .organization-support-copy strong { display: block; color: #164a58; font-size: 15px; }
.organization-dashboard .organization-support-copy p { max-width: 760px; margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.organization-dashboard .organization-support-callout .btn { min-height: 44px; padding: 11px 16px; white-space: nowrap; }
.organization-section-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #203f53; font-size: 16px; font-weight: 850; }
.organization-count { display: inline-grid; min-width: 26px; height: 26px; place-items: center; padding: 0 7px; border-radius: 999px; color: #176b78; background: #e2f1f0; font-size: 12px; }
.organization-dashboard .organization-card { padding: 0; overflow: hidden; margin-bottom: 20px; border-color: #dae7ec; border-radius: 22px; box-shadow: 0 16px 44px rgba(24, 58, 76, .055); }
.organization-dashboard .organization-card-heading { display: block; padding: 25px clamp(20px, 3vw, 34px); border-bottom: 1px solid #e7eef1; background: linear-gradient(110deg, #fff 45%, #f3faf9); }
.organization-card-identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.organization-card-brand { display: grid; flex: 0 0 118px; width: 118px; height: 78px; place-items: center; padding: 11px; border: 1px solid #dce9ed; border-radius: 17px; background: #fff; box-shadow: 0 8px 20px rgba(20, 58, 78, .065); }
.organization-card-brand img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.organization-card-copy { min-width: 0; }
.organization-card-monogram { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #0a6584, #128b83); font-size: 24px; font-weight: 850; }
.organization-card-kicker { margin: 0 0 3px !important; color: #bd8b45; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.organization-dashboard .organization-card h2 { margin: 0 0 3px; color: #14364b; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.025em; line-height: 1.15; overflow-wrap: anywhere; }
.organization-dashboard .organization-card-heading .muted { margin: 0; color: #718b99; font-size: 13px; overflow-wrap: anywhere; }
.organization-subheading { margin: 25px clamp(20px, 3vw, 34px) 14px; color: #446477; font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.organization-dashboard .organization-products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 15px; padding: 0 clamp(20px, 3vw, 34px) 28px; }
.organization-dashboard .organization-product { display: flex; flex-direction: column; min-width: 0; min-height: 218px; padding: 20px; border-color: #dbe9ed; border-radius: 16px; background: linear-gradient(145deg, #fff, #f8fcfc); box-shadow: 0 8px 22px rgba(22, 58, 76, .035); }
.organization-product-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; width: 100%; }
.organization-dashboard .organization-product h4.organization-product-logo { display: flex; flex: 0 1 240px; align-items: center; justify-content: center; min-width: 0; height: 72px; margin: 0; padding: 11px 13px; border: 1px solid #e3edf0; border-radius: 12px; background: #fff; }
.organization-product-logo img { display: block; width: 100%; max-width: 214px; height: 100%; object-fit: contain; }
.organization-product-status { flex: 0 0 auto; margin-top: 4px; padding: 6px 9px; border: 1px solid #d0e9dd; border-radius: 999px; color: #23725f; background: #f0faf5; font-size: 11px; font-weight: 800; }
.organization-product.is-unavailable .organization-product-status { border-color: #dce7eb; color: #758d99; background: #f4f7f8; }
.organization-dashboard .organization-product p { margin: 17px 0 20px; color: #607989; font-size: 13px; line-height: 1.5; }
.organization-dashboard .organization-product form { margin-top: auto; }
.organization-dashboard .organization-product .btn { min-height: 40px; padding: 9px 14px; font-size: 13px; }
.organization-dashboard .organization-management { padding: 18px clamp(20px, 3vw, 34px) 23px; border-top: 1px solid #e7eef1; background: #fcfdfd; }
.organization-dashboard .organization-management .organization-subheading { margin: 0 0 11px; }
.organization-dashboard .organization-card-actions { display: flex; justify-content: flex-start; gap: 8px; }
.organization-dashboard .organization-card-actions a, .organization-dashboard .organization-card-actions button { display: inline-flex; align-items: center; gap: 7px; min-height: 39px; padding: 8px 11px; border: 1px solid #d6e5eb; border-radius: 9px; color: #136581; background: #fff; font: inherit; font-size: 12px; font-weight: 750; line-height: 1.25; text-decoration: none; cursor: pointer; }
.organization-dashboard .organization-card-actions a:hover, .organization-dashboard .organization-card-actions button:hover { border-color: #a6cad6; background: #f0f8fa; }
.organization-dashboard .organization-card-actions form { margin: 0; }
.organization-dashboard .organization-setup { display: grid; gap: 15px; margin: 20px clamp(20px, 3vw, 34px) 0; padding: 20px; border: 1px solid #cfdee8; border-radius: 14px; background: #f4f9fc; }
.organization-setup strong { color: #1a4d66; }
.organization-setup p { margin: 5px 0 0; color: #5f7888; font-size: 13px; line-height: 1.5; }
.organization-setup .enrollment-review { margin: 0; }
.organization-setup .btn { justify-self: start; }
.organization-dashboard .organization-boundary { margin: 23px 0 0; text-align: center; font-size: 12px; }
@media (max-width: 960px) { .organization-hero { align-items: start; flex-direction: column; } .organization-language { width: min(100%, 300px); } }
@media (max-width: 700px) {
  .organization-mfa-callout { align-items: stretch; flex-direction: column; }
  .payment-security-confirmation { grid-template-columns: 1fr; }
  .platform-dashboard-body .platform-entry-header { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0 0; }
  .platform-dashboard-body .platform-entry-brand-logo { width: 160px; margin-left: 17px; }
  .platform-dashboard-body .platform-entry-actions { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; width: 100%; gap: 2px; overflow-x: auto; padding: 0 12px 9px; scrollbar-width: thin; }
  .platform-dashboard-body .platform-entry-actions a,
  .platform-dashboard-body .platform-entry-actions button { flex: 0 0 auto; min-height: 42px; padding: 9px 11px; font-size: 12px; }
  .platform-dashboard-body .platform-entry-main { padding: 1px 12px 40px; }
  .organization-dashboard { margin-top: 16px; }
  .organization-hero { gap: 24px; padding: 25px 21px; border-radius: 18px; }
  .organization-dashboard .organization-heading h1 { font-size: clamp(30px, 8vw, 42px); }
  .organization-dashboard .organization-support-callout { align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 17px; }
  .organization-dashboard .organization-support-callout .btn { width: 100%; justify-content: center; }
  .organization-dashboard .organization-card-heading { padding: 21px; }
  .organization-dashboard .organization-products { grid-template-columns: 1fr; gap: 11px; padding: 0 16px 20px; }
  .organization-dashboard .organization-product { min-height: 0; padding: 17px; }
  .organization-dashboard .organization-product p { margin-bottom: 16px; }
  .organization-dashboard .organization-product .btn { min-height: 44px; }
  .organization-dashboard .organization-subheading { margin-left: 17px; margin-right: 17px; }
  .organization-dashboard .organization-management { padding: 19px 16px; }
  .organization-dashboard .organization-management .organization-subheading { margin-left: 0; margin-right: 0; }
  .organization-dashboard .organization-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organization-dashboard .organization-card-actions a, .organization-dashboard .organization-card-actions button { width: 100%; justify-content: space-between; min-height: 44px; }
  .organization-dashboard .organization-setup { margin: 16px; }
}
@media (max-width: 420px) { .organization-dashboard .organization-card-actions { grid-template-columns: 1fr; } .organization-card-brand { flex-basis: 88px; width: 88px; height: 64px; padding: 8px; } .organization-card-monogram { width: 44px; height: 44px; font-size: 21px; } .organization-card-identity { gap: 13px; } .organization-dashboard .organization-product h4.organization-product-logo { height: 62px; padding: 8px; } .organization-dashboard .organization-support-copy { flex-basis: calc(100% - 56px); } .organization-dashboard .enrollment-payment-reminder { align-items: stretch; flex-direction: column; } }

@media (max-width: 640px) {
  .dashboard-hero-copy .eyebrow { margin-bottom: 9px; }
  .dashboard-new-case { width: 100%; margin-top: 18px; }
}

/* Company subscription management */
.platform-subscriptions { max-width: 1180px; margin: 0 auto; display: grid; gap: 24px; }
.platform-subscriptions-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 28px 0 8px; }
.platform-subscriptions-head h1 { margin: 5px 0 10px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; }
.platform-subscriptions-head p:last-child { margin: 0; color: #617a8b; }
.platform-subscriptions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.platform-subscription-card { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 27px; border: 1px solid #d9e7eb; border-radius: 24px; background: #fff; box-shadow: 0 14px 38px rgba(17, 52, 71, .06); }
.platform-subscription-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.platform-subscription-card-head h2 { margin: 5px 0; font-size: 1.5rem; }
.platform-subscription-card-head p:last-child { margin: 0; color: #637c8c; }
.platform-subscription-state { flex-shrink: 0; padding: 8px 12px; border-radius: 999px; background: #e8f6f0; color: #127251; font-weight: 700; font-size: .83rem; }
.platform-subscription-state.is-scheduled { background: #fff1db; color: #8d5a13; }
.platform-subscription-period { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 0; border-block: 1px solid #e1ebee; }
.platform-subscription-period span, .platform-subscription-note { color: #617a8b; }
.platform-subscription-period strong { color: #103850; font-size: 1.2rem; white-space: nowrap; }
.platform-subscription-note { margin: 0; line-height: 1.55; }
.platform-subscription-card form, .platform-subscription-card > .btn { margin-top: auto; }
.platform-subscriptions-billing { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px; border-radius: 22px; }
.platform-subscriptions-billing h2, .platform-subscriptions-order h2 { margin: 0 0 8px; }
.platform-subscriptions-billing p { margin: 0; color: #617a8b; }
.platform-subscriptions-order { padding: 28px; border-radius: 22px; }
.platform-subscriptions-order { scroll-margin-top: 28px; }
.platform-subscription-consent { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: 1px solid #bbdae5; border-radius: 14px; background: #f3f9fb; color: #173e53; line-height: 1.5; }
.platform-subscription-consent[hidden] { display: none; }
.platform-subscription-consent input { flex: 0 0 auto; width: 19px; height: 19px; margin: 2px 0 0; accent-color: #086995; }
.organization-trial-date { display: inline-flex; margin: 8px 0 0; padding: 6px 11px; border: 1px solid #c8e4e8; border-radius: 999px; background: #f1faf9; color: #176679; font-size: .85rem; font-weight: 700; }
.platform-subscription-dialog { width: min(92vw, 560px); max-height: 90vh; padding: 30px; border: 1px solid #cfe0e6; border-radius: 24px; box-shadow: 0 24px 80px rgba(16, 46, 62, .22); color: #103850; }
.platform-subscription-dialog::backdrop { background: rgba(13, 38, 55, .48); }
.platform-subscription-dialog h2 { margin: 7px 0 18px; }
.platform-subscription-dialog p { line-height: 1.55; }
.platform-subscription-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* Central authentication: passkeys complement the existing password and OTP flow. */
.platform-passkey-login { display: grid; justify-items: start; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #dce8ed; }
.platform-product-links { display: grid; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #dce8ed; }
.platform-product-links > strong { color: #244c64; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.platform-product-links a { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 14px; border: 1px solid #d6e5eb; border-radius: 12px; color: #123c56; background: #f8fbfc; font-weight: 700; text-decoration: none; }
.platform-product-links a:hover, .platform-product-links a:focus-visible { border-color: #7bb8d1; background: #edf7fa; }
.platform-passkey-login > span { color: #6b8290; font-size: 13px; font-weight: 700; }
.platform-passkey-login small, .organization-passkeys small { color: #637d89; line-height: 1.45; }
.platform-passkey-error { margin: 0; padding: 10px 13px; border: 1px solid #e9c4bf; border-radius: 10px; background: #fff6f4; color: #9b3e35; font-size: 13px; }
.platform-passkey-error[hidden] { display: none; }
.organization-passkeys { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0; padding: 22px; border: 1px solid #d4e5e8; border-radius: 18px; background: #f7fbfa; }
.organization-passkeys h3, .organization-passkeys > p:not(.platform-passkey-error) { flex-basis: 100%; margin: 0; }
.organization-passkeys h3 { color: #173d50; font-size: 19px; }
.organization-passkeys > p:not(.platform-passkey-error) { color: #607b88; line-height: 1.5; }
.organization-passkey-label { display: grid; flex: 1 1 220px; gap: 5px; color: #355d69; font-size: 13px; font-weight: 750; }
.organization-passkey-label input { width: 100%; min-height: 42px; border: 1px solid #c9dfe3; border-radius: 10px; padding: 9px 11px; background: #fff; color: #173d50; font: inherit; }
.organization-passkey-list { display: grid; flex-basis: 100%; gap: 9px; margin: 4px 0; padding: 0; list-style: none; }
.organization-passkey-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid #dce9eb; border-radius: 12px; background: #fff; }
.organization-passkey-list li > span { display: grid; gap: 3px; min-width: 0; }
.organization-passkey-list strong { overflow-wrap: anywhere; color: #173d50; }
.organization-passkey-list form { margin: 0; }
@media (max-width: 560px) { .organization-passkeys { padding: 17px; } .organization-passkeys > .btn, .platform-passkey-login > .btn { width: 100%; justify-content: center; } .organization-passkey-list li { align-items: flex-start; flex-direction: column; } }
@media (max-width: 640px) {
  .platform-subscriptions-head, .platform-subscriptions-billing { flex-direction: column; align-items: stretch; }
  .platform-subscription-card { padding: 21px; }
  .platform-subscription-card-head { flex-wrap: wrap; }
  .platform-subscription-dialog-actions .btn { width: 100%; }
}

/* Fiscal work surface: one queue, restrained hierarchy, and explicit review signals. */
.admin-home-dashboard .dashboard-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.admin-home-dashboard .dashboard-metric-card { min-height: 122px; padding: 21px; border-color: #dce9ec; border-radius: 21px; box-shadow: 0 10px 30px rgba(17, 52, 71, .045); }
.admin-home-dashboard .dashboard-metric-card strong { color: #143c4f; font-variant-numeric: tabular-nums; font-size: clamp(2rem, 3vw, 2.6rem); }
.admin-home-dashboard .dashboard-metric-card em { margin-top: 5px; line-height: 1.4; }
.admin-home-dashboard .dashboard-metric-card:focus-visible, .work-queue a:focus-visible, .case-tabs-more summary:focus-visible { outline: 3px solid #2c89a9; outline-offset: 3px; }
.admin-home-dashboard .work-queue { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #d9e7eb; border-radius: 24px; background: #fff; box-shadow: 0 18px 48px rgba(21, 63, 82, .06); }
.work-queue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 30px 32px 21px; border-bottom: 1px solid #e7eff1; background: linear-gradient(115deg, #fff 55%, #f2f8f8); }
.work-queue-head .eyebrow { margin: 0 0 7px; color: #227d81; }
.work-queue-head h2 { margin: 0; color: #12384c; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.03em; }
.work-queue-head p:last-child { margin: 7px 0 0; color: #667d89; line-height: 1.45; }
.work-queue-total { flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; background: #e9f4f2; color: #196969; font-size: .8rem; font-weight: 800; }
.work-queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 32px; border-bottom: 1px solid #e9eff1; }
.work-queue-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.work-queue-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid transparent; border-radius: 10px; color: #526d7b; text-decoration: none; font-size: .82rem; font-weight: 750; white-space: nowrap; }
.work-queue-tabs a:hover { background: #f1f7f8; color: #0f596a; }
.work-queue-tabs a.active { border-color: #badcde; background: #eaf5f4; color: #115a60; }
.work-queue-tabs a span { padding: 2px 6px; border-radius: 7px; background: #eff3f4; color: #426575; font-variant-numeric: tabular-nums; font-size: .72rem; }
.work-queue-tabs a.active span { background: #d1eae7; color: #115a60; }
.work-queue-search { display: flex; flex: 0 1 305px; gap: 7px; margin: 0; }
.work-queue-search input { width: 100%; min-width: 0; min-height: 39px; padding: 8px 11px; border: 1px solid #d2e1e5; border-radius: 10px; background: #fff; color: #173e50; font: inherit; font-size: .83rem; }
.work-queue-search .btn { min-height: 39px; }
.work-queue-list { display: grid; }
.work-queue-category { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 12px 32px; border-bottom: 1px solid #e4edf0; background: #f7fafb; }
.work-queue-category span { color: #6b8290; font-size: .67rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.work-queue-category strong { color: #294e60; font-size: .82rem; font-weight: 850; }
.work-queue-category.is-support { margin-top: 4px; border-top: 1px solid #d5e6e5; border-bottom-color: #d5e6e5; background: #eef7f6; }
.work-queue-category.is-support span { color: #4f8282; }
.work-queue-category.is-support strong { color: #265f63; }
.work-queue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; min-width: 0; padding: 19px 32px; border-bottom: 1px solid #edf2f3; color: inherit; text-decoration: none; }
.work-queue-row:focus-visible { outline: 3px solid #2c89a9; outline-offset: -3px; }
.work-queue-row:last-child { border-bottom: 0; }
.work-queue-row:hover { background: #fafdfd; }
.work-queue-row.is-support { background: #fbfefe; }
.work-queue-row.is-support:hover { background: #f4faf9; }
.work-queue-row-main { min-width: 0; padding-left: 16px; border-left: 3px solid #86bdb9; }
.work-queue-row.is-action .work-queue-row-main { border-left-color: #d88d6c; }
.work-queue-row.is-documents .work-queue-row-main { border-left-color: #d5ae63; }
.work-queue-row.is-ready .work-queue-row-main { border-left-color: #68b49b; }
.work-queue-row.is-waiting .work-queue-row-main { border-left-color: #99b4c2; }
.work-queue-row.is-support .work-queue-row-main { border-left-color: #66aaa5; }
.work-queue-kicker { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #6d8590; font-size: .73rem; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.work-queue-type-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 7px; border: 1px solid #d7e3e8; border-radius: 6px; background: #f2f6f7; color: #456577; font-size: .67rem; font-weight: 850; letter-spacing: .07em; }
.work-queue-row.is-support .work-queue-type-badge { border-color: #c8e2df; background: #e8f5f3; color: #22676a; }
.work-queue-row h3 { margin: 4px 0 4px; color: #143e52; font-size: 1.05rem; line-height: 1.25; }
.work-queue-row-main strong { display: block; color: #264d5d; font-size: .87rem; }
.work-queue-row-main p { margin: 4px 0 0; color: #687f89; font-size: .82rem; line-height: 1.35; }
.work-queue-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 175px; }
.work-queue-row-side small { color: #728792; font-size: .75rem; }
.work-queue-due { color: #875d26; font-size: .75rem; font-weight: 800; }
.work-queue-due.is-overdue { color: #af4545; }
.work-queue-row-side .btn { min-height: 36px; }
.work-queue-empty { margin: 0; padding: 40px 32px; color: #617b88; }
.work-queue-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 32px; border-top: 1px solid #e7eff1; color: #5a7480; font-size: .8rem; }
.work-queue-pagination div { display: flex; gap: 8px; }
.work-queue-more { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 32px; border-top: 1px solid #e7eff1; color: #5a7480; font-size: .8rem; }
.work-queue-more a { color: #176b78; font-weight: 800; text-decoration: none; }
.case-tabs .case-tabs-links { justify-content: flex-start; flex-wrap: nowrap; }
.case-tabs .case-tabs-links > a, .case-tabs .case-tabs-links > button { padding: 9px 14px; border-radius: 10px; white-space: nowrap; font-size: .83rem; font-weight: 750; }
.case-tabs-more { position: relative; flex: 0 0 auto; }
.case-tabs-more > summary { padding: 9px 14px; border: 1px solid #d8e8ef; border-radius: 10px; background: #fff; color: var(--blue); cursor: pointer; list-style: none; font-size: .83rem; font-weight: 750; }
.case-tabs-more > summary::-webkit-details-marker { display: none; }
.case-tabs-more > summary::after { content: ' ⌄'; }
.case-tabs-more[open] > div { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000; display: grid; gap: 3px; width: max-content; min-width: 185px; padding: 8px; border: 1px solid #d8e6ea; border-radius: 14px; background: #fff; box-shadow: 0 16px 38px rgba(15, 52, 70, .16); }
.case-tabs-more[open] a { border: 0; border-radius: 8px; font-size: .82rem; white-space: nowrap; }
.document-triage { margin: 18px 0 20px; border: 1px solid #e6dbc1; border-radius: 16px; background: #fffdf8; }
.document-triage > summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 17px 20px; cursor: pointer; list-style: none; }
.document-triage > summary::-webkit-details-marker { display: none; }
.document-triage > summary span:first-child { display: grid; gap: 3px; }
.document-triage small { color: #946b2a; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.document-triage strong { color: #4f482f; font-size: .94rem; }
.document-triage-list { display: grid; padding: 0 20px 15px; }
.document-triage-row { display: grid; grid-template-columns: minmax(230px, 1fr) auto; gap: 12px 18px; align-items: center; padding: 15px 0; border-top: 1px solid #efe5d0; }
.document-triage-description { display: grid; gap: 4px; min-width: 0; color: #52616a; font-size: .8rem; line-height: 1.45; }
.document-triage-description strong { min-width: 0; overflow-wrap: anywhere; font-size: .86rem; }
.document-triage-actions, .document-triage-form { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.document-triage-actions form { margin: 0; }
.document-triage-form select { max-width: 240px; min-height: 37px; padding: 6px 10px; border: 1px solid #c9dde5; border-radius: 8px; background: #fff; color: #234859; font: inherit; font-size: .79rem; }
.document-triage-actions .btn.small { min-height: 37px; padding: 7px 11px; font-size: .78rem; }
.document-triage-remove { color: #8b472c; }
.case-preflight { display: grid; gap: 13px; margin: 0 0 20px; padding: 21px; border: 1px solid #d6e9df; border-radius: 16px; background: #f5fbf7; }
.case-preflight.has-issues { border-color: #e9d5ae; background: #fffaf0; }
.case-preflight h3 { margin: 4px 0 3px; color: #214e46; font-size: 1rem; }
.case-preflight.has-issues h3 { color: #775628; }
.case-preflight p { margin: 0; color: #5f7880; font-size: .83rem; line-height: 1.5; }
.case-preflight details { padding: 9px 0; border-block: 1px solid #e9ddc3; }
.case-preflight summary { color: #775628; cursor: pointer; font-size: .83rem; font-weight: 800; }
.case-preflight ul { margin: 10px 0 2px; padding-left: 20px; color: #594f3d; font-size: .81rem; line-height: 1.5; }
.case-preflight label, .case-preflight-correction-note { display: grid; gap: 7px; color: #5f4c2c; font-size: .82rem; font-weight: 750; }
.case-preflight textarea, .case-preflight-correction-note textarea { width: 100%; padding: 11px 12px; border: 1px solid #dacda9; border-radius: 10px; background: #fff; color: #243f49; font: inherit; font-weight: 400; resize: vertical; }
.annual-change-card, .annual-change-review { display: grid; gap: 15px; margin: 22px 0; padding: 23px; border: 1px solid #d5e5e6; border-radius: 19px; background: linear-gradient(145deg, #f5fbfa, #fff); box-shadow: 0 8px 24px rgba(20, 66, 76, .035); }
.annual-change-card h3 { margin: 4px 0 6px; color: #143f4a; font-size: 1.22rem; }
.annual-change-card p, .annual-change-review p { margin: 0; color: #5f7881; line-height: 1.5; }
.annual-change-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.annual-change-choice label { display: inline-flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid #ccdedf; border-radius: 11px; background: #fff; color: #294e58; font-size: .88rem; font-weight: 700; cursor: pointer; }
.annual-change-details { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid #dce9e8; }
.annual-change-details[hidden], .annual-change-note[hidden] { display: none; }
.annual-change-details legend { padding: 0 0 6px; color: #446872; font-size: .83rem; font-weight: 800; }
.annual-change-details label { display: inline-flex; align-items: center; gap: 7px; min-width: 145px; color: #335b64; font-size: .84rem; cursor: pointer; }
.annual-change-note { display: grid; gap: 8px; color: #335b64; font-size: .84rem; font-weight: 750; }
.annual-change-note textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbdfe1; border-radius: 11px; background: #fff; color: #264653; font: inherit; resize: vertical; }
.annual-change-review { gap: 7px; margin: 0 0 22px; padding: 18px 21px; }
.annual-change-review strong { color: #184f55; }
.annual-change-review small { color: #6e8990; }
@media (max-width: 1100px) { .admin-home-dashboard .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .work-queue-toolbar { align-items: stretch; flex-direction: column; } .work-queue-search { flex-basis: auto; max-width: 400px; } }
@media (max-width: 900px) { .document-triage-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .work-queue-head, .work-queue-toolbar, .work-queue-row, .work-queue-pagination { padding-inline: 18px; } .work-queue-head { flex-direction: column; gap: 13px; } .work-queue-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; } .work-queue-row { grid-template-columns: 1fr; gap: 13px; } .work-queue-row-side { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; min-width: 0; } .work-queue-row-side .btn { width: 100%; justify-content: center; } .case-tabs .case-tabs-links { flex-wrap: wrap; justify-content: flex-start; } .case-tabs-more[open] > div { right: 0; } .document-triage-form select { max-width: 100%; flex: 1 1 100%; } }
@media (max-width: 700px) { .work-queue-category { padding-inline: 18px; } }
@media (max-width: 500px) { .admin-home-dashboard .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .admin-home-dashboard .dashboard-metric-card { grid-template-columns: 1fr; min-height: 133px; padding: 15px; } .admin-home-dashboard .dashboard-metric-card strong { font-size: 2rem; } .work-queue-search { max-width: none; } .work-queue-search .btn { padding-inline: 9px; } .annual-change-choice { display: grid; } .annual-change-card, .annual-change-review { padding: 17px; } }

/* Cabinet dashboard catalogue */
.dashboard-customize-links{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin:-7px 0 6px}
.dashboard-customize-links a{padding:7px 11px;border:1px solid #d5e5e8;border-radius:999px;background:#fff;color:#416475;font-size:.78rem;font-weight:750;text-decoration:none}
.dashboard-customize-links a:hover{border-color:#9fcbd0;background:#f0f8f8;color:#155b63}
.dashboard-tool-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;min-width:0}
.dashboard-tool-card{display:flex;flex-direction:column;min-width:0;min-height:210px;padding:23px 24px;border:1px solid #dce9ec;border-radius:22px;background:linear-gradient(155deg,#fff 58%,#f7fbfb);box-shadow:0 12px 34px rgba(20,60,78,.055)}
.dashboard-tool-card-top{display:flex;justify-content:space-between;align-items:center;color:#3d8990}.dashboard-tool-card-top .eyebrow{margin:0;font-size:.7rem}
.dashboard-tool-card h2{margin:15px 0 8px;color:#163c4e;font-size:1.15rem;line-height:1.22;letter-spacing:-.02em}
.dashboard-tool-card .dashboard-tool-value{display:block;margin:1px 0 7px;color:#123d4f;font-size:clamp(2rem,3vw,2.75rem);line-height:1.05;font-variant-numeric:tabular-nums}
.dashboard-tool-card>p{margin:3px 0 16px;color:#607a86;font-size:.86rem;line-height:1.5}
.dashboard-tool-link{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:15px;border-top:1px solid #e5eef0;color:#176a75;font-size:.83rem;font-weight:800;text-decoration:none}
.dashboard-tool-link:hover,.dashboard-tool-items a:hover,.dashboard-tool-shortcuts a:hover{color:#0c4d62}
.dashboard-tool-items{display:grid;gap:0;margin:0 0 14px}.dashboard-tool-items>a,.dashboard-tool-items>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e8eff0;color:#234959;font-size:.78rem;text-decoration:none}.dashboard-tool-items strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-tool-items span{color:#718892;text-align:right}
.dashboard-tool-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.dashboard-tool-shortcuts a{padding:9px 11px;border:1px solid #d3e6e7;border-radius:11px;background:#f5fbfa;color:#216673;font-size:.79rem;font-weight:750;text-decoration:none}
.dashboard-config-shell{max-width:1120px;margin-inline:auto}.dashboard-config-form{display:grid;gap:20px}.dashboard-config-form>.panel{padding:25px 28px}.dashboard-config-form h2{margin:0 0 10px;color:#193f50;font-size:1.25rem}.dashboard-config-mode{display:grid;gap:12px}.dashboard-config-choice{display:flex;align-items:flex-start;gap:13px;padding:14px 15px;border:1px solid #dae8eb;border-radius:14px;background:#fbfdfd;cursor:pointer}.dashboard-config-choice input{margin-top:5px;accent-color:#167c86}.dashboard-config-choice span{display:grid;gap:4px}.dashboard-config-choice small{color:#667f89}
.dashboard-config-list{display:grid;gap:9px;list-style:none;margin:20px 0 0;padding:0}.dashboard-config-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(155px,190px) auto;align-items:center;gap:18px;min-width:0;padding:15px;border:1px solid #dce9eb;border-radius:15px;background:#fff;box-shadow:0 3px 10px rgba(20,60,78,.025)}.dashboard-config-toggle{display:flex;align-items:flex-start;gap:14px;min-width:0;cursor:pointer}.dashboard-config-toggle input{flex:none;width:18px;height:18px;margin-top:15px;accent-color:#177c86}.dashboard-config-toggle span{display:grid;gap:3px;min-width:0}.dashboard-config-toggle small{color:#4b8990;font-size:.69rem;font-weight:850;text-transform:uppercase;letter-spacing:.045em}.dashboard-config-toggle strong{color:#214b5a;font-size:.95rem}.dashboard-config-toggle em{color:#66808b;font-size:.78rem;font-style:normal;line-height:1.35}.dashboard-config-audience{display:grid;gap:5px;color:#637e89;font-size:.74rem;font-weight:750}.dashboard-config-audience select{width:100%;min-height:37px;padding:6px 9px;border:1px solid #d0e0e5;border-radius:9px;background:#f9fcfc;color:#244b5c;font:inherit}.dashboard-config-move{display:flex;gap:5px}.dashboard-config-move button{width:34px;height:34px;border:1px solid #d4e4e7;border-radius:9px;background:#f8fbfc;color:#2b6676;font-size:1.1rem;cursor:pointer}.dashboard-config-move button:hover:not(:disabled){background:#e9f5f6}.dashboard-config-move button:disabled{opacity:.35;cursor:default}.dashboard-shortcut-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:9px;margin-top:16px}.dashboard-shortcut-options label{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #dce9eb;border-radius:11px;color:#335766;font-size:.84rem;cursor:pointer}.dashboard-shortcut-options input{accent-color:#177c86}.dashboard-config-actions{display:flex;justify-content:flex-end;position:sticky;bottom:12px;padding:12px;border:1px solid #dae8eb;border-radius:15px;background:rgba(255,255,255,.96);box-shadow:0 10px 30px rgba(18,60,75,.08);z-index:2}
@media(max-width:760px){.dashboard-config-form>.panel{padding:19px}.dashboard-config-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}.dashboard-config-audience{grid-column:1/-1;grid-row:2}.dashboard-config-move{grid-column:2;grid-row:1}.dashboard-tool-card{min-height:190px;padding:20px}.dashboard-customize-links{justify-content:flex-start}}
@media(max-width:430px){.dashboard-tool-grid{grid-template-columns:1fr}.dashboard-config-toggle input{margin-top:9px}.dashboard-config-row{padding:12px}.dashboard-config-toggle em{font-size:.74rem}}

.dashboard-config-finance .section-title-row { margin-bottom: 22px; }
.dashboard-config-finance .section-title-row .muted { max-width: 72ch; margin-bottom: 0; }
.dashboard-finance-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.dashboard-finance-options fieldset { display: grid; align-content: start; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.dashboard-finance-options legend { margin-bottom: 10px; color: #214b5a; font-size: .9rem; font-weight: 800; }
.dashboard-finance-options label { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px 15px; border: 1px solid #dce9eb; border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.dashboard-finance-options label:has(input:checked) { border-color: #91c5c5; background: #f2faf8; box-shadow: 0 7px 18px rgba(18, 101, 104, .07); }
.dashboard-finance-options label:focus-within { outline: 3px solid #81b5ca; outline-offset: 2px; }
.dashboard-finance-options input[type="radio"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: #167c86; }
.dashboard-finance-options label span { display: grid; gap: 3px; min-width: 0; }
.dashboard-finance-options label strong, .dashboard-config-audience strong { color: #214b5a; font-size: .88rem; }
.dashboard-finance-options label small { color: #667f89; line-height: 1.4; }
@media (max-width: 760px) { .dashboard-finance-options { grid-template-columns: 1fr; gap: 18px; } }

/* Dashboard order editor: compact previews keep large dossier sections easy to move. */
.dashboard-customize-links .dashboard-customize-primary{border-color:#a9d4d2;background:#eaf7f4;color:#126370}
.dashboard-customize-links .dashboard-customize-primary:hover{border-color:#77b9b5;background:#dcf1ec}
.dashboard-order-editor{min-width:0;padding:clamp(22px,3vw,36px);border:1px solid #d8e8e9;border-radius:24px;background:linear-gradient(145deg,#fff 30%,#f7fbfb 100%);box-shadow:0 18px 46px rgba(19,58,75,.065)}
.dashboard-order-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:27px}
.dashboard-order-intro .eyebrow{margin:0 0 8px;color:#267b80;font-size:.72rem;letter-spacing:.11em;text-transform:uppercase}
.dashboard-order-intro h2{margin:0;color:#173c4e;font-size:clamp(1.45rem,2.4vw,2rem);line-height:1.18;letter-spacing:-.025em}
.dashboard-order-intro p:not(.eyebrow){max-width:62ch;margin:10px 0 0;color:#5d7984;font-size:.91rem;line-height:1.55}
.dashboard-order-count{flex:none;padding:8px 12px;border:1px solid #d3e8e7;border-radius:999px;background:#f3faf9;color:#26737c;font-size:.75rem;font-weight:800}
.dashboard-order-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch;min-width:0}
.dashboard-order-tile{display:flex;align-items:flex-start;gap:16px;min-width:0;min-height:136px;padding:20px;border:1px solid #d8e7e9;border-radius:18px;background:#fff;box-shadow:0 8px 25px rgba(18,57,75,.045);transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.dashboard-order-tile.is-wide{grid-column:1/-1;min-height:113px;background:linear-gradient(110deg,#fff,#f6fbfa)}
.dashboard-order-tile.is-solo{grid-column:1/-1}
.dashboard-order-tile:hover,.dashboard-order-tile:focus-within{border-color:#a4cdd0;box-shadow:0 12px 31px rgba(18,57,75,.09)}
.dashboard-order-handle{display:grid;place-items:center;flex:none;width:42px;height:42px;padding:0;border:1px solid #cde2e3;border-radius:12px;background:#eff8f6;color:#397985;font-family:inherit;font-size:1.7rem;line-height:1;cursor:grab;touch-action:none;user-select:none}
.dashboard-order-handle:hover,.dashboard-order-handle:focus-visible{border-color:#7eb9bb;background:#e2f3ef;color:#125b69}
.dashboard-order-handle:active{cursor:grabbing}
.dashboard-order-tile-copy{flex:1;min-width:0;padding-top:2px}
.dashboard-order-tile-copy span{display:block;color:#39868d;font-size:.69rem;font-weight:850;letter-spacing:.065em;text-transform:uppercase}
.dashboard-order-tile-copy h3{margin:6px 0 5px;color:#173e50;font-size:1.03rem;line-height:1.3}
.dashboard-order-tile-copy p{margin:0;color:#66808b;font-size:.79rem;line-height:1.45}
.dashboard-order-tile-actions{display:flex;align-items:center;gap:5px;flex:none}
.dashboard-order-position{display:grid;place-items:center;width:31px;height:31px;margin-right:3px;border-radius:50%;background:#edf5f6;color:#446d78;font-size:.78rem;font-weight:850;font-variant-numeric:tabular-nums}
.dashboard-order-tile-actions button{width:34px;height:34px;padding:0;border:1px solid #d7e5e8;border-radius:10px;background:#fff;color:#2b6975;font-size:1.05rem;cursor:pointer}
.dashboard-order-tile-actions button:hover:not(:disabled){border-color:#9dcacf;background:#edf7f7}
.dashboard-order-tile-actions button:disabled{opacity:.3;cursor:default}
.dashboard-order-handle:focus-visible,.dashboard-order-tile-actions button:focus-visible,.dashboard-order-actions a:focus-visible,.dashboard-order-actions button:focus-visible{outline:3px solid #3a93a2;outline-offset:2px}
.dashboard-order-board.is-reordering .dashboard-order-tile.is-dragging{border-style:dashed;border-color:#76b8b7;background:#eaf6f3;box-shadow:inset 0 0 0 1px #b6dcd9;opacity:.48}
.dashboard-order-ghost{position:fixed;z-index:9999;pointer-events:none;opacity:.96;transform:rotate(-1deg) scale(1.015);border-color:#76b8b7;box-shadow:0 25px 65px rgba(13,51,70,.22)}
.dashboard-order-hint{margin:17px 0 0;color:#6b858d;font-size:.78rem;line-height:1.45}
.dashboard-order-actions{position:sticky;bottom:12px;z-index:4;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:11px;margin-top:23px;padding:14px;border:1px solid #dce9e9;border-radius:16px;background:rgba(255,255,255,.97);box-shadow:0 14px 35px rgba(16,52,68,.1);backdrop-filter:blur(12px)}
.dashboard-order-actions a,.dashboard-order-reset{padding:9px 11px;border:0;border-radius:9px;background:transparent;color:#3a6673;font:inherit;font-size:.8rem;font-weight:750;text-decoration:none;cursor:pointer}
.dashboard-order-actions a:hover,.dashboard-order-reset:hover{background:#edf6f5;color:#155f6b}
.dashboard-order-actions .btn{margin-left:5px}
.dashboard-order-empty{padding:35px;border:1px dashed #b8d7d9;border-radius:16px;background:#f8fbfb;color:#5d7984;text-align:center}
@media(max-width:850px){.dashboard-order-board{grid-template-columns:1fr}.dashboard-order-tile.is-wide{grid-column:auto}}
@media(max-width:620px){.dashboard-order-editor{padding:19px}.dashboard-order-intro{flex-direction:column;gap:10px}.dashboard-order-tile,.dashboard-order-tile.is-wide{gap:9px;min-height:92px;padding:14px}.dashboard-order-tile-copy>span,.dashboard-order-tile-copy p{display:none}.dashboard-order-tile-copy h3{margin:6px 0;font-size:.96rem}.dashboard-order-tile-actions{gap:3px}.dashboard-order-position{display:none}.dashboard-order-handle{width:38px;height:38px}.dashboard-order-actions{bottom:5px;gap:5px;padding:9px}.dashboard-order-actions .btn{width:100%;margin:0;justify-content:center}.dashboard-order-actions a,.dashboard-order-reset{font-size:.75rem;padding:8px}}
@media(prefers-reduced-motion:reduce){.dashboard-order-tile{transition:none}.dashboard-order-ghost{transform:none}}

/* Dashboard settings: keep native controls compact and aligned with their labels. */
.dashboard-config-shell{max-width:1180px}
.dashboard-config-shell .admin-head{min-width:0;align-items:flex-end;flex-wrap:wrap}
.dashboard-config-shell .admin-head>div{min-width:0;flex:1 1 auto}
.dashboard-config-shell .admin-head>.btn{flex:none}
.dashboard-config-form>.panel{padding:clamp(22px,2.5vw,32px)}
.dashboard-config-mode{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:14px}
.dashboard-config-mode>h2{grid-column:1/-1;margin-bottom:2px}
.dashboard-config-choice{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:13px;min-width:0;min-height:108px;padding:20px;border-color:#d7e6e9;border-radius:16px;background:#fff;box-shadow:0 4px 14px rgba(19,58,75,.025);transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}
.dashboard-config-choice input[type=radio]{box-sizing:border-box;flex:none;width:20px;min-width:20px;height:20px;min-height:20px;margin:2px 0 0;padding:0;border-radius:50%;accent-color:#197f85;cursor:pointer}
.dashboard-config-choice span{min-width:0;gap:6px}
.dashboard-config-choice strong{color:#183e50;font-size:.98rem;line-height:1.3}
.dashboard-config-choice small{color:#617c87;font-size:.82rem;font-weight:550;line-height:1.5}
.dashboard-config-choice:hover{border-color:#9dcdd0;background:#fbfefd}
.dashboard-config-choice:has(input:checked){border-color:#72b7b7;background:linear-gradient(135deg,#f2faf8,#fff);box-shadow:inset 0 0 0 1px #b4dcd9,0 9px 24px rgba(19,91,95,.055)}
.dashboard-config-choice:focus-within,.dashboard-shortcut-options label:focus-within{outline:3px solid #9bd4da;outline-offset:2px}
.dashboard-config-toggle input[type=checkbox]{box-sizing:border-box;width:19px;min-width:19px;height:19px;min-height:19px;margin:14px 0 0;padding:0;accent-color:#197f85}
.dashboard-shortcut-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-top:20px}
.dashboard-shortcut-options label{display:grid;grid-template-columns:21px minmax(0,1fr);align-items:center;gap:11px;min-width:0;min-height:68px;padding:14px 16px;border-color:#d9e8eb;border-radius:13px;background:#fff;color:#274e5e;font-size:.86rem;font-weight:750;line-height:1.35;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}
.dashboard-shortcut-options label:hover{border-color:#a8d0d2;background:#fbfefd}
.dashboard-shortcut-options label:has(input:checked){border-color:#a5d0cf;background:#f4faf8;box-shadow:inset 0 0 0 1px #d5eae7}
.dashboard-shortcut-options input[type=checkbox]{box-sizing:border-box;flex:none;width:20px;min-width:20px;height:20px;min-height:20px;margin:0;padding:0;accent-color:#197f85;cursor:pointer}
.dashboard-shortcut-options span{min-width:0;overflow-wrap:anywhere}
@media(max-width:900px){.dashboard-config-mode{grid-template-columns:1fr}.dashboard-config-choice{min-height:0}.dashboard-shortcut-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.dashboard-config-shell .admin-head{align-items:stretch}.dashboard-config-shell .admin-head>div{flex:none;width:100%}.dashboard-config-shell .admin-head>.btn{width:100%;justify-content:center}.dashboard-config-form>.panel{padding:19px}.dashboard-config-choice{padding:16px}.dashboard-shortcut-options{grid-template-columns:1fr}.dashboard-shortcut-options label{min-height:58px}}

/* One compact action bar for the simplified client upload journey. */
.document-submit-bar--pilot{width:min(980px,calc(100vw - 36px));bottom:16px}
.document-submit-bar--pilot .document-submit-compact{pointer-events:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;width:100%;padding:12px 14px 12px 18px;border:1px solid #c8dfe5;border-left:4px solid #be9156;border-radius:17px;background:rgba(255,255,255,.97);box-shadow:0 12px 34px rgba(18,57,75,.14);backdrop-filter:blur(12px)}
.document-submit-bar--pilot.ready .document-submit-compact{border-left-color:#24886b}
.document-submit-compact-copy{display:grid;gap:3px;min-width:0}
.document-submit-compact-copy>strong{color:#173d51;font-size:.91rem;line-height:1.25}
.document-submit-bar--pilot .document-submit-compact-copy>span{max-width:none;padding:0;color:#4d6d7d;font-size:.83rem;font-weight:650;line-height:1.4}
.document-submit-bar--pilot.ready .document-submit-compact-copy>span{color:#3d6d5b}
.document-submit-compact-help{position:relative;width:max-content;max-width:100%;font-size:.76rem}
.document-submit-compact-help summary{width:max-content;max-width:100%;color:#0c6a88;font-weight:750;cursor:pointer;list-style:none;text-decoration:underline;text-decoration-color:#acd1dd;text-underline-offset:3px}
.document-submit-compact-help summary::-webkit-details-marker{display:none}
.document-submit-compact-help summary:focus-visible,.document-submit-bar--pilot .btn:focus-visible{outline:3px solid #86c4d5;outline-offset:3px}
.document-submit-compact-help p{position:absolute;left:0;bottom:calc(100% + 14px);z-index:2;width:min(340px,calc(100vw - 54px));margin:0;padding:14px 16px;border:1px solid #c9dfe6;border-radius:12px;background:#fff;box-shadow:0 14px 36px rgba(17,56,76,.17);color:#496b7b;font-size:.79rem;font-weight:550;line-height:1.5}
.document-submit-bar--pilot form{display:block;flex:none;width:auto;max-width:none;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none}
.document-submit-bar--pilot .btn{display:inline-flex;align-items:center;justify-content:center;min-width:220px;min-height:45px;padding:10px 18px;border-radius:11px;box-shadow:none;text-align:center;white-space:nowrap}
.document-submit-bar--pilot.ready .btn{box-shadow:none}
@media(max-width:760px){.document-submit-bar--pilot{position:sticky;left:auto;right:auto;bottom:8px;width:100%;transform:none;padding:0 8px max(8px,env(safe-area-inset-bottom));z-index:6}.document-submit-bar--pilot .document-submit-compact{grid-template-columns:1fr;gap:10px;padding:13px 14px;border-radius:15px}.document-submit-bar--pilot .btn,.document-submit-bar--pilot form{width:100%;min-width:0}.document-submit-compact-help p{left:0;bottom:calc(100% + 10px)}}

/* Client account: keep every destination reachable on a phone without sideways navigation. */
@media (min-width: 901px) and (max-width: 1200px) {
    .topbar.is-client-account nav { justify-content: flex-start; }
}
@media (max-width: 900px) {
    .topbar.is-client-account {
        height: 68px;
        min-height: 68px;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }
    .topbar.is-client-account + main { padding-top: 68px; }
    .topbar.is-client-account .brand { flex: 0 1 122px; }
    .topbar.is-client-account .mobile-menu-toggle {
        display: grid;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 9px;
        z-index: 5;
    }
    .topbar.is-client-account nav,
    .topbar.is-client-account.menu-open nav {
        position: fixed;
        top: calc(var(--topbar-height, 68px) + 8px);
        left: 12px;
        right: 12px;
        z-index: 4;
        display: grid;
        flex: none;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - var(--topbar-height, 68px) - 20px);
        justify-content: stretch;
        align-items: stretch;
        gap: 10px;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 16px;
        border: 1px solid #d4e5eb;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 24px 65px rgba(6, 35, 55, .24);
        scroll-snap-type: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    }
    .topbar.is-client-account.menu-open nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition-delay: 0s;
    }
    .topbar.is-client-account .client-nav-group {
        display: grid;
        width: 100%;
        min-width: 0;
        gap: 3px;
        padding: 6px;
        border: 1px solid #e1ebef;
        border-radius: 13px;
        background: #f7fafb;
        scroll-snap-align: none;
    }
    .topbar.is-client-account .client-nav-group.account { background: #fff; }
    .topbar.is-client-account .client-nav-group .nav-link {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 9px 12px;
        border-radius: 9px;
        color: #254c60;
        font-size: .94rem;
        white-space: normal;
    }
    .topbar.is-client-account .client-nav-group .nav-link.active {
        background: #e9f4f6;
        color: #0d617c;
        box-shadow: none;
    }
    .topbar.is-client-account .client-nav-group .nav-new-case {
        border-color: #0e6798;
        background: #0d6797;
        color: #fff;
    }
    .topbar.is-client-account .client-nav-group .nav-new-case:hover,
    .topbar.is-client-account .client-nav-group .nav-new-case.active { background: #0a557e; color: #fff; }
    .topbar.is-client-account.menu-open .mobile-menu-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }
    .topbar.is-client-account + main > .dashboard-shell,
    .topbar.is-client-account + main > .intake-shell { padding-top: 22px; }
    .topbar.is-client-account + main .btn.small,
    .topbar.is-client-account + main .invoice-filter-tabs button { min-height: 44px; }
}
@media (min-width: 461px) and (max-width: 900px) {
    .topbar.is-client-account .brand { flex-basis: 180px; }
    .topbar.is-client-account .brand img { width: 155px; }
}
@media (max-width: 360px) {
    .topbar.is-client-account { gap: 6px; padding-inline: 8px; }
    .topbar.is-client-account .brand { flex-basis: 99px; padding-inline: 5px; }
    .topbar.is-client-account .brand img { width: 91px; }
    .topbar.is-client-account .brand > strong { font-size: .85rem; }
    .topbar.is-client-account .mobile-menu-toggle { flex-basis: 40px; width: 40px; }
    .topbar.is-client-account > .app-launcher .app-launcher-trigger { width: 40px; }
    .topbar.is-client-account .tax-language select { width: 76px; padding-inline: 5px; }
}

/* Focused phone layout for the tax intake. Keep the estimate in the page flow. */
@media (max-width: 640px) {
    .wizard-v2.intake-shell {
        padding: 14px 12px 28px;
        gap: 0;
        overflow: visible;
    }
    .topbar.is-client-account + main > .wizard-v2.intake-shell { padding-top: 14px; }
    .wizard-v2 .intake-main.panel {
        overflow: visible;
        gap: 15px;
        padding: 20px 16px 0;
        border: 1px solid #dfe9eb;
        border-radius: 22px;
        box-shadow: 0 16px 40px rgba(13, 48, 70, .07);
        scroll-margin-top: 80px;
    }
    .wizard-v2 .intake-head { gap: 8px; }
    .wizard-v2 .intake-head h1 {
        font-size: clamp(27px, 7.2vw, 34px);
        line-height: 1.12;
        letter-spacing: -.025em;
    }
    .wizard-v2 .wizard-intro-note { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
    .wizard-v2 .mobile-intake-promise,
    .wizard-v2 .draft-takeover-note,
    .wizard-v2 .progress-pill,
    .wizard-v2 .wizard-mobile-step-panel > p,
    .wizard-v2 .save-status:not([data-state="error"]) { display: none !important; }
    .wizard-v2 .save-status[data-state="error"] {
        min-height: 44px;
        justify-content: center;
        margin-top: 4px;
        font-size: 13px;
    }
    .wizard-v2 .wizard-progress { height: 4px; background: #e5eeef; }
    .wizard-v2 .wizard-progress span { background: #147680; }
    .wizard-v2 .wizard-mobile-step-toggle {
        min-height: 44px;
        border-color: #dce8ea;
        border-radius: 12px;
        background: #f7fafb;
        box-shadow: none;
        font-size: 13px;
        text-align: left;
    }
    .wizard-v2 .mobile-price-float {
        position: relative;
        inset: auto;
        z-index: 2;
        display: grid;
        gap: 8px;
        margin: 0;
        pointer-events: auto;
    }
    .wizard-v2 .mobile-price-float[hidden],
    .wizard-v2 .mobile-price-detail[hidden] { display: none !important; }
    .wizard-v2 .mobile-price-toggle {
        min-height: 54px;
        padding: 10px 13px;
        border-color: #d2e3e3;
        border-radius: 14px;
        background: #f5faf8;
        box-shadow: none;
        backdrop-filter: none;
    }
    .wizard-v2 .mobile-price-toggle span {
        font-size: 11px;
        letter-spacing: .025em;
        white-space: nowrap;
    }
    .wizard-v2 .mobile-price-toggle strong {
        color: #176f56;
        font-size: clamp(15px, 4.2vw, 17px);
        text-align: right;
    }
    .wizard-v2 .mobile-price-toggle em {
        background: #e4f3eb;
        padding: 6px 9px;
        font-size: 11px;
    }
    .wizard-v2 .mobile-price-float.is-open .mobile-price-toggle { border-radius: 14px; }
    .wizard-v2 .mobile-price-detail {
        border-color: #dce8e7;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(13, 48, 70, .06);
        backdrop-filter: none;
    }
    .wizard-v2 > .price-box { display: none !important; }
    .wizard-v2 .deposit-scope-note {
        display: block;
        padding: 10px 13px;
        border: 0;
        border-radius: 11px;
        background: #f5f8f9;
        box-shadow: none;
    }
    .wizard-v2 .deposit-scope-note > span,
    .wizard-v2 .deposit-scope-note p { display: none; }
    .wizard-v2 .deposit-scope-note strong {
        color: #526c75;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.35;
    }
    .wizard-v2 .fiscal-year-choice {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .wizard-v2 .fiscal-year-card {
        position: relative;
        min-height: 96px;
        align-content: center;
        gap: 5px;
        padding: 16px 52px 16px 16px;
        border-radius: 14px;
    }
    .wizard-v2 .fiscal-year-card input[type="radio"] {
        position: absolute;
        top: 50%;
        right: 18px;
        width: 20px;
        height: 20px;
        margin: 0;
        transform: translateY(-50%);
        accent-color: #0d5f93;
    }
    .wizard-v2 .fiscal-year-card .choice-indicator { display: none; }
    .wizard-v2 .fiscal-year-card strong { font-size: 20px; line-height: 1.2; }
    .wizard-v2 .fiscal-year-card small { font-size: 14px; line-height: 1.4; }
    .wizard-v2 .wizard-step.is-active { gap: 16px; }
    .wizard-v2 .annual-change-card {
        gap: 15px;
        margin: 2px 0 0;
        padding: 18px 16px 16px;
        border-color: #d8e8e7;
        border-radius: 18px;
        background: #f8fbfa;
        box-shadow: none;
    }
    .wizard-v2 .annual-change-card .eyebrow {
        color: #a57937;
        font-size: 11px;
        letter-spacing: .06em;
    }
    .wizard-v2 .annual-change-card h3 {
        margin: 7px 0 8px;
        font-size: clamp(21px, 5.6vw, 24px);
        line-height: 1.22;
        letter-spacing: -.02em;
    }
    .wizard-v2 .annual-change-card p { font-size: 14px; line-height: 1.45; }
    .wizard-v2 .annual-change-choice {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }
    .wizard-v2 .annual-change-choice label {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        min-height: 62px;
        padding: 12px 14px;
        border-radius: 13px;
        color: #234954;
        font-size: 15px;
        font-weight: 750;
        line-height: 1.3;
        cursor: pointer;
    }
    .wizard-v2 .annual-change-choice label:has(input:checked) {
        border-color: #398b81;
        background: #edf8f4;
        box-shadow: inset 0 0 0 1px #398b81;
    }
    .wizard-v2 .annual-change-choice label span { min-width: 0; }
    .wizard-v2 .annual-change-choice input[type="radio"] {
        appearance: none;
        flex: 0 0 20px;
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        margin: 0;
        padding: 0;
        border: 2px solid #8299a2;
        border-radius: 50%;
        background: #fff;
    }
    .wizard-v2 .annual-change-choice input[type="radio"]:checked {
        border-color: #147b71;
        background: radial-gradient(circle, #147b71 0 4px, #fff 5px);
    }
    .wizard-v2 .annual-change-choice input[type="radio"]:focus-visible {
        outline: 3px solid #87c3bf;
        outline-offset: 3px;
    }
    .wizard-v2 .annual-change-details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }
    .wizard-v2 .annual-change-details[hidden] { display: none; }
    .wizard-v2 .annual-change-details legend { margin-bottom: 4px; }
    .wizard-v2 .annual-change-details label {
        min-width: 0;
        align-items: flex-start;
        line-height: 1.3;
    }
    .wizard-v2 .annual-change-details input[type="checkbox"] {
        flex: 0 0 18px;
        width: 18px;
        min-width: 18px;
        height: 18px;
        min-height: 18px;
        margin: 0;
        padding: 0;
        accent-color: #147b71;
    }
    .wizard-v2 .wizard-actions {
        display: grid;
        grid-template-columns: minmax(82px, .35fr) minmax(0, 1fr);
        gap: 10px;
        bottom: 0;
        margin: 0 -16px;
        padding: 12px 16px max(12px, env(safe-area-inset-bottom));
        border-radius: 0 0 22px 22px;
        box-shadow: 0 -10px 24px rgba(13, 48, 70, .06);
    }
    .wizard-v2 .wizard-actions #wizard-prev {
        border-color: #d6e3e8;
        background: #fff;
        color: #295268;
    }
    .wizard-v2 .wizard-actions #wizard-prev[hidden] + #wizard-next { grid-column: 1 / -1; }
    .wizard-v2 .wizard-actions:has(#wizard-next[hidden]) {
        position: static;
        grid-template-columns: 1fr;
        box-shadow: none;
    }
    .wizard-v2 .wizard-actions .btn { min-width: 0; min-height: 52px; font-size: 15px; }
    body:has(.wizard-v2) .scroll-top-button { display: none !important; }
}

@media (max-width: 360px) {
    .wizard-v2 .annual-change-details { grid-template-columns: 1fr; }
    .wizard-v2 .mobile-price-toggle { grid-template-columns: auto 1fr; }
    .wizard-v2 .mobile-price-toggle em { display: none; }
}
@media (max-width: 760px) {
    .topbar.is-client-account + main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .topbar.is-client-account + main select,
    .topbar.is-client-account + main textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .topbar.is-client-account nav { transition: none; }
}
.cabinet-suspension-page {
    min-height: 100vh;
    margin: 0;
    background: #f5f9fb;
}
.cabinet-suspension-page-brand {
    position: relative;
    z-index: 1;
    padding: 26px clamp(20px, 5vw, 64px);
}
.cabinet-suspension-page-brand img { display: block; width: 180px; height: auto; }
.cabinet-suspension-overlay[hidden] { display: none; }
.cabinet-suspension-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 22px;
    background: rgba(8, 38, 57, .54);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.cabinet-suspension-visible { overflow: hidden; }
.cabinet-suspension-dialog {
    position: relative;
    width: min(100%, 490px);
    padding: clamp(28px, 5vw, 46px);
    border: 1px solid #dce9ee;
    border-top: 4px solid #bd8b45;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(5, 31, 47, .27);
    color: #173b51;
}
.cabinet-suspension-symbol {
    display: grid;
    place-items: center;
    width: 53px;
    height: 53px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: #eaf4f8;
    color: #176888;
}
.cabinet-suspension-symbol svg { width: 27px; height: 27px; }
.cabinet-suspension-eyebrow {
    margin: 0 0 9px;
    color: #af7f3b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.cabinet-suspension-organization {
    margin: 0 0 8px;
    color: #6c8795;
    font-size: 14px;
    font-weight: 700;
}
.cabinet-suspension-dialog h1 {
    margin: 0 0 14px;
    color: #10384f;
    font-size: clamp(25px, 4vw, 31px);
    line-height: 1.18;
}
.cabinet-suspension-dialog #cabinet-suspension-text {
    margin: 0;
    color: #526f80;
    font-size: 16px;
    line-height: 1.65;
}
.cabinet-suspension-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 28px;
    padding: 11px 19px;
    border: 0;
    border-radius: 10px;
    background: #116b96;
    color: #fff;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.cabinet-suspension-action:hover { background: #0d5275; color: #fff; }
.cabinet-suspension-close {
    position: absolute;
    top: 16px;
    right: 17px;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid #d7e5ea;
    border-radius: 50%;
    background: #fff;
    color: #547386;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.cabinet-suspension-dialog :is(a, button):focus-visible { outline: 3px solid #5aa6c4; outline-offset: 3px; }
@media (max-width: 520px) {
    .cabinet-suspension-overlay { padding: 16px; }
    .cabinet-suspension-dialog { border-radius: 17px; }
    .cabinet-suspension-action { width: 100%; }
}

/* Trial notices keep the subscription decision clear without obscuring normal work. */
.organization-trial-reminder, .trial-dashboard-reminder {
    display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 18px;
    border: 1px solid #e9d9bc; border-radius: 15px; background: #fffaf1; color: #173d50;
}
.organization-trial-reminder-icon, .trial-dashboard-reminder > span { color: #ae7c35; font-size: 25px; line-height: 1; }
.organization-trial-reminder > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.organization-trial-reminder strong, .trial-dashboard-reminder strong { font-weight: 800; }
.organization-trial-reminder small { color: #687d89; line-height: 1.4; }
.organization-trial-reminder a { color: #126082; font-weight: 800; text-decoration: none; white-space: nowrap; }
.organization-trial-reminder a:hover { text-decoration: underline; }
.trial-dashboard-reminder { max-width: 1240px; margin-inline: auto; }
.trial-dashboard-reminder p { margin: 0; line-height: 1.5; }
.trial-notice-overlay[hidden] { display: none; }
.trial-notice-overlay {
    position: fixed; inset: 0; z-index: 10020; display: grid; place-items: center; overflow-y: auto;
    padding: 22px; background: rgba(8, 38, 57, .57); backdrop-filter: blur(5px);
}
.trial-notice-visible { overflow: hidden; }
.trial-notice-dialog {
    position: relative; width: min(100%, 520px); padding: clamp(28px, 5vw, 43px);
    border: 1px solid #dce9ee; border-top: 4px solid #bd8b45; border-radius: 22px;
    background: #fff; box-shadow: 0 30px 90px rgba(5, 31, 47, .27); color: #173b51;
}
.trial-notice-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 19px; border-radius: 16px; background: #eaf4f8; color: #176888; font-size: 30px; }
.trial-notice-organization { margin: 0 0 7px; color: #6b8490; font-weight: 700; }
.trial-notice-dialog h1 { margin: 0 0 12px; color: #10384f; font-size: clamp(25px, 4vw, 31px); line-height: 1.18; }
.trial-notice-dialog #trial-notice-text { margin: 0; color: #526f80; line-height: 1.6; }
.trial-notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trial-notice-actions .btn { flex: 1 1 185px; justify-content: center; text-align: center; }
.trial-notice-close { position: absolute; top: 15px; right: 16px; width: 36px; height: 36px; border: 1px solid #d7e5ea; border-radius: 50%; background: #fff; color: #547386; font: inherit; font-size: 25px; line-height: 1; cursor: pointer; }
.trial-notice-dialog :is(a, button):focus-visible { outline: 3px solid #5aa6c4; outline-offset: 3px; }
.platform-subscription-review-details { display: grid; gap: 0; margin: 19px 0 0; }
.platform-subscription-review-details > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #e4edf0; }
.platform-subscription-review-details dt { color: #637c8c; }
.platform-subscription-review-details dd { margin: 0; color: #12384c; font-weight: 800; text-align: right; }
.platform-subscription-review-note { color: #607987; font-size: .9rem; }
@media (max-width: 600px) {
    .organization-trial-reminder { flex-wrap: wrap; }
    .organization-trial-reminder a { flex-basis: 100%; margin-left: 39px; }
    .trial-notice-overlay { padding: 15px; }
    .trial-notice-dialog { border-radius: 17px; }
    .trial-notice-actions .btn { flex-basis: 100%; }
    .platform-subscription-review-details > div { align-items: baseline; }
}

/* Mobile navigation: one compact header and a clear language setting inside the menu. */
.mobile-nav-section-label,
.mobile-nav-preferences,
.tax-language-mobile { display: none; }

@media (max-width: 900px) {
    .topbar:not(.is-module-only) {
        height: 68px;
        min-height: 68px;
        flex-wrap: nowrap;
        align-items: center;
        gap: 9px;
        padding: 8px 12px;
    }
    .topbar:not(.is-module-only) .brand {
        flex: 0 1 138px;
        min-height: 44px;
        padding: 6px 11px;
        border-radius: 13px;
    }
    .topbar:not(.is-module-only) .brand img { width: min(100%, 120px); }
    .topbar > .tax-language-desktop { display: none; }
    .topbar:not(.is-module-only) > .app-launcher {
        order: 1;
        margin-left: auto;
    }
    .topbar:not(.is-module-only) > .app-launcher > .app-launcher-trigger {
        width: 44px;
        min-height: 44px !important;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(255,255,255,.2);
        border-radius: 14px;
        background: rgba(255,255,255,.1);
    }
    .topbar:not(.is-module-only) > .mobile-menu-toggle {
        order: 2;
        flex: 0 0 46px;
        width: 46px;
        height: 44px;
        margin-left: 0;
        border-radius: 14px;
    }
    .topbar:not(.is-module-only):not(.has-app-launcher) > .mobile-menu-toggle { margin-left: auto; }
    .topbar:not(.is-module-only) > nav { order: 3; }
    .topbar:not(.is-module-only) nav .mobile-nav-preferences {
        display: grid;
        gap: 9px;
        padding-top: 15px;
        border-top: 1px solid #e3ecef;
    }
    .topbar:not(.is-module-only) nav .mobile-nav-section-label {
        display: block;
        padding: 0 12px;
        color: #698391;
        font-size: 10px;
        font-weight: 850;
        letter-spacing: .11em;
        line-height: 1.4;
        text-transform: uppercase;
    }
    .topbar:not(.is-module-only) nav .tax-language-mobile {
        display: grid;
        grid-template-columns: 40px minmax(0,1fr) auto;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 62px;
        margin: 0;
        padding: 9px 11px;
        border: 1px solid #dfeaec;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 5px 16px rgba(12,55,73,.04);
        color: #173e52;
    }
    .topbar:not(.is-module-only) nav .tax-language-mobile label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        color: #254c5f;
        font-size: 14px;
        font-weight: 760;
        white-space: nowrap;
    }
    .topbar:not(.is-module-only) nav .tax-language-mobile select {
        width: 116px;
        max-width: 100%;
        min-height: 40px;
        padding: 7px 9px;
        border: 1px solid #cedfe5;
        border-radius: 10px;
        background: #f8fbfc;
        color: #133a50;
        font-size: 13px;
        font-weight: 750;
        cursor: pointer;
    }
    .topbar:not(.is-module-only) nav .tax-language-mobile select:focus-visible {
        outline: 3px solid #8bc6d8;
        outline-offset: 2px;
    }
    .mobile-nav-language-icon {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: #eaf4f7;
        color: #11657e;
    }
    .mobile-nav-language-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .topbar.is-client-account nav,
    .topbar.is-client-account.menu-open nav {
        left: auto;
        right: 12px;
        width: min(420px, calc(100vw - 24px));
        padding: 18px;
        border-color: #d5e4e9;
        border-radius: 23px;
        background: linear-gradient(180deg,#fff 0%,#f8fbfc 100%);
        box-shadow: 0 28px 72px rgba(5,31,48,.27);
    }
    .topbar.is-client-account nav .mobile-nav-heading { padding: 2px 3px 11px; }
    .topbar.is-client-account .client-nav-group,
    .topbar.is-client-account .client-nav-group.account {
        gap: 3px;
        padding: 9px 0 10px;
        border: 0;
        border-bottom: 1px solid #e3ecef;
        border-radius: 0;
        background: transparent;
    }
    .topbar.is-client-account .client-nav-group .mobile-nav-section-label { margin-bottom: 4px; }
    .topbar.is-client-account .client-nav-group .nav-link {
        min-height: 44px;
        padding: 10px 13px;
        border-radius: 12px;
        color: #25495c;
        font-size: 14px;
        font-weight: 720;
    }
    .topbar.is-client-account .client-nav-group .nav-link:hover,
    .topbar.is-client-account .client-nav-group .nav-link.active {
        background: #e7f3f6;
        color: #0e627b;
    }
    .topbar.is-client-account .client-nav-group .nav-new-case,
    .topbar.is-client-account .client-nav-group .nav-new-case:hover,
    .topbar.is-client-account .client-nav-group .nav-new-case.active {
        justify-content: space-between;
        background: #0d6797;
        color: #fff;
    }
    .topbar.is-client-account nav .mobile-nav-preferences { padding-top: 7px; border-top: 0; }
}

@media (max-width: 360px) {
    .topbar:not(.is-module-only) { gap: 7px; padding-inline: 9px; }
    .topbar:not(.is-module-only) .brand { flex-basis: 112px; padding-inline: 8px; }
    .topbar:not(.is-module-only) > .app-launcher > .app-launcher-trigger { width: 42px; }
    .topbar:not(.is-module-only) > .mobile-menu-toggle { flex-basis: 44px; width: 44px; }
    .topbar:not(.is-module-only) nav .tax-language-mobile { grid-template-columns: 36px minmax(0,1fr) auto; gap: 8px; }
    .topbar:not(.is-module-only) nav .tax-language-mobile select { width: 106px; }
    .mobile-nav-language-icon { width: 36px; height: 36px; }
}

/* Central Velensio entry: keep sign-in visible and give product discovery its own space. */
.platform-auth-home-body {
    background:
        radial-gradient(circle at 10% 18%, rgba(46, 177, 208, .09), transparent 30%),
        radial-gradient(circle at 91% 88%, rgba(13, 95, 147, .07), transparent 34%),
        #f3f7f9;
}
.platform-auth-home-body .platform-entry-header { box-shadow: none; }
.platform-auth-home-body .platform-entry-main {
    display: grid;
    align-items: center;
    width: min(100%, 1192px);
    padding: clamp(26px, 5vh, 58px) clamp(16px, 3vw, 36px) 48px;
}
.platform-auth-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(370px, 460px);
    gap: clamp(18px, 3vw, 36px);
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.platform-auth-card,
.platform-auth-discover { min-width: 0; border-radius: 28px; }
.platform-auth-card {
    grid-column: 2;
    grid-row: 1;
    padding: clamp(28px, 3.1vw, 42px);
    border: 1px solid #d9e5e9;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 43, 66, .09);
}
.platform-auth-card-heading { margin-bottom: 26px; }
.platform-auth-card-heading .eyebrow { margin: 0 0 11px; color: #98723e; font-size: 12px; letter-spacing: .13em; }
.platform-auth-card-heading h1 { margin: 0; color: #12364c; font-size: clamp(31px, 3.2vw, 39px); line-height: 1.12; letter-spacing: -.025em; }
.platform-auth-card-heading > p:last-child { max-width: 36ch; margin: 10px 0 0; color: #617989; font-size: 15px; line-height: 1.5; }
.platform-auth-card .login-password-form { gap: 16px; margin: 0; }
.platform-auth-card .login-password-form label { color: #23475b; font-size: 13px; }
.platform-auth-card .login-password-form input:not([type="hidden"]) { width: 100%; min-height: 49px; border-radius: 11px; }
.platform-auth-card .login-password-form .btn.primary { min-height: 50px; width: 100%; margin-top: 3px; border-radius: 11px; }
.platform-auth-forgot { display: block; width: fit-content; margin: 13px 0 0 auto; color: #0b628e; font-size: 13px; font-weight: 750; text-underline-offset: 3px; }
.platform-auth-card .platform-passkey-login { justify-items: stretch; gap: 8px; margin-top: 22px; padding-top: 18px; text-align: center; }
.platform-auth-card .platform-passkey-login > span { display: block; margin: -27px auto 2px; padding: 0 13px; background: #fff; }
.platform-auth-card .platform-passkey-login > .btn { width: 100%; min-height: 48px; border-radius: 11px; }
.platform-auth-card .platform-passkey-login small { font-size: 12px; }
.platform-auth-discover {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: clamp(32px, 4vw, 52px);
    overflow: hidden;
    background:
        radial-gradient(circle at 94% 0%, rgba(42, 204, 211, .21), transparent 39%),
        linear-gradient(155deg, #103c56, #0b2b43 70%);
    color: #fff;
    box-shadow: 0 24px 65px rgba(12, 49, 72, .13);
}
.platform-auth-discover-kicker { margin: 0 0 12px; color: #91e0e2; font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.platform-auth-discover-intro h2 { max-width: 24ch; margin: 0; color: #fff; font-size: clamp(28px, 2.7vw, 38px); line-height: 1.16; letter-spacing: -.025em; }
.platform-auth-discover-intro h2 span { color: #9be9e6; white-space: nowrap; }
.platform-auth-products { display: grid; gap: 9px; }
.platform-auth-products a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 70px;
    padding: 12px 16px;
    border: 1px solid rgba(206, 232, 241, .22);
    border-radius: 15px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .15s;
}
.platform-auth-products a:hover,
.platform-auth-products a:focus-visible { border-color: rgba(169, 236, 239, .65); background: rgba(255, 255, 255, .15); transform: translateY(-1px); }
.platform-auth-product-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(142, 229, 234, .18); color: #a6f1f0; font-size: 18px; font-weight: 850; }
.platform-auth-product-copy { display: grid; gap: 2px; min-width: 0; }
.platform-auth-product-copy strong { font-size: 15px; }
.platform-auth-product-copy small { color: #bad1db; font-size: 12px; }
.platform-auth-product-arrow { color: #a2e8e7; font-size: 23px; }
.platform-auth-mobile-products { display: none; }
.platform-auth-home.is-standalone { grid-template-columns: minmax(0, 460px); justify-content: center; }
.platform-auth-home.is-standalone .platform-auth-card { grid-column: 1; }

@media (max-width: 980px) {
    .platform-auth-home-body .platform-entry-main { display: block; padding: 22px 16px 40px; }
    .platform-auth-home { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 520px; margin: 0 auto; }
    .platform-auth-card { grid-column: 1; grid-row: 1; padding: clamp(24px, 5vw, 34px); border-radius: 22px; }
    .platform-auth-discover { grid-column: 1; grid-row: 2; display: block; padding: 0; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
    .platform-auth-discover-intro,
    .platform-auth-products { display: none; }
    .platform-auth-mobile-products { display: block; overflow: hidden; border: 1px solid #d9e5e9; border-radius: 18px; background: #fff; box-shadow: 0 10px 34px rgba(16, 43, 66, .05); }
    .platform-auth-mobile-products summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 74px; padding: 15px 21px; color: #12364c; cursor: pointer; list-style: none; }
    .platform-auth-mobile-products summary::-webkit-details-marker { display: none; }
    .platform-auth-mobile-products summary > span:first-child { display: grid; gap: 4px; }
    .platform-auth-mobile-products summary strong { font-size: 16px; line-height: 1.35; }
    .platform-auth-mobile-products summary small { color: #637c8a; font-size: 12px; }
    .platform-auth-mobile-chevron { flex: none; width: 10px; height: 10px; border-right: 2px solid #17638b; border-bottom: 2px solid #17638b; transform: rotate(45deg); transition: transform .15s; }
    .platform-auth-mobile-products[open] .platform-auth-mobile-chevron { transform: rotate(225deg); }
    .platform-auth-mobile-products nav { display: grid; gap: 7px; padding: 0 13px 13px; }
    .platform-auth-mobile-products nav a { display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 10px 14px; border: 1px solid #e2ebef; border-radius: 11px; background: #f8fbfc; color: #143c52; text-decoration: none; }
    .platform-auth-mobile-products nav a span:first-child { display: grid; gap: 2px; }
    .platform-auth-mobile-products nav a small { color: #647c88; font-size: 12px; }
    .platform-auth-mobile-products nav a span:last-child { color: #0b628e; font-size: 20px; }
    .platform-auth-home.is-standalone { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
    .platform-auth-home-body .platform-entry-header { min-height: 62px; padding: 11px 17px; }
    .platform-auth-home-body .platform-entry-brand-logo { width: 162px; }
    .platform-auth-home-body .platform-entry-main { padding: 13px 13px 28px; }
    .platform-auth-card { padding: 22px; }
    .platform-auth-card-heading { margin-bottom: 21px; }
    .platform-auth-card-heading h1 { font-size: 30px; }
}

/* Individual-business intake and quote review */
.choice-grid.client-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid.client-type-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.independent-activity-step .wizard-step-heading { margin-bottom: 24px; }
.independent-person-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0 12px; }
.independent-person-choice .choice-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 12px; min-height: 98px; padding: 19px 21px; border: 1px solid #d8e6ed; border-radius: 17px; background: #f9fcfd; cursor: pointer; }
.independent-person-choice .choice-card:has(input:checked) { border-color: #70a9bc; background: #eff8f8; box-shadow: 0 10px 28px rgba(14, 73, 98, .08); }
.independent-person-choice .choice-card input { grid-row: span 2; width: 20px; height: 20px; accent-color: #146991; }
.independent-person-choice .choice-card strong { color: #12384d; font-size: 16px; }
.independent-person-choice .choice-card small { color: #607d8e; line-height: 1.4; }
.independent-person-panel { margin-top: 23px; padding: clamp(20px, 3vw, 32px); border: 1px solid #dbe8ed; border-radius: 20px; background: linear-gradient(145deg, #fff, #f6fafb); box-shadow: 0 15px 38px rgba(11, 61, 82, .05); }
.independent-person-panel[hidden], .independent-spouse-choice[hidden], .independent-summary[hidden], [data-private-summary][hidden] { display: none !important; }
.wizard-v2 .price-box[hidden] { display: none !important; }
.independent-person-heading { margin-bottom: 21px; }
.independent-person-heading h3 { margin: 6px 0 0; color: #10364c; font-size: clamp(21px, 2vw, 27px); }
.independent-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.independent-form-grid label, .independent-quote-form label { display: grid; gap: 8px; color: #24465a; font-weight: 700; }
.independent-form-grid .independent-wide { grid-column: 1 / -1; }
.independent-form-grid input, .independent-form-grid select, .independent-quote-form input, .independent-quote-form textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cfdee6; border-radius: 11px; background: #fff; color: #10364c; font: inherit; }
.independent-form-grid input:focus, .independent-form-grid select:focus, .independent-quote-form input:focus, .independent-quote-form textarea:focus { outline: 2px solid #82b8c5; outline-offset: 2px; }
.independent-financial-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 27px 0 14px; padding-top: 22px; border-top: 1px solid #dce8ec; color: #12394e; }
.independent-financial-head span { color: #67808e; font-size: 13px; }
.independent-accounts-ready { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 15px; border: 1px solid #d8e7e9; border-radius: 12px; background: #f3f9f8; color: #244d57; font-weight: 650; }
.independent-accounts-ready input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: #146991; }
.independent-summary { margin-bottom: 22px; padding: clamp(21px, 3vw, 30px); border: 1px solid #b8d9d8; border-radius: 19px; background: linear-gradient(135deg, #f1f9f7, #fff 75%); }
.independent-summary > strong { display: block; margin: 9px 0; color: #10384b; font-size: clamp(21px, 2vw, 27px); }
.independent-summary p { color: #526f7d; line-height: 1.55; }
.independent-missing { margin-top: 16px; padding-top: 15px; border-top: 1px solid #d6e8e7; }
.independent-missing ul { columns: 2; margin: 10px 0 0; padding-left: 21px; color: #536e79; }
.independent-admin-panel { margin-top: 22px; padding: clamp(23px, 3vw, 36px); border: 1px solid #d8e7e8; border-radius: 21px; background: linear-gradient(145deg, #fff, #f8fbfa); }
.independent-admin-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.independent-admin-heading h2 { margin: 4px 0 8px; color: #10374d; }
.independent-admin-heading p:not(.eyebrow) { margin: 0; color: #617987; }
.independent-quote-state { flex: none; padding: 9px 14px; border-radius: 999px; background: #e7f2ef; color: #1b665a; font-weight: 750; }
.independent-admin-activities { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 23px; }
.independent-admin-activities article { padding: 20px; border: 1px solid #dce8eb; border-radius: 15px; background: #fff; }
.independent-admin-activities article > span { color: #af813a; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.independent-admin-activities h3 { margin: 8px 0 5px; color: #10374d; }
.independent-admin-activities p { margin: 0; color: #67808d; }
.independent-admin-activities dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 19px 0 0; }
.independent-admin-activities dl div { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid #edf1f3; }
.independent-admin-activities dt { color: #6c8490; font-size: 12px; }
.independent-admin-activities dd { margin: 0; color: #1d4052; font-weight: 750; }
.independent-admin-missing { margin-top: 20px; padding: 17px 20px; border-radius: 13px; background: #fff8ea; color: #70582e; }
.independent-admin-missing ul { columns: 2; margin: 8px 0 0; padding-left: 20px; }
.independent-quote-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 230px); gap: 17px 21px; align-items: end; margin-top: 23px; padding-top: 22px; border-top: 1px solid #dce8eb; }
.independent-quote-form > div p { margin: 6px 0 0; color: #6a808b; }
.independent-quote-form label:has(textarea) { grid-column: 1 / -1; }
.independent-quote-form textarea { resize: vertical; }
.independent-quote-form .btn { justify-self: start; }
.independent-client-quote { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin: 20px 0; padding: clamp(22px, 3vw, 34px); border: 1px solid #c6e0dc; border-radius: 20px; background: linear-gradient(120deg, #edf8f4, #fff 76%); box-shadow: 0 14px 36px rgba(13, 75, 83, .06); }
.independent-client-quote h2 { margin: 5px 0 10px; color: #10394e; font-size: clamp(24px, 2.4vw, 33px); }
.independent-client-quote p { max-width: 67ch; margin: 0; color: #577480; line-height: 1.55; }
.independent-client-quote .independent-quote-message { margin-top: 12px; padding: 12px 15px; border-left: 3px solid #6ba99f; background: #fff; }
.independent-client-quote-action { flex: none; display: grid; gap: 14px; justify-items: end; }
.independent-client-quote-action > strong { color: #0d4a5c; font-size: clamp(27px, 3vw, 39px); }
.independent-client-quote-action > div { display: flex; gap: 9px; }
@media (max-width: 760px) { .choice-grid.client-type-grid, .independent-person-choice, .independent-form-grid, .independent-quote-form { grid-template-columns: 1fr; } .independent-form-grid .independent-wide, .independent-quote-form label:has(textarea) { grid-column: auto; } .independent-financial-head, .independent-admin-heading, .independent-client-quote { flex-direction: column; align-items: stretch; } .independent-client-quote-action { justify-items: start; } .independent-missing ul, .independent-admin-missing ul { columns: 1; } }

.independent-quote-settings { padding: 20px 24px 25px; }
.independent-quote-settings > label { display: grid; gap: 8px; max-width: 760px; font-weight: 700; }
.independent-quote-settings > label input, .independent-quote-settings > label textarea { width: 100%; border: 1px solid #cfdee6; border-radius: 11px; padding: 12px 14px; font: inherit; }
.independent-quote-settings fieldset { display: grid; gap: 10px; max-width: 760px; }
.independent-quote-settings .check-row { display: flex; gap: 11px; align-items: flex-start; }
.independent-quote-settings .check-row input { accent-color: #126b87; }
.independent-offer-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 22px; }
.independent-offer-snapshot > div { display: grid; align-content: start; gap: 8px; min-height: 108px; padding: 17px 19px; border: 1px solid #dbe8e9; border-radius: 14px; background: #fff; }
.independent-offer-snapshot > div span { color: #647e8b; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.independent-offer-snapshot > div strong { color: #153d50; font-size: 17px; line-height: 1.35; }
.independent-offer-snapshot > p { grid-column: 1 / -1; margin: 0; padding: 17px 19px; border: 1px solid #dbe8e9; border-radius: 14px; background: #fff; color: #35576a; line-height: 1.55; }
.independent-offer-delivery { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 17px; padding: 16px 19px; border: 1px solid #c9e2dc; border-radius: 14px; background: #f0faf6; }
.independent-offer-delivery.needs-attention { border-color: #e8d4a8; background: #fff8e9; }
.independent-offer-delivery strong { color: #174d4b; }
.independent-offer-delivery p { margin: 5px 0 0; color: #607986; }
.independent-quote-form { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.independent-quote-form .independent-quote-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.independent-quote-form-head h3 { margin: 5px 0 0; color: #10374d; font-size: clamp(21px, 2vw, 28px); }
.independent-quote-form .independent-quote-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.independent-quote-form .independent-quote-timing { margin: 0; padding: 14px 17px; border-radius: 12px; background: #f0f6f8; color: #33596a; }
.independent-quote-form .independent-quote-review { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border: 1px solid #d7e6df; border-radius: 12px; background: #f3faf7; font-weight: 650; }
.independent-quote-form .independent-quote-review input { flex: none; width: 19px; min-height: 19px; height: 19px; margin-top: 2px; accent-color: #146991; }
.independent-client-quote { align-items: flex-start; }
.independent-client-quote-terms { max-width: 670px; margin-top: 18px; padding: 17px 19px; border: 1px solid #d4e9e3; border-radius: 14px; background: #fff; }
.independent-client-quote-terms strong { display: block; margin-bottom: 7px; color: #123e4c; }
.independent-client-quote .independent-client-quote-terms p { margin: 0 0 9px; color: #355b63; }
.independent-client-quote-terms small { color: #5b7881; line-height: 1.45; }
@media (max-width: 760px) {
    .independent-offer-snapshot, .independent-quote-form .independent-quote-fields { grid-template-columns: 1fr; }
    .independent-offer-snapshot > p { grid-column: auto; }
    .independent-offer-delivery, .independent-quote-form .independent-quote-form-head { flex-direction: column; align-items: stretch; }
    .independent-client-quote-action > div { flex-wrap: wrap; }
}

/* Cabinet payment fees: one explanation, then compact settings per method. */
.payment-fee-settings { border-color: #d7e5eb; background: #f8fbfc; box-shadow: 0 14px 36px rgba(18, 58, 78, .045); }
.payment-fee-settings > summary { padding: 22px clamp(18px, 2vw, 28px); background: #fff; }
.payment-fee-settings[open] > summary { border-bottom: 1px solid #e3edf1; }
.payment-fee-settings > summary strong { display: block; color: #103b51; font-size: clamp(18px, 1.5vw, 21px); }
.payment-fee-settings > summary small { display: block; margin-top: 4px; color: #66808d; font-size: 13px; font-weight: 500; line-height: 1.4; }
.payment-fee-content { display: grid; gap: 18px; padding: clamp(16px, 2vw, 28px); }
.payment-fee-guide { display: flex; align-items: center; gap: 16px; padding: 17px 20px; border: 1px solid #cfe4e9; border-radius: 16px; background: linear-gradient(115deg, #edf8f8, #f6fbfc 76%); }
.payment-fee-guide-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #d5ecef; color: #12677e; font-size: 17px; font-weight: 850; font-style: normal; }
.payment-fee-guide > div { min-width: 0; }
.payment-fee-guide strong { color: #164358; font-size: 14px; }
.payment-fee-guide p { margin: 3px 0 0; color: #456979; font-size: 13px; line-height: 1.5; }
.payment-fee-formula { flex: 0 0 auto; margin-left: auto; padding: 9px 12px; border: 1px solid #cfe3e9; border-radius: 999px; background: #fff; color: #235c70; font-size: 12px; font-weight: 800; text-align: center; }
.payment-fee-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.payment-fee-card { min-width: 0; padding: clamp(17px, 1.6vw, 23px); border: 1px solid #d9e7ec; border-radius: 18px; background: #fff; box-shadow: 0 9px 26px rgba(15, 54, 75, .045); transition: border-color .18s ease, box-shadow .18s ease; }
.payment-fee-card:focus-within { border-color: #7cb5c7; box-shadow: 0 0 0 3px rgba(15, 115, 151, .1); }
.payment-fee-card-head { display: flex; align-items: center; gap: 12px; min-height: 63px; margin-bottom: 19px; }
.payment-fee-card-mark { display: grid; flex: 0 0 45px; width: 45px; height: 45px; place-items: center; border-radius: 13px; background: #e8f4f1; color: #177765; font-size: 13px; font-weight: 900; letter-spacing: .02em; }
.payment-fee-card:nth-child(2) .payment-fee-card-mark { background: #e8f2fa; color: #17648f; }
.payment-fee-card:nth-child(3) .payment-fee-card-mark { background: #f5f0e8; color: #936b2e; }
.payment-fee-card h3 { margin: 0; color: #12394f; font-size: 17px; line-height: 1.25; }
.payment-fee-card-head p { margin: 4px 0 0; color: #718995; font-size: 12px; line-height: 1.35; }
.payment-fee-settings .payment-fee-field { display: grid; gap: 7px; min-width: 0; margin: 0; color: #315668; font-size: 12px; font-weight: 800; }
.payment-fee-field > span:first-child { line-height: 1.3; }
.payment-fee-field select, .payment-fee-field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 47px; margin: 0; padding: 10px 12px; border: 1px solid #d1e1e8; border-radius: 11px; background: #fff; color: #153b50; font: inherit; font-size: 13px; font-weight: 700; }
.payment-fee-field select:focus-visible, .payment-fee-field input:focus-visible { outline: 3px solid rgba(26, 119, 151, .26); outline-offset: 2px; }
.payment-fee-rate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.payment-fee-input { position: relative; display: block; min-width: 0; }
.payment-fee-input input { padding-right: 47px; appearance: textfield; }
.payment-fee-input input::-webkit-outer-spin-button, .payment-fee-input input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.payment-fee-input > span { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #698493; font-size: 12px; font-weight: 800; pointer-events: none; }
.payment-fee-caution { margin: 0; color: #6b7f8a; font-size: 12px; line-height: 1.5; }
@media (max-width: 1200px) { .payment-fee-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
    .payment-fee-guide { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
    .payment-fee-formula { grid-column: 1 / -1; min-width: 0; margin-left: 0; white-space: normal; }
    .payment-fee-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
    .payment-fee-guide { padding: 15px; }
    .payment-fee-formula { margin-left: 0; }
    .payment-fee-rate-fields { grid-template-columns: minmax(0, 1fr); }
}

/* QR invoice settings: follow the same order as the issued invoice. */
.qr-settings > summary { background: #f8fbfd; }
.qr-settings > summary small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.qr-settings-body { display: grid; gap: 18px; padding: clamp(16px, 2.4vw, 30px); background: linear-gradient(180deg, #f7fbfd, #fff 280px); }
.qr-settings .qr-settings-body label { margin: 0; }
.qr-settings-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 26px; border: 1px solid #bfdce6; border-radius: 18px; background: linear-gradient(115deg, #eaf5f8, #f8fcfd 68%); }
.qr-settings-kicker { color: #8a682f; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.qr-settings-intro h2 { margin: 5px 0 6px; color: var(--ink); font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }
.qr-settings-intro p { max-width: 720px; margin: 0; color: #526e7e; line-height: 1.5; }
.qr-settings .qr-settings-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid #a6d8cb; border-radius: 999px; background: #fff; color: #125b4e; font-weight: 850; cursor: pointer; }
.qr-settings-switch input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: #138268; }
.qr-settings-card { min-width: 0; padding: clamp(18px, 2.3vw, 29px); border: 1px solid #d6e5ec; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(16, 49, 68, .04); }
.qr-settings-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.qr-settings-number { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #e8f4f6; color: #116b79; font-size: 13px; font-weight: 950; }
.qr-settings-card-head h3 { margin: 0 0 4px; color: var(--ink); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.25; }
.qr-settings-card-head p { margin: 0; color: var(--muted); line-height: 1.45; }
.qr-identity-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 270px); align-items: start; gap: 24px; }
.qr-settings-field-title { margin: 0 0 10px; color: #45677a; font-size: 13px; font-weight: 850; }
.qr-settings .invoice-contact-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.qr-settings .invoice-contact-options .check-row { min-height: 52px; padding: 11px 12px; border-radius: 11px; color: #28546b; font-size: 13px; }
.qr-settings .invoice-contact-options input { accent-color: #0b76a5; }
.qr-identity-preview { padding: 15px; border: 1px solid #d9e7ec; border-radius: 15px; background: #f8fbfc; }
.qr-identity-preview > span { display: block; margin-bottom: 10px; color: #667f8c; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.qr-identity-preview .invoice-branding-preview { width: 100%; min-height: 92px; padding: 16px; }
.qr-identity-preview .invoice-branding-preview img { max-width: 100%; max-height: 62px; }
.qr-identity-preview a { display: inline-block; margin-top: 12px; color: #096591; font-size: 13px; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.qr-settings-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; max-width: 1200px; }
.qr-settings-fields label, .qr-reference-field { min-width: 0; color: #284d62; font-size: 13px; font-weight: 800; }
.qr-settings-fields input, .qr-settings-fields select, .qr-settings-fields textarea, .qr-reference-field select { width: 100%; border-color: #ccdee7; border-radius: 10px; }
.qr-settings-fields input:focus, .qr-settings-fields select:focus, .qr-settings-fields textarea:focus, .qr-reference-field select:focus { border-color: #2084aa; outline: 3px solid rgba(32, 132, 170, .14); }
.qr-settings-fields .qr-span-2 { grid-column: span 2; }
.qr-settings-fields .qr-span-full { grid-column: 1 / -1; }
.qr-settings-divider { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 13px; margin: 22px 0 15px; padding-top: 18px; border-top: 1px solid #e2edf1; }
.qr-settings-divider span { color: #244d63; font-size: 14px; font-weight: 900; }
.qr-settings-divider small { color: var(--muted); line-height: 1.4; }
.qr-settings-callout { display: grid; gap: 3px; max-width: 1200px; margin: 18px 0; padding: 13px 16px; border-left: 3px solid #78b5c9; border-radius: 0 10px 10px 0; background: #f1f8fa; color: #4d6b7a; font-size: 13px; line-height: 1.45; }
.qr-settings-callout strong { color: #214f66; }
.qr-reference-field { max-width: 620px; }
.qr-settings-hint { max-width: 850px; margin: 9px 0 0; color: #627d8b; font-size: 13px; line-height: 1.5; }
.qr-timing-fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.qr-timing-fieldset legend { margin-bottom: 10px; color: #284d62; font-size: 13px; font-weight: 850; }
.qr-timing-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 1000px; }
.qr-settings .qr-timing-option { display: flex; align-items: flex-start; gap: 12px; min-height: 88px; padding: 15px; border: 1px solid #d4e3e9; border-radius: 12px; background: #fbfdfe; cursor: pointer; }
.qr-settings .qr-timing-option:has(input:checked) { border-color: #69b1c6; background: #ecf7fa; box-shadow: inset 0 0 0 1px #69b1c6; }
.qr-timing-option input { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: #087da3; }
.qr-timing-option span { display: grid; gap: 4px; }
.qr-timing-option strong { color: #173f55; font-size: 14px; }
.qr-timing-option small { color: #5c7785; font-weight: 500; line-height: 1.4; }
.qr-timing-fieldset > p { max-width: 980px; margin: 11px 0 0; color: #627d8b; font-size: 13px; line-height: 1.45; }
.qr-settings-fields-terms { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; }
.qr-settings-fields-terms textarea { min-height: 92px; }
@media (max-width: 900px) {
    .qr-identity-layout { grid-template-columns: 1fr; }
    .qr-identity-preview { max-width: 360px; }
}
@media (max-width: 650px) {
    .qr-settings-body { padding: 12px; gap: 12px; }
    .qr-settings-intro { align-items: stretch; flex-direction: column; padding: 19px; gap: 16px; }
    .qr-settings .qr-settings-switch { align-self: flex-start; }
    .qr-settings-card { padding: 18px; border-radius: 15px; }
    .qr-settings .invoice-contact-options, .qr-settings-fields, .qr-settings-fields-terms, .qr-timing-options { grid-template-columns: 1fr; }
    .qr-settings-fields .qr-span-2, .qr-settings-fields .qr-span-full { grid-column: auto; }
    .qr-identity-preview { max-width: none; }
}
.oauth-choice-shell .admin-head { margin-bottom: 1.5rem; }
.oauth-choice-intro { padding: 1.5rem 1.75rem; margin-bottom: 1rem; background: linear-gradient(120deg,#f1f8fa,#fff); }
.oauth-choice-intro h2 { margin: 0 0 .35rem; }
.oauth-choice-intro p { margin: 0; color: #607b8a; }
.oauth-choice-grid,.oauth-console-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.oauth-choice-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.oauth-choice-card p { color: #587487; margin: 0; }
.oauth-choice-card form { margin-top: auto; }
.oauth-choice-head { display:flex; align-items:center; gap: 1rem; }
.oauth-choice-head h2 { margin: .15rem 0 0; }
.oauth-choice-head .oauth-state { margin-left:auto; }
.oauth-console-card { min-width: 0; }
.oauth-console-card .saas-admin-form { display: grid; gap: 1rem; }
.oauth-console-callback { display: grid; gap: .45rem; padding: 1rem; border: 1px solid #d5e5eb; background: #f5fafb; border-radius: 14px; }
.oauth-console-callback code { overflow-wrap: anywhere; font-size: .9rem; }
.oauth-console-callback small { color: #607b8a; }
@media (max-width: 760px) {
    .oauth-choice-grid,.oauth-console-grid { grid-template-columns: 1fr; }
    .oauth-choice-head { flex-wrap: wrap; }
    .oauth-choice-head .oauth-state { margin-left: 0; }
}
