:root { --navy:#14305a; --navy2:#1d4177; --line:#d9dee7; --bg:#f4f6fa; --text:#1b2433; --muted:#667085; --red:#b42318; --green:#067647; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Segoe UI",Arial,sans-serif; color:var(--text); background:var(--bg); font-size:14px; }
.hidden { display:none !important; }
#login { min-height:100vh; }
.login-wrap { min-height:100vh; display:grid; grid-template-columns:1.15fr 1fr; }
.login-hero { position:relative; overflow:hidden; color:#fff; padding:44px 52px; display:flex; flex-direction:column; justify-content:space-between; background:linear-gradient(135deg, var(--hero1, #0f5a46) 0%, var(--hero2, #14305a) 100%); }
.login-hero .hero-art { position:absolute; right:-40px; bottom:-40px; width:520px; height:520px; color:#fff; pointer-events:none; }
.hero-top { display:flex; align-items:center; gap:14px; position:relative; }
.logo-badge { width:62px; height:62px; border-radius:16px; background:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 8px 24px rgba(0,0,0,.18); overflow:hidden; }
.logo-badge img { max-width:52px; max-height:52px; }
.logo-badge span { font-size:28px; font-weight:800; color:var(--hero2, #14305a); }
.hero-co { font-size:15px; font-weight:600; opacity:.9; }
.hero-mid { position:relative; max-width:460px; }
.hero-mid h1 { font-size:40px; line-height:1.1; margin:0 0 12px; color:#fff; letter-spacing:-.02em; }
.hero-mid p { font-size:17px; opacity:.88; margin:0 0 26px; }
.hero-points { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.hero-points li { padding-left:30px; position:relative; font-size:14.5px; opacity:.92; }
.hero-points li::before { content:''; position:absolute; left:0; top:2px; width:18px; height:18px; border-radius:50%; background:var(--hero3, #f2b632); box-shadow:inset 0 0 0 5px rgba(255,255,255,.35); }
.hero-foot { font-size:12px; opacity:.7; position:relative; }
.login-side { display:flex; align-items:center; justify-content:center; background:#f4f6fa; padding:32px; }
.login-box { background:#fff; padding:36px 34px; width:min(380px,100%); border:1px solid var(--line); border-radius:14px; display:flex; flex-direction:column; gap:14px; box-shadow:0 12px 40px rgba(16,24,40,.08); }
.login-box h2 { margin:0; color:var(--navy); font-size:24px; }
.login-box button[type=submit] { padding:11px 14px; font-size:15px; }
@media (max-width:860px) { .login-wrap { grid-template-columns:1fr; } .login-hero { padding:28px; min-height:260px; } .hero-mid h1 { font-size:30px; } .hero-points { display:none; } }
label { display:flex; flex-direction:column; gap:4px; font-weight:600; font-size:13px; }
label.check { flex-direction:row; align-items:center; gap:8px; }
input, select, textarea { padding:8px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; background:#fff; }
input:focus, select:focus, textarea:focus { outline:2px solid #9db7e0; border-color:var(--navy2); }
button { background:var(--navy); color:#fff; border:0; padding:8px 14px; border-radius:6px; font:inherit; cursor:pointer; }
button:hover { background:var(--navy2); }
button.ghost { background:#fff; color:var(--navy); border:1px solid var(--line); }
button.ghost:hover { background:#eef2f9; }
button.ghost.light { background:transparent; color:#fff; border-color:#5b78a6; }
button.small { padding:4px 9px; font-size:12px; }
#app { display:flex; min-height:100vh; }
aside { width:210px; background:var(--navy); color:#fff; display:flex; flex-direction:column; padding:16px 0; position:sticky; top:0; height:100vh; }
.brand { padding:0 14px 18px 16px; font-weight:700; font-size:15px; line-height:1.25; display:flex; align-items:center; gap:10px; }
.brand-logo { width:36px; height:36px; border-radius:9px; background:#fff; color:var(--navy); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:17px; flex:none; overflow:hidden; }
.brand-logo img { max-width:32px; max-height:32px; }
.brand small { font-weight:400; opacity:.75; }
nav a { display:block; padding:10px 18px; color:#dbe6f7; text-decoration:none; }
nav a:hover { background:var(--navy2); }
nav a.active { background:var(--navy2); border-left:3px solid #fff; padding-left:15px; color:#fff; }
.side-foot { margin-top:auto; padding:0 18px; display:flex; flex-direction:column; gap:8px; font-size:12px; }
main { flex:1; padding:24px 28px; min-width:0; }
h1 { margin:0 0 4px; font-size:21px; color:var(--navy); }
.sub { color:var(--muted); margin-bottom:16px; }
.toolbar { display:flex; gap:10px; margin-bottom:14px; align-items:center; flex-wrap:wrap; }
.toolbar input { width:240px; }
.table-wrap { background:#fff; border:1px solid var(--line); border-radius:8px; overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th, td { padding:9px 12px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
th { background:#eef2f9; font-size:12px; color:#344054; position:sticky; top:0; }
tr:last-child td { border-bottom:0; }
td.actions { display:flex; gap:6px; }
td.num, th.num { text-align:right; }
.tag { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; background:#eef2f9; }
.tag.ok { background:#d1fadf; color:var(--green); }
.tag.off { background:#fee4e2; color:var(--red); }
.empty { padding:24px; color:var(--muted); text-align:center; }
#modal { display:none; position:fixed; inset:0; background:rgba(16,24,40,.45); overflow:auto; z-index:10; }
#modal.open { display:block; }
.box { background:#fff; width:min(560px,94vw); margin:5vh auto; padding:22px; border-radius:10px; }
.box.wide { width:min(900px,96vw); }
.box h3 { margin:0 0 14px; color:var(--navy); }
.box form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.box form .full { grid-column:1 / -1; }
.actions { display:flex; justify-content:flex-end; gap:8px; grid-column:1 / -1; margin-top:6px; }
.err { color:var(--red); font-size:13px; grid-column:1 / -1; min-height:0; }
.notice { background:#d1fadf; color:var(--green); padding:9px 14px; border-radius:6px; margin-bottom:14px; }
.hint { font-weight:400; color:var(--muted); font-size:12px; }
@media (max-width:760px) { aside { width:150px; } main { padding:16px; } .box form { grid-template-columns:1fr; } }

a.btn { background:var(--navy); color:#fff; padding:8px 14px; border-radius:6px; text-decoration:none; display:inline-block; }
a.btn:hover { background:var(--navy2); }

/* v2 */
nav .grp { padding:14px 18px 4px; font-size:11px; text-transform:uppercase; letter-spacing:.06em; opacity:.6; }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:16px; flex-wrap:wrap; }
.tabs a { padding:9px 14px; text-decoration:none; color:var(--muted); border-bottom:2px solid transparent; font-weight:600; }
.tabs a.on { color:var(--navy); border-bottom-color:var(--navy); }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:16px; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 14px; }
.card .k { color:var(--muted); font-size:12px; } .card .v { font-size:18px; font-weight:700; color:var(--navy); margin-top:2px; }
.box form h4 { grid-column:1 / -1; margin:6px 0 0; color:var(--navy); font-size:13px; border-bottom:1px solid var(--line); padding-bottom:4px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px; max-width:760px; }
.panel form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; } .panel form .full { grid-column:1 / -1; }
/* long option texts must never push a field out of its box */
.panel form > *, .box form > * { min-width:0; }
.panel form select, .panel form input, .box form select, .box form input { max-width:100%; }
.panel form label .ssel, .box form label .ssel { min-width:0; }
/* report form: as wide as the results below it */
.panel.wide { max-width:none; }
.panel.wide form { grid-template-columns:repeat(4, minmax(0,1fr)); } .panel.wide form .half { grid-column:span 2; }
@media (max-width:1000px) { .panel.wide form { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
.logo-prev { max-height:60px; max-width:220px; border:1px solid var(--line); padding:4px; background:#fff; }
label.btn { background:var(--navy); color:#fff; padding:8px 14px; border-radius:6px; display:inline-block; font-size:14px; }
a.btn.ghost, label.btn.ghost { background:#fff; color:var(--navy); border:1px solid var(--line); }
a.btn.ghost:hover, label.btn.ghost:hover { background:#eef2f9; }
a.btn.small { padding:4px 9px; font-size:12px; }

td.wrap { white-space:normal; min-width:160px; max-width:360px; }

/* view-only tabs */
.ro-banner { background:#fef6e7; border:1px solid #f5d79e; color:#8a5a00; border-radius:8px; padding:8px 12px; margin:-4px 0 12px; font-size:13px; }
/* Daily Upload Check grid */
.uc-grid td, .uc-grid th { padding:4px 2px; text-align:center; font-size:11px; }
.uc-grid th.shop, .uc-grid td.shop { text-align:left; position:sticky; left:0; background:#fff; z-index:1; min-width:190px; max-width:230px; white-space:normal; padding-left:10px; }
.uc-grid th.shop { background:#eef2f9; }
.uc-grid th .wd { display:block; font-weight:400; opacity:.6; font-size:10px; }
.uc-grid th.we, .uc-grid td.we { background-color:#fafbfd; }
.uc { display:inline-block; min-width:30px; padding:4px 2px; border-radius:5px; font-size:10px; line-height:1.15; cursor:default; }
.uc.UPLOADED { background:#dcfae6; color:#067647; }
.uc.ZERO, .uc.NO_SALES { background:#eef0f4; color:#475467; }
.uc.CLOSED { background:#dbe8fe; color:#1849a9; }
.uc.MISSING { background:#fee4e2; color:#b42318; font-weight:700; cursor:pointer; box-shadow:inset 0 0 0 1px #fda29b; }
.uc.MISSING.card { background:#d92d20; color:#fff; }
.uc.NOT_DUE { color:#98a2b3; }
.uc.NOT_OPEN { color:#d0d5dd; }
.uc.NO_SALES, .uc.CLOSED { cursor:pointer; }
.uc-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; margin:8px 0 10px; align-items:center; }
.uc-legend .uc { min-width:auto; padding:2px 8px; }
.brand-logo span { color:var(--navy); }
.geo-pay td.wrap { max-width:220px; }

/* data entry to-do */
.todo { padding: 9px 12px; border-radius: 8px; margin: 6px 0; font-size: 14px; }
.todo.ok { background: #e6f6ec; color: #145c32; }
.todo.bad { background: #fde2e1; color: #8a1c13; font-weight: 600; }
.todo.bad a { color: #8a1c13; margin-left: 6px; }
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }

/* search box above long drop-down lists (shops, partners...) */
.ssel { display: inline-flex; flex-direction: column; gap: 4px; min-width: 200px; vertical-align: top; }
label .ssel { display: flex; width: 100%; }
.ssel .selsearch { padding: 6px 9px; font-size: 13px; }
.ssel select.open { position: relative; z-index: 5; box-shadow: 0 6px 18px rgba(16, 24, 40, .14); }
.ssel select.open option:checked { background: #dbe7f7; }
.ssel .selsearch.nomatch { border-color: var(--red, #b42318); background: #fff5f4; }

/* Excel button above every table */
.xlbar { display:flex; justify-content:flex-end; margin:2px 0 4px; }
.xlbtn { font-size:12px; padding:3px 10px; background:#fff; color:#0f5132; border:1px solid #b7d7c4; border-radius:5px; cursor:pointer; }
.xlbtn:hover { background:#eaf3ee; }
@media print { .xlbar { display:none; } }
/* action buttons stacked in narrow columns (Geidea payouts) */
td.actions.stack { white-space:normal; min-width:118px; flex-direction:column; align-items:stretch; gap:4px; }
td.actions.stack .small { width:100%; margin:0; }
/* statement shown to the customer: fit the screen - headings wrap, smaller text, amounts never break */
#sprint table { width:100%; font-size:12.5px; }
#sprint th { white-space:normal; vertical-align:bottom; }
#sprint th, #sprint td { padding:6px 7px; }
#sprint td.num { white-space:nowrap; }
#sprint .table-wrap { overflow-x:auto; }
/* ---------- report design: tiles, report tables, header band ---------- */
.cards .card { position:relative; overflow:hidden; box-shadow:0 1px 2px rgba(16,24,40,.05); border-color:#e3e7ee; }
.cards .card::before { content:''; position:absolute; left:10px; right:10px; top:0; height:3px; border-radius:0 0 3px 3px; background:var(--c, var(--navy)); }
.cards .card:nth-child(8n+1) { --c:#14305a; } .cards .card:nth-child(8n+2) { --c:#d4a72c; } .cards .card:nth-child(8n+3) { --c:#1aa39a; } .cards .card:nth-child(8n+4) { --c:#e8684a; }
.cards .card:nth-child(8n+5) { --c:#7b61c9; } .cards .card:nth-child(8n+6) { --c:#3fa7e0; } .cards .card:nth-child(8n+7) { --c:#5cb85c; } .cards .card:nth-child(8n+8) { --c:#c2477a; }
.cards .card .k { font-size:12px; letter-spacing:.01em; }
.cards .card.hi { background:linear-gradient(135deg,#d4a72c 0%,#ecd089 100%); border-color:transparent; }
.cards .card.hi::before { display:none; } .cards .card.hi .k { color:#3d2f05; font-weight:600; } .cards .card.hi .v { color:#1f1803; }
.cards.tiles { margin:2px 0 18px; }
tr.tot td { background:#fbf1d6; font-weight:700; border-top:2px solid #d4a72c; }
tr.bold td { background:#eef2f9; font-weight:600; color:var(--navy); }
.rep h4 { color:var(--navy); margin:20px 0 6px; padding-left:9px; border-left:4px solid #d4a72c; font-size:14.5px; }
.rep .table-wrap { border-color:#dfe4ec; box-shadow:0 1px 2px rgba(16,24,40,.04); }
.rep th { background:var(--navy); color:#fff; font-weight:600; border-bottom:none; }
.rep tbody tr:nth-child(even):not(.tot):not(.bold) td { background:#f7f8fb; }
.rep tbody tr:hover:not(.tot) td { background:#eef4ff; }
.rep-band { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 20px; color:#fff; background:linear-gradient(120deg,#14305a 0%,#0d2140 100%); border-bottom:3px solid #d4a72c; border-radius:8px 8px 0 0; }
.rep-title { font-size:18px; font-weight:700; letter-spacing:.01em; }
.rep-sub { font-size:12.5px; opacity:.85; margin-top:3px; }
.rep-chip { background:#d4a72c; color:#1f1803; font-weight:700; font-size:12.5px; padding:6px 12px; border-radius:999px; white-space:nowrap; }
#sprint .rep-band { border-radius:8px; margin:4px 0 12px; }
@media print { * { -webkit-print-color-adjust:exact; print-color-adjust:exact; } }
/* daily sheet upload check */
.card .v.pos { color: var(--green, #1a7f37); } .card .v.neg { color: #b54708; }

/* ---------- table sort and filter ---------- */
.xlbar { align-items:center; gap:8px; flex-wrap:wrap; }
.tfil { display:flex; align-items:center; gap:6px; margin-right:auto; flex-wrap:wrap; }
.tfil .tfilter { width:220px; padding:6px 10px; }
.tfil .tfcol { width:auto; padding:6px 8px; }
#content table thead th { cursor:pointer; user-select:none; }
#content table thead th[data-dir]::after { content:" ▲"; font-size:10px; opacity:.8; }
#content table thead th[data-dir="desc"]::after { content:" ▼"; }
tr.ftot td { font-style:italic; }

/* ---------- dashboard ---------- */
.dash { display:flex; flex-direction:column; gap:16px; }
.dash .dbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 12px; }
.dash .dbar label { display:flex; flex-direction:row; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--muted); margin:0; }
.dash .dbar input[type=date], .dash .dbar select { width:auto; }
.pill { border:1px solid #c9d2de; background:#fff; color:var(--navy); border-radius:999px; padding:7px 13px; font-size:13px; font-weight:600; cursor:pointer; }
.pill.on { background:var(--navy); color:#fff; border-color:var(--navy); }
.seg { display:inline-flex; gap:3px; background:#eef2f7; border-radius:10px; padding:3px; }
.seg button { border:0; background:transparent; color:var(--muted); border-radius:8px; padding:7px 11px; font-size:13px; font-weight:600; cursor:pointer; }
.seg button.on { background:#fff; color:var(--navy); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.dk { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:12px; }
.dk .t { background:#fff; border:1px solid var(--line); border-top:4px solid var(--c, var(--navy)); border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.dk .t.click { cursor:pointer; }
.dk .t .k { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.dk .t .v { font-size:22px; font-weight:700; }
.dk .t .d { font-size:12px; font-weight:600; }
.up { color:#067647; } .down { color:#b42318; } .flat { color:var(--muted); }
.drow { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.dbox { background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.dbox h3 { margin:0; font-size:16px; }
.dbox .head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
.big { flex:999 1 620px; } .side { flex:1 1 320px; }
.dinfo { font-size:13px; background:#f4f6fa; border-radius:8px; padding:8px 10px; min-height:20px; }
.chart { overflow-x:auto; }
.bars { display:flex; align-items:flex-end; gap:3px; height:240px; border-bottom:1px solid #c9d2de; padding-top:8px; }
.bars .b { flex:1; min-width:9px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; position:relative; cursor:pointer; }
.bars .b span { display:block; }
.bars .b .pv { position:absolute; left:0; right:0; height:0; border-top:2px dashed #b42318; }
.bars .b.dim { opacity:.45; }
.blabels { display:flex; gap:3px; padding-top:4px; }
.blabels span { flex:1; min-width:9px; text-align:center; font-size:10px; color:var(--muted); overflow:hidden; white-space:nowrap; }
.legend { display:flex; flex-wrap:wrap; gap:14px; font-size:12px; color:#3d4757; }
.legend i { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:5px; vertical-align:-2px; }
.hbar { display:flex; flex-direction:column; gap:3px; font-size:13px; }
.hbar .l { display:flex; justify-content:space-between; gap:8px; }
.hbar .tr { height:10px; background:#eef2f7; border-radius:999px; } .hbar .tr div { height:10px; border-radius:999px; }
.alert { display:flex; gap:10px; padding:10px; border-radius:10px; font-size:13px; text-decoration:none; color:var(--text); }
.alert.red { background:#fdecea; } .alert.amber { background:#fff4d6; } .alert.blue { background:#eaf1f8; } .alert.green { background:#e3f4e8; }
.alert b.i { width:18px; text-align:center; }
.heat { display:flex; flex-direction:column; gap:2px; min-width:760px; }
.heat .hr { display:flex; gap:2px; align-items:center; }
.heat .nm { width:190px; flex:none; font-size:12px; font-weight:600; color:var(--navy); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; cursor:pointer; }
.heat .c { flex:1; height:24px; border-radius:3px; cursor:pointer; min-width:8px; }
.heat .c.sel { outline:2px solid #d9a441; outline-offset:1px; }
.heat .dh { flex:1; text-align:center; font-size:9px; color:var(--muted); min-width:8px; }
.heat .tt { width:96px; flex:none; text-align:right; font-size:12px; }
.wf { display:flex; align-items:flex-end; gap:10px; height:260px; border-bottom:1px solid #c9d2de; min-width:640px; }
.wf button { flex:1; height:100%; border:0; background:none; padding:0; display:flex; flex-direction:column; justify-content:flex-end; cursor:pointer; }
.wf button .bar { border-radius:4px; }
.wf button.on .bar { outline:3px solid #1b2433; outline-offset:2px; }
.wf button .val { font-size:12px; font-weight:700; text-align:center; padding-bottom:4px; }
.wfl { display:flex; gap:10px; min-width:640px; } .wfl span { flex:1; text-align:center; font-size:12px; font-weight:600; color:#3d4757; }
.agebar { display:flex; height:30px; border-radius:8px; overflow:hidden; }
.agebar button { border:0; font-size:12px; font-weight:700; cursor:pointer; min-width:0; }
.chip { font-size:12px; font-weight:600; padding:3px 8px; border-radius:999px; white-space:nowrap; }
.chip.g { background:#e3f4e8; color:#1a6b34; } .chip.a { background:#fff4d6; color:#8a5a00; } .chip.o { background:#fde7d9; color:#9a3a0c; } .chip.r { background:#fdecea; color:#b42318; } .chip.n { background:#eef2f7; color:#3d4757; } .chip.b { background:#eaf1f8; color:#14305a; }
.cal .c { height:22px; }
