:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#1c2b46;background:#f3f6fb;font-size:14px;--blue:#174ea6;--line:#e2e8f1}*{box-sizing:border-box}body{margin:0}aside{position:fixed;inset:0 auto 0 0;width:235px;background:#102744;color:white;padding:30px 20px;display:flex;flex-direction:column;gap:24px}.brand{font-size:36px;font-weight:900;color:#65b6ff;display:flex;gap:8px;align-items:center}.brand span{font-size:23px;color:white;letter-spacing:-1px}aside p{font-size:10px;letter-spacing:2px;color:#9aafc9}nav{display:grid;gap:6px}nav button{text-align:left;background:none;color:#cfdaeb;border:0;padding:12px 14px;border-radius:8px}nav button.active{background:#254a78;color:white}aside small{margin-top:auto;line-height:1.7;color:#a8bbd2}main{margin-left:235px;padding:34px;max-width:1800px}header{display:flex;gap:12px;align-items:center;margin-bottom:30px}header>div{margin-right:auto}h1{font-size:29px;margin:8px 0}h2{font-size:20px}h3{margin-top:0}.eyebrow{font-size:10px;letter-spacing:2px;color:#6a7d96;font-weight:700}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #cbd5e3;background:white;color:#29415f;border-radius:8px;padding:10px 14px;font-weight:600}button:hover{filter:brightness(.96)}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.danger{color:#b32437}button:disabled{opacity:.4;cursor:default}label{display:grid;gap:7px;color:#687d99;font-size:12px}input,select{padding:11px;border:1px solid #cbd5e3;border-radius:7px;background:white;color:#1c2b46;min-width:0;width:100%}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:20px 0}.card,.panel{background:white;border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:0 3px 12px #1b3d6c04}.card small{color:#687d99}.card strong{display:block;font-size:26px;margin-top:14px;letter-spacing:-.7px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:20px 0}.toolbar input{max-width:300px}.toolbar .spacer{flex:1}.tablebox{overflow:auto;background:white;border:1px solid var(--line);border-radius:12px}table{border-collapse:collapse;width:100%;font-size:12px}th{background:#edf2f9;text-align:left;color:#62758e;white-space:nowrap;padding:14px 12px}td{padding:13px 12px;border-top:1px solid #edf1f6;white-space:nowrap}tr:hover td{background:#f8faff}td button{padding:5px 8px;font-size:11px}.badge{display:inline-block;background:#eaf2ff;color:#275b9d;padding:5px 9px;border-radius:20px;font-size:11px}.warn{background:#fff4da;color:#815610}.ok{background:#e7f7ee;color:#177246}.error{color:#a62331}#notice:not(:empty){padding:13px 18px;background:#fff4da;border-radius:9px;margin:15px 0;line-height:1.6}.muted{color:#7789a2;line-height:1.7}.actions{display:flex;gap:10px;justify-content:flex-end;margin-top:25px}dialog{border:0;border-radius:16px;width:min(680px,94vw);padding:28px;box-shadow:0 30px 90px #09224644}dialog::backdrop{background:#09224680}#fields{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-height:60vh;overflow:auto;padding:3px}footer{padding:30px 0;color:#8c9bb0;font-size:11px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}progress{accent-color:#2074cd;width:100%;height:10px}ul{line-height:1.8;padding-left:20px}.printOnly{display:none}details{margin:14px 0}summary{cursor:pointer;font-weight:bold;padding:10px}.warningbox{padding:16px;border:1px solid #e7ca83;background:#fff9eb;border-radius:9px;margin-bottom:20px;line-height:1.7}@media(max-width:1000px){aside{width:190px;padding:20px 12px}main{margin-left:190px;padding:22px}.cards{grid-template-columns:1fr 1fr}header{flex-wrap:wrap}.grid2{grid-template-columns:1fr}}@media(max-width:650px){aside{position:static;width:auto;padding:16px}aside p,aside small{display:none}nav{display:flex;overflow:auto;gap:4px}nav button{white-space:nowrap}main{margin:0;padding:15px}header>div{width:100%}.cards{gap:10px}.card{padding:15px}.card strong{font-size:21px}#fields{grid-template-columns:1fr}}@media print{@page{size:A4 landscape;margin:12mm}body{background:white;font-size:10px}aside,header,footer,.toolbar,button,#notice,.noPrint{display:none!important}main{margin:0;padding:0;max-width:none}.printOnly{display:block}table{font-size:8px}td,th{padding:5px;white-space:normal}.tablebox{overflow:visible;border:0}.panel{break-inside:avoid;box-shadow:none}.cards{grid-template-columns:repeat(4,1fr)}.card{padding:10px;box-shadow:none}.card strong{font-size:17px}h2{break-before:page}thead{display:table-header-group}tr{break-inside:avoid}details{display:block}details>*{display:block}}
/* Cadastro-first layout */
.brand{background:white;border-radius:10px;padding:12px 9px;margin:-5px -4px 0}.brand img{width:100%;height:auto;display:block}.workspace-label{font-size:11px;font-weight:700;color:#aac2de;letter-spacing:1.4px}.switchpage{display:block;text-decoration:none;color:white;border:1px solid #416083;border-radius:8px;padding:13px 12px;font-weight:600;line-height:1.5}.switchpage:hover{background:#244767}.entry{border-top:3px solid #ff7b08;padding:25px 28px;margin-top:20px}.section-title{display:flex;gap:14px;align-items:flex-start;margin-bottom:22px}.section-title h2{margin:0 0 6px;font-size:21px}.section-title p{margin:0}.step{width:30px;height:30px;border-radius:50%;background:#e7effa;color:#205ba8;display:flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0}.formgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.formgrid label{font-size:13px;font-weight:600;color:#415672}.formgrid input,.formgrid select{padding:13px 12px;font-weight:400}.formgrid input:focus,.formgrid select:focus{outline:3px solid #dceaff;border-color:#2c6bc2}.actions{align-items:center}.actions #formHint{margin-right:auto;font-size:12px}.list-title{margin-top:32px}.config-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0}.config-tabs .selected{color:white;background:#1e5ca8;border-color:#1e5ca8}.config-intro{color:#5a6b83;font-size:15px}.notes{margin-top:25px}th{font-size:11px;letter-spacing:.2px}td:last-child{white-space:normal;min-width:170px}#notice:not(:empty){background:#eaf1fa;color:#385c88;font-size:12px}.primary{box-shadow:0 4px 10px #1f58a31c}.tablebox{margin-bottom:18px}@media(min-width:1500px){.formgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1000px){.formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.formgrid{grid-template-columns:1fr}.brand{max-width:210px}.workspace-label{display:none}.switchpage{margin-top:-10px}.entry{padding:20px 16px}.actions{flex-wrap:wrap}.actions #formHint{width:100%}}@media print{.entry,.switchpage,.config-tabs,.config-intro,.list-title{display:none}}
/* Revision 3: focused forms and readable spacing */
:root{background:#f5f7fb;color:#25364c;font-size:14px}body{line-height:1.5}aside{width:250px;background:#fff;color:#354963;border-right:1px solid #e3eaf2;padding:28px 20px;gap:14px;overflow:auto}.brand{background:#fff;margin:0;padding:8px 0 10px;border-radius:0;display:block}.brand img{width:100%;height:62px;object-fit:contain;display:block}.brand-subtitle{color:#8091a5!important;font-size:9px!important;letter-spacing:1.6px!important;text-align:center;margin:0 0 18px!important}.nav-label{color:#8b98a9;font-size:10px;letter-spacing:1.4px;font-weight:700;padding:12px 13px 4px}nav{gap:3px}nav button{color:#50627a;font-weight:500;padding:10px 14px;font-size:13px}nav button.active{background:#eaf2ff;color:#195caf;font-weight:700;border-left:3px solid #f8841a;padding-left:11px}nav button:hover{background:#f0f5fb}.switchpage{margin-top:12px;color:#1e5ba8;border:1px solid #d5e2f4;background:#f7faff;font-size:12px;padding:12px 14px}.switchpage:hover{background:#eaf2ff}.storage-status{font-size:10px;color:#7f8fa3;margin-top:auto;padding-top:20px}.storage-status span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#46a47b;margin-right:4px}.logout{padding:6px 0;border:0;font-size:11px;font-weight:400;color:#7c8ba1}main{margin-left:250px;padding:34px 38px;max-width:1600px}header{gap:24px;align-items:center;margin-bottom:24px}header h1{font-size:27px;letter-spacing:-.6px;margin:4px 0}.month-label{font-size:11px;min-width:160px}.month-label input{padding:10px 12px}.utilities{position:relative;margin:0;font-size:11px;color:#7c8ba1}.utilities summary{font-weight:500;white-space:nowrap}.utilities>div{position:absolute;right:0;top:38px;z-index:10;width:180px;background:#fff;border:1px solid #dce5ef;padding:12px;border-radius:10px;box-shadow:0 8px 24px #13365812;display:grid;gap:8px}.utilities button{font-size:11px}.entry{padding:30px 32px;border:1px solid #e2e9f3;border-top:3px solid #f8841a;border-radius:14px;margin:0;box-shadow:0 4px 18px #16365a04}.section-title{margin-bottom:24px}.section-title h2{font-size:21px}.section-title .muted{font-size:13px}.formgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.formgrid label{font-size:12px;gap:8px}.formgrid label small{font-size:10px;line-height:1.6;color:#8b98aa;font-weight:400;min-height:16px}.formgrid input,.formgrid select{background:#fff;padding:12px 13px;border-color:#d8e1ed;border-radius:8px;height:46px}.formgrid input::placeholder{color:#a7b3c2}fieldset{border:0;padding:0;margin:0 0 28px}fieldset:last-of-type{margin-bottom:12px}legend{font-size:13px;color:#415773;font-weight:700;margin-bottom:18px;padding:0}legend span{display:inline-flex;width:23px;height:23px;align-items:center;justify-content:center;border-radius:7px;background:#eaf1fc;color:#2a68b4;font-size:11px;margin-right:9px}.actions{margin-top:20px;padding-top:18px;border-top:1px solid #edf1f6;gap:14px}.actions .primary{padding:12px 24px}.quiet{font-weight:400;border:0;color:#8191a7;background:transparent}.rule-hint{background:#f6f9fe;border-radius:8px;font-size:12px;color:#54759b;padding:0}.rule-hint:not(:empty){padding:12px 15px;margin-top:16px}.saved-section{margin-top:34px}.saved-heading{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:16px}.saved-heading h2{font-size:16px;margin:0}.saved-heading p{font-size:11px;color:#8b99ac;margin:0}.count{display:inline-flex;padding:2px 8px;background:#e9eff7;color:#6a80a0;border-radius:6px;font-size:11px;margin-left:6px}.empty-state{border:1px dashed #d8e3ef;border-radius:12px;text-align:center;padding:28px;background:#fafdff;color:#75869c}.empty-state strong{font-size:13px;color:#526b89}.empty-state p{font-size:12px;margin:8px 0 0}.result-panel{margin-top:28px;background:#f2f8ff;border:1px solid #cfdfef;border-radius:12px;padding:24px}.result-top{display:flex;justify-content:space-between;gap:20px;align-items:center}.result-top h3{margin:8px 0 4px;font-size:17px}.result-top p{margin:0;color:#6c84a0;font-size:12px}.result-money{text-align:right}.result-money small{display:block;color:#65809f;font-size:11px}.result-money strong{font-size:31px;color:#185bab;white-space:nowrap}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:22px;padding:18px 0;border-top:1px solid #dce7f5}.result-grid small{display:block;color:#7890aa;font-size:11px}.result-grid b{display:block;font-size:14px;margin-top:5px}.result-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px}.result-bottom small{color:#768da8;font-size:11px}.result-pending{border-radius:8px;background:#fff7e7;padding:10px 14px;color:#8d6a24;font-size:12px}.result-pending p{margin:4px 0}.result-error{padding:16px;background:#fff1ed;color:#a94730;border:1px solid #f0cfc4;border-radius:8px;margin-top:18px}.result-error p{margin-bottom:0}.config-tabs{margin-top:16px}.config-tabs button{font-size:12px}.config-intro{font-size:13px}.auth-page{display:flex;min-height:100vh;justify-content:center;align-items:center;background:#f2f6fc;padding:30px}.auth-card{margin:0;max-width:460px;width:100%;background:white;border:1px solid #e0e8f3;padding:36px;border-radius:16px;box-shadow:0 14px 50px #1f487d0d}.auth-logo{max-width:245px;height:70px;object-fit:contain;display:block;margin:0 auto 28px}.auth-card h1{font-size:25px;line-height:1.3;margin:0 0 10px}.auth-card p{color:#8492a5;font-size:13px}.auth-card form{display:grid;gap:17px;margin:26px 0 15px}.auth-card small{font-size:11px;color:#8d9db1}.auth-card details label{margin-top:12px}.auth-card details summary{font-size:12px}.auth-card button.primary{padding:13px}footer{padding-top:25px;font-size:10px}#notice:empty{display:none}@media(max-width:1100px){aside{width:215px;padding:24px 16px}main{margin-left:215px;padding:25px}.formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.utilities summary{font-size:10px}header{gap:14px}}@media(max-width:700px){aside{width:auto;position:static;padding:16px 20px;gap:8px}.brand img{height:46px;max-width:220px}.brand-subtitle,.nav-label,.storage-status,.logout{display:none}nav{display:flex;overflow-x:auto;gap:7px}nav button{white-space:nowrap;border:1px solid #e1e9f4}.switchpage{padding:8px 12px;margin-top:8px;text-align:center}.brand{padding:0;margin-bottom:5px}main{margin:0;padding:20px 14px}header{align-items:center;gap:12px}header h1{font-size:23px}.month-label{min-width:150px}.utilities{margin-left:auto}.entry{padding:22px 18px}.formgrid{grid-template-columns:1fr;gap:16px}.formgrid label small{min-height:0}.section-title h2{font-size:19px}.result-top{align-items:flex-start;flex-direction:column}.result-money{text-align:left}.result-grid{grid-template-columns:1fr;gap:12px}.result-bottom{flex-direction:column;align-items:stretch}.result-bottom button{width:100%}.actions .primary{padding:12px 16px}.saved-heading{gap:8px}}@media print{.saved-heading p,.utilities,.storage-status,.logout,.result-bottom{display:none!important}.result-panel{background:white}.saved-section{margin-top:15px}}
/* Logo original completo, proporcional em qualquer largura. */
.brand{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;padding:0;margin:0;flex-shrink:0;overflow:visible}
.brand img{display:block;width:100%;max-width:230px;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;margin:0 auto}
.auth-logo{display:block;width:100%;max-width:260px;height:auto;max-height:none;object-fit:contain;margin:0 auto 20px}
@media(max-width:700px){.brand{justify-content:flex-start;margin-bottom:0}.brand img{width:min(100%,210px);max-width:210px;height:auto;max-height:none;margin:0}.brand-subtitle{display:none}.auth-logo{width:100%;max-width:230px;height:auto}}
@media(max-width:380px){.brand img{max-width:180px}.auth-card{padding:24px 20px}.auth-page{padding:16px}}
[hidden]{display:none!important}.field-toggles{display:flex;flex-direction:column;justify-content:center;gap:16px}.field-toggles label{display:flex;align-items:center;gap:9px}.field-toggles input,.winner-summary input{width:16px;height:16px;margin:0;padding:0}.formgrid textarea{font:inherit;padding:12px;border:1px solid #d8e1ed;border-radius:8px;resize:vertical;min-height:100px}.flow-description{display:flex;gap:18px;align-items:center;flex-wrap:wrap}.flow-description b{font-size:16px}.flow-description span{font-size:12px;color:#7d8da3}.store-tabs{margin-bottom:24px}.store-tabs .config-tabs{margin-bottom:0}.winner-summary{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 18px;border:1px solid #d2e6d9;background:#f0f9f3;border-radius:9px;margin:15px 0;font-size:13px;color:#2d7050}.winner-summary label{display:flex;align-items:center;gap:9px;font-size:12px}.custom-result{padding:10px 0;font-size:12px;color:#506d90}.custom-result p{margin:4px 0}.formgrid select:disabled{background:#f1f4f8;color:#6e7d90}@media(max-width:700px){.winner-summary{align-items:flex-start;flex-direction:column}.flow-description{gap:5px}}
.storage-warning:empty{display:none}.storage-warning:not(:empty){padding:14px 16px;background:#fff6dd;color:#735b20;border-radius:8px;margin-bottom:18px;font-size:12px;line-height:1.6}
.backup-location{padding:14px 16px;background:#eef5fc;border:1px solid #d9e5f3;border-radius:9px;font-size:12px;color:#41658a;margin-top:18px}@media print{.backup-location{display:none!important}}
input[data-money]{font-variant-numeric:tabular-nums;text-align:right;letter-spacing:.15px}.sp-table input[data-money]{min-width:155px;width:155px}input[data-money][aria-invalid="true"]{border-color:#c75b42;background:#fff8f6}
.nav-sub{border-left:2px solid #e0e9f6;margin:0 0 12px 14px;padding-left:7px;display:grid;gap:2px}.nav-sub button{font-size:11px;padding:8px 10px}.manager-summary{display:flex;gap:24px;justify-content:space-between;align-items:center;padding:20px 24px;background:#eef5fe;border:1px solid #d8e5f5;border-radius:12px;margin:20px 0}.manager-summary h2{font-size:19px;margin:0 0 7px}.manager-summary p{font-size:12px;color:#64809d;margin:0}.manager-summary>strong{font-size:26px;color:#18579e;white-space:nowrap}@media(max-width:700px){.nav-sub{display:none}.manager-summary{flex-direction:column;align-items:flex-start}}

/* Gerência e supervisão: entrada única e conferência das metas. */
.manager-goals{min-width:780px}.manager-goals td{vertical-align:top}.goal-status{display:inline-flex;padding:5px 9px;border-radius:6px;font-size:12px;font-weight:700;white-space:nowrap}.goal-hit{color:#176244;background:#e1f4ea}.goal-missed{color:#8a4c13;background:#fff0dc}.goal-detail{display:block;margin-top:6px;color:#60768d;font-size:11px;max-width:255px;white-space:normal;line-height:1.5}.product-check-title{margin:24px 0 12px;font-size:15px}.manager-result .tablebox{background:#fff}.manager-result .result-bottom{gap:18px}.manager-result .result-bottom small{max-width:65%}@media(max-width:650px){.manager-result .result-bottom{align-items:stretch;flex-direction:column}.manager-result .result-bottom small{max-width:100%}.manager-result .result-grid{grid-template-columns:1fr}.manager-result .result-money strong{font-size:26px}}

/* Editor modal: background list remains in place. */
.edit-dialog{width:min(1000px,calc(100vw - 32px));max-width:1000px;max-height:calc(100dvh - 40px);padding:0;border:1px solid #d5e2ef;border-radius:16px;background:#f6f8fc;color:#22384e;box-shadow:0 24px 80px #16375d40;overflow:auto}.edit-dialog::backdrop{background:#10253f80;backdrop-filter:blur(3px)}.edit-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;background:white;border-bottom:1px solid #dce5f0;padding:18px 24px}.edit-dialog-header h2{font-size:19px;margin:0}.edit-dialog-close{width:36px;height:36px;padding:0;font-size:26px;line-height:1;border-radius:9px}.edit-dialog-body{padding:20px}.edit-dialog-body .panel{margin:0;padding:24px}.edit-dialog-body .entry{border:0;box-shadow:none}.edit-dialog-body .section-title{margin-bottom:20px}.edit-dialog-body .formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.edit-dialog-body .result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.edit-dialog-body .notes{display:none}@media(max-width:600px){.edit-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.edit-dialog-header{padding:14px}.edit-dialog-header h2{font-size:16px}.edit-dialog-body{padding:10px}.edit-dialog-body .panel{padding:15px}.edit-dialog-body .formgrid,.edit-dialog-body .result-grid{grid-template-columns:1fr}}

footer .developer-credit{font-size:12px;letter-spacing:.02em;color:#37516f;margin-bottom:8px}footer .developer-credit strong{color:#1c5eac;font-weight:700}

/* Independent sections and read-only result dialog. */
.section-intro{margin:0 0 24px}.section-intro p{font-size:13px;color:#75869b;margin:0 0 12px}.section-intro .config-tabs{margin-top:0}.detail-dialog{width:min(1040px,calc(100vw - 32px));max-width:1040px;padding:0;border:1px solid #dce6f2;max-height:calc(100dvh - 40px);overflow:hidden;background:#f8fafd}.detail-dialog::backdrop{background:#10283f88;backdrop-filter:blur(3px)}.detail-dialog #editform{display:flex;flex-direction:column;margin:0;max-height:calc(100dvh - 42px)}.detail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;background:white;border-bottom:1px solid #dfe8f2;border-top:3px solid #ff861b;flex-shrink:0}.detail-heading span{display:block;font-size:9px;letter-spacing:.14em;color:#8394a9;font-weight:700}.detail-heading h2{margin:3px 0 0;font-size:19px;color:#274763}.detail-heading button{font-size:25px;line-height:1;padding:5px 9px;border-radius:9px}.detail-dialog #fields{display:block;max-height:none;min-height:0;overflow:auto;padding:22px 24px;flex:1}.detail-actions{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 24px;background:white;border-top:1px solid #dfe8f2;flex-shrink:0}.detail-actions span{font-size:11px;color:#8a99aa}.detail-actions button{padding:10px 26px;background:#185ba8;color:white;border-color:#185ba8}.calculation-detail .dv-hero{flex-wrap:nowrap}.calculation-detail .dv-hero>div{margin-right:0}@media(max-width:650px){.detail-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.detail-dialog #editform{max-height:calc(100dvh - 18px)}.detail-dialog #fields{padding:15px}.detail-heading,.detail-actions{padding:14px 16px}.detail-actions span{max-width:60%}}

.parameter-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(110deg,#eef5ff,#fff);border:1px solid #d5e3f3;border-radius:14px;padding:22px 24px;margin-bottom:18px}.parameter-banner span:first-child{font-size:9px;color:#738ca8;letter-spacing:.11em;font-weight:700}.parameter-banner h2{font-size:23px;margin:4px 0;text-transform:capitalize;color:#245383}.parameter-banner p{font-size:12px;color:#71849b;margin:6px 0 0;max-width:650px}.parameter-banner button{flex-shrink:0;font-size:12px}.parameter-readonly{padding:14px 18px;background:#fff9ec;border:1px solid #efdfbb;border-radius:10px;font-size:12px;color:#816331;margin:20px 0}@media(max-width:700px){.parameter-banner{flex-direction:column;align-items:stretch;padding:18px}.parameter-banner button{align-self:start}}

.team-source{border:1px solid #dce6f2;border-radius:12px;background:#f6f9ff;padding:18px 20px;margin:4px 0 22px}.team-source-heading{display:flex;gap:16px;align-items:center;justify-content:space-between}.team-source-heading span{font-size:11px;color:#7187a0}.team-source h3{font-size:15px;margin:5px 0}.team-source p{font-size:12px;color:#6e829a;margin:7px 0;line-height:1.6}.team-source-ready{border-color:#cce6d7;background:#f2fbf6}.team-source-pending{border-color:#ecd9b6;background:#fffaf0}.team-source button{font-size:12px;flex-shrink:0}.team-targets,.team-production-values{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}.team-targets>div,.team-production-values>div{border:1px solid #e5e9ed;background:#fff;border-radius:8px;padding:11px}.team-targets span,.team-production-values span{display:block;color:#7f8fa1;font-size:10px}.team-targets b,.team-production-values b{display:block;font-size:16px;color:#2b4f75;margin-top:4px}.team-targets small{font-size:10px;color:#7d8e9f}.team-source .team-share{margin-top:12px;color:#487759}.team-duplicates{margin-top:14px}@media(max-width:650px){.team-source-heading{flex-direction:column;align-items:stretch}.team-targets,.team-production-values{grid-template-columns:1fr}.team-source{padding:15px}}

.feedback-dialog{width:min(590px,calc(100vw - 28px));padding:0;max-height:calc(100dvh - 36px);border:1px solid #efd5c3;overflow:auto;background:white}.feedback-dialog::backdrop{background:#1b2e4580;backdrop-filter:blur(2px)}.feedback-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:22px 24px;border-top:4px solid #ee822b;border-bottom:1px solid #edf0f5}.feedback-heading span{font-size:9px;letter-spacing:.1em;color:#b36c36;font-weight:700}.feedback-heading h2{font-size:19px;margin:6px 0 0;color:#354d68}.feedback-heading button{font-size:24px;padding:2px 9px;line-height:1.2}.feedback-content{padding:12px 24px;color:#704935;font-size:13px}.feedback-content ul{padding-left:20px;line-height:1.7}.feedback-content li+li{margin-top:8px}.feedback-actions{display:flex;justify-content:flex-end;padding:16px 24px;border-top:1px solid #edf0f5}.saved-section,#preview,.sp-cards{scroll-margin-top:22px}

.quick-rule-actions{display:flex;justify-content:flex-end;margin:12px 0}.quick-rule-actions button{font-size:11px;padding:7px 12px}.link-action{border:0;background:none;font-size:10px;text-align:left;padding:2px 0;color:#2863a8}

.calculation-detail{color:#29425c;font-size:13px;line-height:1.5}.calculation-detail *{box-sizing:border-box}.dv-hero{display:flex;gap:24px;justify-content:space-between;align-items:center;padding:24px;border:1px solid #dce6f2;border-radius:14px;background:linear-gradient(110deg,#eef5ff,#fff);margin-bottom:18px}.dv-area,.dv-eyebrow{display:block;text-transform:uppercase;font-size:10px;letter-spacing:.11em;color:#6381a3;font-weight:700}.dv-identity{min-width:0}.dv-identity h3{font-size:24px;line-height:1.25;color:#173f6c;margin:6px 0 8px;overflow-wrap:anywhere}.dv-identity p{font-size:12px;color:#74869d;margin:0 0 12px}.dv-status{display:inline-flex;align-items:center;border-radius:20px;font-size:11px;font-weight:700;padding:5px 10px;background:#e6edf6;color:#4b6586}.dv-status-ready{background:#e2f2e9;color:#246448}.dv-status-below{background:#fff0d9;color:#8c5b1c}.dv-status-pending{background:#ffe8e4;color:#943e30}.dv-total{flex-shrink:0;text-align:right;min-width:180px}.dv-total span{display:block;font-size:11px;color:#6c83a1}.dv-total strong{display:block;color:#185da7;font-size:29px;line-height:1.25;margin-top:6px;white-space:nowrap;font-variant-numeric:tabular-nums}.dv-benefit{display:flex;gap:13px;align-items:center;border:1px solid #e0e7ef;background:#f7f9fc;border-radius:12px;padding:17px 20px;margin:18px 0}.dv-benefit-earned{border-color:#f3d6af;background:#fff8ed}.dv-benefit-icon{height:36px;width:36px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#e6edf6;color:#6683a2;font-size:20px;font-weight:700}.dv-benefit-earned .dv-benefit-icon{background:#ffead0;color:#af6a16}.dv-benefit strong{display:block;font-size:16px;color:#2b4666;margin:3px 0}.dv-benefit-earned strong{color:#966025}.dv-benefit p{margin:0;color:#6e8198;font-size:11px}.dv-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.dv-metric{padding:15px 16px;border:1px solid #e0e8f1;border-radius:10px;background:#fff}.dv-metric span{display:block;font-size:11px;color:#6a819e}.dv-metric strong{display:block;color:#203f64;font-size:18px;margin-top:5px;font-variant-numeric:tabular-nums}.dv-metric small{display:block;font-size:10px;color:#8796a8;margin-top:7px;line-height:1.5}.dv-section{border-top:1px solid #e4ebf3;padding-top:20px;margin-top:22px}.dv-section-heading{margin-bottom:12px}.dv-section-heading h3{font-size:14px;margin:0;color:#284d75;font-weight:700}.dv-section-heading p{font-size:11px;color:#7c8da2;margin:5px 0 0}.dv-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 24px;margin:0}.dv-pairs>div{min-width:0}.dv-pairs dt{font-size:11px;color:#7a8ca3}.dv-pairs dd{margin:4px 0 0;font-weight:600;font-size:13px;color:#2b4664;overflow-wrap:anywhere}.dv-table-wrap{overflow:auto;border:1px solid #e0e7ef;border-radius:10px;background:#fff}.dv-table{border-collapse:collapse;width:100%;min-width:560px;font-size:11px}.dv-table th,.dv-table td{padding:11px 13px;text-align:left;border-bottom:1px solid #e7edf4;vertical-align:top;font-variant-numeric:tabular-nums;white-space:nowrap}.dv-table thead th{color:#6b809b;background:#f1f5fa;font-size:10px;font-weight:700}.dv-table tbody th{font-weight:700;color:#355574}.dv-table tr:last-child th,.dv-table tr:last-child td{border-bottom:0}.dv-table tbody tr:nth-child(even){background:#fafcff}.dv-alert{border:1px solid #f2c5bd;background:#fff0ed;border-radius:10px;padding:15px 18px;color:#923f32;margin:16px 0}.dv-alert strong{font-size:13px}.dv-alert p{margin:5px 0 0;font-size:12px}@media(max-width:700px){.dv-hero{align-items:flex-start;flex-direction:column;padding:18px;gap:14px}.dv-total{text-align:left;min-width:0}.dv-total strong{font-size:26px}.dv-identity h3{font-size:21px}.dv-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dv-metric{padding:12px}.dv-metric strong{font-size:17px}.dv-pairs{gap:14px;grid-template-columns:1fr 1fr}.dv-benefit{padding:15px}.dv-benefit strong{font-size:14px}}@media(max-width:420px){.dv-metrics,.dv-pairs{grid-template-columns:1fr}.dv-benefit{align-items:flex-start}.dv-table{min-width:490px}}@media print{.dv-hero,.dv-benefit,.dv-metric{break-inside:avoid}.dv-hero{background:white}.dv-table-wrap{overflow:visible}.dv-table{min-width:0;font-size:9px}.dv-table th,.dv-table td{white-space:normal;padding:7px}.dv-area,.dv-eyebrow{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

.email-settings{margin-top:20px}.email-settings>p{color:#72839a;font-size:13px}.email-toggle{margin:20px 0}.email-toggle label{display:flex;align-items:center;gap:10px;font-size:13px}.email-toggle input{width:auto}.email-recipients{grid-column:span 2}.email-note{margin-top:20px;padding:14px 16px;border-radius:9px;background:#f2f6fd;color:#647b98;font-size:12px}.email-delivery{margin-top:20px}.email-status-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.email-status-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.email-status-cards>div{background:#f3f7fc;border-radius:9px;padding:15px}.email-status-cards small{display:block;color:#7e8ea2}.email-status-cards b{display:block;margin-top:6px;font-size:17px;color:#2e527a}.email-delivery p,.email-delivery li{font-size:12px;color:#72839a}@media(max-width:700px){.email-recipients{grid-column:auto}.email-status-cards{grid-template-columns:1fr}.email-status-heading{align-items:flex-start;flex-direction:column}}

/* Appearance controls and the startup scene. Append after the base stylesheet. */
:root{color-scheme:light;--app-surface:#fff;--app-bg:#f5f7fb;--app-text:#263c55;--app-muted:#7c8da2;--app-border:#dce6f2}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;white-space:nowrap;padding:10px 12px;min-height:38px;flex-shrink:0}.theme-toggle svg{height:17px;width:17px;display:block}.theme-toggle span{line-height:1.2}
.startup-screen{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at 50% 25%,#eef6ff 0,#f7f9fd 45%,#eaf0f8 100%);transition:opacity .22s ease,visibility .22s ease}.startup-screen-finished{opacity:0;visibility:hidden;pointer-events:none}.startup-panel{width:min(470px,100%);padding:34px 40px;text-align:center;border:1px solid #d9e5f3;border-radius:24px;background:#ffffffd9;box-shadow:0 24px 90px #1b4f7b12;backdrop-filter:blur(8px)}.startup-brand{max-width:245px;margin:0 auto 6px;padding:12px;border-radius:10px;background:white}.startup-brand img{display:block;width:100%;height:auto;max-height:85px;object-fit:contain}.startup-visual{position:relative;display:flex;align-items:center;justify-content:center;height:180px;width:100%;overflow:hidden}.startup-visual canvas{display:block;max-width:100%;height:180px!important}.startup-has-three .startup-orbit,.startup-has-three .startup-dot{display:none}.startup-orbit{position:absolute;width:116px;height:116px;border:1px solid #246cba33;border-top:3px solid #2367b6;border-radius:50%;transform:rotateX(50deg);animation:startup-spin 2.4s linear infinite}.startup-orbit-orange{width:92px;height:92px;border-color:#f0801e33;border-bottom:3px solid #f0801e;animation-direction:reverse;animation-duration:1.9s}.startup-dot{height:21px;width:21px;border-radius:7px;background:#205ea8;box-shadow:0 0 34px #276db03d;transform:rotate(45deg)}.startup-copy h2{font-size:22px;line-height:1.3;letter-spacing:-.35px;color:#214c76;margin:8px 0}.startup-eyebrow{font-size:9px;letter-spacing:.17em;color:#7f93aa;font-weight:700}.startup-status{font-size:12px;color:#7c8ea5;margin:0 0 24px;min-height:20px}.startup-progress{height:5px;overflow:hidden;border-radius:9px;background:#e6edf6}.startup-progress-bar{height:100%;width:0;background:linear-gradient(90deg,#1c5cab,#4281c5 70%,#ff831a);transition:width .3s ease;border-radius:9px}.startup-percentage{display:block;margin-top:10px;color:#8194aa;font-size:10px;font-variant-numeric:tabular-nums}.startup-screen-error .startup-status{color:#a1482e}.startup-screen-error button{margin-top:18px}@keyframes startup-spin{to{transform:rotate(360deg)}}
html[data-theme=dark]{color-scheme:dark;--app-surface:#152235;--app-bg:#0d1624;--app-text:#d6e3f2;--app-muted:#92a7bd;--app-border:#2b3d52;--line:#2b3d52;--blue:#2365b1;background:var(--app-bg);color:var(--app-text)}
html[data-theme=dark] body,html[data-theme=dark] main{background:var(--app-bg);color:var(--app-text)}
html[data-theme=dark] aside{background:#111d2d;color:var(--app-text);border-color:#26384d}
html[data-theme=dark] .brand{background:#fff;border-radius:10px;padding:8px}
html[data-theme=dark] .brand-subtitle,html[data-theme=dark] .nav-label,html[data-theme=dark] .storage-status{color:#8ea4be!important}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3{color:#dceafb}
html[data-theme=dark] nav button{color:#a9bfd6}html[data-theme=dark] nav button:hover{background:#1a2d44}html[data-theme=dark] nav button.active{background:#1c3654;color:#85bafd;border-left-color:#ff962d}
html[data-theme=dark] .switchpage,html[data-theme=dark] button{background:#1b2c41;border-color:#38516d;color:#c6dcf2}html[data-theme=dark] .switchpage:hover{background:#213d5b}html[data-theme=dark] button.primary{background:#2367b7;border-color:#3479c7;color:#fff}html[data-theme=dark] button.danger{color:#ffa99d}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#0f1b2a;color:#d7e5f6;border-color:#334b65}html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#6f879f}html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{outline-color:#274a72;border-color:#5894d5}
html[data-theme=dark] label,html[data-theme=dark] .formgrid label,html[data-theme=dark] legend{color:#afc5de}html[data-theme=dark] .formgrid label small,html[data-theme=dark] .muted,html[data-theme=dark] footer,html[data-theme=dark] .eyebrow,html[data-theme=dark] .saved-heading p{color:#90a6c1}
html[data-theme=dark] .panel,html[data-theme=dark] .card,html[data-theme=dark] .entry,html[data-theme=dark] .tablebox,html[data-theme=dark] .empty-state,html[data-theme=dark] .report-filter-panel{background:#142235;border-color:#2b4059;color:#c9d9eb;box-shadow:none}
html[data-theme=dark] .entry{border-top-color:#eb902f}html[data-theme=dark] .card small,html[data-theme=dark] .sp-note,html[data-theme=dark] .report-filter-panel p{color:#93a9c2}html[data-theme=dark] .card strong{color:#d6e9ff}
html[data-theme=dark] th{background:#1a3048;color:#9fbad5}html[data-theme=dark] td{border-color:#263d55;color:#c3d5e8}html[data-theme=dark] tr:hover td{background:#1b324b}
html[data-theme=dark] .sp-table tr.sp-hit td{background:#133a30;color:#bee4cf}html[data-theme=dark] .sp-table tr.sp-hit:hover td{background:#194938}html[data-theme=dark] .sp-table .sp-invalid{color:#f6b29f}
html[data-theme=dark] .sp-cards div,html[data-theme=dark] .team-targets>div,html[data-theme=dark] .team-production-values>div{background:#14263a;border-color:#2b465f}html[data-theme=dark] .sp-cards small,html[data-theme=dark] .team-targets span,html[data-theme=dark] .team-production-values span,html[data-theme=dark] .team-targets small{color:#90aac5}html[data-theme=dark] .sp-cards b,html[data-theme=dark] .team-targets b,html[data-theme=dark] .team-production-values b{color:#c8e1ff}
html[data-theme=dark] .sp-copy,html[data-theme=dark] .sp-status,html[data-theme=dark] .rule-hint,html[data-theme=dark] .count,html[data-theme=dark] #notice:not(:empty){background:#1b3049;border-color:#2b4867;color:#aacbef}
html[data-theme=dark] .result-panel{background:#122b44;border-color:#315579}html[data-theme=dark] .result-grid{border-color:#294969}html[data-theme=dark] .result-grid small,html[data-theme=dark] .result-top p,html[data-theme=dark] .result-money small,html[data-theme=dark] .result-bottom small{color:#93afcd}html[data-theme=dark] .result-grid b,html[data-theme=dark] .result-money strong{color:#92c5ff}
html[data-theme=dark] .team-source,html[data-theme=dark] .team-source-ready{background:#123229;border-color:#2e5748}html[data-theme=dark] .team-source-pending,html[data-theme=dark] .warningbox,html[data-theme=dark] .parameter-readonly,html[data-theme=dark] .result-pending{background:#3c3020;border-color:#6d5630;color:#e5c58f}html[data-theme=dark] .team-source p,html[data-theme=dark] .team-source-heading span{color:#a3bdc2}html[data-theme=dark] .team-share{color:#a5d9bd}
html[data-theme=dark] .parameter-banner{background:linear-gradient(110deg,#152f4c,#172638);border-color:#31516e}html[data-theme=dark] .parameter-banner h2{color:#aad2ff}html[data-theme=dark] .parameter-banner p,html[data-theme=dark] .parameter-banner span:first-child{color:#9db6d0}
html[data-theme=dark] .actions,html[data-theme=dark] .result-grid,html[data-theme=dark] .detail-actions{border-color:#2c425c}html[data-theme=dark] .badge{background:#1f3d60;color:#9bcbff}html[data-theme=dark] .goal-hit{background:#1c4a37;color:#c0edcf}html[data-theme=dark] .goal-missed{background:#5a4222;color:#ffe2ab}html[data-theme=dark] .goal-detail{color:#a2b4c9}
html[data-theme=dark] .result-error,html[data-theme=dark] .sp-error,html[data-theme=dark] .access-error,html[data-theme=dark] .dv-alert{background:#432b28;border-color:#78504a;color:#ffc4b5}
html[data-theme=dark] dialog,html[data-theme=dark] .edit-dialog,html[data-theme=dark] .detail-dialog,html[data-theme=dark] .access-dialog,html[data-theme=dark] .feedback-dialog{background:#132235;color:#d2e2f3;border-color:#3a526b}
html[data-theme=dark] .edit-dialog-header,html[data-theme=dark] .detail-heading,html[data-theme=dark] .detail-actions,html[data-theme=dark] .feedback-heading,html[data-theme=dark] .feedback-actions{background:#172a40;border-color:#30465e}html[data-theme=dark] .access-heading h2,html[data-theme=dark] .feedback-heading h2,html[data-theme=dark] .detail-heading h2{color:#d4e7fe}html[data-theme=dark] .access-form p,html[data-theme=dark] .access-form label,html[data-theme=dark] .feedback-content{color:#b1c6de}
html[data-theme=dark] .calculation-detail{color:#c7daef}html[data-theme=dark] .dv-hero{background:linear-gradient(110deg,#153250,#17283e);border-color:#365271}html[data-theme=dark] .dv-identity h3,html[data-theme=dark] .dv-total strong{color:#acd4ff}html[data-theme=dark] .dv-area,html[data-theme=dark] .dv-eyebrow,html[data-theme=dark] .dv-identity p,html[data-theme=dark] .dv-total span,html[data-theme=dark] .dv-metric span,html[data-theme=dark] .dv-pairs dt{color:#93b0cf}html[data-theme=dark] .dv-benefit{background:#1c2e43;border-color:#304a66}html[data-theme=dark] .dv-benefit-earned{background:#3b3021;border-color:#725738}html[data-theme=dark] .dv-benefit strong,html[data-theme=dark] .dv-metric strong,html[data-theme=dark] .dv-pairs dd,html[data-theme=dark] .dv-section-heading h3{color:#d3e6fe}html[data-theme=dark] .dv-benefit p,html[data-theme=dark] .dv-section-heading p,html[data-theme=dark] .dv-metric small{color:#9eb2ca}html[data-theme=dark] .dv-metric,html[data-theme=dark] .dv-table-wrap{background:#14283e;border-color:#2e455d}html[data-theme=dark] .dv-section{border-color:#2d445d}html[data-theme=dark] .dv-table thead th{background:#203951;color:#a2bfdd}html[data-theme=dark] .dv-table tbody tr:nth-child(even){background:#183149}html[data-theme=dark] .dv-table tbody th{color:#c4ddf7}html[data-theme=dark] .dv-table th,html[data-theme=dark] .dv-table td{border-color:#2d455e}
html[data-theme=dark] footer .developer-credit,html[data-theme=dark] footer .developer-credit strong{color:#8abdf8}html[data-theme=dark] .utilities>div{background:#182c43;border-color:#3a526b}
html[data-theme=dark] .rpt-root{color:#22384e;background:#fff;padding:18px;border-radius:12px}html[data-theme=dark] .rpt-root h1,html[data-theme=dark] .rpt-root h2,html[data-theme=dark] .rpt-root h3{color:#164a78}html[data-theme=dark] .rpt-root td{color:#22384e;border-color:#dce6f0}html[data-theme=dark] .rpt-root tr:hover td{background:inherit}
html[data-theme=dark] .startup-screen{background:radial-gradient(circle at 50% 25%,#193755 0,#101d30 50%,#0a1422 100%)}html[data-theme=dark] .startup-panel{background:#15263ee0;border-color:#314d6c;box-shadow:0 24px 90px #0006}html[data-theme=dark] .startup-copy h2{color:#c9e1ff}html[data-theme=dark] .startup-eyebrow,html[data-theme=dark] .startup-status,html[data-theme=dark] .startup-percentage{color:#91aac7}html[data-theme=dark] .startup-progress{background:#263e59}
@media(max-width:500px){.theme-toggle{width:36px;min-width:36px;padding:8px}.theme-toggle span{display:none}.startup-panel{padding:26px 22px}.startup-copy h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.startup-orbit{animation:none}.startup-screen,.startup-progress-bar{transition:none}}
@media print{.theme-toggle,.startup-screen{display:none!important}html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] main{background:white!important;color:#22384e!important}html[data-theme=dark] .rpt-root{padding:0;border-radius:0}html[data-theme=dark] .rpt-root td{background:transparent;color:#22384e}}
html[data-theme=dark] .email-settings{background:#142235;border-color:#2b4059;color:#c9d9eb}html[data-theme=dark] .email-note{background:#1c334c;border-color:#31516f;color:#a8c9e9}html[data-theme=dark] .email-status-cards>div{background:#172b40;border-color:#30485f}html[data-theme=dark] .email-status-cards small,html[data-theme=dark] .email-settings .muted{color:#92abc4}html[data-theme=dark] .email-status-cards strong{color:#cae2ff}
.recovery-dialog{width:min(520px,calc(100vw - 28px));padding:0;border:1px solid var(--app-border,#dce6f2);max-height:calc(100dvh - 28px);overflow:auto;background:var(--app-surface,#fff);color:var(--app-text,#21466f);border-radius:18px;box-shadow:0 24px 90px #1235563d}
.recovery-dialog::backdrop{background:#142b4588;backdrop-filter:blur(4px)}
.recovery-dialog .access-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 26px 0}
.recovery-dialog h2{font-size:21px;margin:0;color:inherit}
.recovery-dialog .access-form{padding:18px 26px 26px;line-height:1.7}
.recovery-dialog .access-form label{display:grid;gap:8px;font-size:13px}
.recovery-dialog input{width:100%;height:46px}
.recovery-dialog .access-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:22px}
.recovery-dialog .access-error{color:#a34631;background:#fff1ed;border-radius:8px;padding:10px 12px}
.quick-tier-choice{display:grid;gap:8px;margin:20px 24px 0;max-width:360px}
.quick-rule-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.recovery-dialog [hidden]{display:none!important}
/* Shared icon geometry: the SVG box and its clickable area stay centered. */
button > svg,.app-icon-button > svg{display:block;flex:0 0 auto;width:18px;height:18px;pointer-events:none}
button:has(> svg){display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle}
button.app-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;min-width:40px;height:40px;min-height:40px;padding:0;line-height:1;vertical-align:middle}
.edit-dialog .edit-dialog-header > .edit-dialog-close,
.access-dialog .access-heading > .access-close,
.recovery-dialog .access-heading > button[aria-label="Cancelar"],
.feedback-dialog .feedback-heading > button[aria-label="Fechar aviso"],
.detail-dialog .detail-heading > button[aria-label="Fechar detalhes"],
button.app-close-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;min-width:40px;height:40px;min-height:40px;padding:0;line-height:1;border:1px solid #dbe5f0;border-radius:12px;background:#f7faff;color:#526d89;box-shadow:0 1px 2px #16365305;transition:background .16s ease,border-color .16s ease,color .16s ease;align-self:center}
button.app-close-button > .app-close-icon{display:block;width:20px;height:20px;margin:0;flex:0 0 20px}
button.app-close-button:hover{background:#eaf2fc;border-color:#bed2eb;color:#185dab;filter:none}
button.app-close-button:focus-visible{outline:3px solid #7eabea;outline-offset:3px}
.edit-dialog-header > h2,.access-heading > h2,.feedback-heading > div,.detail-heading > div{min-width:0;overflow-wrap:anywhere}
.edit-dialog-header h2,.access-heading h2,.feedback-heading h2,.detail-heading h2{line-height:1.35}
.dv-benefit-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}
html[data-theme=dark] button.app-close-button{background:#1b3047;border-color:#3b536c;color:#b4cee8;box-shadow:none}
html[data-theme=dark] button.app-close-button:hover{background:#244365;border-color:#52779c;color:#e0efff}
@media(max-width:600px){.feedback-heading,.access-dialog .access-heading,.recovery-dialog .access-heading{gap:12px;padding-left:18px;padding-right:18px}.feedback-heading h2,.access-dialog .access-heading h2{font-size:18px}.feedback-content,.feedback-actions,.recovery-dialog .access-form{padding-left:18px;padding-right:18px}}
@media(prefers-reduced-motion:reduce){button.app-close-button{transition:none}}

.service-status-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;font-size:11px;white-space:nowrap;flex-shrink:0}
.service-status-dot{width:8px;height:8px;border-radius:50%;display:block;background:#94a3b8;flex:0 0 8px}
.service-status-button[data-service=online] .service-status-dot{background:#24936d;box-shadow:0 0 0 3px #24936d18}
.service-status-button[data-service=offline] .service-status-dot{background:#c76849}
.service-status-button[data-service=warning] .service-status-dot{background:#d49b33}
.service-help{padding:26px;max-width:720px;margin:auto;line-height:1.75}.service-help h3{font-size:18px;margin:0 0 12px}.service-help ol{padding-left:22px}.service-help li+li{margin-top:10px}.service-help .service-note{padding:14px 16px;border:1px solid var(--app-border,#dce6f2);border-radius:10px;background:var(--app-bg,#f5f7fb)}.service-help .actions{flex-wrap:wrap}
@media(max-width:650px){.service-status-button{flex:1}.service-help{padding:18px}}
@media print{.service-status-button{display:none!important}}

/* The application header only; dialog headings keep their own layouts. */
.app-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;column-gap:24px;row-gap:20px;margin-bottom:26px}
.app-header > .app-heading{flex:1 1 250px;min-width:0;width:auto;margin:0}
.app-header .app-heading h1{margin:5px 0 0;line-height:1.25;overflow-wrap:anywhere}
.app-header > .header-controls{display:flex;align-items:flex-end;justify-content:flex-end;flex-wrap:wrap;gap:12px;flex:0 1 auto;min-width:0;max-width:100%;width:auto;margin:0}
.header-controls > *{flex-shrink:0;margin:0}
.header-controls .month-label{display:grid;gap:6px;min-width:152px;width:152px;font-size:10px;line-height:1.3}
.header-controls .month-label input{height:40px;min-height:40px;padding:8px 11px;line-height:1.2}
.header-controls > button,.header-controls > .utilities > summary{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;height:40px;min-height:40px;padding:0 12px;line-height:1.2;font-size:11px;white-space:nowrap;vertical-align:middle}
.header-controls > button svg{display:block;flex:0 0 18px;width:18px;height:18px;margin:0}
.header-controls > button span{line-height:1.2}
.header-controls [hidden]{display:none!important}
.header-controls > .utilities{position:relative;align-self:flex-end;margin:0;color:#58708a}
.header-controls > .utilities > summary{border:1px solid #d7e2ef;border-radius:8px;background:#fff;color:inherit;list-style:none;cursor:pointer;font-weight:500;user-select:none}
.header-controls > .utilities > summary::-webkit-details-marker{display:none}
.header-controls > .utilities > summary::marker{content:""}
.header-controls > .utilities > summary::after{content:"";display:block;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);flex:0 0 6px;margin-left:2px}
.header-controls > .utilities[open] > summary::after{transform:translateY(2px) rotate(225deg)}
.header-controls > .utilities > summary:hover{background:#f0f5fc}
.header-controls > .utilities > summary:focus-visible{outline:3px solid #7eabea;outline-offset:3px}
.header-controls > .utilities > div{top:calc(100% + 8px);right:0;max-width:calc(100vw - 28px)}
html[data-theme=dark] .header-controls > .utilities{color:#c6dcf2}
html[data-theme=dark] .header-controls > .utilities > summary{background:#1b2c41;border-color:#38516d}
html[data-theme=dark] .header-controls > .utilities > summary:hover{background:#244365}
@media(max-width:1280px){.app-header > .header-controls{flex:1 1 100%;justify-content:flex-start}}
@media(max-width:700px){.app-header{gap:18px}.app-header > .app-heading{flex-basis:100%}.app-header > .header-controls{width:100%;gap:10px}.header-controls .month-label{flex:1 1 150px;width:auto;max-width:220px}.header-controls > .utilities{margin-left:0}.header-controls > .utilities > div{left:0;right:auto}}
@media(max-width:420px){.header-controls > .service-status-button{padding:0 10px;font-size:10px}.header-controls > .theme-toggle{width:40px;min-width:40px;padding:0}.header-controls > .theme-toggle span{display:none}}
@media print{.app-header{display:none!important}}

/* Daily Streets entry and the matching saved production table. */
.streets-entry .streets-identification{grid-template-columns:minmax(155px,.75fr) minmax(180px,1fr) minmax(220px,1.3fr)}
.streets-entry .streets-numbers{grid-template-columns:repeat(3,minmax(0,1fr))}
.streets-entry input[type=number],.streets-entry [data-street-unit]{font-variant-numeric:tabular-nums;text-align:right}
.streets-entry input[readonly]{background:#f4f7fb;color:#486481;border-style:dashed;cursor:default}
.streets-entry .street-observation{grid-column:1/-1;display:block}
.street-observation textarea{display:block;width:100%;margin-top:8px;font-weight:400}
.street-optional{font-size:10px;font-weight:400;color:#8393a7;margin-left:4px}
.street-rule{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-top:15px;padding:13px 16px;background:#f3f7fd;border:1px solid #e2eaf5;border-radius:9px}
.street-rule p{margin:0;font-size:12px;line-height:1.6;color:#536f91}
.street-rule button{flex-shrink:0;font-size:11px}
#streetPreview,#streetResults{scroll-margin-top:24px}
.street-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}
.street-summary>div{background:#fff;border:1px solid #dfe7f0;border-radius:12px;padding:17px 19px;min-width:0}
.street-summary span{display:block;font-size:11px;color:#7a8da3}
.street-summary strong{display:block;margin-top:8px;font-size:24px;letter-spacing:-.4px;color:#2a4665;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.street-summary .street-summary-total{background:#edf5ff;border-color:#d3e3f6}
.street-summary-total strong{color:#185cab}
.street-results .toolbar{margin:20px 0 14px}
.street-search-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.street-results #search{width:min(420px,100%);max-width:420px}
.street-tablebox{max-height:560px;isolation:isolate;margin-bottom:0}
.street-table{min-width:1120px;font-size:12px}
.street-table thead th{position:sticky;top:0;z-index:1;padding:15px 13px;background:#eaf0f8;border-bottom:1px solid #dbe5f0}
.street-table td{padding:15px 13px;vertical-align:middle}
.street-table tbody tr:nth-child(even) td{background:#f8fafd}
.street-table tbody tr:hover td{background:#edf4fd}
.street-table .street-number{text-align:right;font-variant-numeric:tabular-nums}
.street-table .street-person{font-weight:600;color:#344f70}
.street-table .street-pay{font-weight:700;color:#185ba6}
.street-table .street-actions{min-width:200px;white-space:nowrap}
.street-actions button+button{margin-left:4px}
.street-status{display:inline-flex;padding:5px 8px;border-radius:6px;font-size:11px;font-weight:600}
.street-status-hit{background:#e5f4eb;color:#27714e}
.street-status-partial{background:#fff1dd;color:#98601f}
.street-status-pending{background:#fce9e5;color:#a34a35}
.street-table tfoot th,.street-table tfoot td{background:#edf3fb;border-top:2px solid #d5e1ef;padding:15px 13px;font-weight:700}
.street-calculation{padding:12px 15px;background:#e6f0fc;color:#486b95;font-size:12px;border-radius:8px;margin:0 0 16px;font-variant-numeric:tabular-nums}
.street-note{font-size:12px;color:#607b9a;white-space:pre-wrap;overflow-wrap:anywhere}
.street-result .result-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
[data-theme=dark] .streets-entry input[readonly]{background:#192b40;color:#afc4dd;border-color:#40526b}
[data-theme=dark] .street-rule{background:#192d46;border-color:#31465f}
[data-theme=dark] .street-rule p,[data-theme=dark] .street-rule button{color:#b7cee9}
[data-theme=dark] .street-summary>div{background:#17283e;border-color:#31445e}
[data-theme=dark] .street-summary span{color:#a9bbd0}
[data-theme=dark] .street-summary strong{color:#e0ecf8}
[data-theme=dark] .street-summary .street-summary-total{background:#1b3555;border-color:#3b5b83}
[data-theme=dark] .street-summary-total strong,[data-theme=dark] .street-table .street-pay{color:#9bc6ff}
[data-theme=dark] .street-table thead th,[data-theme=dark] .street-table tfoot th,[data-theme=dark] .street-table tfoot td{background:#243b56;border-color:#40556f;color:#d4e2f5}
[data-theme=dark] .street-table tbody tr:nth-child(even) td{background:#1a2b41}
[data-theme=dark] .street-table tbody tr:hover td{background:#243d59}
[data-theme=dark] .street-table .street-person{color:#dce9f9}
[data-theme=dark] .street-status-hit{background:#204b3c;color:#afebcd}
[data-theme=dark] .street-status-partial{background:#514128;color:#ffe0ad}
[data-theme=dark] .street-status-pending{background:#542e30;color:#ffcbc1}
[data-theme=dark] .street-calculation{background:#203a59;color:#c1d7f4}
[data-theme=dark] .street-note{color:#b5c9e2}
@media(max-width:1000px){.streets-entry .streets-identification{grid-template-columns:repeat(2,minmax(0,1fr))}.streets-identification label:last-child{grid-column:1/-1}.street-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.streets-entry .streets-identification,.streets-entry .streets-numbers,.street-result .result-grid{grid-template-columns:1fr}.streets-identification label:last-child{grid-column:auto}.street-rule{align-items:flex-start;flex-direction:column;gap:8px}.street-summary{gap:10px}.street-summary>div{padding:13px}.street-summary strong{font-size:20px}.street-calculation{line-height:1.8}}
@media print{.street-results .toolbar,.street-actions,.street-table th:last-child,.street-table tbody td:last-child{display:none!important}.street-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.street-summary>div{background:#fff!important}.street-summary strong{font-size:18px;color:#1c3650!important}.street-tablebox{max-height:none;overflow:visible}.street-table{min-width:0;font-size:8px}.street-table td,.street-table th{padding:7px 5px!important}.street-table thead th{position:static}.street-result{break-inside:avoid}.street-table tbody tr{break-inside:avoid}}
.street-rule-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.street-rule-cards>div{border:1px solid var(--app-border,#dce6f2);background:var(--app-bg,#f5f7fb);border-radius:12px;padding:18px}.street-rule-cards small{display:block;color:var(--app-muted,#7c8da2);font-size:12px}.street-rule-cards strong{display:block;font-size:25px;margin-top:8px;color:var(--app-text,#263c55);font-variant-numeric:tabular-nums}.street-rule-panel>p{font-size:12px;line-height:1.7;color:var(--app-muted,#7c8da2)}@media(max-width:650px){.street-rule-cards{grid-template-columns:1fr}}

.street-rule-panel .street-rule-cards{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1100px){.street-rule-panel .street-rule-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.street-rule-panel .street-rule-cards{grid-template-columns:1fr}}

/* Independent payout and target counters. */
.street-rule-panel .street-rule-cards strong{font-size:22px;overflow-wrap:anywhere}.street-rule-panel .actions{flex-wrap:wrap;gap:10px}.street-rule-preview{margin:15px 0;padding:17px;border:1px solid var(--app-border,#dce6f2);border-radius:12px;background:var(--app-bg,#f5f7fb)}.street-rule-preview h3{margin:0 0 10px;font-size:14px}.street-rule-preview>p{font-size:12px;line-height:1.7;margin:0 0 14px;color:var(--app-muted,#70839d)}#streetRuleSimulation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#streetRuleSimulation>div{border:1px solid var(--app-border,#dce6f2);border-radius:9px;padding:13px;background:var(--app-panel,#fff)}#streetRuleSimulation span,#streetRuleSimulation small{display:block;font-size:11px;color:var(--app-muted,#70839d);line-height:1.5}#streetRuleSimulation strong{display:block;margin:8px 0;font-size:23px;color:#185cab;font-variant-numeric:tabular-nums}[data-theme=dark] #streetRuleSimulation>div{background:#17283e}[data-theme=dark] #streetRuleSimulation strong{color:#9bc6ff}@media(max-width:550px){#streetRuleSimulation{grid-template-columns:1fr}}

/* Keep each field anchored to the top, independently of optional help text. */
#app,.panel,.entry,.edit-dialog-body{min-width:0;max-width:100%}
fieldset{min-inline-size:0;min-width:0;max-width:100%}
.formgrid{min-width:0;align-items:start}
.formgrid > label{min-width:0;max-width:100%;align-self:start;align-content:start;grid-template-columns:minmax(0,1fr);line-height:1.5}
.formgrid > label > input,.formgrid > label > select,.formgrid > label > textarea{box-sizing:border-box;min-width:0;max-width:100%;width:100%;margin:0}
.formgrid > label > input:not([type=checkbox]):not([type=radio]),.formgrid > label > select{height:46px;min-height:46px}
.formgrid > label > datalist{display:none}
.formgrid > label > small{margin:0;align-self:start}
.streets-entry .streets-identification,.streets-entry .streets-numbers{grid-template-columns:repeat(3,minmax(0,1fr))}
.streets-identification > label:last-child{grid-column:auto}
.street-rule{min-width:0;max-width:100%}
.street-rule p{min-width:0;overflow-wrap:anywhere}
body > main{width:calc(100% - 250px);max-width:1600px}
.edit-dialog-body .streets-identification,.edit-dialog-body .streets-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}
.edit-dialog-body .streets-identification > label:last-child{grid-column:1/-1}
@media(max-width:1100px){body > main{width:calc(100% - 215px)}}
@media(max-width:1000px){.streets-entry .streets-identification,.streets-entry .streets-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}.streets-identification > label:last-child{grid-column:1/-1}}
@media(max-width:700px){body > main{width:100%}.streets-entry .streets-identification,.streets-entry .streets-numbers,.edit-dialog-body .streets-identification,.edit-dialog-body .streets-numbers{grid-template-columns:minmax(0,1fr)}.streets-identification > label:last-child{grid-column:auto}.formgrid > label > small{min-height:0}}
@media print{body > main{width:100%;max-width:none}}

.streets-entry .street-observation > textarea{margin-top:8px}

/* The monthly Streets grid keeps all horizontal scrolling inside its table. */
.street-month-entry{min-width:0}
.street-month-entry .section-title{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.street-month-period{font-size:12px;font-weight:600;text-transform:capitalize;color:var(--app-text,#294967);padding:9px 13px;border:1px solid var(--app-border,#dce6f2);border-radius:8px;background:var(--app-bg,#f5f7fb)}
.street-month-identification{grid-template-columns:repeat(2,minmax(0,1fr));margin:22px 0 16px}
.street-month-identification>label{align-content:start!important;align-self:start;min-width:0}
.street-month-identification input{width:100%;margin:8px 0 0!important;min-width:0}
.street-month-rule{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 15px;border-radius:10px;border:1px solid var(--app-border,#dce6f2);background:var(--app-bg,#f5f7fb)}
.street-month-rule p{font-size:12px;line-height:1.7;margin:0;color:var(--app-muted,#6e819b)}
.street-month-rule button{white-space:nowrap;flex-shrink:0;font-size:11px}
.street-month-guidance{font-size:11px;line-height:1.8;color:var(--app-muted,#70839d);margin:12px 0 18px}
.street-month-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.street-month-summary>div{border:1px solid var(--app-border,#dce6f2);border-radius:10px;padding:15px;min-width:0}
.street-month-summary small{display:block;color:var(--app-muted,#70839d);font-size:11px}
.street-month-summary strong{display:block;font-size:23px;margin-top:7px;color:var(--app-text,#294967);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.street-month-summary strong span{font-size:17px;font-weight:400;color:var(--app-muted,#70839d)}
.street-month-summary .street-month-summary-pay{background:#edf5ff;border-color:#cddff5}
.street-month-summary-pay strong{color:#185cab}
.street-month-tablebox{max-width:100%;max-height:640px;overflow:auto;isolation:isolate;border-radius:10px}
.street-month-table{min-width:850px;width:100%;table-layout:fixed;font-size:12px}
.street-month-table th:first-child{width:78px}
.street-month-table th:nth-child(2),.street-month-table th:nth-child(3){width:95px}
.street-month-table th:nth-child(4),.street-month-table th:nth-child(6){width:135px}
.street-month-table th:nth-child(5){width:100px}
.street-month-table thead th{position:sticky;top:0;z-index:2;background:#eaf0f8;border-bottom:1px solid #d9e4f1;padding:14px 12px}
.street-month-table tbody th{font-weight:400;background:#f8fafd;position:sticky;left:0;z-index:1;border-bottom:1px solid var(--app-border,#dce6f2)}
.street-month-table tbody th strong{display:inline-block;font-size:15px;color:var(--app-text,#294967)}
.street-month-table tbody th small{display:block;font-size:10px;color:var(--app-muted,#70839d);margin-top:3px;text-transform:capitalize}
.street-month-table td,.street-month-table tbody th{padding:8px 11px;vertical-align:middle}
.street-month-table input{width:100%;min-width:0;height:37px;margin:0!important;padding:7px 9px;border-radius:7px;font-size:12px}
.street-month-table input:disabled{opacity:.65;background:var(--app-bg,#f5f7fb);cursor:not-allowed}
.street-month-table input[type=number]{text-align:right;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
.street-month-table input[type=number]::-webkit-inner-spin-button,.street-month-table input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.street-month-table .street-month-cash{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.street-month-table .street-month-factor{text-align:center;color:var(--app-muted,#70839d);font-variant-numeric:tabular-nums}
.street-month-table .street-month-pay{font-weight:700;color:#185cab}
.street-month-table .street-month-weekend td,.street-month-table .street-month-weekend th{background:#f5f8fc}
.street-month-table tbody tr:hover td,.street-month-table tbody tr:hover th{background:#edf4fd}
.street-month-table tbody tr:focus-within td,.street-month-table tbody tr:focus-within th{background:#edf4fd}
.street-month-table .street-month-invalid td{background:#fff0ed}
.street-month-table tfoot th,.street-month-table tfoot td{position:sticky;bottom:0;z-index:2;background:#eaf1fa;border-top:2px solid #d3e0ef;padding:15px 11px;font-weight:700}
.street-month-table tfoot td:nth-child(2),.street-month-table tfoot td:nth-child(3){text-align:right;font-variant-numeric:tabular-nums}
.street-month-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:19px}
.street-month-footer>p{font-size:11px;color:var(--app-muted,#70839d);line-height:1.7;margin:0;max-width:480px}
.street-month-footer .actions{margin:0;padding:0;border:0;flex-shrink:0;gap:12px}
.street-month-warning{background:#fff3e6;color:#925620;padding:12px 15px;border-radius:8px;font-size:12px}
[data-theme=dark] .street-month-summary .street-month-summary-pay{background:#1b3555;border-color:#3b5b83}
[data-theme=dark] .street-month-summary-pay strong,[data-theme=dark] .street-month-table .street-month-pay{color:#9bc6ff}
[data-theme=dark] .street-month-table thead th,[data-theme=dark] .street-month-table tfoot th,[data-theme=dark] .street-month-table tfoot td{background:#243b56;border-color:#40556f;color:#d4e2f5}
[data-theme=dark] .street-month-table tbody th{background:#17283e}
[data-theme=dark] .street-month-table .street-month-weekend td,[data-theme=dark] .street-month-table .street-month-weekend th{background:#1a2b41}
[data-theme=dark] .street-month-table tbody tr:hover td,[data-theme=dark] .street-month-table tbody tr:hover th,[data-theme=dark] .street-month-table tbody tr:focus-within td,[data-theme=dark] .street-month-table tbody tr:focus-within th{background:#243d59}
[data-theme=dark] .street-month-table .street-month-invalid td{background:#4b2c30}
[data-theme=dark] .street-month-warning{background:#514128;color:#ffe0ad}
@media(max-width:1000px){.street-month-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.street-month-footer{align-items:flex-start;flex-direction:column}.street-month-footer .actions{width:100%;justify-content:flex-end}}
@media(max-width:650px){.street-month-identification{grid-template-columns:1fr}.street-month-rule{align-items:flex-start;flex-direction:column;gap:8px}.street-month-summary{gap:9px}.street-month-summary>div{padding:12px}.street-month-summary strong{font-size:20px}.street-month-footer .actions{flex-wrap:wrap}.street-month-tablebox{max-height:530px}}
@media print{.street-month-rule button,.street-month-footer{display:none!important}.street-month-tablebox{max-height:none;overflow:visible}.street-month-table{min-width:0;font-size:8px}.street-month-table td,.street-month-table th{padding:5px!important}.street-month-table thead th,.street-month-table tfoot th,.street-month-table tfoot td,.street-month-table tbody th{position:static}.street-month-table input{height:auto;border:0;background:none;padding:0;font-size:8px}.street-month-summary strong{font-size:17px}}

.payment-mirror-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}.payment-mirror-heading h2{margin:0 0 7px}.payment-mirror-heading p{margin:0;color:#71869f;font-size:13px;line-height:1.6}.payment-mirror-heading .badge{white-space:nowrap}.payment-mirror-filters{display:grid;grid-template-columns:repeat(2,minmax(130px,.7fr)) repeat(3,minmax(140px,1fr));gap:16px;align-items:start}.payment-mirror-filters label{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:12px}.payment-mirror-filters input,.payment-mirror-filters select{width:100%;min-width:0;height:46px;margin:0}.payment-mirror-columns{margin-top:20px;padding:14px 0;border-top:1px solid #e1e9f2;border-bottom:1px solid #e1e9f2}.payment-mirror-columns summary{cursor:pointer;color:#215da4;font-weight:600;font-size:13px}.payment-mirror-columns fieldset{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin:18px 0 2px;border:0;padding:0;min-width:0}.payment-mirror-columns legend{font-size:12px;margin-bottom:14px;color:#74859a}.payment-mirror-columns label{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.4;min-width:0}.payment-mirror-columns input{width:16px;height:16px;min-width:16px;margin:0;accent-color:#215da4}.payment-mirror-columns label small{color:#8191a3;font-size:10px}.payment-mirror-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}.payment-mirror-actions button{min-height:44px}html[data-theme=dark] .payment-mirror-heading p,html[data-theme=dark] .payment-mirror-columns legend{color:#a9b8cb}html[data-theme=dark] .payment-mirror-columns{border-color:#35465a}html[data-theme=dark] .payment-mirror-columns summary{color:#90bbff}@media(max-width:1250px){.payment-mirror-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:850px){.payment-mirror-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.payment-mirror-columns fieldset{grid-template-columns:repeat(2,minmax(0,1fr))}.payment-mirror-heading{align-items:flex-start;flex-direction:column}}@media(max-width:500px){.payment-mirror-filters,.payment-mirror-columns fieldset{grid-template-columns:1fr}.payment-mirror-actions{align-items:stretch;flex-direction:column}.payment-mirror-actions button{width:100%}}

/* The ledger shares its colours and spacing with the payment reports. */
.ded-page, .ded-editor {
  --ledger-muted: #536a81;
  --ledger-accent: #154f88;
  --ledger-accent-bg: #edf5fd;
  --ledger-warn: #843e13;
  --ledger-warn-bg: #fff4e6;
  min-width: 0;
}
html[data-theme="dark"] :is(.ded-page,.ded-editor) {
  --ledger-muted: #afc2d6;
  --ledger-accent: #a6d1ff;
  --ledger-accent-bg: #1b3650;
  --ledger-warn: #ffcb9d;
  --ledger-warn-bg: #3a2d23;
}
.ded-head {display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:12px 24px}
.ded-head h2, .ded-editor h2 {margin:0 0 6px; line-height:1.3}
.ded-head p, .ded-identity p {max-width:72ch; margin:0; color:var(--ledger-muted); font-size:.92rem; line-height:1.6}
.ded-period, .ded-status {
  display:inline-flex; align-items:center; width:fit-content; max-width:100%;
  border-radius:20px; padding:.38em .82em; background:var(--app-bg); color:var(--ledger-muted);
  font-size:.81rem; line-height:1.45; white-space:normal;
}
.ded-period {border:1px solid var(--app-border); font-variant-numeric:tabular-nums}
.ded-filters {display:grid; grid-template-columns:minmax(190px,1.55fr) repeat(3,minmax(130px,1fr)) auto; align-items:end; gap:14px; margin:22px 0}
.ded-filters label, .ded-form-grid label {display:grid; align-content:start; gap:7px; margin:0; min-width:0; font-size:.87rem; font-weight:600}
.ded-filters input, .ded-filters select, .ded-form-grid input, .ded-form-grid textarea {width:100%; min-width:0; height:44px; margin:0; font:inherit; font-weight:400}
.ded-form-grid textarea {height:auto; min-height:70px; padding:10px 12px; line-height:1.5; resize:vertical; border:1px solid var(--app-border); border-radius:8px; color:var(--app-text); background:var(--app-surface)}
.ded-filters button, .ded-form-actions button {min-height:44px}
.ded-totals {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0}
.ded-tile {padding:15px 16px; border:1px solid var(--app-border); border-radius:10px; background:var(--app-bg); min-width:0}
.ded-tile dt {color:var(--ledger-muted); font-size:.82rem; line-height:1.4}
.ded-tile dd {margin:6px 0 0; color:var(--app-text); font-size:clamp(1rem,1.7vw,1.55rem); font-weight:700; line-height:1.3; letter-spacing:-.02em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere}
.ded-tile-liquido {background:var(--ledger-accent-bg)}
.ded-tile-liquido dt, .ded-tile-liquido dd {color:var(--ledger-accent)}
.ded-count {margin:16px 2px 8px; font-size:.83rem; color:var(--ledger-muted)}
.ded-tablebox {max-width:100%; overflow:auto; scrollbar-width:thin}
.ded-table {min-width:780px; width:100%; font-variant-numeric:tabular-nums; border-spacing:0}
.ded-table th, .ded-table td {padding:12px 11px; vertical-align:middle}
.ded-table tbody th {min-width:155px; max-width:300px; white-space:normal; overflow-wrap:anywhere; border-top:1px solid var(--app-border); background:var(--app-surface); color:var(--app-text)}
.ded-table tbody th small {display:block; margin-top:4px; font-weight:400; color:var(--ledger-muted); line-height:1.4}
.ded-table tbody td:nth-child(2) {max-width:165px; white-space:normal}
.ded-table .ded-number {text-align:right; white-space:nowrap}
.ded-table .ded-net {font-weight:700}
.ded-table tfoot th, .ded-table tfoot td {background:var(--ledger-accent-bg); color:var(--ledger-accent); font-weight:700; border-top:1px solid var(--app-border)}
.ded-open, .ded-item-actions button {font-size:.84rem; min-height:40px}
.ded-mark {color:var(--ledger-accent); background:var(--ledger-accent-bg)}
.ded-pending, .ded-warning {color:var(--ledger-warn); background:var(--ledger-warn-bg)}
.ded-page :focus-visible, .ded-editor :focus-visible {outline:3px solid #3686ca; outline-offset:2px}
.ded-identity small {display:block; font-size:.85rem; color:var(--ledger-muted); margin:0 0 6px}
.ded-editor h2, .ded-identity p {overflow-wrap:anywhere}
.ded-editor h3 {font-size:1rem; margin:0 0 12px}
.ded-history {list-style:none; padding:0; margin:0}
.ded-history li {display:flex; align-items:start; justify-content:space-between; gap:16px; border-top:1px solid var(--app-border); padding:12px 0}
.ded-history li > div {min-width:0}
.ded-history li > div:last-child {text-align:right; flex-shrink:0}
.ded-history time, .ded-no-history {color:var(--ledger-muted); font-size:.85rem}
.ded-history p {margin:3px 0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55}
.ded-history strong, .ded-preview strong {font-variant-numeric:tabular-nums}
.ded-item-actions {display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; margin-top:5px}
.ded-item-actions button {padding:5px 10px}
.ded-entry, .ded-confirm {margin-top:18px; padding-top:18px; border-top:1px solid var(--app-border)}
.ded-form-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px}
.ded-wide {grid-column:1/-1}
.ded-preview {display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 16px; margin:14px 0 6px; padding:12px 14px; border-radius:8px; color:var(--ledger-accent); background:var(--ledger-accent-bg); font-size:.9rem}
.ded-form-actions {display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; padding-top:16px}
.ded-warning, .ded-confirm p {padding:12px 14px; border-radius:8px; overflow-wrap:anywhere}
.ded-confirm p {background:var(--ledger-warn-bg); color:var(--ledger-warn)}
@media (max-width:1250px) {
  .ded-filters {grid-template-columns:repeat(2,minmax(0,1fr))}
  .ded-clear {justify-self:start}
}
@media (max-width:620px) {
  .ded-filters {gap:12px}
  .ded-totals {gap:8px}
  .ded-tile {padding:10px}
  .ded-open, .ded-item-actions button {min-height:44px}
  .ded-form-grid {grid-template-columns:1fr}
}
@media (max-width:450px) {
  .ded-filters {grid-template-columns:1fr}
  .ded-totals {grid-template-columns:1fr}
  .ded-tile {display:flex; justify-content:space-between; align-items:center; gap:10px}
  .ded-tile dd {margin:0; text-align:right}
  .ded-history li {flex-wrap:wrap}
  .ded-history li > div:last-child {text-align:left}
  .ded-item-actions {justify-content:flex-start}
}


.host-account{display:flex;align-items:center;gap:10px;font-size:11px}.host-account form{margin:0}.host-account button{font-size:11px;padding:7px 11px}.hosted-cron-command{display:block;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;border:1px solid var(--app-border);background:var(--app-bg);border-radius:8px;font-size:12px}.hosted-signout{padding:7px 12px}
