@theme inline{--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}.doc-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#eaf4fa;color:#4388ad}
@media print{@page{size:A4;margin:0}}
/* The workspace: quiet paper, dark ink and restrained green. */.doc-icon{border-radius:3px;background:#eff3e9;color:#627955;width:31px;height:36px}

/* Model gallery */.model-thumbnail .document-pages{gap:0}.model-thumbnail .document-page{box-shadow:0 5px 20px #263c4020}

/* Template workspace */.editor-block .doc-image-placeholder{border:1px dashed #cddbbd}

/* The same document renderer is used in composition, preview and print. */
.document-pages{display:flex;flex-direction:column;gap:24px;width:794px;margin:auto}.document-page{position:relative;background:white;flex:none;overflow:hidden;box-shadow:0 5px 22px #263c4015}.document-block{position:absolute;line-height:1.5;white-space:normal;overflow-wrap:anywhere}.document-block:not(.editor-block){overflow:hidden}.doc-text{white-space:pre-wrap}.doc-image{width:100%;height:100%;object-fit:contain;display:block}.doc-image-placeholder{display:flex;align-items:center;justify-content:center;background:#f7f9f3;color:#c0cdb0;height:100%;font-weight:400;font-size:14px}.doc-company{display:flex;gap:18px;align-items:center;justify-content:inherit;height:100%}.doc-company img{height:72px;max-width:110px;object-fit:contain;flex:none}.doc-company>div{flex:1}.doc-company strong{font-size:1.9em;letter-spacing:.04em}.doc-company p{font-size:1em;margin-top:4px;line-height:1.5}.doc-party{display:grid;gap:5px}.doc-party small{font-size:.8em;letter-spacing:.12em;opacity:.6}.doc-party>strong{font-size:1.25em}.doc-party p{white-space:pre-wrap}.doc-reference p{margin-top:8px}.doc-reference>strong{font-size:1.2em}.doc-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:1em;line-height:1.35}.doc-table th{background:var(--block-color);color:#fff;padding:10px 6px;text-align:left;font-size:.8em;font-weight:500}.doc-table td{padding:10px 6px;border-bottom:1px solid #dfe5de;font-weight:400;vertical-align:top}.doc-table th:nth-child(2){width:27%}.doc-table th:nth-child(6){width:19%}.doc-table th:nth-child(4){width:12%}.doc-table td:nth-child(n+4){text-align:right;font-size:.88em}.doc-totals p{display:flex;gap:14px;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e2e8de}.doc-totals p:last-child{border-bottom:0;border-top:1px solid var(--block-color);font-weight:700;padding:12px 0;margin-top:3px}.doc-totals strong{white-space:nowrap;font-size:1em}.doc-signature{font-weight:700;border-top:1px solid #dfe5db;height:100%;padding-top:12px}.doc-rule{height:1px;background:var(--block-color);position:relative;top:50%}.free-table td{border:1px solid #dfe5db;height:36px;text-align:inherit!important;font-size:inherit!important}.free-table tr:first-child td{background:#f2f5ee;font-weight:700}.doc-page-number{position:absolute;right:48px;bottom:13px;color:#8e9b85;font-size:9px}
@media(max-width:600px){.model-gallery .document-page{min-width:0}}
@media print{.document-pages{display:block!important;gap:0;width:210mm!important;margin:0!important}.document-page{width:210mm!important;height:297mm!important;break-after:page;box-shadow:none!important;overflow:hidden!important}.document-page:last-child{break-after:auto}.document-block{left:calc(var(--doc-x,0)*1px)}.document-page{zoom:1}.document-page{print-color-adjust:exact;-webkit-print-color-adjust:exact}}.document-block.kind-image:not(.editor-block) .doc-image-placeholder{visibility:hidden}.doc-company{justify-content:inherit}.editor-page .document-block.kind-company{text-align:inherit}.doc-table th{overflow-wrap:anywhere}
/* Clear, comfortable screens for everyday invoicing. */.doc-icon{background:#eff5f6;color:#7296a3;border-radius:6px}
/* Most-used template actions come first. */
/* Keep smaller text readable on both light panels and the canvas. */.format-preview-document .document-pages{position:absolute;top:24px;left:50%;transform:translateX(-50%) scale(.53);transform-origin:top center;pointer-events:none}
@media(max-width:1250px){.format-preview-document .document-pages{transform:translateX(-50%) scale(.45)}}
@media(max-width:1050px){.format-preview-document .document-pages{transform:translateX(-50%) scale(.59)}}
@media(max-width:600px){.format-preview-document .document-pages{transform:translateX(-50%) scale(.42)}}
@media(max-width:400px){.format-preview-document .document-pages{transform:translateX(-50%) scale(.37)}}.doc-table,.doc-totals{font-variant-numeric:tabular-nums}
/* A page is scaled inside a frame that occupies its real visible size. */.document-preview{min-width:0;border:1px solid #dce7ed;background:#edf2f5;border-radius:10px;overflow:hidden}.document-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:13px 17px;background:#fff;border-bottom:1px solid #dce7ed}.document-preview-toolbar>strong{font-size:13px;font-weight:600;color:#4d7385;line-height:1.6}.document-zoom-controls{display:flex;align-items:center;gap:3px}.document-zoom-controls>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:36px;height:38px;border:1px solid transparent;background:transparent;border-radius:5px;padding:6px;color:#60899c}.document-zoom-controls>button:hover:not(:disabled){background:#edf5f8;color:#356f86}.document-zoom-controls>span{font-size:12px;color:#668e9f;min-width:45px;text-align:center;font-variant-numeric:tabular-nums}.document-zoom-controls>.fit-document-button{margin-left:6px;border-left:1px solid #e4edf3;border-radius:0;font-size:11px;padding:6px 10px}.document-preview-scroll{position:relative;overflow:auto;padding:25px;max-height:min(76vh,840px);min-height:260px;scrollbar-width:thin;scrollbar-color:#afc2ce #edf2f5;overscroll-behavior:contain}.document-preview-frame{position:relative;margin:0 auto;flex:none;min-width:0}.document-preview-source{position:absolute;left:0;top:0;font-family:Arial,Helvetica,sans-serif}.document-preview-source>.document-pages{margin:0;gap:25px}.document-preview-source .paper{min-width:0;max-width:794px;width:794px;min-height:1123px;margin:0}.document-preview-source .document-page,.document-preview-source .paper{box-shadow:0 4px 15px #2d4b5920}.document-preview-hint{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:12px 17px;background:#f8fbfc;border-top:1px solid #dde9ef;color:#7899aa;font-size:11px;line-height:1.6}.document-preview-hint>span:first-child{white-space:nowrap}.document-preview-hint>span:last-child{text-align:right}.document-preview-dialog{width:min(96vw,1100px)!important;max-width:1100px!important;max-height:94vh!important;padding:22px!important;border-radius:12px!important;overflow:hidden!important;gap:17px!important}.document-preview-dialog [data-slot=dialog-title]{font-size:21px;color:#466f83}.document-preview-dialog [data-slot=dialog-description]{font-size:13px;color:#7a9aab;margin-top:8px;line-height:1.7}.document-preview-dialog .document-preview-scroll{max-height:calc(90vh - 210px);min-height:250px}.document-preview-dialog .document-preview-toolbar>strong{display:none}.document-preview-dialog .document-preview-toolbar{justify-content:flex-end}.document-measurement{position:absolute;left:0;top:0;visibility:hidden;pointer-events:none;z-index:-1;line-height:1.5}.document-pages{position:relative}.document-block.kind-footer{white-space:pre-wrap}.doc-table td{overflow-wrap:anywhere}.doc-page-number{font-variant-numeric:tabular-nums}.format-example-note+.document-preview{margin-top:15px}
@media(max-width:1150px){.document-preview-toolbar{padding:12px}.document-preview-toolbar>strong{flex-basis:100%}.document-zoom-controls{margin-left:auto}.document-preview-scroll{padding:20px}}
@media(max-width:1000px){.document-preview-toolbar>strong{flex-basis:auto}.document-preview-scroll{max-height:76vh}.document-preview-source .doc-table{font-family:Arial,sans-serif}}
@media(max-width:850px){.document-preview-toolbar>strong{flex-basis:auto}}
@media(max-width:650px){.document-preview-toolbar{padding:13px 14px;gap:8px}.document-preview-toolbar>strong{flex-basis:100%}.document-zoom-controls{margin:0;width:100%;justify-content:space-between}.document-zoom-controls>.fit-document-button{margin-left:0}.document-zoom-controls>button{height:40px;min-width:40px}.document-preview-scroll{padding:16px;min-height:210px;max-height:70vh}.document-preview-hint{font-size:10px;padding:11px 14px}.document-preview-hint>span:last-child{max-width:22ch}.document-preview-dialog{padding:18px 14px!important;gap:14px!important;width:96vw!important}.document-preview-dialog .document-preview-toolbar>strong{display:none}.document-preview-dialog .document-preview-scroll{max-height:calc(90vh - 235px);min-height:190px}.document-preview-source .credit-paper{padding:48px}}
@media print{.document-preview{display:block!important;background:#fff!important;border:0!important;border-radius:0!important;overflow:visible!important}.document-preview-scroll{display:block!important;padding:0!important;overflow:visible!important;max-height:none!important;min-height:0!important;height:auto!important}.document-preview-frame{position:static!important;width:auto!important;height:auto!important;margin:0!important}.document-preview-source{position:static!important;width:auto!important;transform:none!important}.document-preview-source>.document-pages{gap:0!important}.document-preview-source .paper{box-shadow:none!important;width:210mm!important;max-width:210mm!important;min-height:297mm!important}.document-measurement{display:none!important}.document-preview-dialog{display:none!important}}

/* Secondary text remains readable at normal and reduced preview widths. */
.document-preview-hint{color:#566f7c}.document-preview-hint{color:#587584}.document-zoom-controls>span,.document-zoom-controls>button{color:#497285}.document-preview-toolbar strong{color:#3e6577}
/* CAPSED desktop workspace. Four-pixel rhythm; document typography is isolated. */
/* Registers: command surface, metrics, table, contextual inspector. */.doc-icon{display:none}
.document-inspector{border:1px solid var(--desk-line);border-radius:6px;background:#fff;min-width:0;overflow:hidden;align-self:stretch}
/* Client directory and ledger use the same control and row scales. */
/* Data entry: compact fields and a stable totals panel. */
/* Format workbench and invoice viewing have their own scrollable canvas. */.desktop-shell .document-preview{border:1px solid var(--desk-line);border-radius:6px;background:#e9ecf2}.desktop-shell .fixed-format-preview .document-preview{border:0;border-bottom:1px solid var(--desk-line);border-radius:0}
.desktop-shell .document-preview-toolbar{padding:8px 12px;min-height:44px;flex-wrap:nowrap;border-color:var(--desk-line)}.desktop-shell .document-preview-toolbar>strong{font-size:11px;color:#738097;flex-basis:auto;font-weight:500}.desktop-shell .document-zoom-controls{margin-left:auto;gap:2px}.desktop-shell .document-zoom-controls>button{height:28px;min-width:28px;font-size:10px;color:#7888a4;padding:4px}.desktop-shell .document-zoom-controls svg{width:14px;height:14px}.desktop-shell .document-zoom-controls>span{font-size:10px;min-width:40px;color:#8c98ae}.desktop-shell .document-zoom-controls>.fit-document-button{font-size:10px;padding:4px 8px;border-color:#e5e9f1}
.desktop-shell .document-preview-scroll{padding:24px;max-height:calc(100dvh - 250px);min-height:240px;background:#e9ecf2;scrollbar-color:#b7c1d2 #e9ecf2}.desktop-shell .document-preview-hint{padding:6px 12px;font-size:10px;border-color:var(--desk-line);color:#8a96ab;background:#f9fafc;line-height:16px}.desktop-shell .document-preview-source .paper,.desktop-shell .document-preview-source .document-page{box-shadow:0 2px 8px #25314817}
/* Settings and dialogs share the exact same labels and controls. */
/* One neutral text hierarchy across every working surface. */
.desktop-shell .document-preview-hint{color:var(--desk-muted)}
@media(min-width:1008px){.document-inspector{overflow:auto;scrollbar-width:thin}
}
@media(min-width:1008px) and (max-width:1240px){.document-inspector{display:none}}
@media(max-width:1007px){.document-inspector{display:none}.desktop-shell .document-preview-scroll{max-height:70vh}}
@media(max-width:760px){.desktop-shell .document-preview-toolbar{flex-wrap:wrap}.desktop-shell .document-preview-toolbar>strong{flex-basis:100%}}
@media(max-width:650px){.desktop-shell .document-preview-scroll{padding:16px}.desktop-shell .document-zoom-controls{width:100%;justify-content:space-between}.desktop-shell .document-zoom-controls>button{height:36px;min-width:36px}}
@media print{.document-inspector{display:none!important}.desktop-shell .document-preview-scroll{padding:0!important;max-height:none!important;background:#fff!important}.desktop-shell .document-preview{border:0!important;background:#fff!important}.desktop-shell .document-preview-source .paper,.desktop-shell .document-preview-source .document-page{box-shadow:none!important}}

/* Daily use: one readable scale, shorter copy, explanations on demand. */
.desktop-shell .document-preview-toolbar>strong,.desktop-shell .document-zoom-controls>span,.desktop-shell .document-zoom-controls>button,.desktop-shell .document-zoom-controls>.fit-document-button{font-size:12px}.desktop-shell .document-zoom-controls>button{height:32px;min-width:32px}.desktop-shell .document-preview-hint{font-size:11px}
/* Supervision uses the existing desktop scale and palette. */
.document-delivery-state{font-size:11px;color:var(--desk-muted)}
/* Keep body copy within the established neutral hierarchy. */

/* Workspace transitions and phone-first supervision. */
@keyframes workspace-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes notification-slide{from{transform:translateX(24px);opacity:.7}to{transform:translateX(0);opacity:1}}.field-note{font-size:12px;line-height:1.65;color:#607086;margin:12px 0}.invoice-revisions .document-preview{margin-top:12px}
.receipt-page{font-family:Arial,Helvetica,sans-serif;color:#242932;background:#fff;overflow:hidden;position:relative}.receipt-stationery{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;z-index:0}.receipt-content{position:relative;z-index:2;padding:172px 48px 0;line-height:1.5;font-size:12px}.receipt-page:has(.receipt-banner)::before{content:"";position:absolute;left:0;right:0;top:0;height:155px;background:white;z-index:1}.receipt-banner{position:absolute;top:18px;left:30px;width:734px;height:130px;object-fit:contain;background:white}.receipt-company{position:absolute;top:42px;left:48px;right:48px;text-align:center}.receipt-company strong{font-size:24px}.receipt-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 22px;gap:20px}.receipt-title h1{font-size:21px;letter-spacing:.035em;font-weight:600;color:#242932;line-height:1.25}.receipt-title>span{font-size:11px;color:#5f6470}.receipt-info{display:grid;grid-template-columns:1.25fr 1fr;gap:50px;margin-bottom:22px;align-items:start}.receipt-info small{display:block;font-size:10px;background:#777b84;color:#fff;padding:4px 7px;letter-spacing:.04em;margin-bottom:8px}.receipt-info>div>strong{display:block;font-size:14px;margin-bottom:5px}.receipt-info p{font-size:11px;line-height:1.5;white-space:pre-wrap;margin:2px 0;overflow-wrap:anywhere}.receipt-reference{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;text-align:center}.receipt-reference>p,.receipt-reference>strong{grid-column:1/-1}.receipt-reference p{margin-top:5px}.receipt-reference>div>strong{font-size:12px;font-weight:500}.receipt-table{width:100%;border-collapse:collapse;table-layout:fixed;line-height:1.4;font-size:12px}.receipt-table th{background:#777b84;color:#fff;padding:7px 6px;font-size:10px;text-align:center;font-weight:500;border:1px solid #777b84}.receipt-table th:nth-child(1){width:39%;text-align:left}.receipt-table th:nth-child(2){width:17%}.receipt-table th:nth-child(3){width:10%}.receipt-table th:nth-child(4){width:16%}.receipt-table th:nth-child(5){width:18%}.receipt-table td{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 7px;vertical-align:top;border:1px solid #a7aab0;text-align:right;font-variant-numeric:tabular-nums;font-size:11px}.receipt-table td:nth-child(-n+2){text-align:left}.receipt-table td:nth-child(3){text-align:center}.receipt-table td small{display:block;font-size:10px;line-height:1.45;margin-top:5px;white-space:pre-wrap}.receipt-totals{width:345px;margin:18px 0 0 auto}.receipt-totals p{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:11px;border-bottom:1px solid #d9dce2}.receipt-totals strong{white-space:nowrap;font-weight:600}.receipt-totals .receipt-total{background:#eef0f3;padding:7px 9px;margin-top:4px;font-size:12px}.receipt-words{margin:20px 0 0!important;font-size:11px!important;line-height:1.6;overflow-wrap:normal;white-space:normal}.receipt-words strong{display:inline!important;font-size:inherit;font-weight:600}.receipt-payment{margin-top:22px;font-size:11px}.receipt-payment u{text-underline-offset:3px;font-weight:600}.receipt-note{white-space:pre-wrap;margin-top:5px;font-size:10px}.receipt-signature{text-align:right;margin-top:16px;margin-right:20px;font-size:13px;font-weight:600;min-height:78px}.receipt-custom-footer{position:absolute;z-index:3;bottom:16px;left:16px;right:16px;height:77px;display:flex;justify-content:center;align-items:center;background:#fff;white-space:pre-wrap;text-align:center;font-size:10px;padding:7px 22px;line-height:1.5}.receipt-custom-footer img{width:100%;height:100%;object-fit:contain}.receipt-page-number{position:absolute;z-index:4;bottom:100px;right:48px;font-size:9px;color:#5f6470}.receipt-measurement{width:698px!important;font-size:12px}.credit-motif{font-size:12px;white-space:pre-wrap;margin:0 0 18px}.credit-items-table th:first-child{width:42%}.credit-items-table th:nth-child(2){width:10%}.credit-items-table th:nth-child(n+3){width:auto}.credit-items-table td:nth-child(2){text-align:center}.statement-identification{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;font-size:11px;margin-bottom:20px}.statement-identification strong{font-size:14px}.statement-identification p{margin-top:5px;font-size:11px;overflow-wrap:anywhere}.statement-identification>span{white-space:nowrap}.statement-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 22px;padding:14px 0;border-top:1px solid #bcc1ca;border-bottom:1px solid #bcc1ca}.statement-summary div{display:grid;gap:6px}.statement-summary span{font-size:10px}.statement-summary strong{font-size:13px}.statement-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px;line-height:1.5}.statement-table th{font-size:10px;background:#777b84;color:white;padding:7px 6px;text-align:right;font-weight:500}.statement-table th:first-child{width:13%;text-align:left}.statement-table th:nth-child(2){width:33%;text-align:left}.statement-table td{font-size:10px;padding:9px 6px;vertical-align:top;border-bottom:1px solid #bfc4cd;text-align:right;overflow-wrap:anywhere}.statement-table td:nth-child(-n+2){text-align:left}.statement-table small{display:block;white-space:pre-wrap;font-size:9px;color:#606b7a;margin-top:3px}.statement-global th:first-child{width:23%}.statement-global th:nth-child(2){width:auto;text-align:right}.statement-global td:nth-child(2){text-align:right}.statement-closing{font-size:11px;margin-top:20px}.statement-closing small{display:block;color:#606b7a;font-size:10px;margin-top:5px}.statement-closing>p{margin-top:9px}.statement-closing .receipt-signature{margin-top:15px}
@media print{.receipt-page{width:210mm!important;height:297mm!important;padding:0!important;break-after:page;print-color-adjust:exact;-webkit-print-color-adjust:exact}.receipt-page:last-child{break-after:auto}.receipt-stationery{display:block!important}.receipt-content{padding:172px 48px 0!important}.receipt-page .receipt-custom-footer{margin:0!important}.receipt-measurement{display:none!important}}


/* Explicit select geometry also works in the static build without utility CSS. */


/* CAPSED print typography and fixed official legal footer. */
.receipt-content{color:#151515}
.receipt-info p{font-size:12px;font-weight:500;line-height:1.45}
.receipt-info>div>strong{font-size:15px;font-weight:700}
.receipt-reference>div>strong{font-size:13px;font-weight:650}
.receipt-table td{font-size:12px;font-weight:550;padding:10px 7px}
.receipt-table td:nth-child(n+2){text-align:center;vertical-align:middle}
.receipt-table th{font-size:11px;font-weight:700}
.receipt-totals p{font-size:12px;font-weight:600;color:#151515;border-color:#a8abb1}
.receipt-totals strong{font-weight:750}
.receipt-words{text-align:center;font-size:12px!important;line-height:1.65;font-weight:650;margin:18px 0 0!important}
.receipt-words strong{font-weight:750}
.receipt-payment{font-size:12px;font-weight:550;margin-top:17px}
.receipt-payment u{font-weight:750;text-decoration-thickness:1.5px}
.receipt-signature{width:240px;min-height:48px;margin:14px auto 0!important;text-align:center;font-size:16px;font-weight:800;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1.5px;padding:7px 14px;background:#fff9}
.receipt-official-footer{position:absolute;z-index:4;bottom:42px;left:20px;right:20px;background:#fff;padding:0 0 5px;text-align:center}
.receipt-thanks{font-size:12px;font-weight:650;line-height:1.5;margin:0 0 12px}
.receipt-legal-footer{border-top:1px solid #555;padding-top:9px}
.receipt-legal-footer p{font-size:8.5px;line-height:1.6;color:#181818;font-weight:600;margin:0;white-space:normal}
.statement-identification{flex-wrap:wrap}
.statement-identification>span{white-space:normal;font-weight:650}
.statement-global th:first-child{width:22%}
.statement-global th:nth-child(n+2){width:auto}
.statement-table td{font-size:10px;font-weight:550}
.statement-period-dialog .dialog-actions{margin-top:22px}
.statement-page .receipt-signature{font-size:14px;min-height:40px}
@media print{.receipt-content,.receipt-table td,.receipt-info p,.receipt-words,.receipt-payment,.receipt-legal-footer p{color:#111!important}.receipt-official-footer{display:block!important}.receipt-signature{background:transparent!important}}


/* Body rows are regular weight; the signing area follows the totals column. */
.receipt-table td,.receipt-table td small{font-weight:400}
.receipt-table th{font-weight:600}
.receipt-totals p{font-weight:400}
.receipt-totals strong{font-weight:600}
.receipt-payment .receipt-signature{width:345px;max-width:100%;margin:14px 0 0 auto!important;text-align:center;background:transparent}
.statement-table td{font-weight:400}


/* A single clean footer area masks remnants of the source letterhead artwork. */
.receipt-official-footer{bottom:0;left:0;right:0;padding:12px 24px 40px;background:#fff}
.receipt-legal-footer{border-top:1px solid #c8d5e9;padding-top:9px}
.receipt-legal-footer p{color:#244a87!important;font-weight:400}
.receipt-thanks{color:#244a87;font-weight:500}
.receipt-totals .receipt-total{background:transparent;padding:7px 0;border-top:1px solid #b8c7db}
.receipt-signature,.receipt-payment .receipt-signature{background:transparent}
@media print{.receipt-legal-footer p{color:#244a87!important}}

@media print{.receipt-page-number,.doc-page-number{display:none!important}}
.receipt-title-next{margin-bottom:16px}.receipt-title-next>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@font-face{font-family:'Geist';font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/Geist-Variable.woff2) format('woff2')}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/PlayfairDisplay-700-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/PlayfairDisplay-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* CAPSED v2. Calm enterprise look: Geist, dimmed letterhead plum, hairline borders, small pills.
   Office (Facturation, Encaissement) is a desktop window; Direction is a website, phone first. Scoped under .cx-app. */
.cx-app{
  --bg:#F6F5F7;--surface:#fff;--side:#FBFAFC;--hover:#F8F6F9;
  --ink:#1B1820;--ink-2:#4A4452;--muted:#6F6878;--faint:#8C8594;
  --line:#E7E4EA;--line-soft:#EFEDF1;--line-2:#D9D4DE;
  --plum:#5E3A6B;--plum-hover:#4F3059;--plum-tint:#F4EFF5;--plum-soft:#EADFEC;--aubergine:#3A2443;
  --good:#1F6B42;--good-bg:#E6F2EA;--warn:#8A5A0B;--warn-bg:#FBF0DC;--bad:#A8322A;--bad-bg:#FBE9E7;--info:#1F5F86;--info-bg:#E7F0F6;--neutral-bg:#F1EEF3;
  --r:6px;--r-card:8px;--sh-pop:0 8px 24px rgba(27,24,32,.14),0 0 0 1px rgba(27,24,32,.06);
  font-family:Geist,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:14px;line-height:1.45;color:var(--ink);background:var(--bg);min-height:100vh;
  -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums;color-scheme:light;
}
body:has(.cx-app){background:#F6F5F7;margin:0}
.cx-app *{box-sizing:border-box}
:where(.cx-app) :is(h1,h2,h3,p,dl,dd,figure,ul,ol){margin:0}
.cx-app h1,.cx-app h2{text-wrap:balance}
.cx-app a{color:var(--plum);text-underline-offset:3px}
.cx-app ::selection{background:var(--plum-soft);color:var(--ink)}
:where(.cx-app) button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.cx-app :focus-visible{outline:2px solid var(--plum);outline-offset:2px;border-radius:4px}
.cx-app input,.cx-app select,.cx-app textarea{caret-color:var(--plum)}
.cx-app em{font-style:normal}
.cx-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cx-app ::-webkit-scrollbar{width:10px;height:10px}
.cx-app ::-webkit-scrollbar-thumb{background:#D3CDD9;border-radius:10px;border:3px solid transparent;background-clip:content-box}
.cx-app ::-webkit-scrollbar-track{background:transparent}

/* Buttons */
.cx-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:0 12px;border-radius:var(--r);border:1px solid transparent;font-weight:500;font-size:13px;line-height:1.2;white-space:nowrap;text-decoration:none;background:none;transition:background-color .12s,border-color .12s,color .12s}
.cx-btn:disabled{opacity:.45;cursor:not-allowed}
.cx-btn-sm{min-height:28px;padding:0 10px;font-size:12.5px}
.cx-btn-primary,.cx-btn-accent{background:var(--plum);border-color:var(--plum);color:#fff}
.cx-btn-primary:hover:not(:disabled),.cx-btn-accent:hover:not(:disabled){background:var(--plum-hover);border-color:var(--plum-hover)}
.cx-btn-secondary,.cx-btn-ghost-light{background:var(--surface);border-color:var(--line-2);color:var(--ink)}
.cx-btn-secondary:hover:not(:disabled),.cx-btn-ghost-light:hover:not(:disabled){background:var(--hover);border-color:#C6BECF}
.cx-btn-quiet{color:var(--ink-2)}
.cx-btn-quiet:hover:not(:disabled){background:var(--neutral-bg);color:var(--ink)}
.cx-btn-link{color:var(--plum);padding:0 4px}
.cx-btn-link:hover{text-decoration:underline}
.cx-btn-icon{width:32px;padding:0}
.cx-btn.cx-inline{min-height:0;padding:0;display:inline-flex;font-size:inherit;vertical-align:baseline}
.cx-quiet-link{color:var(--muted)!important;margin-left:14px}
.cx-wide{width:100%}
.cx-text-btn,.cx-link-btn{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 4px;border:0;background:none;color:var(--plum);font-weight:500;font-size:13px;white-space:nowrap}
.cx-text-btn:hover,.cx-link-btn:hover{text-decoration:underline;text-underline-offset:3px}
.cx-text-bad{color:var(--bad)}
.cx-icon-btn{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:var(--r);border:0;background:transparent;color:var(--ink-2);flex:none}
.cx-icon-btn:hover{background:var(--neutral-bg);color:var(--ink)}
.cx-round-btn{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);flex:none}
.cx-round-btn:hover{color:var(--ink);border-color:var(--line-2)}
.cx-file{position:relative;overflow:hidden}
.cx-file input{position:absolute;inset:0;opacity:0;cursor:pointer}

/* Status pills */
.cx-chip{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:500;line-height:1;background:var(--neutral-bg);color:var(--ink-2);white-space:nowrap;vertical-align:middle}
.cx-chip svg{flex:none}
.cx-tone-good{background:var(--good-bg);color:var(--good)}
.cx-tone-warn{background:var(--warn-bg);color:var(--warn)}
.cx-tone-bad{background:var(--bad-bg);color:var(--bad)}
.cx-tone-info{background:var(--info-bg);color:var(--info)}
.cx-tone-plum{background:var(--plum-tint);color:var(--plum)}
:is(h1,h2) .cx-chip{margin-left:8px;font-size:12px;font-weight:500;letter-spacing:0}
.cx-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;font-size:11px;font-weight:600;background:var(--plum);color:#fff;font-style:normal;line-height:1}
.cx-good-text{color:var(--good)}
.cx-warn-text{color:var(--warn)}
.cx-bad-text{color:var(--bad)}
.cx-muted{color:var(--muted)}
.cx-strong{font-weight:600}
.cx-nowrap{white-space:nowrap}

/* Forms */
.cx-field{display:grid;gap:6px;margin:0 0 16px;min-width:0;align-content:start}
.cx-label{font-weight:500;font-size:13px;color:var(--ink)}
.cx-label b{color:var(--bad);font-weight:500}
.cx-label em{font-weight:400;color:var(--muted)}
.cx-hint{font-size:12.5px;color:var(--muted)}
.cx-error{display:flex;align-items:flex-start;gap:6px;font-size:12.5px;font-weight:500;color:var(--bad)}
.cx-error svg{flex:none;margin-top:1px}
.cx-input,.cx-select select{width:100%;min-height:38px;padding:8px 11px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);font:inherit;font-size:14px;color:var(--ink)}
.cx-input::placeholder{color:var(--faint)}
.cx-input:hover,.cx-select select:hover{border-color:#C6BECF}
.cx-input:focus,.cx-select select:focus{outline:none;border-color:var(--plum);box-shadow:0 0 0 3px var(--plum-soft)}
.cx-has-error .cx-input{border-color:var(--bad)}
.cx-textarea{min-height:72px;resize:vertical}
.cx-money{position:relative}
.cx-money span{position:absolute;right:11px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:12.5px;pointer-events:none}
.cx-money .cx-input{padding-right:56px}
.cx-input-money{font-size:15px;font-weight:500}
.cx-static{min-height:38px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--ink-2)}
.cx-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.cx-span2{grid-column:1/-1}
.cx-form-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:4px}
.cx-form-actions.cx-left{justify-content:flex-start}
.cx-choice{display:grid;gap:8px}
.cx-choice-item{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;text-align:left;background:var(--surface);border:1px solid var(--line-2);border-radius:var(--r);transition:border-color .12s,background-color .12s}
.cx-choice-item:hover{border-color:#C6BECF}
.cx-choice-item.cx-on{border-color:var(--plum);background:var(--plum-tint);box-shadow:inset 0 0 0 1px var(--plum)}
.cx-choice-item strong{display:block;font-weight:500;font-size:14px;line-height:1.3}
.cx-choice-item small{display:block;color:var(--muted);font-size:12.5px;line-height:1.35}
.cx-choice-dot{flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;border:1.5px solid var(--line-2);background:#fff;color:#fff}
.cx-on .cx-choice-dot{background:var(--plum);border-color:var(--plum)}
/* Five payment modes: one segmented strip */
.cx-choice-compact{gap:0;border:1px solid var(--line-2);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.cx-choice-compact .cx-choice-item{justify-content:center;text-align:center;min-height:38px;padding:6px 4px;border:0;border-left:1px solid var(--line-2);border-radius:0}
.cx-choice-compact .cx-choice-item:first-child{border-left:0}
.cx-choice-compact .cx-choice-dot{display:none}
.cx-choice-compact .cx-choice-item.cx-on{background:var(--plum);box-shadow:none}
.cx-choice-compact .cx-choice-item.cx-on strong{color:#fff}
.cx-choice-compact .cx-choice-item.cx-on small{color:#E9DDEE}
.cx-confirm{display:flex;gap:8px;align-items:center;margin-top:8px;font-weight:500;color:var(--ink)}
.cx-app input[type=checkbox],.cx-app input[type=radio]{width:18px;height:18px;accent-color:var(--plum);flex:none;margin:0}
.cx-password{position:relative}.cx-password .cx-input{padding-right:44px}.cx-password .cx-icon-btn{position:absolute;right:3px;top:3px}
.cx-select,.cx-month{display:inline-flex;align-items:center;gap:8px;font-weight:500;font-size:13px;color:var(--ink-2)}
.cx-select select{width:auto;min-width:200px;min-height:32px;padding:4px 10px}
.cx-month input{min-height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);font:inherit;color:var(--ink)}

/* Search, month, toolbar */
.cx-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-bottom:14px}
.cx-search{position:relative;display:flex;align-items:center;flex:1 1 240px;max-width:320px;min-width:0}
.cx-search>svg{position:absolute;left:10px;width:15px;height:15px;color:var(--muted);pointer-events:none}
.cx-search input{width:100%;min-height:32px;padding:0 30px 0 32px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);font:inherit;font-size:13px;color:var(--ink)}
.cx-search input::placeholder{color:var(--faint)}
.cx-search input:focus{outline:none;border-color:var(--plum);box-shadow:0 0 0 3px var(--plum-soft)}
.cx-search button{position:absolute;right:3px;display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:4px;background:transparent;color:var(--muted)}
.cx-search button svg{width:14px;height:14px}
.cx-search-row{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.cx-search-row .cx-search{max-width:none}
.cx-monthstep{display:inline-flex;align-items:center;height:32px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);flex:none}
.cx-monthstep strong{min-width:112px;padding:0 4px;text-align:center;font-size:13px;font-weight:500}
.cx-monthstep strong::first-letter{text-transform:uppercase}
.cx-monthstep button{display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:var(--r);background:none;color:var(--ink-2)}
.cx-monthstep button svg{width:16px;height:16px}
.cx-monthstep button:hover{background:var(--neutral-bg);color:var(--ink)}
.cx-pill{min-height:32px;padding:0 12px;border-radius:var(--r);border:1px solid var(--line-2);background:var(--surface);font-weight:500;font-size:13px;color:var(--ink-2)}
.cx-pill:hover{border-color:#C6BECF;color:var(--ink)}
.cx-quick{display:flex;gap:6px;flex-wrap:wrap}

/* Page header */
.cx-page{display:block}
.cx-page-head{margin-bottom:16px}
.cx-back{display:inline-flex;align-items:center;gap:2px;margin:0 0 4px -4px;padding:2px 6px 2px 2px;border:0;background:none;color:var(--muted);font-weight:500;font-size:13px;border-radius:4px}
.cx-back svg{width:16px;height:16px}
.cx-back:hover{color:var(--plum)}
.cx-page-head-row{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap}
.cx-page-title{min-width:0;margin-right:6px}
.cx-page-head h1{font-size:18px;font-weight:600;line-height:1.25;letter-spacing:-.01em;display:flex;align-items:center;flex-wrap:wrap}
.cx-page-head p{color:var(--ink-2);font-size:13px;margin-top:1px}
.cx-head-tools{display:flex;align-items:center;gap:8px;flex:1 1 300px;min-width:0;flex-wrap:wrap}
.cx-head-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-left:auto}
.cx-pane-head{margin-bottom:12px}
.cx-pane-head h2{font-size:17px;font-weight:600;line-height:1.3;display:flex;align-items:center;flex-wrap:wrap}
.cx-section{margin-top:24px}
.cx-section-head{margin-bottom:8px}
.cx-section-head h2{font-size:15px;font-weight:600}
.cx-section-head p{color:var(--muted);font-size:13px;margin-top:2px}
.cx-section-head-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.cx-check-all{display:flex;align-items:center;gap:8px;font-weight:500;font-size:13px}
.cx-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.cx-sec-title{font-size:15px;font-weight:600;margin:0 0 8px}
.cx-sec-head .cx-sec-title{margin:0}

/* Figures: one joined strip of small cells */
.cx-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;margin:0 0 14px}
.cx-strip>div{background:var(--surface);padding:9px 14px;min-width:0}
.cx-strip dt{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cx-strip dd{font-size:17px;font-weight:600;white-space:nowrap;letter-spacing:-.01em}
.cx-strip dd.cx-strong{color:var(--plum)}
.cx-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;margin:0 0 14px}
.cx-facts>div{background:var(--surface);padding:9px 14px}
.cx-facts dt{font-size:12px;color:var(--muted)}
.cx-facts dd{font-size:16px;font-weight:600;white-space:nowrap}
.cx-facts dd.cx-strong{color:var(--plum)}
.cx-facts-tight dd{font-size:14px;white-space:normal}
.cx-kv{display:grid;margin:0 0 14px}
.cx-kv>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line-soft);font-size:13px}
.cx-kv>div:last-child{border-bottom:0}
.cx-kv dt{color:var(--muted)}
.cx-kv dd{text-align:right;font-weight:500}
.cx-kv dd.cx-strong{color:var(--plum);font-weight:600}

/* Cards, tables, rows */
.cx-card,.cx-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);container-type:inline-size}
.cx-card{padding:16px}
.cx-card-flush,.cx-panel{padding:0;overflow:hidden}
.cx-card+.cx-card,.cx-card+section,section+.cx-card,section+section{margin-top:14px}
.cx-card-title{display:flex;align-items:baseline;gap:10px;padding:10px 14px;margin:0;font-size:13px;font-weight:600;border-bottom:1px solid var(--line)}
.cx-card-title small{font-weight:400;color:var(--muted);font-size:12.5px}
.cx-gap{margin-top:10px}
.cx-table{width:100%;border-collapse:collapse;font-size:14px}
.cx-table th{height:34px;padding:0 12px;text-align:left;font-size:12px;font-weight:500;color:var(--muted);border-bottom:1px solid var(--line);white-space:nowrap;background:var(--surface);position:sticky;top:0;z-index:1}
.cx-table td{height:44px;padding:0 12px;border-bottom:1px solid var(--line-soft);vertical-align:middle;white-space:nowrap}
.cx-table tbody tr:last-child td{border-bottom:0}
.cx-table .cx-num{text-align:right}
.cx-table .cx-t-name{font-weight:500;white-space:normal}
.cx-table .cx-t-amount{font-weight:500}
.cx-clickable{cursor:pointer}
.cx-clickable:hover td{background:var(--hover)}
.cx-table .cx-current td{background:var(--plum-tint)}
.cx-doc-link{border:0;background:none;padding:0;font-weight:500;color:var(--plum);white-space:nowrap;font-size:14px}
.cx-doc-link:hover{text-decoration:underline;text-underline-offset:3px}
.cx-rows{display:grid}
.cx-row{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:9px 14px;border:0;border-bottom:1px solid var(--line-soft);background:var(--surface);text-align:left;color:var(--ink)}
.cx-rows>.cx-row:last-child{border-bottom:0}
.cx-row:hover{background:var(--hover)}
.cx-row[aria-current]{background:var(--plum-tint)}
.cx-row[aria-current] .cx-row-main strong{color:var(--plum)}
.cx-row-main{flex:1;min-width:0;display:grid;gap:1px}
.cx-row-main strong{font-size:14px;font-weight:500;line-height:1.35;overflow-wrap:anywhere}
.cx-row-main small{display:flex;flex-wrap:wrap;gap:0 5px;font-size:12.5px;color:var(--muted)}
.cx-row-main small>span:not(:last-child)::after{content:"·";margin-left:5px;color:var(--muted)}
.cx-num-id{color:var(--ink-2)}
.cx-todo{font-style:normal;font-size:12.5px;color:var(--warn)}
.cx-row-end{display:grid;justify-items:end;gap:3px;flex:none;text-align:right}
.cx-row-end strong{font-size:14px;font-weight:600;white-space:nowrap}
.cx-row-label{font-size:12px;color:var(--muted)}
.cx-go{color:var(--faint)}
.cx-list-cap{padding:9px 14px;font-size:12px;font-weight:500;color:var(--muted);border-bottom:1px solid var(--line)}
.cx-fold{border-top:1px solid var(--line)}
.cx-card>.cx-fold:first-child,.cx-fold.cx-card{border-top:0}
.cx-fold>summary{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 14px;font-size:13px;font-weight:500;color:var(--ink-2);cursor:pointer;list-style:none}
.cx-fold>summary::-webkit-details-marker{display:none}
.cx-fold>summary>span{display:inline-flex;align-items:center;gap:8px}
.cx-fold>summary>span::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.cx-fold[open]>summary>span::before{transform:rotate(45deg)}
.cx-fold>summary em{color:var(--muted)}
.cx-fold>summary .cx-link-btn{margin-left:auto}
.cx-fold>summary:hover{color:var(--ink)}
.cx-fold-note{padding:12px 14px;font-size:13px;color:var(--muted)}
.cx-fold-body{padding:4px 14px 14px}
.cx-fold.cx-card{padding:0}
.cx-list{display:grid}
.cx-list-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:9px 14px;border:0;border-bottom:1px solid var(--line-soft);background:var(--surface);text-align:left;font-size:14px;flex-wrap:wrap}
.cx-list>.cx-list-row:last-child{border-bottom:0}
button.cx-list-row:hover,label.cx-list-row:hover{background:var(--hover)}
.cx-list-row.cx-static{cursor:default}
.cx-list-main{flex:1 1 220px;min-width:0;display:grid;gap:1px}
.cx-list-main strong{font-weight:500;display:flex;align-items:center;gap:8px;flex-wrap:wrap;overflow-wrap:anywhere}
.cx-list-main small{color:var(--muted);font-size:12.5px;overflow-wrap:anywhere}
.cx-list-amount{display:grid;justify-items:end;text-align:right;flex:none}
.cx-list-amount small{color:var(--muted);font-size:12px}
.cx-list-amount strong{font-size:14px;font-weight:600;white-space:nowrap}
.cx-list-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
.cx-check-row{cursor:pointer}
.cx-new{width:8px;height:8px;border-radius:50%;background:var(--plum);flex:none}
.cx-cancelled .cx-list-main strong{text-decoration:line-through;color:var(--muted)}
.cx-revisions{font-size:12.5px;color:var(--muted);margin-top:4px}
.cx-revisions summary{color:var(--plum);font-weight:500;cursor:pointer}
.cx-empty{display:grid;justify-items:center;gap:6px;padding:32px 20px;text-align:center;color:var(--muted);font-size:13px}
.cx-empty strong{color:var(--ink);font-weight:500;font-size:14px}
.cx-empty>svg{color:#C3B6CB}
.cx-empty-big .cx-empty{padding:64px 20px}
.cx-mono{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;flex:none;font-weight:600;font-size:11.5px;background:var(--neutral-bg);color:var(--ink-2)}
.cx-monogram{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;flex:none;font-weight:600;font-size:11.5px;background:var(--neutral-bg);color:var(--ink-2)}
.cx-task-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;flex:none;background:var(--plum-tint);color:var(--plum)}
.cx-task-bad{background:var(--bad-bg);color:var(--bad)}

/* Notices */
.cx-notice{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:var(--r);margin:0 0 14px;background:var(--info-bg);color:var(--info);font-size:13px}
.cx-notice-icon{flex:none;margin-top:1px}
.cx-notice-icon svg{width:16px;height:16px}
.cx-notice>div{flex:1;color:var(--ink)}
.cx-notice strong{display:block;font-weight:600}
.cx-notice.cx-tone-good{background:var(--good-bg);color:var(--good)}
.cx-notice.cx-tone-warn{background:var(--warn-bg);color:var(--warn)}
.cx-notice.cx-tone-bad{background:var(--bad-bg);color:var(--bad)}
.cx-quote{margin:12px 0;padding:12px 14px;border-radius:var(--r-card);background:var(--surface);border:1px solid var(--line);font-size:14px;color:var(--ink)}
.cx-quote cite{display:block;margin-top:4px;font-size:12px;font-style:normal;font-weight:500;color:var(--muted)}
.cx-answer{margin-top:12px;padding:10px 12px;border-radius:var(--r);background:var(--good-bg);color:var(--ink);font-size:13px}
.cx-disclosure{margin-top:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);padding:0 14px}
.cx-disclosure summary{display:flex;align-items:center;gap:8px;min-height:42px;font-weight:500;font-size:13px;color:var(--ink-2);cursor:pointer;list-style:none}
.cx-disclosure summary::-webkit-details-marker{display:none}
.cx-disclosure summary::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.cx-disclosure[open] summary::before{transform:rotate(45deg)}
.cx-disclosure>*:not(summary){margin-bottom:12px}
.cx-versions details{margin-top:10px}
.cx-versions summary{cursor:pointer;color:var(--ink-2);font-weight:500;font-size:13px}
.cx-mini-list{margin:10px 0 0;padding-left:18px;display:grid;gap:4px}
.cx-contact{display:inline-flex;flex-wrap:wrap;gap:4px 14px}
.cx-contact a{display:inline-flex;align-items:center;gap:6px;font-weight:500;text-decoration:none}

/* Invoice page (full) */
.cx-delivery{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;min-height:48px;padding:8px 14px;margin:0 0 14px;border-radius:var(--r-card);background:var(--surface);border:1px solid var(--line);font-size:13px}
.cx-delivery p{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--ink-2)}
.cx-delivery-done{background:var(--plum-tint);border-color:var(--plum-soft)}

/* The A4 document, whole and scaled to its column */
.cx-paper{position:relative;overflow:hidden;border-radius:var(--r-card);background:#ECE9EF;max-width:900px}
.cx-paper-sheet{width:794px;transform-origin:top left}
.cx-paper-sheet .document-pages{display:grid;gap:12px;margin:0}
.cx-paper-sheet .document-page{box-shadow:0 1px 3px rgba(27,24,32,.14)}
.cx-paper-sheet .document-measurement{position:absolute;visibility:hidden;pointer-events:none;left:-9999px}
.cx-banner{display:block;width:100%;height:auto;border-radius:var(--r);border:1px solid var(--line);margin-bottom:12px;background:#fff}

/* Wizard (the 4-step invoice flow) */
.cx-wizard{max-width:1200px;padding:20px 20px 0}
.cx-wizard-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.cx-wizard-head h1{font-size:18px;font-weight:600}
.cx-wizard-head p{color:var(--ink-2);font-size:13px;margin-top:2px}
.cx-steps{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0;margin:14px 0 16px;border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;background:var(--surface)}
.cx-steps li+li{border-left:1px solid var(--line)}
.cx-steps button{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;padding:6px 14px;border:0;background:none;color:var(--muted);font-weight:500;font-size:13px;text-align:left;line-height:1.25}
.cx-steps button:disabled{cursor:default}
.cx-steps span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--line-2);font-size:12px;font-weight:600;flex:none}
.cx-steps span svg{width:13px;height:13px}
.cx-steps .cx-now button{color:var(--plum);background:var(--plum-tint)}
.cx-steps .cx-now span{background:var(--plum);border-color:var(--plum);color:#fff}
.cx-steps .cx-done button{color:var(--ink)}
.cx-steps .cx-done span{background:var(--good-bg);border-color:var(--good-bg);color:var(--good)}
.cx-compose{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.cx-compose .cx-card+.cx-card{margin-top:12px}
.cx-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}
.cx-section-title h2{font-size:15px;font-weight:600}
.cx-summary{position:sticky;top:16px;padding:16px;border-radius:var(--r-card);background:var(--surface);border:1px solid var(--line)}
.cx-summary h3,.cx-recap h3{font-size:14px;font-weight:600;margin-bottom:6px}
.cx-summary p,.cx-recap p{display:flex;justify-content:space-between;gap:10px;padding:7px 0;font-size:13px;border-bottom:1px solid var(--line-soft)}
.cx-summary p span,.cx-recap p span{color:var(--muted)}
.cx-summary p strong,.cx-recap p strong{font-weight:500;text-align:right}
.cx-summary-total{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 10px;padding:10px 0 0}
.cx-summary-total span{font-weight:500;font-size:13px}
.cx-summary-total strong{font-size:20px;font-weight:600;color:var(--plum);white-space:nowrap;letter-spacing:-.01em}
.cx-words{display:block;margin-top:6px;color:var(--muted);font-size:12px}
.cx-words::first-letter{text-transform:uppercase}
.cx-chosen{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--r);background:var(--plum-tint);flex-wrap:wrap}
.cx-chosen>div:not(.cx-chosen-actions){flex:1 1 200px;min-width:0;display:grid}
.cx-chosen strong{font-size:14px;font-weight:600}
.cx-chosen span{color:var(--ink-2);font-size:12.5px}
.cx-chosen-actions{display:flex;flex-wrap:wrap;gap:4px}
.cx-pick-list{display:grid;max-height:340px;overflow:auto;border:1px solid var(--line);border-radius:var(--r);overscroll-behavior:contain}
.cx-pick-list button{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 12px;border:0;border-bottom:1px solid var(--line-soft);background:var(--surface);text-align:left}
.cx-pick-list button:last-child{border-bottom:0}
.cx-pick-list button:hover{background:var(--hover)}
.cx-pick-list button>span:not(.cx-monogram){flex:1;display:grid;min-width:0}
.cx-pick-list strong{font-size:14px;font-weight:500}
.cx-pick-list small{color:var(--muted);font-size:12.5px}
.cx-pick-list>p{padding:14px}
.cx-pick-amount{text-align:right;justify-items:end;flex:none!important}
.cx-line{margin:0 0 12px;padding:12px 14px 4px;border:1px solid var(--line);border-radius:var(--r)}
.cx-line legend{padding:0 6px;font-weight:600;font-size:13px;color:var(--ink-2)}
.cx-line-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.cx-line-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0 6px;border-top:1px solid var(--line-soft);color:var(--ink-2);font-size:13px}
.cx-review{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.cx-recap{position:sticky;top:16px}
.cx-wizard-foot{position:sticky;bottom:0;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px -20px 0;padding:10px 20px;background:var(--surface);border-top:1px solid var(--line)}
.cx-due-box{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;padding:10px 12px;margin-bottom:14px;border-radius:var(--r);background:var(--bg);font-size:13px}
.cx-due-box span{color:var(--ink-2)}
.cx-due-box strong{font-size:16px;font-weight:600;white-space:nowrap}
.cx-after{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px;padding:10px 12px;margin:0 0 12px;border-radius:var(--r);background:var(--bg);color:var(--ink-2);font-size:13px}
.cx-after strong{color:var(--ink)}
.cx-fill{margin:-8px 0 14px;font-size:12.5px!important}
.cx-credit-lines{display:grid;gap:8px;margin-bottom:12px}
.cx-credit-line{padding:10px 12px;border:1px solid var(--line-2);border-radius:var(--r)}
.cx-credit-line.cx-on{border-color:var(--plum);background:var(--plum-tint)}
.cx-credit-line>label{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.cx-credit-line>label>span{display:grid;white-space:pre-line}
.cx-credit-line small{color:var(--muted);font-size:12.5px}
.cx-credit-line .cx-field{margin:8px 0 0 28px;max-width:200px}

/* Dialogs: confirmations centred, forms slide in from the right; a bottom sheet on phones */
.cx-overlay{position:fixed;inset:0;z-index:60;background:rgba(27,24,32,.32);display:grid;place-items:center;padding:16px;overscroll-behavior:contain;animation:cx-fade .15s ease-out}
.cx-modal{width:min(480px,100%);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;background:var(--surface);border-radius:10px;box-shadow:0 24px 60px rgba(27,24,32,.25)}
.cx-modal-wide{width:min(640px,100%)}
.cx-modal header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:16px 18px 12px;border-bottom:1px solid var(--line)}
.cx-modal h2{font-size:16px;font-weight:600;line-height:1.3}
.cx-modal header p{color:var(--ink-2);font-size:13px;margin-top:2px}
.cx-modal-body{padding:16px 18px;overflow:auto;overscroll-behavior:contain;font-size:14px}
.cx-modal-body>p+p{margin-top:8px}
.cx-modal footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 18px;border-top:1px solid var(--line)}
.cx-overlay-side{place-items:stretch end;padding:0}
.cx-modal-side{width:min(460px,100%);height:100%;max-height:none;border-radius:0;animation:cx-slide .2s cubic-bezier(.16,1,.3,1)}
.cx-modal-side.cx-modal-wide{width:min(600px,100%)}
@keyframes cx-fade{from{opacity:0}to{opacity:1}}
@keyframes cx-slide{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
.cx-more-menu{position:fixed;z-index:90;min-width:240px;max-width:min(320px,calc(100vw - 16px));padding:4px;background:var(--surface);border-radius:8px;box-shadow:var(--sh-pop)}
.cx-more-menu button{display:grid;gap:1px;width:100%;padding:8px 10px;text-align:left;border:0;background:none;border-radius:6px;font-size:13px}
.cx-more-menu button strong{font-weight:500}
.cx-more-menu button:hover{background:var(--hover)}
.cx-more-menu small{color:var(--muted);font-size:12px}
.cx-toasts{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:95;display:grid;gap:8px;width:min(440px,calc(100% - 32px))}
.cx-toast{display:flex;align-items:center;gap:10px;padding:10px 10px 10px 14px;border-radius:8px;background:var(--ink);color:#fff;font-size:13px;box-shadow:0 12px 32px rgba(27,24,32,.3)}
.cx-toast>svg:first-child{flex:none;color:#8FD9AE;width:16px;height:16px}
.cx-toast-warn>svg:first-child{color:#F3C477}
.cx-toast span{flex:1}
.cx-toast button{display:grid;place-items:center;border:0;background:none;color:#ffffffb3;width:28px;height:28px;border-radius:6px}
.cx-toast button:hover{background:#ffffff1f;color:#fff}

/* Timeline */
.cx-timeline{list-style:none;margin:6px 0 0;padding:0;display:grid}
.cx-timeline li{display:grid;grid-template-columns:12px 1fr;gap:10px;padding:0 0 12px;position:relative;font-size:13px}
.cx-timeline li::before{content:"";position:absolute;left:3.5px;top:14px;bottom:0;width:1px;background:var(--line)}
.cx-timeline li:last-child::before{display:none}
.cx-dot{width:8px;height:8px;border-radius:50%;background:var(--plum);margin-top:6px}
.cx-timeline small{color:var(--muted);font-size:12px}

/* Help */
.cx-help{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.cx-help li{display:flex;gap:12px;align-items:flex-start}
.cx-help li>span{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:var(--plum-tint);color:var(--plum);font-weight:600;font-size:12px}
.cx-help h3{font-size:14px;font-weight:600}
.cx-help p{color:var(--ink-2);font-size:13px}

/* Credential sheet */
.cx-credential{display:grid;gap:10px;padding:14px;margin-bottom:12px;border:1px dashed var(--line-2);border-radius:var(--r)}
.cx-credential div{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cx-credential dt{color:var(--muted)}
.cx-credential dd{font-size:16px;font-weight:600;letter-spacing:.02em}

/* ===== Office: a desktop window ===== */
.cx-office{display:grid;grid-template-columns:232px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;height:100vh;height:100dvh;overflow:hidden}
.cx-sidebar{grid-row:1/3;display:flex;flex-direction:column;gap:18px;padding:16px 12px 14px;background:var(--side);border-right:1px solid var(--line);min-height:0;overflow:auto}
.cx-brand{display:flex;align-items:center;gap:10px;min-width:0;padding:0 6px;border:0;background:none;text-align:left;color:var(--ink)}
.cx-brand-logo{width:30px;height:30px;border-radius:50%;flex:none}
.cx-brand strong{display:block;font-size:14px;font-weight:600;letter-spacing:.02em;line-height:1.2}
.cx-brand small{display:block;font-size:12px;color:var(--muted);line-height:1.3}
.cx-sidebar nav{display:grid;gap:2px}
.cx-sidebar nav button{display:flex;align-items:center;gap:10px;min-height:36px;padding:0 10px;border:0;border-radius:var(--r);background:none;color:var(--ink-2);font-weight:500;font-size:14px;text-align:left}
.cx-sidebar nav button svg{width:18px;height:18px}
.cx-sidebar nav button span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cx-sidebar nav button:hover{background:var(--neutral-bg);color:var(--ink)}
.cx-sidebar nav button.cx-on{background:var(--plum-tint);color:var(--plum)}
.cx-sidebar-foot{margin-top:auto;display:grid;gap:12px;padding:0 6px}
.cx-sync{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.cx-sync-off{color:var(--warn);font-weight:500}
.cx-sync-dot{width:7px;height:7px;border-radius:50%;background:#2F8A57;flex:none}
.cx-user{display:flex;align-items:center;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.cx-user strong{display:block;font-size:13px;font-weight:500;line-height:1.25}
.cx-user button{border:0;background:none;padding:0;color:var(--muted);font-size:12px}
.cx-user button:hover{color:var(--plum);text-decoration:underline}
.cx-avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--plum-soft);color:var(--plum);font-weight:600;font-size:12px;flex:none}
.cx-content{grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:auto;outline:none;scrollbar-gutter:stable}
.cx-content:has(> .cx-page-split){overflow:hidden}
.cx-statusbar{grid-column:2;grid-row:2;display:flex;align-items:center;gap:18px;min-height:28px;padding:0 20px;background:var(--surface);border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.cx-statusbar>button{display:inline-flex;align-items:center;gap:6px;margin-left:auto;min-height:24px;padding:0 6px;border:0;border-radius:4px;background:none;color:var(--muted);font-size:12px}
.cx-statusbar>button:hover{color:var(--ink);background:var(--neutral-bg)}
.cx-status-keys{display:flex;gap:16px;margin-left:auto}
.cx-status-keys+button{margin-left:0}
.cx-app kbd{display:inline-block;padding:1px 5px;border:1px solid var(--line-2);border-radius:4px;background:#FAFAFB;font:500 11px/1.4 Geist,system-ui,sans-serif;color:var(--ink-2)}
/* Each office page: a white header bar, then the work */
.cx-office .cx-page{padding:0 20px 20px}
.cx-office .cx-page>.cx-page-head{position:sticky;top:0;z-index:6;margin:0 -20px 16px;padding:10px 20px;min-height:56px;display:flex;flex-direction:column;justify-content:center;background:var(--surface);border-bottom:1px solid var(--line)}
.cx-office .cx-page>.cx-page-head.cx-pane-head{position:static;margin:0 0 12px;padding:0;min-height:0;background:none;border:0}
.cx-office .cx-detail .cx-page-head{position:static;margin:0 0 12px;padding:0;min-height:0;background:none;border:0}
/* List and detail side by side */
.cx-page-split{display:flex;flex-direction:column;height:100%;min-height:0;padding-bottom:16px}
.cx-split{flex:1;min-height:0;display:grid;gap:16px}
.cx-split-panel{grid-template-columns:minmax(0,1fr) 400px}
.cx-split-list{grid-template-columns:320px minmax(0,1fr)}
.cx-split:not(.cx-split-panel):not(.cx-split-list){grid-template-columns:340px minmax(0,1fr)}
.cx-col{display:flex;flex-direction:column;min-height:0;min-width:0}
.cx-grow{flex:1;min-height:0;overflow:auto}
.cx-scroll{min-height:0;overflow:auto;overscroll-behavior:contain}
.cx-detail-col{padding-right:4px}
.cx-pane-list{min-height:0;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);overscroll-behavior:contain}
.cx-pane-detail{min-height:0;overflow:auto;padding-right:4px;overscroll-behavior:contain}
.cx-detail{display:block}
.cx-detail .cx-paper{max-width:none}
.cx-side-panel{min-height:0;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);overscroll-behavior:contain}
.cx-panel-body{display:flex;flex-direction:column}
.cx-panel-head{padding:14px 16px;border-bottom:1px solid var(--line)}
.cx-panel-head h2{display:flex;align-items:center;flex-wrap:wrap;gap:4px 0;font-size:16px;font-weight:600}
.cx-panel-head p{font-size:13px;color:var(--ink-2)}
.cx-panel-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.cx-panel-body>.cx-kv{padding:4px 16px 0;margin:0}
.cx-panel-paper{padding:14px 16px 16px;background:var(--bg);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.cx-panel-paper .cx-paper{background:none;border-radius:0;max-width:none}
.cx-panel-body>.cx-fold{border-top:0}
.cx-side-panel>.cx-detail{padding:14px 16px}

/* ===== Direction: a website, phone first ===== */
.cx-site{min-height:100vh;min-height:100dvh;font-size:15px;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
.cx-site-head{position:sticky;top:0;z-index:20;background:rgba(246,245,247,.92);backdrop-filter:saturate(1.2) blur(8px);-webkit-backdrop-filter:saturate(1.2) blur(8px)}
.cx-site-bar{display:flex;align-items:center;gap:12px;max-width:1200px;height:60px;margin:0 auto;padding:0 16px}
.cx-site-bar .cx-brand{padding:0}
.cx-site-bar .cx-brand small{font-size:12px}
.cx-site-tabs{display:none}
.cx-site-user{display:flex;align-items:center;gap:8px;margin-left:auto}
.cx-site-main{max-width:1200px;margin:0 auto;padding:4px 16px 24px}
.cx-site-focus{padding-bottom:0}
.cx-site-focus .cx-site-main{padding-bottom:0}
.cx-site .cx-btn{min-height:40px;padding:0 14px;font-size:14px;border-radius:8px}
.cx-site .cx-btn-sm{min-height:32px;padding:0 10px;font-size:13px}
.cx-site .cx-btn-icon{width:40px;padding:0}
.cx-site .cx-input,.cx-site .cx-select select{min-height:44px;font-size:16px;border-radius:8px}
.cx-site .cx-search{max-width:none}
.cx-site .cx-search input{min-height:40px;font-size:15px;border-radius:8px}
.cx-site .cx-card,.cx-site .cx-panel{border-radius:12px}
.cx-site .cx-row{min-height:62px;padding:10px 14px}
.cx-site .cx-row-main strong,.cx-site .cx-row-end strong{font-size:15px}
.cx-site .cx-row-main small{font-size:13px}
.cx-site .cx-mono{width:36px;height:36px;font-size:12px}
.cx-site .cx-page-head h1{font-size:22px}
.cx-site .cx-page-head p{font-size:13.5px}
.cx-site .cx-list-row{min-height:60px}
.cx-site .cx-strip,.cx-site .cx-facts{border-radius:12px}
.cx-fresh{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);margin:0 0 10px}
.cx-fresh>span:not(.cx-sync-dot){display:grid;gap:1px}
.cx-fresh small{font-size:12px;font-weight:400;color:var(--muted)}
.cx-freshness{display:grid;gap:8px;margin:0 0 12px}
.cx-freshness .cx-fresh{margin:0;align-items:flex-start}
.cx-freshness .cx-fresh .cx-sync-dot,.cx-freshness .cx-fresh svg{margin-top:4px;flex:none}
.cx-pw-line{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin-top:2px}
.cx-pw-line code{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;color:var(--ink)}
.cx-pw-line .cx-link-btn{min-height:22px;font-size:12.5px}
.cx-member .cx-list-actions{flex-wrap:wrap;justify-content:flex-end}
.cx-lift-effect{margin:0 0 14px}
.cx-big-code{font:600 40px/1.1 var(--font);letter-spacing:.08em;text-align:center;margin:8px 0;font-variant-numeric:tabular-nums;color:var(--ink)}
.cx-sync-good .cx-sync-dot{background:var(--good)}
.cx-sync-info .cx-sync-dot{background:var(--info)}
.cx-sync-warn{color:var(--warn)}
.cx-sync-bad{color:var(--bad)}
.cx-sync span small{color:var(--muted);font-weight:400}
.cx-sync-bar{display:flex;align-items:center;gap:6px;margin:0;min-width:0}
.cx-sync-bar>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-sync-rejected{border:0;background:none;padding:2px 0;color:var(--bad);font-size:12.5px;font-weight:500;text-align:left;text-decoration:underline}
.cx-code-input{font-size:20px;letter-spacing:.1em;font-variant-numeric:tabular-nums}
.cx-fresh-stale{color:var(--warn);font-weight:500}
.cx-fresh-stale .cx-sync-dot{background:var(--warn)}
.cx-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--surface);border-top:1px solid var(--line);padding:0 6px env(safe-area-inset-bottom)}
.cx-bottom-nav button{position:relative;display:grid;justify-items:center;align-content:center;gap:3px;min-height:56px;padding:4px 2px;border:0;background:none;color:var(--muted);font-size:11px;font-weight:500}
.cx-bottom-nav button svg{width:21px;height:21px}
.cx-bottom-nav button.cx-on{color:var(--plum)}
.cx-bottom-nav .cx-count{position:absolute;top:5px;left:calc(50% + 5px)}
/* Home */
.cx-home{display:grid;gap:20px}
.cx-home-side{display:grid;gap:20px;align-content:start}
.cx-hero{padding:16px 18px;border-radius:14px;background:var(--aubergine);color:#fff}
.cx-hero-top{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#D9CCE0}
.cx-hero-fresh{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.cx-hero-fresh i{width:6px;height:6px;border-radius:50%;background:#7FD0A0}
.cx-hero-amount{margin-top:4px;font-size:clamp(28px,8.5vw,34px);font-weight:600;letter-spacing:-.02em;line-height:1.15;white-space:nowrap}
.cx-hero-amount small{font-size:15px;font-weight:500;color:#D9CCE0}
.cx-aging{display:flex;gap:2px;height:6px;margin-top:14px;border-radius:3px;overflow:hidden}
.cx-aging span{background:#C9B5D2;min-width:2px}
.cx-aging .cx-aging-late{background:#E8907F}
.cx-aging-legend{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-top:8px;font-size:12px;color:#D9CCE0}
.cx-aging-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;background:#C9B5D2;margin-right:6px}
.cx-aging-legend i.cx-aging-late{background:#E8907F}
/* A client */
.cx-site .cx-wizard{max-width:none;padding:0}
.cx-site .cx-wizard-foot{margin:16px -16px 0;padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
.cx-seg{display:inline-flex;gap:2px;padding:3px;margin:0 0 14px;border-radius:10px;background:#ECE9EF}
.cx-seg button{min-height:34px;padding:0 16px;border:0;border-radius:8px;background:none;font-weight:500;font-size:14px;color:var(--ink-2)}
.cx-seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(27,24,32,.1)}
.cx-team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;margin-bottom:22px}
.cx-team-card{display:grid;gap:4px;align-content:start}
.cx-team-grid>.cx-card{margin-top:0}
.cx-team-card.cx-on{border-color:var(--plum);box-shadow:inset 0 0 0 1px var(--plum)}
.cx-team-card header{display:flex;align-items:center;gap:12px}
.cx-team-card header div{display:grid;min-width:0}
.cx-team-card header strong{font-weight:600;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cx-team-card header small{font-size:12.5px;color:var(--muted)}
.cx-team-card .cx-link-btn{justify-self:start;margin:8px 0 0 -4px}
.cx-team-none{margin:12px 0 0;font-size:13px;color:var(--muted)}
.cx-team-journal .cx-sec-head{flex-wrap:wrap}
.cx-team-journal .cx-sec-title em{font-style:normal;color:var(--muted);font-weight:500}
.cx-journal-day h3{margin:0;padding:10px 14px 6px;font-size:12.5px;font-weight:600;color:var(--muted);background:var(--bg-soft,#FAF9FB);border-bottom:1px solid var(--line-soft)}
.cx-journal-day+.cx-journal-day h3{border-top:1px solid var(--line)}
.cx-journal-row{display:flex;gap:12px;margin:0;padding:9px 14px;border-bottom:1px solid var(--line-soft)}
.cx-journal-row time{flex:none;width:44px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.cx-journal-row span{display:grid;min-width:0}
.cx-journal-row strong{font-weight:500;font-size:14px;overflow-wrap:anywhere}
.cx-journal-row small{font-size:12.5px;color:var(--muted)}
.cx-journal-more{padding:10px 14px}
.cx-story-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
.cx-sum-kv{display:grid;gap:8px;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--line-soft)}
.cx-sum-kv>div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13.5px}
.cx-sum-kv dt{color:var(--muted)}
.cx-sum-kv dd{margin:0;font-weight:500;text-align:right;font-variant-numeric:tabular-nums}
.cx-bills-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px}
.cx-bills-tools .cx-search{flex:1 1 240px;max-width:none}
.cx-bills-note{margin:0 0 10px;font-size:13px;color:var(--muted)}
.cx-site .cx-monthstep{height:40px}
.cx-site .cx-monthstep button{width:38px;height:38px}
.cx-site .cx-monthstep strong{min-width:128px;font-size:14px}
.cx-story-side{display:grid;gap:12px;align-content:start}
.cx-story-main{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-content:start;min-width:0}
.cx-story-main>.cx-card,.cx-story-main>section{margin-top:0}
.cx-sum{padding:16px}
.cx-sum-label{font-size:13px;color:var(--ink-2)}
.cx-sum-amount{font-size:28px;font-weight:600;letter-spacing:-.02em;line-height:1.2;color:var(--aubergine);white-space:nowrap}
.cx-progress{height:6px;margin-top:12px;border-radius:3px;background:var(--line);overflow:hidden}
.cx-progress span{display:block;height:100%;background:var(--plum)}
.cx-sum-legend{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-top:8px;font-size:12.5px;color:var(--muted)}
.cx-actionbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.cx-actionbar .cx-btn{min-height:44px;white-space:normal;text-align:center}
/* Validation */
.cx-validate-grid{display:grid;gap:20px}
.cx-pay-cards{display:grid;gap:8px}
.cx-pay-card{display:flex;gap:12px;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px;cursor:pointer}
.cx-pay-card.cx-on{border-color:var(--plum);box-shadow:inset 0 0 0 1px var(--plum)}
.cx-pay-card input{margin-top:2px!important;width:20px!important;height:20px!important}
.cx-pay-body{flex:1;min-width:0;display:grid;gap:2px}
.cx-pay-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.cx-pay-top strong{font-weight:600}
.cx-pay-top>span:not(.cx-chip){color:var(--ink-2);font-weight:500}
.cx-validate-note{margin:10px 2px 0;font-size:13px;color:var(--muted)}
.cx-mini-list+p{margin-top:12px}
.cx-pay-open{justify-self:start;margin:4px 0 0 -4px}
.cx-pay-who{font-size:14px}
.cx-pay-body small{font-size:12.5px;color:var(--muted)}
.cx-actionbar-total{display:flex;align-items:center;gap:12px;margin-top:16px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.cx-actionbar-total>span{flex:1;display:grid;line-height:1.3}
.cx-actionbar-total small{font-size:12.5px;color:var(--muted)}
.cx-actionbar-total strong{font-weight:600}
.cx-actionbar-total .cx-btn{min-height:44px;padding:0 22px}

/* Sign in (branded, approved) */
.cx-signin{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(380px,520px)}
.cx-signin-brand{position:relative;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:56px clamp(28px,6vw,80px);color:#fff;background:var(--aubergine);overflow:hidden}
.cx-signin-brand::before{content:"";position:absolute;left:0;right:0;top:0;height:5px;background:linear-gradient(#B98BCB 0 3px,transparent 3px 4px,#3EA2D6 4px)}
.cx-signin-logo{width:88px;height:88px;border-radius:50%;background:#fff;padding:3px}
.cx-signin-brand h1{font-family:"Playfair Display",Georgia,serif;font-size:clamp(34px,3.6vw,46px);font-weight:700;line-height:1.1}
.cx-signin-brand p{font-size:16px;color:#E9DFEE;max-width:420px}
.cx-signin-brand ul{list-style:none;padding:0;margin:6px 0;display:grid;gap:10px}
.cx-signin-brand li{display:flex;gap:10px;align-items:center;font-size:14px;color:#F1EAF4}
.cx-signin-brand li svg{flex:none;width:16px;height:16px;color:#C9B5D2}
.cx-signin-brand small{color:#CDBFD5;font-size:13px;max-width:400px}
.cx-signin-panel{display:flex;flex-direction:column;justify-content:center;gap:22px;padding:40px clamp(24px,5vw,56px);background:var(--surface)}
.cx-signin-form{display:grid}
.cx-signin-form h2{font-size:22px;font-weight:600;letter-spacing:-.01em}
.cx-signin-form>.cx-muted{margin:4px 0 18px;font-size:13.5px}
.cx-signin-form .cx-input{min-height:42px}
.cx-signin-form .cx-btn{min-height:42px;font-size:14px;margin-top:4px}
.cx-demo-access{padding-top:18px;border-top:1px solid var(--line)}
.cx-demo-access>p{font-size:13px;color:var(--ink-2);margin-bottom:10px}
.cx-demo-cards{display:grid;gap:6px;margin-bottom:10px}
.cx-demo-card{display:flex;align-items:center;gap:12px;min-height:54px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);text-align:left}
.cx-demo-card:hover{border-color:var(--plum);background:var(--plum-tint)}
.cx-demo-card>span:last-child{display:grid}
.cx-demo-card strong{font-size:14px;font-weight:600}
.cx-demo-card small{color:var(--muted);font-size:12.5px}
.cx-demo-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;flex:none;background:var(--plum-tint);color:var(--plum)}
.cx-demo-icon svg{width:18px;height:18px}
.cx-rule{height:4px;background:linear-gradient(var(--plum) 0 2px,transparent 2px 3px,#3EA2D6 3px)}

/* Tables in a narrower column first drop a secondary column, then become one card per line */
@container (max-width:880px){.cx-hide-880{display:none}}
@container (max-width:700px){.cx-hide-700{display:none}}
@container (max-width:560px){
  .cx-table td.cx-hide-880,.cx-table td.cx-hide-700{display:block}
  .cx-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .cx-table,.cx-table tbody{display:block}
  .cx-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"n a" "u d" "s x" "y y";gap:4px 12px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line-soft)}
  .cx-table tbody tr:last-child{border-bottom:0}
  .cx-table td{display:block;height:auto;padding:0;border:0;font-size:13px;min-width:0;white-space:normal}
  .cx-table .t-n{grid-area:n;font-size:14px;font-weight:500}
  .cx-table .t-u{grid-area:u}
  .cx-table .t-d{grid-area:d;text-align:right;color:var(--muted)}
  .cx-table .t-a{grid-area:a;text-align:right;font-size:14px;font-weight:600}
  .cx-table .t-s{grid-area:s}
  .cx-table .t-x{grid-area:x;text-align:right;color:var(--muted)}
  .cx-table .t-x::before{content:attr(data-label) " "}
  .cx-table .t-x2{grid-area:y;color:var(--muted)}
  .cx-table .t-x2::before{content:attr(data-label) " : "}
  .cx-table .t-act{grid-column:1/-1;grid-row:5;text-align:left}
  .cx-table .t-act .cx-btn{width:100%;min-height:36px}
  .cx-table .cx-num{text-align:right}
}

/* Responsive */
@media (min-width:1024px){
  .cx-site{padding-bottom:0;font-size:14.5px}
  .cx-site-head{background:var(--surface);border-bottom:1px solid var(--line);backdrop-filter:none}
  .cx-site-tabs{display:flex;gap:2px;margin-left:24px}
  .cx-site-tabs button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border:0;border-radius:var(--r);background:none;color:var(--ink-2);font-weight:500;font-size:14px}
  .cx-site-tabs button:hover{background:var(--neutral-bg);color:var(--ink)}
  .cx-site-tabs button.cx-on{background:var(--plum-tint);color:var(--plum)}
  .cx-bottom-nav{display:none}
  .cx-site-main{padding:24px 24px 48px}
  .cx-site .cx-wizard-foot{margin:20px -24px 0;padding:10px 24px}
  .cx-home{grid-template-columns:380px minmax(0,1fr);gap:28px;align-items:start}
  .cx-home-side{position:sticky;top:84px}
  .cx-story-grid{grid-template-columns:340px minmax(0,1fr);gap:24px;align-items:start}
  .cx-story-side{position:sticky;top:84px}
  .cx-actionbar{grid-template-columns:1fr}
  .cx-validate-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:28px;align-items:start}
  .cx-actionbar-total{position:sticky;bottom:16px}
}
@media (max-width:1023px){
  .cx-validate{padding-bottom:84px}
  .cx-actionbar-total{position:fixed;left:0;right:0;bottom:calc(56px + env(safe-area-inset-bottom));z-index:19;margin:0;padding:10px 16px;background:var(--surface);border:0;border-top:1px solid var(--line);border-radius:0}
  .cx-role-responsable .cx-toasts{bottom:calc(140px + env(safe-area-inset-bottom))}
}
@media (max-width:559px){.cx-wizard-head{flex-wrap:wrap}.cx-wizard-head .cx-btn{white-space:nowrap;margin-left:-10px}.cx-actionbar{grid-template-columns:1fr}.cx-seg{display:flex}.cx-seg button{flex:1}.cx-team-grid{grid-template-columns:1fr}}
@media (max-width:1179px){.cx-status-keys{display:none}}
@media (max-width:1100px){
  .cx-compose,.cx-review{grid-template-columns:1fr}
  .cx-summary,.cx-recap{position:static}
}
@media (max-width:900px){
  .cx-office{display:block;height:auto;overflow:visible}
  .cx-content{overflow:visible}
  .cx-statusbar{position:sticky;bottom:0;z-index:5;padding:0 16px}
  .cx-sidebar{position:static;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 12px;border-right:0;border-bottom:1px solid var(--line)}
  .cx-sidebar nav{display:flex;flex:1 1 100%;gap:4px}
  .cx-sidebar nav button{flex:1;justify-content:center}
  .cx-sidebar-foot{display:none}
  .cx-office .cx-page{padding:0 14px 16px}
  .cx-office .cx-page>.cx-page-head{margin:0 -14px 14px;padding:10px 14px;position:static}
  .cx-wizard{padding:14px 14px 0}
  .cx-wizard-foot{margin:16px -14px 0;padding:10px 14px}
  .cx-steps button{font-size:0;justify-content:center;gap:0}
  .cx-steps span{font-size:12px}
  .cx-signin{grid-template-columns:1fr}
  .cx-signin-brand{padding:36px 22px 30px}
  .cx-signin-brand ul,.cx-signin-brand small{display:none}
  .cx-signin-logo{width:68px;height:68px}
}
@media (max-width:640px){
  .cx-btn{white-space:normal;text-align:center}
  .cx-form-grid,.cx-line-grid{grid-template-columns:1fr}
  .cx-head-tools{flex-basis:100%}
  .cx-head-actions{width:100%;margin-left:0}
  .cx-head-actions>.cx-btn{flex:1 1 auto}
  .cx-head-actions>.cx-btn-icon{flex:none}
  .cx-overlay,.cx-overlay-side{place-items:end stretch;padding:0}
  .cx-modal,.cx-modal-side{width:100%;height:auto;max-height:92dvh;border-radius:14px 14px 0 0;animation:cx-up .2s cubic-bezier(.16,1,.3,1)}
  .cx-modal footer{flex-direction:column-reverse;align-items:stretch;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .cx-modal footer .cx-btn{width:100%;min-height:44px}
  .cx-choice-compact{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .cx-choice-compact .cx-choice-item:nth-child(4){border-left:0}
  .cx-choice-compact .cx-choice-item:nth-child(n+4){border-top:1px solid var(--line-2)}
  .cx-search-row{flex-direction:column;align-items:stretch}
  .cx-search-row .cx-search{flex:0 0 auto}
  .cx-select select{min-width:0;width:100%}
  .cx-select,.cx-month{flex-wrap:wrap}
  .cx-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cx-strip>div:last-child:nth-child(odd){grid-column:1/-1}
}
@keyframes cx-up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.cx-app *,.cx-app *::before{transition:none!important;animation:none!important}}

@media print{
  .cx-app{background:#fff!important;min-height:0!important}
  .cx-app .cx-noprint,.cx-app .cx-toasts,.cx-app .cx-sidebar,.cx-app .cx-bottom-nav,.cx-app .cx-site-head,.cx-app .cx-page-head,.cx-app .cx-toolbar,.cx-app .cx-fresh,.cx-app .cx-disclosure,.cx-app .cx-facts,.cx-app .cx-strip,.cx-app .cx-kv,.cx-app .cx-delivery,.cx-app .cx-statusbar,.cx-app .cx-col,.cx-app .cx-panel-head,.cx-app .cx-fold,.cx-app .cx-pane-list,.cx-app .cx-actionbar{display:none!important}
  .cx-app .cx-office{display:block!important;height:auto!important;overflow:visible!important}
  .cx-app .cx-content,.cx-app .cx-side-panel,.cx-app .cx-pane-detail,.cx-app .cx-scroll{overflow:visible!important;height:auto!important;border:0!important}
  .cx-app .cx-page-split,.cx-app .cx-split{display:block!important;height:auto!important;padding:0!important}
  .cx-app .cx-page,.cx-app .cx-content,.cx-app .cx-site-main,.cx-app .cx-panel-paper{padding:0!important;max-width:none!important;background:none!important;border:0!important}
  .cx-app .cx-paper{height:auto!important;overflow:visible!important;background:none!important;border-radius:0!important}
  .cx-app .cx-paper-sheet{transform:none!important}
  .cx-app .cx-story-grid{display:block!important}
  .cx-app .cx-paper-sheet .document-pages{gap:0!important}
  .cx-app .cx-paper-sheet .document-page{box-shadow:none!important}
}
/* Linking a computer: live wait, then confirmation */
.cx-wait-line{display:flex;align-items:center;justify-content:center;gap:9px;color:var(--muted);font-size:14px;margin:0 0 6px}
.cx-dot-pulse{width:8px;height:8px;border-radius:50%;background:var(--plum);animation:cx-pulse 1.4s ease-in-out infinite}
@keyframes cx-pulse{0%,100%{opacity:.25;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}
.cx-linked{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:500;color:#1F6B42;background:#E6F2EA;border-radius:10px;padding:12px 14px;margin:0}
.cx-linked svg{flex:none}
@media (prefers-reduced-motion:reduce){.cx-dot-pulse{animation:none}}
/* A new version was published */
.cx-update-bar{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:20px;display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px #1b182024;padding:8px 8px 8px 16px;font-size:14px;max-width:calc(100vw - 32px)}
.cx-update-bar span{white-space:nowrap}
.cx-role-responsable .cx-update-bar{bottom:calc(84px + env(safe-area-inset-bottom))}
@media (min-width:1024px){.cx-role-responsable .cx-update-bar{bottom:20px}}
/* Password: shown, copied with one small icon */
.cx-icon-mini{display:inline-grid;place-items:center;width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:var(--plum);cursor:pointer;vertical-align:middle}
.cx-icon-mini:hover{background:var(--plum-tint)}
.cx-icon-mini:focus-visible{outline:2px solid var(--plum);outline-offset:1px}
.cx-pw-sheet{display:inline-flex;align-items:center;gap:6px}
/* An invoice made before the app, typed in afterwards */
.cx-legacy-tag{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:999px;background:#EEF0F3;color:#4E5563;font-size:11.5px;font-weight:500;vertical-align:1px;white-space:nowrap}
/* Office computer locked after 10 minutes without use (or « Verrouiller ») */
.cx-lock-host{display:contents}
.cx-lock{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:16px;background:#3a2443e6;backdrop-filter:blur(6px)}
.cx-lock-card{width:min(380px,100%);background:var(--surface);border-radius:16px;padding:28px 26px 22px;box-shadow:0 24px 60px #1b182040;display:grid;gap:12px;text-align:center}
.cx-lock-card h2{font-size:20px;font-weight:600;margin:0}
.cx-lock-card p{margin:0}
.cx-lock-card .cx-field{text-align:left}
.cx-lock-mark{width:52px;height:52px;margin:0 auto 4px;border-radius:13px}
.cx-user-actions{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:12px}
.cx-update-bar span{white-space:normal}
.cx-update-bar{width:max-content;max-width:min(760px,calc(100vw - 32px))}
.cx-import-preview{border:1px solid var(--line);border-radius:10px;overflow:auto;max-height:320px}
.cx-import-preview .cx-table td,.cx-import-preview .cx-table th{white-space:nowrap}
/* Something to check: possible duplicate payment, number used twice, invoice made in a closed month */
.cx-flag{display:block;margin-top:6px;padding:6px 9px;border-radius:8px;background:#FBE9E7;color:#A8322A;font-size:12.5px;line-height:1.45}
.cx-flag .cx-link-btn{color:#A8322A;font-weight:600;margin-left:6px;text-decoration:underline}
.cx-tag-bad{background:#FBE9E7;color:#A8322A}
.cx-flags-block{display:grid;gap:6px;margin:0 0 14px}
.cx-flags-block .cx-flag{margin:0;font-size:13.5px;padding:10px 12px}
