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

.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;
}

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

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

.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-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 {
    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) auto;
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 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-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-list {
    display: grid;
    gap: 10px;
}

.intake-standard-item-card {
    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) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 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-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 .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); }

.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;
}
.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: rgba(255, 255, 255, .94);
    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;
}
.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 > a { display: inline-flex; align-items: center; min-height: 38px; }
.nav-submenu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 230px;
    display: none;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(20,50,74,.12);
    z-index: 1100;
}
.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu { display: grid; gap: 4px; }
.nav-submenu a {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--ink);
}
.nav-submenu a:hover { background: #fff8e8; color: #9b6924; }

.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;
}
.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;
}
.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-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 {
    color: #0b5f93;
    font-size: 14px;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.platform-entry-main {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 1px 16px 48px;
}
.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;
}
.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;
}
@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;
    }
}
@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;
    }
    .saas-admin-heading h1 {
        font-size: 34px;
    }
    .saas-admin-metrics {
        grid-template-columns: 1fr;
    }
    .saas-admin-metric {
        border-right: 0;
    }
}
.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); }
.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;
}
.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;
}
.previous-address {
    display: grid;
    gap: 10px;
}
.previous-address[hidden] {
    display: none;
}
.previous-address > strong {
    color: var(--ink);
    font-size: 16px;
}
.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-locality-picker {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}
.swiss-locality-picker[hidden] {
    display: none;
}
.swiss-locality-picker small {
    color: #5f7383;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}
.swiss-locality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.swiss-locality-option {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #cbdde8;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font: inherit;
    font-size: 12.5px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(20, 50, 74, .045);
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.swiss-locality-option:hover,
.swiss-locality-option.is-selected {
    border-color: rgba(15, 105, 156, .34);
    background: #eef7fb;
    color: var(--blue);
    transform: translateY(-1px);
}
.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 label:nth-child(4),
    .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 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(160px, .8fr) repeat(3, minmax(160px, 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 {
    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; }
.summary-documents {
    border: 1px solid #cfe6d8;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(242,251,246,.98), rgba(255,255,255,.96) 48%),
        #fff;
    padding: clamp(18px, 3vw, 24px);
    box-shadow: 0 18px 48px rgba(45,138,98,.08);
}
.summary-documents.compact {
    display: grid;
    gap: 12px;
}
.summary-documents.compact .summary-documents-head {
    margin-bottom: 0;
}
.summary-documents.compact .summary-documents-note {
    margin-top: 0;
    padding-top: 12px;
}
.summary-documents-head {
    margin-bottom: 14px;
}
.summary-documents-head span {
    color: var(--gold);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}
.summary-documents-head strong {
    color: var(--ink);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
}
.summary-documents-head p,
.summary-documents-note,
.summary-document-optional p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}
.summary-documents ul {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.summary-documents li {
    list-style: none;
    min-height: 78px;
    padding: 14px;
    border: 1px solid rgba(207,230,216,.95);
    border-radius: 14px;
    background: rgba(255,255,255,.88);
}
.summary-documents li span,
.summary-document-optional span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f2fbf6;
    color: var(--ok);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.summary-documents li strong {
    margin-top: 10px;
    color: var(--ink);
    font-size: 16px;
}
.summary-document-optional {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #e6edf2;
    border-radius: 14px;
    background: #f8fbfd;
}
.summary-document-optional span {
    background: #eef3f6;
    color: #587388;
}
.summary-document-optional strong {
    color: var(--ink);
    font-size: 16px;
}
.summary-documents-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(207,230,216,.9);
}
.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 {
    display: flex;
    flex-direction: column;
}
.case-workstation-shell > .admin-head { order: 0; }
.case-workstation-shell > .case-workflow-panel { order: 1; }
.case-workstation-shell > .case-tabs { order: 2; }
.case-workstation-shell > .production-banner { order: 3; }
.case-workstation-shell > .case-contact-strip { order: 4; }
.case-workstation-shell > .deadline-alert-card { order: 5; }
.case-workstation-shell > #delai-fiscal { order: 6; }
.case-workstation-shell > .payment-admin-callout { order: 7; }
.case-workstation-shell > .case-priority-card { order: 8; }
.case-workstation-shell > .case-readiness-panel { order: 9; }
.case-workstation-shell > #synthese { order: 10; }
.case-workstation-shell > .gentle-step-banner { order: 11; }
.case-workstation-shell > .ai-case-panel { order: 12; }
.case-workstation-shell > #justificatifs { order: 20; }
.case-workstation-shell > .grid.two { order: 31; }
.case-workstation-shell > #factures { order: 40; }
.case-workstation-shell > .case-delivery-grid { order: 60; }
.case-workstation-shell > #decision-taxation { order: 70; }
.case-workstation-shell > #historique { order: 80; }
.case-workstation-shell > .admin-cancel-case { order: 100; }
.admin-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.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);
}
.document-queue-actions {
    min-width: 250px;
}
.document-queue-actions .btn.primary {
    box-shadow: 0 10px 24px rgba(13,95,147,.14);
}
.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, 1.45fr) minmax(320px, .85fr);
    gap: 18px;
    align-items: end;
    padding: 22px;
    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 h1 {
    margin-bottom: 8px;
}
.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);
}
.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; }
.financial-month-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.financial-month-grid article {
    min-width: 0;
    border: 1px solid #e2edf2;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}
.financial-month-grid strong,
.financial-month-grid small {
    display: block;
}
.financial-month-grid small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.financial-bars {
    position: relative;
    height: 12px;
    margin-top: 10px;
    border-radius: 999px;
    background: #edf4f7;
    overflow: hidden;
}
.financial-bars span,
.financial-bars em {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
}
.financial-bars span { background: #d6ebf5; }
.financial-bars em { background: linear-gradient(90deg, #12689b, #2b9467); }
.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-alert-list,
.dashboard-activity-list {
    display: grid;
    gap: 10px;
}
.dashboard-action-row,
.dashboard-alert-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 {
    grid-template-columns: 160px minmax(0, 1fr) auto;
}
.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-alert-row {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-alert-row strong {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f5f8;
}
.dashboard-alert-row.tone-danger strong { background: #fff0f0; color: #b24b4b; }
.dashboard-alert-row.tone-warning strong { background: #fff5ea; color: #bd7128; }
.dashboard-alert-row.tone-info strong { background: #eef4ff; color: #345fb6; }
.dashboard-alert-arrow {
    color: #7891a0;
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    transition: transform .18s ease, color .18s ease;
}
.dashboard-alert-row:hover,
.dashboard-alert-row:focus-visible {
    border-color: #aacddd;
    background: #f7fbfd;
    box-shadow: 0 10px 24px rgba(14, 70, 101, .1);
    transform: translateY(-1px);
    outline: none;
}
.dashboard-alert-row:hover .dashboard-alert-arrow,
.dashboard-alert-row:focus-visible .dashboard-alert-arrow {
    color: var(--blue);
    transform: translateX(3px);
}
#dossiers-suivi,
#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 {
    padding: 0 22px 22px;
}
.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; }
.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(220px, 1.65fr) minmax(110px, .82fr) minmax(130px, .9fr) minmax(250px, 1.45fr) minmax(88px, .52fr) minmax(150px, 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 > div:nth-child(4) {
    padding-inline: 14px;
}
.production-banner > div:nth-child(5) {
    justify-self: stretch;
}
.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-banner .score-readable {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}
.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-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(auto-fit, minmax(170px, 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);
}
.case-workflow-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 9px;
    row-gap: 1px;
    align-items: center;
    min-height: 78px;
    padding: 10px;
    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 {
    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.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.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-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) - 1px);
    z-index: 990;
    margin-inline: calc(clamp(20px, 4vw, 46px) * -1);
    padding: 11px clamp(20px, 4vw, 46px);
    border-top: 1px solid rgba(216, 232, 239, .72);
    box-shadow: 0 16px 34px rgba(16,43,66,.10);
}
.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-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;
}
.invoice-admin-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 18px 18px;
}
.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: 18px 20px 20px;
}
.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) {
    .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%;
    }

    .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;
    }
}
.payment-admin-callout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-top: 14px;
    border: 1px solid #bfe3cf;
    border-radius: 18px;
    padding: 18px;
}
.payment-admin-callout.is-open {
    border-color: #efc7c7;
    background:
        radial-gradient(circle at 4% 0%, rgba(178, 75, 75, .15), transparent 34%),
        linear-gradient(135deg, #fff5f5, #fff);
    box-shadow: 0 16px 34px rgba(178, 75, 75, .10);
}
.payment-admin-callout.is-paid {
    border-color: #bfe3cf;
    background:
        radial-gradient(circle at 4% 0%, rgba(38, 142, 92, .16), transparent 34%),
        linear-gradient(135deg, #f3fbf6, #fff);
    box-shadow: 0 16px 34px rgba(31, 122, 82, .12);
}
.payment-admin-callout.is-open .eyebrow {
    color: #a94848;
}
.payment-admin-callout.is-paid .eyebrow {
    color: #21744f;
}
.payment-admin-callout h2 {
    margin: 2px 0 4px;
}
.payment-admin-callout p {
    margin: 0;
    color: var(--muted);
}
.payment-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.payment-admin-actions form {
    margin: 0;
}
.case-contact-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(320px, 1.65fr) minmax(160px, .85fr);
    gap: 10px;
    align-items: stretch;
    border: 1px solid #d8e8ef;
    border-radius: 16px;
    background:
        radial-gradient(circle at 3% 0%, rgba(185, 130, 47, .12), transparent 30%),
        linear-gradient(135deg, #ffffff, #f8fbfd);
    box-shadow: 0 14px 34px rgba(16,43,66,.08);
    padding: 12px;
}
.case-contact-strip > div {
    min-width: 0;
    border: 1px solid #edf3f6;
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    padding: 10px 12px;
}
.case-contact-strip span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.case-contact-strip strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.case-contact-strip a {
    color: var(--blue);
    text-decoration: none;
}
.case-contact-postal-address {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.35;
    font-weight: 760;
}
.case-tabs {
    position: sticky;
    top: calc(var(--topbar-height, 68px) - 1px);
    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: max(0px, calc(var(--topbar-height, 68px) - 14px));
    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);
}
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) + 86px);
}
.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-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;
}
.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) + 86px);
}
.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 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .case-workflow-step {
        min-height: 58px;
    }
    .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;
}
.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-bulk-download {
    border-color: #b8dfca;
    background: #f4fbf7;
    color: #1f6f4d;
    box-shadow: 0 10px 22px rgba(31, 111, 77, .08);
}
.document-bulk-download:hover {
    border-color: #8dccab;
    background: #eaf8f0;
}
.document-bulk-download:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.document-control-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 18px;
}
.document-control-overview span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border: 1px solid #d8e8ef;
    border-radius: 999px;
    padding: 0 12px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}
.document-control-overview strong {
    color: var(--ink);
    font-size: 16px;
}
.document-control-overview .review {
    border-color: #efd3a8;
    background: #fff8ec;
    color: #9a651f;
}
.document-control-overview .missing {
    border-color: #efc7c7;
    background: #fff5f5;
    color: #a33d3d;
}
.document-control-overview .ok {
    border-color: #c8e9d6;
    background: #f2fbf6;
    color: #21744f;
}
.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-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-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 {
    padding: 10px;
    border: 1px solid #dbe8ef;
    border-radius: 12px;
    background: #f7fbfd;
}
.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-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-viewer-treatment {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe8ef;
    border-radius: 12px;
    background: #fff;
}
.document-viewer-duplicate-action {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #e3edf2;
}
.document-viewer-duplicate-action .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.document-viewer-duplicate-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.document-viewer-duplicate-action small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.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;
}
.document-viewer-treatment span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.document-review-current-btn {
    border-color: #b9e3cf;
    background: #f0fbf5;
    color: #17764e;
    font-weight: 950;
}
.document-review-current-btn.is-reviewed {
    background: #188756;
    border-color: #188756;
    color: #fff;
}
.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-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;
}
.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-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.client-progress-steps li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 78px;
    padding: 13px;
    border-radius: 12px;
    background: #f5f8fa;
    color: var(--muted);
}
.client-progress-steps li > span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 999px;
    background: #dbe6ec;
    color: #527084;
    font-weight: 950;
}
.client-progress-steps li strong,
.client-progress-steps li small {
    display: block;
}
.client-progress-steps li small {
    margin-top: 3px;
    color: var(--muted);
}
.client-progress-steps li.done {
    background: #eef9f3;
}
.client-progress-steps li.done > span {
    background: var(--ok);
    color: #fff;
}
.client-progress-steps li.current {
    background: #fff6e8;
}
.client-progress-steps li.current > span {
    background: var(--gold);
    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;
}
.client-secondary-details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.client-secondary-details summary {
    min-height: 52px;
    padding: 15px 18px;
    cursor: pointer;
    font-weight: 900;
}
.client-secondary-details > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 0 18px 18px;
    color: var(--muted);
}
.client-secondary-details p {
    margin: 0;
}
.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: 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-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .client-deadline-focus {
        grid-template-columns: 1fr;
        gap: 9px;
    }
}
@media (max-width: 430px) {
    .client-progress-steps {
        grid-template-columns: 1fr;
    }
    .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-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;
}
.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-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-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-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-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-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, .72fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #b8dfca;
    border-radius: 14px;
    background: linear-gradient(135deg, #f2fbf6, #fff);
}
.email-rule-card strong {
    display: block;
    color: var(--ok);
    font-size: 16px;
}
.email-rule-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}
.email-rule-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}
.email-rule-fields label {
    display: grid;
    gap: 6px;
    margin: 0;
}
.email-rule-fields label span {
    color: var(--muted);
    font-size: 13px;
}
.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;
}
.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 span { color: var(--muted); font-size: 13px; }
.email-preview {
    width: 100%;
    height: 520px;
    border: 0;
    background: #fff;
}
.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-custom-list {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 6px;
}
.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;
}
.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 { 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: 176px; align-self: start; }
.invoice-brand-name { max-width: 280px; color: var(--tenant-primary, var(--navy)); font-size: 24px; line-height: 1.15; }
.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-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,
.document-control-overview span,
.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(3, minmax(0, 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, .summary-documents ul, .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; }
    .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,
    .financial-month-grid,
    .consistency-grid,
    .print-info-grid,
    .print-check-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-action-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .dashboard-action-row .score {
        justify-self: start;
    }
    .payment-admin-callout {
        grid-template-columns: 1fr;
    }
    .case-workflow-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .case-priority-card {
        flex-direction: column;
        align-items: stretch;
    }
    .case-priority-card .btn {
        width: 100%;
        justify-content: center;
    }
    .payment-admin-actions,
    .payment-admin-actions .btn,
    .payment-admin-actions form {
        width: 100%;
    }
    .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, .case-contact-strip, .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;
    }
    .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; }
    .nav-submenu { position: static; display: grid; box-shadow: none; margin-top: 6px; }
    .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,
    .dashboard-alert-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,
    .summary-documents ul {
        grid-template-columns: 1fr;
    }
    .summary-documents-head strong {
        font-size: 22px;
    }
    .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 label:nth-child(4) {
        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 {
        grid-column: 1 / -1 !important;
    }
    .coord-card .previous-address-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .coord-card .previous-address-grid label {
        grid-column: 1 / -1 !important;
    }
}

@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; }
}
