
:root{--bg:#eef3f7;--panel:rgba(255,255,255,.88);--ink:#172536;--muted:#64748b;--line:#dce5ed;--accent:#087f70;--accent2:#0c9b83;--bad:#c62828;--good:#087f45;--shadow:0 12px 32px rgba(24,48,70,.09)}*{box-sizing:border-box}body{margin:0;background:linear-gradient(135deg,#eaf3f2,#f4f7fb 55%,#e7eef5);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink)}header{padding:20px clamp(14px,3vw,38px);background:linear-gradient(110deg,#073f3c,#087f70);color:white;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}header h1{font-size:clamp(20px,3vw,28px);margin:0}header p{margin:4px 0 0;color:#c8e8e2;font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap}button{border:0;border-radius:10px;padding:10px 14px;font-weight:650;cursor:pointer;font-size:14px}.btn-light{background:#ffffff;color:#07584f}.btn-ghost{background:#ffffff20;color:white;border:1px solid #ffffff55}.btn-main{background:var(--accent);color:white}.btn-soft{background:#e8f4f1;color:#086b5f}.btn-danger{background:#fff0f0;color:#a51e1e}.wrap{max-width:1440px;margin:auto;padding:20px clamp(12px,2.5vw,30px) 48px}.meta{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;margin-bottom:16px}.field,.panel{background:var(--panel);border:1px solid #ffffff;box-shadow:var(--shadow);border-radius:16px;padding:15px}.field label,.mini-label{display:block;color:var(--muted);font-size:12px;font-weight:700;margin-bottom:7px}input,select{font:inherit;color:var(--ink)}.field input{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px;background:white}.grid{display:grid;grid-template-columns:1.05fr .95fr;gap:16px}.panel h2{font-size:18px;margin:0 0 4px}.sub{font-size:12px;color:var(--muted);margin:0 0 14px}.money-table{width:100%;border-collapse:collapse}.money-table th{font-size:12px;color:var(--muted);font-weight:700;background:#f3f7f8}.money-table th,.money-table td{padding:8px 7px;border-bottom:1px solid var(--line);text-align:right}.money-table th:first-child,.money-table td:first-child{text-align:left}.money-table td:nth-child(2){text-align:center;color:#425466}.money-table input{width:100%;min-width:82px;padding:9px 8px;text-align:right;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:16px}.money-table input:focus,.field input:focus,.doc-name:focus{outline:2px solid #83cfc1;border-color:var(--accent)}.sumline{display:flex;justify-content:space-between;align-items:center;padding:13px 4px 0;font-weight:750}.sumline strong{font-size:19px;color:var(--accent)}.doc-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px}.doc-list{display:flex;flex-direction:column;gap:7px}.doc-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(90px,145px) 36px;gap:7px;align-items:center}.doc-name{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff}.doc-amount{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;text-align:right;font-size:15px}.icon-btn{padding:7px 9px;background:#fff0f0;color:#a51e1e;border-radius:8px}.doc-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:8px;flex-wrap:wrap}.totals{margin-top:16px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.metric{background:var(--panel);border:1px solid white;box-shadow:var(--shadow);border-radius:15px;padding:16px}.metric span{font-size:12px;color:var(--muted);font-weight:700}.metric strong{display:block;font-size:clamp(20px,3vw,26px);margin-top:5px}.recon{margin-top:16px;background:linear-gradient(120deg,#fff,#f0f8f6);border:1px solid #d9eae5;border-radius:16px;padding:18px;box-shadow:var(--shadow)}.recon h2{margin:0 0 12px;font-size:18px}.recon-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.recon input{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px;background:white;font-size:17px;text-align:right}.difference{margin-top:15px;padding:15px;border-radius:12px;background:#edf7f1;display:flex;justify-content:space-between;align-items:center;gap:10px}.difference strong{font-size:25px}.positive{color:var(--good)}.negative{color:var(--bad);background:#fff0f0}.note{color:var(--muted);font-size:12px;margin-top:12px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.status{font-size:12px;color:#d8f6ed;align-self:center}.zoom{display:flex;gap:6px;align-items:center;color:#fff;font-size:12px}.zoom button{padding:7px 10px}.hidden{display:none!important}@media(max-width:850px){.grid{grid-template-columns:1fr}.meta{grid-template-columns:1fr 1fr}.meta .field:first-child{grid-column:1/-1}}@media(max-width:520px){header{align-items:flex-start}.meta,.totals,.recon-grid{grid-template-columns:1fr}.doc-row{grid-template-columns:minmax(80px,1fr) minmax(90px,120px) 34px}.money-table th,.money-table td{padding:7px 4px}.money-table input{min-width:68px;padding:9px 5px}.wrap{padding-top:12px}.metric{padding:13px}.actions{width:100%}.actions button{flex:1}}
@media print{body{background:white}.actions,.toolbar,.icon-btn,.doc-head button,.zoom{display:none!important}.wrap{max-width:none;padding:0}.panel,.field,.metric,.recon{box-shadow:none;border:1px solid #ddd;break-inside:avoid}header{background:#fff!important;color:#111;padding:10px 0}header p{color:#555}.grid{grid-template-columns:1fr 1fr}.meta{grid-template-columns:1.4fr 1fr 1fr}.money-table input,.doc-amount,.doc-name,.recon input,.field input{border:0;padding:2px;background:transparent}.note{color:#555}}

/* Compact pink-glass layout based on the supplied reference */
:root{--bg:#fff0f3;--panel:rgba(255,255,255,.82);--ink:#252331;--muted:#8b6872;--line:#ffd0d9;--accent:#d7194b;--accent2:#ef4770;--bad:#e11d48;--good:#079447;--shadow:0 5px 18px rgba(177,52,83,.10)}
body{background:linear-gradient(145deg,#ffe9ee,#fff7f8 48%,#ffdfe7);color:var(--ink);font-size:13px}
header{margin:8px 8px 0;padding:10px 12px;background:rgba(255,255,255,.58);color:#c31948;border:1px solid #fff;border-radius:14px;box-shadow:var(--shadow);min-height:48px}
header h1{font-size:16px;color:#c31948}header p{display:none}
header .actions{gap:6px;align-items:center}.status{display:none}
.btn-light,.btn-ghost,.btn-main,.btn-soft,.btn-danger{border-radius:7px}
.btn-light{background:#34445a;color:#fff}.btn-ghost{background:#fff;color:#c31948;border:1px solid #ffb7c7}
.zoom{color:#c31948;gap:3px}.zoom button{padding:4px 7px;font-size:11px}
header .actions>button{display:none}
.wrap{max-width:900px;margin:auto;padding:8px 8px 12px}
.meta{display:flex;justify-content:flex-end;gap:6px;margin:0 0 8px}
.meta .field{padding:5px 8px;border-radius:8px;box-shadow:none;background:#fff9fa;border-color:#ffd0d9}
.meta .field:first-child{display:none}.meta .field label{display:none}
.meta .field input{width:auto;min-width:110px;padding:4px 6px;border:0;background:transparent;font-size:11px}
.grid{grid-template-columns:1fr 1fr;gap:8px}
.panel{padding:9px;border-radius:11px;box-shadow:var(--shadow);border-color:#fff}
.panel h2{font-size:12px;color:#c31948}.sub{font-size:10px;margin-bottom:7px}
.money-table th{font-size:9px;color:#bd3154;background:#fff3f6}
.money-table th,.money-table td{padding:4px 3px;border-bottom:1px solid #f8e4e9;font-size:10px}
.money-table input{min-width:40px;padding:4px 5px;font-size:11px;border:1px solid #ff9eb4;border-radius:6px}
.money-table td:nth-child(2){font-size:9px}
.sumline{padding:7px 2px 0;font-size:10px;color:#c31948}.sumline strong{font-size:12px;color:#e11d48}
.doc-head{margin-bottom:6px}.doc-head .sub{display:none}
.doc-head button{padding:5px 8px;font-size:9px;background:#d7194b;color:white}
.doc-list{gap:4px}.doc-row{grid-template-columns:minmax(55px,1fr) minmax(55px,76px) 25px;gap:4px}
.doc-name,.doc-amount{padding:4px 5px;border:1px solid #ff9eb4;border-radius:6px;font-size:10px;min-width:0}
.icon-btn{padding:3px 5px;font-size:10px}
.doc-footer{margin-top:6px;font-size:10px;color:#c31948}.doc-footer strong{font-size:12px!important;color:#e11d48!important}
.totals{display:none}
.recon{margin-top:8px;padding:8px;border-radius:11px;background:rgba(255,255,255,.78);border:1px solid white;box-shadow:var(--shadow)}
.recon h2{display:none}.recon-grid{display:flex;flex-direction:column;gap:5px}
.recon-grid>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 7px;border-radius:7px;background:#fff9fa;min-height:31px}
.recon-grid label{font-size:9px;color:#6f5960;margin:0;flex:1}
.recon input{width:98px;max-width:40%;padding:4px 6px;border:1px solid #ff9eb4;border-radius:6px;font-size:11px;font-weight:700}
#safeAdd{background:#fff4d6;border-color:#ffb000}#adjusted{background:#fff;color:#bd1744}#differenceInput{background:#fff;color:#07863e}
.difference{margin-top:5px;padding:6px 8px;border-radius:7px;background:#fff8fa;border:1px solid #ff9eb4}
.difference span{font-size:9px;color:#c31948}.difference small{display:none!important}.difference strong{font-size:12px}
.note{font-size:9px;margin-top:6px}.recon .note{display:none}.toolbar{display:none}
.bottom-actions{display:grid;grid-template-columns:1.2fr .9fr .9fr;gap:6px;margin-top:8px}
.bottom-actions button{padding:8px 5px;font-size:10px;border-radius:6px}
.bottom-actions .btn-main{background:#a91443;color:#fff}.bottom-actions .btn-soft{background:#ed8a00;color:#fff}
.bottom-actions .btn-light{background:#34445a;color:#fff}
@media(max-width:520px){header{margin:6px 6px 0;padding:8px}header h1{font-size:13px}.wrap{padding:6px}.meta{margin-bottom:6px}.meta .field input{min-width:95px;font-size:10px}.grid{grid-template-columns:1fr 1fr;gap:6px}.panel{padding:7px}.money-table th,.money-table td{padding:4px 2px}.money-table input{min-width:30px;padding:4px 2px}.doc-row{grid-template-columns:minmax(45px,1fr) minmax(48px,68px) 22px;gap:3px}.doc-name,.doc-amount{padding:4px 3px;font-size:9px}.recon{padding:7px}}
@media(max-width:370px){.grid{grid-template-columns:1fr}.meta .field input{min-width:85px}}
@media print{body{background:#fff}header{margin:0;border:0;box-shadow:none}.wrap{padding:0}.grid{grid-template-columns:1fr 1fr}.meta .field:first-child{display:none}.recon{box-shadow:none}.bottom-actions{display:none!important}}


/* User-selectable appearance; appended after reference layout */
body{background:linear-gradient(140deg,var(--theme-bg1,#ffe9ee),var(--theme-bg2,#fff7f8) 55%,var(--theme-bg3,#ffdfe7));transition:background .2s,color .2s}
header h1,.panel h2,.sumline,.doc-footer,.zoom,.difference span{color:var(--accent)!important}
header{background:var(--theme-header,rgba(255,255,255,.65))}
.panel,.recon{background:var(--panel);border-color:var(--theme-border,#fff)}
.recon-grid>div{background:var(--theme-row,#fff9fa)}
.money-table th{background:var(--theme-row,#fff9fa);color:var(--accent)}
.money-table td{border-color:var(--line)}
.money-table input,.doc-name,.doc-amount,.recon input{border-color:var(--theme-input,#ff9eb4);background:var(--theme-field,#fff);color:var(--ink)}
.btn-main,.doc-head button,.bottom-actions .btn-main{background:var(--accent);color:#fff}
.btn-soft,.bottom-actions .btn-soft{background:var(--theme-secondary,#ed8a00);color:#fff}
.sumline strong,.doc-footer strong{color:var(--accent)!important}
.theme-toggle{border:1px solid var(--line);background:var(--panel);color:var(--ink);padding:6px 10px;font-size:11px;border-radius:7px}
header .actions>.theme-toggle{display:inline-flex!important;align-items:center;gap:4px}
.theme-dialog{position:fixed;inset:0;background:#0d1429a8;z-index:1000;display:none;align-items:center;justify-content:center;padding:15px}
.theme-dialog.open{display:flex}
.theme-panel{background:var(--panel);color:var(--ink);width:min(460px,100%);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 20px 65px #0004;max-height:90vh;overflow:auto;backdrop-filter:blur(20px)}
.theme-panel h2{font-size:18px;margin:0 0 12px}.theme-swatches{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.theme-swatch{background:var(--theme-row,#fff);border:2px solid var(--line);border-radius:10px;padding:7px 4px;color:var(--ink);font-size:11px;display:flex;align-items:center;flex-direction:column;gap:4px}
.theme-swatch.selected{border-color:var(--accent);outline:1px solid var(--accent)}
.theme-dot{display:block;width:35px;height:26px;border-radius:6px}
.theme-controls{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;align-items:center}
.theme-controls label{display:flex;align-items:center;gap:6px;font-size:12px}.theme-controls input[type=color]{width:42px;height:32px;padding:2px;border-radius:6px}
.theme-panel .theme-footer{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.theme-panel .theme-footer button{padding:9px 12px;font-size:12px}
body[data-mode=dark] .theme-panel,body[data-mode=dark] .field{background:var(--panel)}
body[data-mode=dark] .difference{background:var(--theme-row)}
body[data-mode=dark] .doc-row input,body[data-mode=dark] .field input{background:var(--theme-field);color:var(--ink)}
@media print{.theme-toggle,.theme-dialog{display:none!important}}

/* V4: numeric-only denomination labels; blank document amount fields */
body,body *{font-weight:700!important}
.money-table th:nth-child(1),.money-table td:nth-child(1){text-align:left}
.money-table th:nth-child(2),.money-table td:nth-child(2){text-align:center}
.money-table th:nth-child(3),.money-table td:nth-child(3){text-align:right}
.money-table input{min-width:0;width:100%;font-weight:800}
.money-table td:first-child{white-space:nowrap}
.recon-grid>div{min-height:35px}
.recon-grid .summary-highlight{border:1px solid var(--theme-input,#ff9eb4);background:var(--theme-field,#fff);color:var(--accent)}
.recon-grid .summary-highlight label{color:var(--accent)}
.recon-grid output{font-size:12px;color:var(--accent);text-align:right;min-width:90px}
.recon-grid .red-label{color:#e11d48}
.recon-grid .summary-result{background:var(--theme-field,#fff)}
.recon-grid .summary-result label{color:#e11d48}
.recon-grid .summary-result input{color:#079447;border:0;background:transparent}
.recon-grid .summary-result input.negative{color:#e11d48}
.recon-grid .summary-highlight input{border:0;background:transparent;color:var(--accent)}
@media(max-width:520px){.money-table th,.money-table td{font-size:10px}.money-table input{font-size:11px}}

/* V5: keyboard navigation */
.money-table input:focus-visible,.doc-row input:focus-visible,.recon input:focus-visible,.meta input:focus-visible{outline:2px solid var(--accent)!important;outline-offset:1px}
/* V4: never display a hint in document amount inputs */
.doc-amount::placeholder{color:transparent!important;opacity:0!important}

/* V6: calculated quantity column, always read-only */
.money-table{table-layout:fixed}
.money-table th:nth-child(1){width:24%}
.money-table th:nth-child(2){width:34%}
.money-table th:nth-child(3){width:20%}
.money-table th:nth-child(4){width:22%}
.money-table th,.money-table td{padding-left:3px;padding-right:3px}
.money-table th:nth-child(3),.money-table td:nth-child(3){text-align:right}
.money-table th:nth-child(4),.money-table td:nth-child(4){text-align:right}
.money-table .count-total{color:var(--accent);font-variant-numeric:tabular-nums}
.money-table td:first-child{white-space:nowrap}
@media(max-width:520px){.money-table th,.money-table td{font-size:9px}.money-table input{font-size:11px;padding:5px 3px}.money-table th:nth-child(1){width:24%}.money-table th:nth-child(2){width:31%}.money-table th:nth-child(3){width:20%}.money-table th:nth-child(4){width:25%}}

/* V9: responsive across phone, tablet, notebook and desktop */
html{width:100%;-webkit-text-size-adjust:100%}
body{min-width:0;overflow-x:hidden}
.wrap,.grid,.panel,.recon,.recon-grid{min-width:0}
input,button{touch-action:manipulation}
input:focus-visible,button:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px}
.money-table{width:100%;table-layout:fixed}
.money-table th,.money-table td{overflow-wrap:normal;min-width:0}
.money-table input{min-width:0;max-width:100%}
.doc-row{min-width:0}
.doc-row input{min-width:0}
@media(min-width:1100px){.wrap{max-width:1440px}.grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.panel{padding:14px}.money-table input,.doc-name,.doc-amount{font-size:15px}}
@media(min-width:701px) and (max-width:1099px){.wrap{max-width:100%;padding:12px}.grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.panel{padding:10px}.money-table th,.money-table td{font-size:11px;padding:7px 3px}.money-table input{font-size:14px}.doc-name,.doc-amount{font-size:13px}.doc-row{grid-template-columns:minmax(0,1fr) minmax(75px,90px) 26px}}
@media(max-width:700px){
 header{gap:7px;flex-wrap:wrap}header .actions{min-width:0;justify-content:flex-end}
 .wrap{width:100%;max-width:100%;padding:8px 7px 16px}
 .grid{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:10px}
 .panel{width:100%;min-width:0;padding:10px}
 .meta{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
 .meta .field{min-width:0;max-width:100%}
 .money-table th,.money-table td{font-size:clamp(10px,2.5vw,13px);padding:7px 3px}
 .money-table input{font-size:16px!important;min-height:40px;padding:7px 4px}
 .money-table th:nth-child(1){width:23%}.money-table th:nth-child(2){width:34%}.money-table th:nth-child(3){width:20%}.money-table th:nth-child(4){width:23%}
 .doc-row{grid-template-columns:minmax(0,1fr) minmax(75px,31%) 32px;gap:6px}
 .doc-name,.doc-amount{font-size:16px!important;min-height:40px;padding:7px}
 .icon-btn{min-height:40px;padding:5px}
 .recon{margin-top:10px;padding:10px}.recon-grid{gap:7px}
 .recon-grid>div{min-width:0;min-height:43px;padding:7px;gap:6px}
 .recon-grid label{font-size:clamp(11px,2.6vw,14px)}
 .recon-grid input{font-size:16px!important;min-height:36px;max-width:45%;width:130px}
 .recon-grid output{min-width:0;font-size:14px}
 .bottom-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .bottom-actions button{min-height:44px;font-size:12px;padding:7px 3px}
 .theme-panel{max-width:min(95vw,500px);max-height:85dvh;overflow-y:auto}
}
@media(max-width:360px){.money-table th,.money-table td{font-size:10px}.money-table input{padding:5px 2px}.money-table th:nth-child(1){width:24%}.money-table th:nth-child(2){width:30%}.money-table th:nth-child(3){width:21%}.money-table th:nth-child(4){width:25%}.bottom-actions button{font-size:11px}}
@media print{.grid{grid-template-columns:1fr 1fr!important}.panel{padding:8px}.money-table input,.doc-name,.doc-amount{font-size:11px!important;min-height:0}.bottom-actions{display:none!important}}

/* Zoom buttons stay visible and usable at mobile widths. */
.zoom{display:flex!important;align-items:center;gap:4px;white-space:nowrap}
.zoom button{min-width:34px;min-height:30px;padding:5px 7px;touch-action:manipulation}
#zoomReset{min-width:55px;font-variant-numeric:tabular-nums}
@media(max-width:520px){header .actions{display:flex;align-items:center}.zoom{margin-left:auto}}
@media print{main.wrap{zoom:1!important}}

/* Three-page cash counter */
.page-tabs{display:flex;gap:7px;margin:0 0 10px;flex-wrap:wrap}.page-tabs button{border:1px solid var(--accent);border-radius:9px;padding:10px 13px;background:var(--panel);color:var(--accent);font-weight:800;cursor:pointer}.page-tabs button.active{background:var(--accent);color:white}.count-page[hidden]{display:none!important}.extra-page{margin:8px 0}.extra-page .panel{max-width:850px;margin:auto}.extra-page .money-table input{width:100%;min-width:70px}.extra-summary{margin-top:10px;display:flex;justify-content:space-between;align-items:center;padding:12px;border:1px solid var(--accent);border-radius:9px;font-weight:800}.extra-note{margin:10px 0;color:var(--muted);font-size:12px}.extra-actions{display:flex;gap:8px;justify-content:flex-end;margin:10px 0}.extra-actions button{padding:9px 14px;border-radius:8px;border:1px solid var(--accent);background:var(--panel);color:var(--accent);font-weight:800;cursor:pointer}.money-table td,.money-table th{font-weight:800!important}@media(max-width:600px){.page-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.page-tabs button{padding:9px 3px;font-size:11px}.extra-page .money-table input{min-width:35px}}

.safe-doc-section{margin-top:16px;padding-top:12px;border-top:2px solid var(--line)}
.safe-doc-section h2{margin-bottom:10px}.safe-doc-section .doc-row{margin-bottom:7px}
.safe-doc-section button{font-weight:700}.safe-grand{margin-top:12px;border:2px solid var(--accent);border-radius:9px;padding:12px;font-weight:800}
.safe-doc-section input{font-weight:700;min-width:0}
#addSafeDoc{margin-bottom:9px}
#safeDocRows{display:flex;flex-direction:column;gap:7px}

/* V17: Larger, bolder figures on phones across all three counting pages */
@media (max-width:700px){
  .money-table th,.money-table td{font-size:clamp(12px,3.2vw,15px)!important;font-weight:800!important;line-height:1.35}
  .money-table input{font-size:clamp(17px,4.3vw,20px)!important;font-weight:800!important;min-height:46px!important;line-height:1.25}
  .money-table td:last-child,.money-table td:nth-last-child(2),.money-table output,.money-table strong{font-size:clamp(13px,3.6vw,17px)!important;font-weight:800!important}
  .doc-name,.doc-amount,.safe-doc-section input,#pettyPage input:not([type=color]){font-size:17px!important;font-weight:800!important;min-height:46px}
  .doc-footer,.doc-footer strong,.sumline,.sumline strong,.extra-summary,.safe-grand,.petty-grand{font-size:clamp(15px,3.8vw,19px)!important;font-weight:800!important}
  .recon-grid label,.recon-grid output,.recon-grid input,.summary-result input,.summary-highlight output{font-size:clamp(14px,3.5vw,18px)!important;font-weight:800!important}
  .recon-grid input{min-height:42px!important}
  .panel h2,.safe-doc-section h2,.extra-page h2{font-size:17px!important;font-weight:800!important}
  .page-tabs button{font-size:clamp(12px,3.1vw,15px)!important;font-weight:800!important}
  .bottom-actions button,.extra-actions button{font-size:14px!important;font-weight:800!important;min-height:46px}
  .money-table{width:100%;table-layout:fixed}
  .money-table td,.money-table th{overflow-wrap:anywhere}
  .money-table input{width:100%;min-width:0;box-sizing:border-box}
}
@media (max-width:390px){
  .money-table th,.money-table td{padding:6px 2px!important;font-size:12px!important}
  .money-table input{font-size:16px!important;padding:6px 2px!important}
  .money-table td:last-child,.money-table td:nth-last-child(2){font-size:12px!important}
}
@media print{.money-table input,.doc-name,.doc-amount{font-size:12px!important;min-height:0!important}}

/* V18: Three distinct navigation colors, preserved across themes. */
.page-tabs button[data-page="front"]{--tab-color:#d91b50;--tab-hover:#b5123f}
.page-tabs button[data-page="safe"]{--tab-color:#1769c2;--tab-hover:#10549d}
.page-tabs button[data-page="petty"]{--tab-color:#13885b;--tab-hover:#0b6945}
.page-tabs button{border-color:var(--tab-color)!important;color:var(--tab-color)!important;background:var(--panel)!important;transition:background .15s,color .15s,box-shadow .15s}
.page-tabs button:hover{background:color-mix(in srgb,var(--tab-color) 10%,var(--panel))!important}
.page-tabs button.active{background:var(--tab-color)!important;border-color:var(--tab-color)!important;color:#fff!important;box-shadow:0 3px 10px color-mix(in srgb,var(--tab-color) 30%,transparent)}
.page-tabs button.active:hover{background:var(--tab-hover)!important}
.page-tabs button:focus-visible{outline:3px solid var(--tab-color);outline-offset:3px}

/* V19: larger add-document button on the front-counter page only */
#addDoc{font-size:14px!important;font-weight:800!important;padding:11px 17px!important;min-height:44px!important;min-width:135px;border-radius:10px!important;white-space:nowrap}
@media(max-width:520px){#addDoc{font-size:13px!important;padding:10px 13px!important;min-height:44px!important;min-width:124px}}

/* V21: user-selected numeric text color, independent of theme and autosaved amounts */
:root{--number-color:#202b3d}
.money-table tbody td:first-child,.money-table tbody td:last-child,
.money-table .count-total,.money-table .count-qty,
.money-table input,.doc-amount,.doc-footer strong,.sumline strong,
.extra-summary strong,.extra-summary input,.recon input,
.recon-grid input,.difference strong,.metric strong,
.summary-highlight input,.summary-result input,
#pettyDifference,#safeGrandTotal,#pettyGrandTotal,
#safeDocTotal,#pettyDocTotal,#safePageTotal,#pettyPageTotal,
#cashTotal,#docsTotal,#differenceInput,#adjusted,
#dailySales,#pettyLimit{color:var(--number-color)!important}
/* V44: petty-cash difference is green when surplus or exactly balanced, red when short. */
#pettyDifference.positive{color:var(--good)!important}
/* A deficit must remain immediately recognizable even with a custom numeric color. */
#differenceInput.negative,#pettyDifference.negative,.negative input,.negative strong{color:var(--bad)!important}
.number-color-control{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 4px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--theme-row,#fff9fa)}
.number-color-control label{font-weight:800;flex:1;min-width:120px}
.number-color-control input[type=color]{width:54px;height:38px;padding:3px;border-radius:8px;border:1px solid var(--line);cursor:pointer;background:var(--theme-field,#fff)}
.number-color-control button{font-size:12px;padding:8px 10px}
@media print{.number-color-control{display:none}}

/* V23: financial alignment, larger readable typography, and one difference result */
:root{font-variant-numeric:tabular-nums lining-nums}
.money-table{font-variant-numeric:tabular-nums lining-nums}
.money-table th:nth-child(3),.money-table th:nth-child(4),
.money-table td:nth-child(3),.money-table td:nth-child(4){text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.money-table td:nth-child(2) input{text-align:right!important}
.money-table th,.money-table td{vertical-align:middle}
.doc-amount,.recon-grid input,.extra-summary input,.summary-result input{text-align:right!important;font-variant-numeric:tabular-nums lining-nums}
.doc-footer strong,.sumline strong,.extra-summary strong,.summary-highlight output,
.summary-result input,.summary-highlight input,.recon-grid input{
 font-variant-numeric:tabular-nums lining-nums;white-space:nowrap;
}
.recon{padding:clamp(12px,2.2vw,22px)!important}
.recon-grid{gap:9px!important}
.recon-grid>div{min-height:51px!important;padding:10px 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
.recon-grid label,.recon-grid .summary-highlight label,.recon-grid .summary-result label{
 font-size:clamp(14px,1.25vw,18px)!important;line-height:1.45!important;flex:1;min-width:0;
}
.recon-grid input,.recon-grid output{font-size:clamp(16px,1.55vw,21px)!important;font-weight:800!important;text-align:right!important;flex:0 0 auto}
.recon-grid input{width:clamp(118px,24%,190px)!important;max-width:45%!important;min-height:39px!important}
.recon-grid .summary-highlight input{padding-right:0!important}
.recon-grid output{min-width:125px!important}
#differenceBox #diffValue{display:none!important}
#differenceBox #differenceInput{display:block!important;border:1px solid var(--theme-input,#ff9eb4)!important;background:var(--theme-field,#fff)!important;border-radius:7px!important}
.panel h2,.safe-doc-section h2{font-size:clamp(17px,1.55vw,21px)!important}
.money-table th{font-size:clamp(12px,1.1vw,15px)!important}
.money-table tbody td{font-size:clamp(14px,1.15vw,18px)!important}
.money-table tbody input,.doc-name,.doc-amount{font-size:clamp(16px,1.3vw,19px)!important}
.sumline,.doc-footer,.extra-summary{font-size:clamp(15px,1.4vw,20px)!important}
.sumline strong,.doc-footer strong,.extra-summary strong{font-size:clamp(17px,1.6vw,22px)!important}
@media(max-width:700px){
 .recon-grid>div{padding:10px 8px!important;min-height:54px!important}
 .recon-grid label,.recon-grid .summary-highlight label,.recon-grid .summary-result label{font-size:clamp(13px,3.6vw,16px)!important}
 .recon-grid input,.recon-grid output{font-size:clamp(15px,4.2vw,19px)!important}
 .recon-grid input{width:clamp(105px,32%,160px)!important;max-width:44%!important}
 .recon-grid output{min-width:0!important}
 .money-table th{font-size:clamp(11px,2.9vw,14px)!important}
 .money-table tbody td{font-size:clamp(12px,3.2vw,16px)!important}
 .money-table tbody input{font-size:clamp(15px,4vw,19px)!important}
}
@media(max-width:390px){
 .money-table th{font-size:11px!important}
 .money-table tbody td{font-size:12px!important}
 .money-table tbody input{font-size:16px!important}
 .recon-grid label{font-size:13px!important}
}


/* V24: aligned document amounts and reconciliation figures */
#frontPage .doc-row{grid-template-columns:minmax(0,1fr) minmax(135px,180px) 30px!important;column-gap:7px!important;align-items:center}
#frontPage .doc-row .doc-amount{width:100%!important;min-width:0!important;text-align:right!important;padding:8px 10px!important;box-sizing:border-box;font-variant-numeric:tabular-nums lining-nums}
#frontPage .doc-row .doc-name{min-width:0!important}
#frontPage .doc-footer{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(135px,180px) 30px!important;gap:7px!important;align-items:center!important;flex-wrap:nowrap!important}
#frontPage .doc-footer strong{grid-column:2;text-align:right!important;width:100%;padding-right:10px;box-sizing:border-box}
#frontPage .doc-footer> :first-child{grid-column:1}
.recon-grid>div{display:grid!important;grid-template-columns:minmax(0,1fr) 190px!important;align-items:center!important;column-gap:12px!important}
.recon-grid>div>label{min-width:0!important}
.recon-grid>div>input,.recon-grid>div>output{grid-column:2!important;width:100%!important;max-width:none!important;min-width:0!important;text-align:right!important;justify-self:stretch!important;box-sizing:border-box!important;padding-right:10px!important;font-variant-numeric:tabular-nums lining-nums!important}
.recon-grid .summary-highlight input{padding-right:10px!important}
@media(max-width:700px){
 #frontPage .doc-row{grid-template-columns:minmax(0,1fr) minmax(108px,34%) 30px!important;gap:5px!important}
 #frontPage .doc-footer{grid-template-columns:minmax(0,1fr) minmax(108px,34%) 30px!important;gap:5px!important}
 #frontPage .doc-row .doc-amount{padding:7px 6px!important}
 #frontPage .doc-footer strong{padding-right:6px}
 .recon-grid>div{grid-template-columns:minmax(0,1fr) minmax(112px,34%)!important;gap:7px!important}
 .recon-grid>div>input,.recon-grid>div>output{padding-right:7px!important}
}
@media(max-width:360px){#frontPage .doc-row,#frontPage .doc-footer{grid-template-columns:minmax(0,1fr) minmax(96px,34%) 25px!important}}


/* V26: slightly smaller document names, retaining bold weight and legibility */
#frontPage .doc-row .doc-name{font-size:clamp(14px,1.08vw,16px)!important;font-weight:750!important;line-height:1.3!important;}
@media(max-width:520px){#frontPage .doc-row .doc-name{font-size:14px!important;}}

/* V27: emphasize requested entry and total fields; widen safe/petty document amounts */
:root{--focus-total-bg:color-mix(in srgb,var(--accent) 10%,var(--theme-field,#fff));--focus-total-border:var(--accent)}
/* Front counter: oil sales deduction, change float and sales excluding change */
#deductOther,#changeFloat,#dailySales{
 background:var(--focus-total-bg)!important;
 border:2px solid var(--focus-total-border)!important;
 box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 12%,transparent)!important;
 font-weight:900!important;
}
/* Safe cash total and combined cash + document total */
#safePage .extra-summary:has(#safePageTotal),
#safePage .extra-summary:has(#safeGrandTotal),
/* Petty cash total, combined total, and petty cash limit */
#pettyPage .extra-summary:has(#pettyPageTotal),
#pettyPage .extra-summary:has(#pettyGrandTotal),
#pettyPage .extra-summary:has(#pettyLimit){
 background:var(--focus-total-bg)!important;
 border:2px solid var(--focus-total-border)!important;
 border-radius:10px!important;
 padding:12px!important;
}
#safePageTotal,#safeGrandTotal,#pettyPageTotal,#pettyGrandTotal,#pettyLimit{
 font-weight:900!important;
 font-variant-numeric:tabular-nums lining-nums;
}
#pettyLimit{background:var(--theme-field,#fff)!important;border:2px solid var(--focus-total-border)!important;min-height:44px}
/* Widen amount entry while keeping a flexible name column and delete button */
#safeDocRows .doc-row,#pettyDocRows .doc-row{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(145px,34%) 36px!important;
 gap:8px!important;
 align-items:center;
}
#safeDocRows .doc-amount,#pettyDocRows .doc-amount{width:100%!important;min-width:0!important;text-align:right!important}
@media(max-width:600px){
 #safeDocRows .doc-row,#pettyDocRows .doc-row{
  grid-template-columns:minmax(0,1fr) minmax(105px,39%) 30px!important;gap:5px!important;
 }
 #safePage .extra-summary:has(#safePageTotal),#safePage .extra-summary:has(#safeGrandTotal),
 #pettyPage .extra-summary:has(#pettyPageTotal),#pettyPage .extra-summary:has(#pettyGrandTotal),
 #pettyPage .extra-summary:has(#pettyLimit){padding:9px!important}
}
@media(max-width:370px){
 #safeDocRows .doc-row,#pettyDocRows .doc-row{grid-template-columns:minmax(0,1fr) minmax(95px,40%) 28px!important;gap:4px!important}
}


/* V37: extra scrolling room lets the active input sit in the upper viewport. */
body.cc-pad-open{padding-bottom:calc(var(--cc-pad-height, 370px) + 18px)!important}
/* V28 touch calculator keypad */
#ccPad{position:fixed;left:0;right:0;bottom:0;z-index:9999;background:var(--panel,#fff);border-top:2px solid var(--accent,#d7194b);padding:10px max(12px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom));box-shadow:0 -8px 28px #0002;display:none;max-height:72dvh;overflow:auto}
#ccPad.open{display:block}#ccPad .padtop{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;font-weight:800}#ccPad .padvalue{font-size:20px;text-align:right;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;font-variant-numeric:tabular-nums}#ccPad .padkeys{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;max-width:560px;margin:auto}#ccPad button{min-height:49px;font-size:21px;font-weight:800;border-radius:10px;background:#f4f5f8;color:#172536;touch-action:manipulation}#ccPad button.op{background:#fce1e8;color:#ae1745}#ccPad button.action{background:var(--accent,#d7194b);color:white;font-size:15px}#ccPad button.wide{grid-column:span 2}body.cc-pad-open{padding-bottom:340px}#ccPad .padtop button{font-size:14px;min-height:36px;padding:5px 10px}
@media print{#ccPad{display:none!important}body.cc-pad-open{padding-bottom:0}}

/* V35: reserve enough scrolling room for the floating touch keypad */
body.cc-pad-open{padding-bottom:calc(var(--cc-pad-height, 370px) + 30px)!important;scroll-padding-bottom:calc(var(--cc-pad-height, 370px) + 20px)}
body.cc-pad-open .count-page input:focus{scroll-margin-bottom:calc(var(--cc-pad-height, 370px) + 18px)}


/* V36: clear, persistent indication of the currently edited numeric field */
.count-page input.cc-active-input{background:#fff2b8!important;color:#172536!important;border:3px solid #e49b00!important;box-shadow:0 0 0 3px rgba(255,190,38,.3)!important;outline:none!important;position:relative;z-index:2}
.count-page .doc-row:has(input.cc-active-input),.count-page .money-table tr:has(input.cc-active-input),.count-page .recon-grid>div:has(input.cc-active-input),.count-page .extra-summary:has(input.cc-active-input){background:rgba(255,194,41,.12)!important}
#ccPad button{user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;cursor:pointer}
#ccPad button:active{filter:brightness(.88);transform:scale(.97)}
@media print{.count-page input.cc-active-input{background:transparent!important;border:inherit!important;box-shadow:none!important}}

/* V29: consistent compact row heights on all three counting pages */
:root{--cc-row-height:40px;--cc-row-gap:4px}
.count-page .money-table th,.count-page .money-table td{height:var(--cc-row-height)!important;box-sizing:border-box!important;padding-top:3px!important;padding-bottom:3px!important;vertical-align:middle!important}
.count-page .money-table tbody tr{height:var(--cc-row-height)!important}
.count-page .money-table input{height:34px!important;min-height:34px!important;box-sizing:border-box!important;padding-top:3px!important;padding-bottom:3px!important}
.count-page .doc-row{min-height:var(--cc-row-height)!important;margin-top:0!important;margin-bottom:var(--cc-row-gap)!important;align-items:center!important}
.count-page .doc-row .doc-name,.count-page .doc-row .doc-amount,.count-page .doc-row .icon-btn{height:36px!important;min-height:36px!important;box-sizing:border-box!important;padding-top:4px!important;padding-bottom:4px!important}
.count-page .recon-grid>div{min-height:44px!important;padding-top:5px!important;padding-bottom:5px!important}
.count-page .recon-grid input{min-height:34px!important;height:34px!important;box-sizing:border-box!important}
.count-page .extra-summary{min-height:44px!important;padding-top:6px!important;padding-bottom:6px!important;box-sizing:border-box!important;margin-top:6px!important}
.count-page .extra-summary input{min-height:34px!important;height:34px!important;box-sizing:border-box!important}
@media(max-width:700px){
 :root{--cc-row-height:38px;--cc-row-gap:3px}
 .count-page .money-table input{height:32px!important;min-height:32px!important}
 .count-page .doc-row .doc-name,.count-page .doc-row .doc-amount,.count-page .doc-row .icon-btn{height:34px!important;min-height:34px!important}
 .count-page .recon-grid>div,.count-page .extra-summary{min-height:42px!important}
}
@media print{.count-page .money-table input,.count-page .doc-row input{min-height:0!important}}

/* V34: in-page confirmation works even in embedded mobile HTML previews */
#ccConfirmOverlay{position:fixed;inset:0;z-index:2147483647;background:rgba(12,18,31,.65);display:none;align-items:center;justify-content:center;padding:20px;box-sizing:border-box}
#ccConfirmOverlay.open{display:flex}
#ccConfirmBox{background:#fff;color:#1b2638;border-radius:16px;padding:22px;width:min(100%,410px);box-shadow:0 15px 50px #0005;font:700 17px/1.5 system-ui,sans-serif}
#ccConfirmBox p{margin:0 0 20px}
#ccConfirmActions{display:flex;gap:12px;justify-content:flex-end}
#ccConfirmActions button{min-height:48px;padding:10px 20px;border:0;border-radius:10px;font-weight:800;font-size:16px;cursor:pointer}
#ccConfirmCancel{background:#e5e7eb;color:#263246}
#ccConfirmYes{background:#dc174c;color:#fff}

/* V37: ensure enough scroll range below the last editable field */
body.cc-pad-open{padding-bottom:calc(var(--cc-pad-height, 370px) + 18px)!important}

/* V62: no oversized blank scroll area beneath the last page controls. */
html{overscroll-behavior-y:contain}
body.cc-pad-open{scroll-padding-bottom:calc(var(--cc-pad-height, 370px) + 12px)!important}
/* V63: align the last navigation row directly above the open keypad.
   Remove accumulated bottom spacing from the wrapper and navigation; retain
   only the keypad-height scroll reserve so lower inputs remain reachable. */
@media screen {
 body.cc-pad-open{padding-bottom:max(0px,calc(var(--cc-pad-height, 370px) - 6px))!important;}
 body.cc-pad-open .wrap{padding-bottom:0!important;}
 body.cc-pad-open .bottom-page-tabs{margin-bottom:0!important;}
}
/* V65: fixed calculator layout for both quantity and amount fields. */
#ccPad .padkeys button[disabled]{visibility:hidden!important;pointer-events:none!important;}
#ccPad .padkeys button.wide{grid-column:span 2;}
/* V38: clear developer attribution in header, responsive on mobile */
/* V39: override the legacy `header p{display:none}` rule so credit is actually visible */
header p.developer-credit{display:block!important;font-size:clamp(12px,1.25vw,14px);font-weight:800;letter-spacing:.01em;color:var(--accent,#c31948)!important;margin:6px 0 0;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:520px){header p.developer-credit{font-size:12px;margin-top:5px}}
@media print{header .developer-credit{color:inherit}}

/* V40: independent OIL/LPG counting workspaces */
.business-picker{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:14px 0;padding:12px 14px;border:1px solid var(--line,#e2e8f0);border-radius:16px;background:var(--card,#fff)}
.business-label{font-weight:800;margin-right:5px}
.business-choice{padding:10px 20px;border:2px solid #aeb7c3;border-radius:12px;background:transparent;color:inherit;font-size:16px;font-weight:900;cursor:pointer;touch-action:manipulation}
.business-choice.active[data-business="OIL"]{background:#1264a3;color:white;border-color:#1264a3}
.business-choice.active[data-business="LPG"]{background:#b65a08;color:white;border-color:#b65a08}
#businessStatus{margin-left:auto;font-size:15px;padding:6px 10px;border-radius:9px;background:#eaf3fc;color:#15558b}
body[data-business="LPG"] #businessStatus{background:#fff0dd;color:#934509}
.business-mark{display:inline-block;padding:2px 9px;border-radius:8px;background:#eaf3fc;color:#15558b;font-weight:900}
body[data-business="LPG"] .business-mark{background:#fff0dd;color:#934509}
@media(max-width:520px){.business-picker{gap:7px;padding:10px}.business-choice{padding:9px 14px}.business-label{width:100%}#businessStatus{font-size:13px}}
@media print{.business-picker{display:none!important}}

/* V42: increase separation of OIL/LPG to avoid accidental touches */
.business-choice[data-business="OIL"]{margin-right:clamp(16px,3vw,30px)!important}
/* V42: make developer credit clearly readable across screen sizes */
header p.developer-credit{font-size:clamp(16px,1.55vw,20px)!important;line-height:1.45!important}
@media(max-width:520px){header p.developer-credit{font-size:16px!important}}

/* V46: align the right-hand amounts in every safe/petty summary row. */
#safePage .extra-summary,#pettyPage .extra-summary{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(0,42%)!important;
 align-items:center!important;
 column-gap:10px!important;
}
#safePage .extra-summary>strong,#pettyPage .extra-summary>strong,
#safePage .extra-summary>input,#pettyPage .extra-summary>input{
 display:block!important;
 width:100%!important;
 max-width:none!important;
 min-width:0!important;
 box-sizing:border-box!important;
 text-align:right!important;
 font-variant-numeric:tabular-nums lining-nums!important;
 padding-left:8px!important;
 padding-right:10px!important;
 margin:0!important;
}
#safePage .extra-summary>label,#pettyPage .extra-summary>label,
#safePage .extra-summary>span,#pettyPage .extra-summary>span{min-width:0!important;margin:0!important;}
@media(max-width:420px){
 #safePage .extra-summary,#pettyPage .extra-summary{grid-template-columns:minmax(0,1fr) minmax(0,43%)!important;column-gap:6px!important;}
 #safePage .extra-summary>strong,#pettyPage .extra-summary>strong,
 #safePage .extra-summary>input,#pettyPage .extra-summary>input{padding-right:7px!important;padding-left:3px!important;}
}

/* V48: soft banana-leaf green highlights independent of selected theme. */
:root{--focus-total-bg:#e5f5cb;--focus-total-border:#8ebc60}
#deductOther,#changeFloat,#dailySales,
#pettyLimit{
 background:#e5f5cb!important;
 border-color:#8ebc60!important;
 color:#25462c!important;
 box-shadow:inset 0 0 0 1px rgba(91,151,64,.14)!important;
}
#safePage .extra-summary:has(#safePageTotal),
#safePage .extra-summary:has(#safeGrandTotal),
#pettyPage .extra-summary:has(#pettyPageTotal),
#pettyPage .extra-summary:has(#pettyGrandTotal),
#pettyPage .extra-summary:has(#pettyLimit){
 background:#e5f5cb!important;
 border-color:#8ebc60!important;
 color:#25462c!important;
}
/* Maintain contrast for highlighted summary labels and values across themes. */
#safePage .extra-summary:has(#safePageTotal) strong,
#safePage .extra-summary:has(#safeGrandTotal) strong,
#pettyPage .extra-summary:has(#pettyPageTotal) strong,
#pettyPage .extra-summary:has(#pettyGrandTotal) strong,
#pettyPage .extra-summary:has(#pettyLimit) strong{color:#25462c!important}
/* While editing, the stronger yellow active-input highlight takes precedence. */
.count-page input.cc-active-input{background:#fff2b8!important;border-color:#e49b00!important;color:#172536!important}
@media print{
 #deductOther,#changeFloat,#dailySales,#pettyLimit{background:transparent!important;color:inherit!important}
}

/* V50: dedicated A4 report, isolated from interactive application styles */
.cc-print-modal[hidden],#ccPrintReport[hidden]{display:none!important}
.cc-print-modal{position:fixed;inset:0;z-index:20000;background:rgba(16,24,40,.62);display:grid;place-items:center;padding:16px}
.cc-print-dialog{width:min(440px,100%);background:#fff;color:#182638;border-radius:18px;padding:24px;box-shadow:0 16px 60px #0004;font-family:inherit}
.cc-print-dialog h2{margin:0 0 8px;color:#182638}.cc-print-dialog p{margin:0 0 18px;color:#5b6472}
.cc-print-choices{display:grid;gap:10px}.cc-print-choices button{padding:14px;border:1px solid #cad5e2;border-radius:10px;background:#f6f9fc;color:#1c344d;font:inherit;font-weight:750;text-align:left;cursor:pointer}
.cc-print-choices button:active{background:#e0ecf7}.cc-print-choices .cc-print-cancel{background:white;color:#7b3245;text-align:center}
#ccPrintReport{display:none}
@media print{
 @page{size:A4 portrait;margin:12mm 13mm}
}
/* V56: pannable preview on phones, tablets and desktop, even when zoomed. */
#ccPreviewScroll{overflow:auto!important;text-align:left!important;touch-action:none;cursor:grab;-webkit-overflow-scrolling:touch;user-select:none;overscroll-behavior:contain}
#ccPreviewScroll.cc-dragging{cursor:grabbing}
#ccPreviewSheet{display:block!important;width:max-content!important;margin:0 auto!important;max-width:none!important}
@media print{#ccPreviewScroll{touch-action:auto!important;cursor:auto!important}}
/* V52: only one clearly scoped clear button is visible on each page. */
#resetBtn,#clearAmounts,#clearSafe,#clearPetty{display:none!important}

/* V54: built-in scalable report preview, independent of Android print viewer */
#ccPreview[hidden]{display:none!important}
#ccPreview{position:fixed;inset:0;z-index:30000;background:#dce3ec;display:flex;flex-direction:column;color:#1b2c40;font-family:Arial,'Noto Sans Thai',sans-serif}
#ccPreviewToolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 12px;background:#fff;border-bottom:1px solid #c5d0dc;box-shadow:0 2px 7px #0001}
#ccPreviewToolbar button{background:#fff;border:1px solid #aebccb;color:#1b344f;border-radius:8px;padding:9px 13px;font:inherit;font-weight:700;cursor:pointer}
#ccPreviewToolbar #ccPreviewPrint{background:#165c8b;color:#fff;border-color:#165c8b}
#ccPreviewToolbar .pr-zoom{display:flex;align-items:center;gap:7px}
#ccPreviewToolbar #ccPreviewPercent{min-width:48px;text-align:center;font-weight:800}
#ccPreviewScroll{flex:1;overflow:auto;overscroll-behavior:contain;padding:18px 10px;text-align:center}
#ccPreviewSheet{display:inline-block;text-align:left;vertical-align:top;transform-origin:top center}
#ccPreviewSheet #ccPrintReport{display:block!important;width:210mm;min-height:297mm;padding:12mm 13mm;background:white;box-shadow:0 3px 20px #0003;color:#182638;font-size:10pt;line-height:1.35;box-sizing:border-box}
#ccPreviewSheet #ccPrintReport *{box-sizing:border-box}
#ccPreviewSheet .pr-head{display:flex;justify-content:space-between;gap:15px;border-bottom:3px solid #1b5679;padding-bottom:9px;margin-bottom:12px}
#ccPreviewSheet .pr-head h1{font-size:19pt;margin:0;color:#173d58}
#ccPreviewSheet .pr-head p{font-size:9pt;margin:2px 0;color:#536476}
#ccPreviewSheet .pr-biz{font-size:17pt;font-weight:800;border:2px solid #16557a;color:#16557a;border-radius:7px;padding:5px 12px;align-self:start}
#ccPreviewSheet .pr-meta{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;margin:12px 0 16px}
#ccPreviewSheet .pr-meta div{border:1px solid #d5dce4;border-radius:5px;padding:7px 9px;min-height:43px}
#ccPreviewSheet .pr-meta b{display:block;font-size:8pt;color:#637181;margin-bottom:3px}
#ccPreviewSheet .pr-section h2{font-size:14pt;color:#184f70;border-bottom:1px solid #b4c9d6;padding-bottom:6px;margin:14px 0 9px}
#ccPreviewSheet .pr-subhead{font-size:11pt;color:#1b5679;margin:14px 0 6px}
#ccPreviewSheet table{border-collapse:collapse;width:100%;table-layout:fixed;margin:6px 0 10px}
#ccPreviewSheet th,#ccPreviewSheet td{padding:5px 8px;border:1px solid #d7dfe6;font-size:9pt;vertical-align:middle}
#ccPreviewSheet th{background:#eaf2f7}
#ccPreviewSheet th:not(:first-child),#ccPreviewSheet td:not(:first-child){text-align:right}
#ccPreviewSheet .pr-sum{display:flex;justify-content:space-between;gap:12px;padding:7px 10px;border-bottom:1px solid #dbe3e9}
#ccPreviewSheet .pr-sum strong{min-width:130px;text-align:right}
#ccPreviewSheet .pr-total{background:#eaf2f7;border:1px solid #c4d7e4;margin-top:5px}
#ccPreviewSheet .negative{color:#b42335}
#ccPreviewSheet .pr-footer{margin-top:18px;border-top:1px solid #cfd8e0;padding-top:7px;font-size:8pt;color:#667585;display:flex;justify-content:space-between}
@media print{#ccPreview,#ccPreviewToolbar,#ccPreviewScroll{display:contents!important}#ccPreviewToolbar{display:none!important}#ccPreviewScroll,#ccPreviewSheet{display:contents!important;transform:none!important}#ccPrintReport{min-height:0!important;padding:0!important;box-shadow:none!important}}

/* V55: matching page navigation at the bottom of all three pages */
.bottom-page-tabs{margin:16px 0 22px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important}
.bottom-page-tabs button{min-height:54px;white-space:normal;line-height:1.25;font-size:clamp(13px,2.4vw,18px)!important}
@media(max-width:520px){.bottom-page-tabs{gap:7px!important}.bottom-page-tabs button{min-height:46px;padding:8px 3px!important;font-size:clamp(11px,3vw,14px)!important}}
@media print{.bottom-page-tabs{display:none!important}}

/* V66: finish on the left, Enter on the right; distinct high-contrast colors. */
#ccPad .padkeys button[data-pad="เสร็จสิ้น"]{background:#e2e8f0!important;color:#263445!important;}
#ccPad .padkeys button[data-pad="Enter"]{background:#d7f5df!important;color:#176534!important;}
#ccPad .padkeys button[data-pad="Enter"]:active,#ccPad .padkeys button[data-pad="เสร็จสิ้น"]:active{filter:brightness(.82);}

/* V68: accessible, cheerful pastel calculator keys with high-contrast glyphs. */
#ccPad{background:#fffdfd!important;border-top:3px solid #d64d78!important;}
#ccPad .padtop{color:#18283d!important;}
#ccPad .padvalue{color:#102a43!important;font-weight:900!important;}
#ccPad .padkeys button{background:#e8f1ff!important;color:#12355b!important;border:2px solid #b8d2f2!important;font-weight:900!important;box-shadow:0 2px 0 #9cbbe0!important;}
#ccPad .padkeys button[data-pad="⌫"],#ccPad .padkeys button[data-pad="C"]{background:#ffe9dc!important;color:#943c17!important;border-color:#f4b99d!important;box-shadow:0 2px 0 #e9a381!important;}
#ccPad .padkeys button[data-pad="."],#ccPad .padkeys button[data-pad="00"]{background:#eee9ff!important;color:#48308b!important;border-color:#c9b8f4!important;box-shadow:0 2px 0 #b7a2e9!important;}
#ccPad .padkeys button.op{background:#ffe3ef!important;color:#a3184f!important;border-color:#f2a5c4!important;box-shadow:0 2px 0 #dd89ac!important;}
#ccPad .padkeys button[data-pad="เสร็จสิ้น"]{background:#e0e8f2!important;color:#213b5b!important;border-color:#a9bfd9!important;box-shadow:0 2px 0 #95abc6!important;}
#ccPad .padkeys button[data-pad="Enter"]{background:#c9f4d9!important;color:#075a35!important;border-color:#72cda0!important;box-shadow:0 2px 0 #57b98a!important;}
#ccPad .padkeys button:active{filter:brightness(.94)!important;transform:translateY(2px) scale(.98)!important;box-shadow:none!important;}
#ccPad .padtop button[data-pad="close"]{background:#eef2f8!important;color:#18324e!important;border:1px solid #cbd5e1!important;}
@media (prefers-contrast:more){#ccPad .padkeys button{border-width:3px!important;}}
/* V69: raised, tactile 3D calculator keys with clear contrasting symbols */
#ccPad .padkeys button{border-radius:16px!important;box-shadow:inset 0 2px 1px rgba(255,255,255,.95),inset 0 -3px 0 rgba(28,64,105,.10),0 5px 0 #9bbbdc,0 7px 10px rgba(20,47,80,.16)!important;text-shadow:0 1px 0 rgba(255,255,255,.8)!important;transition:transform .09s ease,box-shadow .09s ease!important;}
#ccPad .padkeys button[data-pad="⌫"],#ccPad .padkeys button[data-pad="C"]{box-shadow:inset 0 2px 1px #fff,inset 0 -3px 0 #f5c0a7,0 5px 0 #e9a381,0 7px 10px #9d5a3526!important;}
#ccPad .padkeys button[data-pad="00"],#ccPad .padkeys button[data-pad="."]{box-shadow:inset 0 2px 1px #fff,inset 0 -3px 0 #d8cbff,0 5px 0 #b7a2e9,0 7px 10px #60429b24!important;}
#ccPad .padkeys button[data-pad="Enter"]{box-shadow:inset 0 2px 1px #fff,inset 0 -3px 0 #a2e5bd,0 5px 0 #57b98a,0 7px 10px #087f4526!important;}
#ccPad .padkeys button[data-pad="เสร็จสิ้น"]{box-shadow:inset 0 2px 1px #fff,inset 0 -3px 0 #c1cfdf,0 5px 0 #95abc6,0 7px 10px #253a5626!important;}
#ccPad .padkeys button:active{transform:translateY(5px)!important;box-shadow:inset 0 2px 6px #0002!important;}
/* V70: semi-transparent 3D glass keypad, with readable opaque-enough keys. */
#ccPad{background:rgba(250,252,255,.91)!important;backdrop-filter:blur(16px) saturate(125%)!important;-webkit-backdrop-filter:blur(16px) saturate(125%)!important;box-shadow:0 -8px 30px rgba(27,44,74,.14)!important;}
#ccPad .padkeys button{background:rgba(215,232,255,.88)!important;color:#12355b!important;border-color:rgba(125,165,215,.82)!important;box-shadow:inset 0 2px 1px rgba(255,255,255,.9),inset 0 -3px 0 rgba(39,83,139,.12),0 5px 0 rgba(126,163,208,.9),0 8px 14px rgba(20,47,80,.16)!important;}
#ccPad .padkeys button[data-pad="⌫"],#ccPad .padkeys button[data-pad="C"]{background:rgba(255,222,203,.9)!important;color:#873716!important;border-color:#e8ad8c!important;box-shadow:inset 0 2px 1px #fffc,inset 0 -3px 0 #d68e6a44,0 5px 0 #e5a181,0 8px 14px #9d5a3526!important;}
#ccPad .padkeys button[data-pad="00"],#ccPad .padkeys button[data-pad="."]{background:rgba(231,220,255,.9)!important;color:#48308b!important;border-color:#b9a5ed!important;box-shadow:inset 0 2px 1px #fffc,inset 0 -3px 0 #a48add44,0 5px 0 #b3a0e1,0 8px 14px #60429b24!important;}
#ccPad .padkeys button.op{background:rgba(255,218,235,.9)!important;color:#99164d!important;border-color:#e7a1c0!important;}
#ccPad .padkeys button[data-pad="เสร็จสิ้น"]{background:rgba(215,227,240,.91)!important;color:#213b5b!important;border-color:#a9bfd9!important;box-shadow:inset 0 2px 1px #fffc,inset 0 -3px 0 #9fb3cc55,0 5px 0 #95abc6,0 8px 14px #253a5626!important;}
#ccPad .padkeys button[data-pad="Enter"]{background:rgba(197,242,215,.91)!important;color:#075a35!important;border-color:#72cda0!important;box-shadow:inset 0 2px 1px #fffc,inset 0 -3px 0 #5bbd8d55,0 5px 0 #57b98a,0 8px 14px #087f4526!important;}
#ccPad .padkeys button:active{transform:translateY(5px)!important;box-shadow:inset 0 2px 7px rgba(20,47,80,.24)!important;}

/* V71: flatter, clearer translucent glass keys; remove thick 3D extrusion. */
#ccPad{background:rgba(249,251,255,.77)!important;backdrop-filter:blur(13px) saturate(115%)!important;-webkit-backdrop-filter:blur(13px) saturate(115%)!important;}
#ccPad .padkeys button{background:rgba(202,225,252,.66)!important;color:#10365b!important;border:1.5px solid rgba(107,155,208,.65)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 5px rgba(33,69,110,.10)!important;text-shadow:none!important;transform:none!important;}
#ccPad .padkeys button[data-pad="⌫"],#ccPad .padkeys button[data-pad="C"]{background:rgba(255,218,195,.68)!important;color:#833514!important;border-color:rgba(217,145,108,.65)!important;box-shadow:inset 0 1px 0 #ffffff88,0 2px 5px #965b3c1c!important;}
#ccPad .padkeys button[data-pad="00"],#ccPad .padkeys button[data-pad="."]{background:rgba(221,207,255,.68)!important;color:#4d3189!important;border-color:rgba(157,132,215,.65)!important;box-shadow:inset 0 1px 0 #ffffff88,0 2px 5px #60429b1c!important;}
#ccPad .padkeys button.op{background:rgba(255,205,229,.68)!important;color:#971549!important;border-color:rgba(216,121,164,.65)!important;box-shadow:inset 0 1px 0 #ffffff88,0 2px 5px #a3184f1c!important;}
#ccPad .padkeys button[data-pad="เสร็จสิ้น"]{background:rgba(201,218,237,.7)!important;color:#203b59!important;border-color:rgba(126,155,189,.65)!important;box-shadow:inset 0 1px 0 #ffffff88,0 2px 5px #253a561c!important;}
#ccPad .padkeys button[data-pad="Enter"]{background:rgba(177,238,201,.72)!important;color:#075a35!important;border-color:rgba(91,182,127,.7)!important;box-shadow:inset 0 1px 0 #ffffff88,0 2px 5px #087f451c!important;}
#ccPad .padkeys button:active{transform:scale(.975)!important;filter:brightness(.96)!important;box-shadow:inset 0 2px 5px rgba(20,47,80,.13)!important;}

/* V77: enlarge bottom action buttons on desktop/laptop only; preserve mobile layout. */
@media screen and (min-width:701px){
  .bottom-actions{gap:12px!important;margin-top:20px!important;grid-template-columns:1.2fr .9fr .9fr!important;}
  .bottom-actions button{font-size:clamp(17px,1.45vw,22px)!important;font-weight:800!important;min-height:66px!important;padding:17px 22px!important;border-radius:13px!important;line-height:1.35!important;}
}
/* V78: compact desktop/laptop bottom controls; mobile styles remain unchanged. */
@media screen and (min-width:701px){
  .bottom-actions{width:100%;max-width:1120px;margin:14px auto 0!important;gap:10px!important;grid-template-columns:1.2fr .9fr .9fr!important;}
  .bottom-actions button{font-size:clamp(15px,1.1vw,18px)!important;min-height:48px!important;padding:10px 14px!important;border-radius:10px!important;line-height:1.25!important;}
  .bottom-page-tabs{width:100%;max-width:1120px;margin:14px auto 18px!important;gap:10px!important;}
  .bottom-page-tabs button{font-size:clamp(14px,1.05vw,17px)!important;min-height:44px!important;padding:9px 12px!important;border-radius:9px!important;}
}

/* V79: equal, shorter, neatly aligned desktop-only action and page-navigation buttons. */
@media screen and (min-width: 701px){
  .bottom-actions,
  .bottom-page-tabs{
    box-sizing:border-box!important;
    width:min(100%, 900px)!important;
    max-width:900px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    align-items:stretch!important;
  }
  .bottom-actions{margin-top:12px!important;}
  .bottom-page-tabs{margin-top:12px!important;margin-bottom:16px!important;}
  .bottom-actions button,
  .bottom-page-tabs button{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    height:44px!important;
    padding:8px 10px!important;
    border-radius:9px!important;
    font-size:clamp(14px,1vw,16px)!important;
    line-height:1.2!important;
    font-weight:800!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }
}

/* V81: shorter, uniform desktop/laptop bottom controls; no mobile changes. */
@media screen and (min-width:701px){
  .bottom-actions,.bottom-page-tabs{
    width:min(100%,750px)!important;
    max-width:750px!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .bottom-actions{margin-top:10px!important;}
  .bottom-page-tabs{margin-top:9px!important;margin-bottom:14px!important;}
  .bottom-actions button,.bottom-page-tabs button{
    height:40px!important;min-height:40px!important;
    padding:6px 9px!important;
    font-size:clamp(13px,.95vw,15px)!important;
    border-radius:8px!important;
  }
}

/* Team controls and document metadata use the same counter surfaces. */
.team-settings{margin-bottom:10px}
.team-settings .row,.team-sync-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.team-settings select,.team-settings input,.team-settings button,.team-sync-actions button{max-width:100%;padding:8px;border-radius:7px}
#counter:not([data-part=front]) .grid{grid-template-columns:minmax(0,1fr)}
#counter:not([data-part=front]) .grid>.panel{width:100%;max-width:850px;margin-inline:auto}
#counter .grid>.panel{min-width:0}
#summary{overflow:auto}
#summary table{border-collapse:collapse;width:100%;white-space:nowrap}
#summary :is(th,td){padding:8px;text-align:right;border-bottom:1px solid var(--line)}
#summary :is(th,td):first-child{text-align:left}
#counter button:disabled{opacity:.55;cursor:default}
#difference[data-negative="true"],
:is(#summary,#previewContent,#teamPrintSheet) .report-negative-difference {
 color:#d00016!important;font-weight:800;
 -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
#difference[data-negative=false]{color:var(--good)}
@media print{
 .team-count-page :is(.test-banner,header,.team-settings,#authBox,#counter,#assignBox,.reportActions,.theme-dialog){display:none!important}
 #summary{overflow:visible}#summary table{white-space:normal}
}
.team-count-page [hidden]{display:none!important}
#teamPreview{width:min(820px,94vw);max-height:85dvh;color:var(--ink);background:var(--theme-field);border:1px solid var(--line)}
#teamPreview::backdrop{background:#0d1429a8}
#previewContent{overflow:auto;margin-bottom:12px}
#previewContent table{width:100%;border-collapse:collapse;white-space:nowrap}
#previewContent :is(th,td){padding:8px;text-align:right;border-bottom:1px solid var(--line)}
#previewContent :is(th,td):first-child{text-align:left}

/* The safe and petty-cash pages stack the same controls inside one panel. */
#counter[data-part="front"] #countGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
#counter:not([data-part="front"]) #countGrid{grid-template-columns:minmax(0,1fr)}
#cashPanel #docsBox,#cashPanel #countTotals{
  background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;
  border:0!important;padding:0;margin:10px 0 0;
}
#cashPanel #docsBox{border-top:1px solid var(--line)!important;border-radius:0;padding-top:10px}
#cashPanel #docsBox .doc-head{align-items:flex-start;flex-direction:column}
#counter:not([data-part="front"]) #cashPanel .sumline{
  background:var(--focus-total-bg,#e4f4cf);border:1px solid var(--focus-total-border,#9cc752);
  border-radius:7px;margin-top:8px;padding:8px;
}
#countTotals output{font-weight:800;text-align:right;font-variant-numeric:tabular-nums}
#counter[data-part="petty"] #sales{background:var(--focus-total-bg,#e4f4cf)!important}
@media(max-width:600px){
  #counter[data-part="front"] #countGrid{grid-template-columns:minmax(0,1fr)}
}

/* Make the team and round selectors prominent in the signed-in workspace. */
@media screen {
 #workspace.team-settings {
  padding:clamp(16px,3vw,26px);
  color:var(--cc-readable-ink,#162d40);
  border:1px solid #7696b6!important;
  box-shadow:0 12px 24px #112d4c4d,0 3px 0 #17375170,inset 0 1px 0 #cce6ff55!important;
 }
 #workspace.team-settings h2 {
  font-size:clamp(22px,3vw,28px);
  color:inherit;
  margin:12px 0 10px;
 }
 #workspace .row {gap:10px}
 #workspace #who {font-size:16px;font-weight:700;overflow-wrap:anywhere}
 #workspace :is(select,input,button) {
  min-height:46px;
  font:600 16px/1.35 system-ui,sans-serif;
  padding:9px 12px;
  border-radius:9px;
  border:1px solid #8eacca;
 }
 #workspace :is(select,input) {background:#f0f6fd!important;color:#173550!important}
 #workspace input::placeholder {color:#51677d;opacity:1}
 #workspace select {flex:0 1 230px;min-width:0}
 #workspace button {background:#245b89;color:#fff}
 #workspace #logout {background:#34495f}
 #workspace #close {background:#783b4a}
 #workspace :is(select,input,button):focus-visible {outline:2px solid #9edcff;outline-offset:3px}
 @media(max-width:540px){
  #workspace select {flex:1 1 100%}
 }
}

#teamPrintSheet{display:none}
#previewContent table,#teamPrintSheet table{width:100%;border-collapse:collapse;white-space:normal;overflow-wrap:anywhere;margin:0 0 12px}
#previewContent :is(th,td),#teamPrintSheet :is(th,td){padding:6px 8px;border:1px solid #9eacb7;text-align:left}
#previewContent :is(th,td):last-child,#teamPrintSheet :is(th,td):last-child{text-align:right}
@media print{
 body.printing-team-section > :not(#teamPrintSheet){display:none!important}
 body.printing-team-section #teamPrintSheet{display:block;color:#111;background:#fff;margin:0;padding:0}
 #teamPrintSheet table{font-size:10pt}
 #teamPrintSheet thead{display:table-header-group}
 #teamPrintSheet tr{break-inside:avoid}
 #teamPrintSheet h3{break-after:avoid}
}

@media screen{
 #counter .bottom-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 @media(max-width:520px){#counter .bottom-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
}

#teamActionConfirm{
 width:min(440px,calc(100% - 32px));border:1px solid #fff;border-radius:20px;
 padding:22px;background:linear-gradient(145deg,#fffffffa,#d9eaf8f2);
 color:#172e45;box-shadow:0 5px 0 #6587a5aa,0 18px 55px #10243d70;
}
#teamActionConfirm::backdrop{background:#11263c99;backdrop-filter:blur(3px)}
#teamActionConfirm h2{margin:0 0 8px;font-size:21px}
#teamActionMessage{font-size:16px;line-height:1.55}
.team-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.team-confirm-actions button{padding:9px 14px;border:1px solid #9cb8cf;border-radius:10px;background:#f5faff;color:#173550;font-weight:700}
#teamActionConfirm .team-confirm-actions button{background:#e5f3ff!important;color:#153755!important;border-color:#729dc2!important}
#teamActionConfirm .team-confirm-actions button[value=clear]{background:linear-gradient(145deg,#c92135,#a01325)!important;color:#fff!important;border-color:#8a1020!important}
#teamActionNotice{
 position:fixed;z-index:20000;top:16px;left:50%;transform:translateX(-50%);
 width:max-content;max-width:calc(100% - 28px);padding:12px 18px;border:1px solid #b3e4d1;border-radius:13px;
 background:linear-gradient(145deg,#287759,#124338);color:#fff;
 box-shadow:0 4px 0 #13372e80,0 12px 30px #102d3b55,inset 0 1px 0 #ffffff66;
 font-weight:750;overflow-wrap:anywhere;opacity:0;pointer-events:none;
}
#teamActionNotice.show{opacity:1}
#teamActionNotice.error{background:linear-gradient(145deg,#a5374c,#672136);border-color:#f3b9c4}
@media print{#teamActionConfirm,#teamActionNotice{display:none!important}}

@media print {
 body.printing-team-section {margin:0!important;padding:0!important;background:white!important;overflow:visible!important;min-width:0!important;zoom:1!important}
 body.printing-team-section > #teamPrintSheet {display:block!important;visibility:visible!important}
}

@media screen {
 #counter input.cc-remote-entry {
  box-shadow:inset 0 0 0 2px #009671,0 0 0 2px #43e3b488!important;
 }
 .cc-document-date:has(input.cc-remote-entry) .cc-document-date-label {font-weight:800}
}

@media print {
 @page cc-round-landscape {size:A4 landscape;margin:12mm 13mm}
 #teamPrintSheet.cc-landscape-report {page:cc-round-landscape}
}

:is(#previewContent,#teamPrintSheet) .pr-footer {
 border-top:1px solid currentColor;
 margin-top:16px;
 padding-top:7px;
 font-size:10pt;
 break-inside:avoid;
}

:is(#summary,#previewContent,#teamPrintSheet) td.report-dash {
 font-family:system-ui,sans-serif;font-size:1em;font-weight:600;
}
@media screen {
 .cc-report-zoom{align-items:center;gap:8px;margin:8px 0}
 #previewContent {
  height:min(54dvh,560px);overflow:auto;touch-action:none;cursor:grab;
  overscroll-behavior:contain;user-select:none;background:#dce7eb;
 }
 #previewContent.is-dragging{cursor:grabbing}
 #previewContent>article {
  box-sizing:border-box;width:max(100%,620px);padding:16px;background:white;color:#162d40;
  zoom:var(--report-zoom,1);
 }
}

@media screen {
 #counter {
  --amount-panel-inset:clamp(8px,1.35vw,18px);
  /* Document scroller inset, delete button, grid gap, and amount input border/padding. */
  --amount-edge:calc(3px + 30px + 5px + 1px + 5px);
 }
 #counter #countGrid > .panel,
 #counter > #countTotals {
  padding-inline:var(--amount-panel-inset)!important;
  border-inline-width:1px!important;
 }
 #counter #cashPanel .sumline {
  border-inline-end:1px solid transparent;
  padding-inline-end:calc(var(--amount-edge) - 1px);
 }
 #counter:not([data-part="front"]) #cashPanel .sumline {
  border-inline-end-color:var(--focus-total-border,#9cc752);
 }
 #counter :is(.doc-footer,.money-table td:last-child,.money-table th:last-child) {
  padding-inline-end:var(--amount-edge);
 }
 #counter #countTotals .recon-grid > div {
  width:100%;
  border-inline-end-width:1px;
  border-inline-end-style:solid;
  padding-inline-end:calc(var(--amount-edge) - 2px)!important;
 }
 #counter #countTotals .recon-grid > div:not(.summary-highlight) {
  border-inline-end-color:transparent;
 }
 #counter #countTotals .recon-grid > div > :is(input,output) {
  text-align:end!important;
  font-variant-numeric:tabular-nums lining-nums;
 }
 #counter #countTotals .recon-grid > div > input {
  border-inline-end-width:1px!important;
  padding-inline-end:0!important;
 }
 #counter #countTotals .recon-grid > div > output {
  padding-inline-end:1px!important;
 }
 #counter :is(.sumline strong,.doc-footer strong,.money-table td:last-child,.doc-amount) {
  text-align:end!important;font-variant-numeric:tabular-nums lining-nums;
 }
}

:is(#previewContent,#teamPrintSheet) .section-report-heading {
 display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;
 column-gap:16px;row-gap:4px;
}
:is(#previewContent,#teamPrintSheet) .section-report-heading > :is(h2,p){margin:0}
:is(#previewContent,#teamPrintSheet) .section-report-heading > p{
 margin-inline-start:auto;text-align:end;white-space:nowrap;font-size:.85em;
}
@media print {
 #teamPrintSheet .section-report-heading{break-after:avoid}
}

@media screen {
 .team-count-page #workspace .cc-report-date {
  display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;white-space:nowrap;
 }
 .team-count-page #workspace .cc-report-date input{flex:1}
 .team-count-page #workspace .row.cc-round-select :is(select,input,button){min-height:44px}
 .team-count-page #workspace #teamCountClock{margin:8px 0 0}
 @media (min-width:671px) {
  .team-count-page #workspace .row.cc-round-select {
   grid-template-columns:minmax(0,1fr) minmax(220px,1fr) minmax(0,1.6fr) auto;
   align-items:center;
  }
 }
}

/* Keep the signed-in team header compact without affecting the login screen. */
@media screen {
 .team-count-page:has(#workspace:not([hidden])) > header {
  padding:8px clamp(10px,2vw,22px);
 }
 .team-count-page:has(#workspace:not([hidden])) > header > div:first-child {
  display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;
 }
 .team-count-page:has(#workspace:not([hidden])) > header h1 {font-size:18px;margin:0}
 .team-count-page:has(#workspace:not([hidden])) > header p.developer-credit {
  font-size:12px!important;line-height:1.3!important;margin:0;padding:3px 6px;
 }
 .team-count-page:has(#workspace:not([hidden])) > main.wrap {padding-top:10px}
 .team-count-page:has(#workspace:not([hidden])) .cc-workspace-nav {margin:0 0 6px}
 .team-count-page:has(#workspace:not([hidden])) .cc-workspace-nav .cc-back-mode {padding:6px 10px}
 .team-count-page:has(#workspace:not([hidden])) #status {margin:0 0 8px}
 .team-count-page #workspace.team-settings:not([hidden]) {
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:center;gap:8px 14px;
  padding:clamp(10px,1.6vw,16px);
 }
 .team-count-page #workspace.team-settings > * {grid-column:1/-1}
 .team-count-page #workspace.team-settings > h2 {
  grid-area:1/1;font-size:clamp(16px,1.7vw,20px);margin:0;
 }
 .team-count-page #workspace.team-settings > .cc-team-account {
  grid-area:1/2;min-width:0;justify-content:flex-end;
  padding:0;border:0;gap:8px;
 }
 .team-count-page #workspace.team-settings #who {font-size:13px}
 .team-count-page #workspace.team-settings #logout {padding:6px 10px;min-height:40px}
 .team-count-page #workspace.team-settings :is(#teamCountClock,#createBox) {margin:0}
 .team-count-page #workspace.team-settings #createBox {padding-top:6px}
 .team-count-page #workspace.team-settings #createBox > p {margin:0 0 6px}
 .team-count-page #workspace.team-settings .cc-workspace-appearance {margin:0;padding-top:6px}
 @media(max-width:560px) {
  .team-count-page #workspace.team-settings > h2 {grid-area:2/1/3/-1}
  .team-count-page #workspace.team-settings > .cc-team-account {
   grid-area:1/1/2/-1;justify-content:space-between;
  }
 }
}

@media screen {
 #counter #fields input[aria-invalid="true"] {
  border-color:#a7192d!important;
  outline:2px solid #a7192d!important;
  outline-offset:1px;
  background:#fff0f2!important;
  color:#831427!important;
 }
}

#counter #docRows .shared-document-row .icon-btn {
 padding-inline:2px!important;
 white-space:nowrap;
}

#workspace .cc-report-date .cc-document-date {flex:1;min-width:0}
#workspace #reportDate {color:transparent!important}
#workspace .cc-report-date .cc-document-date-label {color:#173550}

@media screen {
 .team-count-page:has(#workspace:not([hidden])) > header p.developer-credit {
  font-size:clamp(10px,1vw,12px)!important;
  gap:2px 5px;
 }
 .team-count-page:has(#workspace:not([hidden])) > header p.developer-credit strong {
  font-size:clamp(12px,1.25vw,15px)!important;
 }
 .team-count-page > header .actions {align-items:center;justify-content:flex-end}
 .team-count-page > header .cc-workspace-appearance {
  display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;
 }
 .team-count-page > header .cc-workspace-appearance > details {
  margin:0;padding:0;position:relative;max-width:100%;
 }
 .team-count-page > header .cc-workspace-appearance summary {
  padding:7px 10px;min-height:36px;font-size:12px;margin:0;
 }
 .team-count-page > header .cc-workspace-appearance > details[open] {
  z-index:20;width:min(340px,calc(100vw - 32px));
  padding:4px;background:#123543;color:#fff;border-radius:12px;
 }
}
