:root{color-scheme:light;--blue:#0b5471;--sky:#85b7d6;--ink:#173b4b;--muted:#5d7280;--line:#cfe0e9;--surface:#fff;--wash:#f2f7fa}*{box-sizing:border-box}body{margin:0;background:var(--wash);color:var(--ink);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}.topbar{background:var(--blue);color:#fff;padding:14px max(20px,calc((100vw - 1040px)/2));}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#fff;color:var(--blue);font-weight:800}.brand strong,.brand small{display:block}.brand small{opacity:.8}.page{width:min(100% - 32px,820px);margin:36px auto;min-height:62vh}.card,.receipt-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:clamp(20px,4vw,34px);box-shadow:0 8px 24px #14394a0b}.auth-card{max-width:620px;margin:auto}h1{margin:0 0 8px;font-size:clamp(1.6rem,4vw,2.1rem);line-height:1.2}.eyebrow{margin:0 0 8px;color:#397d9d;font-size:.75rem;font-weight:800;letter-spacing:.1em}.intro{color:var(--muted);margin:0 0 22px}.form{display:grid;gap:16px}.form label{display:grid;gap:6px;font-weight:650}.form input{width:100%;min-width:0;border:1px solid #b8ceda;border-radius:11px;padding:12px 13px;color:var(--ink);font:inherit;background:#fff}.form input:focus{outline:3px solid #85b7d655;border-color:#5797b7}.actions{display:flex;gap:10px;flex-wrap:wrap}button{border:1px solid var(--blue);background:var(--blue);color:white;border-radius:11px;padding:11px 16px;font:inherit;font-weight:700;cursor:pointer}button.secondary{background:#edf5f8;color:var(--blue);border-color:var(--line)}button:disabled{opacity:.6;cursor:wait}.hidden{display:none!important}.message{min-height:1.5em;color:var(--muted);margin:14px 0 0}.message[data-state=error]{color:#a83232}.message[data-state=success]{color:#19784f}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.panel-heading .intro{margin-bottom:0}.receipt-list{display:grid;gap:16px}.receipt-card{padding:22px}.receipt-head{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}.receipt-head h2{font-size:1.15rem;margin:0}.receipt-head p{margin:3px 0 0;color:var(--muted)}.receipt-date{color:var(--muted);font-size:.9rem}.receipt-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.receipt-item{padding:11px 12px;background:var(--wash);border:1px solid var(--line);border-radius:12px;min-width:0}.receipt-item span,.receipt-item strong{display:block;overflow-wrap:anywhere}.receipt-item span{font-size:.82rem;color:var(--muted)}.receipt-item strong{font-size:1.05rem}.receipt-item.net{background:#e5f3f8;border-color:#85b7d6}.receipt-actions{margin-top:14px}footer{text-align:center;color:var(--muted);padding:16px 24px 28px;font-size:.88rem}@media(max-width:560px){.page{width:min(100% - 20px,820px);margin:20px auto}.topbar{padding:12px 16px}.panel-heading{align-items:flex-start;flex-direction:column}.receipt-items{grid-template-columns:1fr}.receipt-head{flex-direction:column}.actions>*{flex:1 1 145px}}
@media print{body{background:#fff}.topbar,footer,#authPanel,.panel-heading,#receiptMessage,.receipt-actions{display:none!important}.page{width:100%;margin:0;min-height:0}.receipt-list{display:block}.receipt-card{display:none;box-shadow:none;border:0;padding:0}.receipt-card.printing{display:block}.receipt-item{break-inside:avoid}.receipt-card h2{font-size:20pt}}

/* v346: tema claro/oscuro consistente y selector compacto en el portal */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative}
.worker-theme-toggle{width:76px;height:42px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:3px;padding:3px;border:1px solid #d8e6ec;border-radius:999px;background:#f4f8fa;color:#0b5471;cursor:pointer;box-shadow:none}
.worker-theme-toggle span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#c7dbe4}
.worker-theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="light"] .worker-theme-sun,html[data-theme="dark"] .worker-theme-moon{background:#85b7d6;color:#0b5471}
html[data-theme="dark"]{color-scheme:dark;--ink:#e8f1f5;--muted:#b9cbd3;--line:#405763;--surface:#182832;--wash:#101b22}
html[data-theme="dark"] body{background:var(--wash);color:var(--ink)}
html[data-theme="dark"] .card,html[data-theme="dark"] .receipt-card{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:none}
html[data-theme="dark"] .form input{background:#20343f;color:var(--ink);border-color:#526d7a}
html[data-theme="dark"] .form input::placeholder{color:#b9cbd3;opacity:1}
html[data-theme="dark"] .intro,html[data-theme="dark"] footer{color:var(--muted)}
html[data-theme="dark"] .message:not([data-state="error"]){background:#20343f;color:var(--ink)}
html[data-theme="dark"] .secondary{background:#294754;color:#edf5f8;border-color:#58717d}
html[data-theme="dark"] .topbar{background:#0b5471}
@media(max-width:520px){.topbar{padding-right:12px;padding-left:12px}.worker-theme-toggle{width:68px;height:38px}.worker-theme-toggle span{width:27px;height:27px}.brand{min-width:0;max-width:calc(100% - 78px)}}
