@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap");
:root {
	color-scheme: light;
	--bg: #f1efe9; --fg: #1d2330; --muted: #69707d; --accent: #f2a900; --ink: #1d2330;
	--border: #ddd8cc; --radius: 14px; --font: "Archivo", system-ui, sans-serif;
	--pos: #1f8a4c; --neg: #c4381d; --card: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }
h1 { font-size: 1.5rem; margin: 0; } h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.shell { width: 100%; max-width: 78rem; margin: 0 auto; padding: 0 1rem; }
.page { padding-top: 1.25rem; padding-bottom: 11rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; } .stack.lg { gap: 1.25rem; }
.row { display: flex; gap: .6rem; align-items: center; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; } .mt { margin-top: 1.5rem; } .muted { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: .75rem 1rem; background: var(--ink); color: #fff; cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn.big { min-height: 56px; font-size: 1.05rem; } .btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); align-self: flex-start; }
.btn:disabled { opacity: .6; } .btn.file { cursor: pointer; }
.input { font: inherit; width: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; min-height: 48px; }
.input.money { font-size: 2rem; font-weight: 800; }
.field { display: flex; flex-direction: column; gap: .35rem; } .field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.top { background: var(--ink); color: #fff; padding: .9rem 0; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 1.35rem; } .brand span { color: var(--accent); } .brand.big { font-size: 2rem; }
.topnav { display: none; gap: .3rem; }
.topnav button { font: inherit; background: none; border: 0; color: #cfd3db; padding: .5rem .9rem; border-radius: 8px; cursor: pointer; }
.topnav button.on { background: var(--accent); color: var(--ink); font-weight: 600; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--ink); z-index: 6; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav button { flex: 1; font: inherit; font-size: .8rem; background: none; border: 0; color: #cfd3db; padding: .55rem 0 .65rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; min-height: 60px; }
.bottomnav button span { font-size: 1.2rem; font-weight: 800; } .bottomnav button.on { color: var(--accent); }
.quick { position: fixed; left: 0; right: 0; bottom: 64px; display: flex; gap: .5rem; padding: .6rem 1rem; z-index: 6; background: linear-gradient(transparent, var(--bg) 35%); }
.quick .btn { flex: 1; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.kpi { background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.kpi span { font-size: .8rem; color: var(--muted); } .kpi b { font-size: 1.1rem; overflow-wrap: anywhere; }
.cols { display: grid; gap: 1.25rem; }
.bar { display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: .5rem; margin: .5rem 0; font-size: .9rem; }
.bar i { display: block; height: 14px; background: var(--pos); border-radius: 7px; } .bar.cost i { background: var(--neg); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: .7rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--border); font: inherit; color: inherit; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.list-item small, .jobcard small { display: block; color: var(--muted); font-size: .8rem; }
.job-row { cursor: pointer; }
.badge { font-size: .75rem; font-weight: 600; background: #eceae2; padding: .25rem .55rem; border-radius: 99px; white-space: nowrap; }
.tag { font-size: .72rem; font-weight: 800; padding: .25rem .5rem; border-radius: 6px; text-transform: uppercase; }
.tag.civil { background: #e4ddcf; color: #6b4f1d; } .tag.ele { background: #fff1c7; color: #8a6100; }
.badge.ok { background: #d9f0df; color: #1e6b34; } .badge.bad { background: #f8dcd8; color: #a3261a; } .badge.warn { background: #fbecc8; color: #7a5600; }
.bill { align-items: flex-start; } .bill-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; text-align: right; }
.bill-actions { margin-top: .5rem; gap: .4rem; } .bill-actions .btn { min-height: 44px; padding: .4rem .8rem; font-size: .85rem; }
.bottomnav button { font-size: .7rem; }
.stars { display: inline-flex; gap: .1rem; } .star { font-size: 1.6rem; line-height: 1; color: #cfcbbf; background: none; border: 0; padding: .15rem; min-width: 36px; min-height: 40px; cursor: pointer; } .star.on { color: #e5a400; }
span.star { min-width: 0; min-height: 0; font-size: 1.1rem; cursor: default; }
.switch { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .6rem; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: .4rem .9rem .4rem .4rem; min-height: 44px; cursor: pointer; }
.switch i { width: 38px; height: 22px; border-radius: 99px; background: #cfcbbf; position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on i { background: #1f8a4c; } .switch.on i::after { left: 18px; }
.dim { opacity: .55; }
.check { cursor: pointer; } .check input { width: 22px; height: 22px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calhead { text-align: center; font-size: .75rem; font-weight: 700; color: #777; }
.calday { font: inherit; border: 1px solid var(--border); background: #fff; border-radius: 10px; min-height: 52px; padding: .25rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; cursor: pointer; }
.calday.today { border-color: var(--ink); } .calday.sel { background: var(--ink); color: #fff; }
.dots { display: flex; gap: 3px; min-height: 8px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: #888; } .dots i.civil { background: #c9741a; } .dots i.ele { background: #2563c9; }
.calfilters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.monthname { min-width: 8.5rem; text-align: center; }
.caldetail { background: #faf9f4; }
@media (max-width: 420px) { .bottomnav button { font-size: .66rem; } .bottomnav button span { font-size: 1.05rem; } }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { font: inherit; font-size: .9rem; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: .55rem .9rem; min-height: 44px; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.thumbs figure { margin: 0; font-size: .8rem; } .thumbs figcaption small { display: block; color: var(--muted); }
.rcpt { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.jobgrid { display: grid; gap: .8rem; }
.jobcard { font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: .45rem; }
.overlay { position: fixed; inset: 0; background: rgba(15,18,25,.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 38rem; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 1.1rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--ink); }
.login .card { max-width: 26rem; width: 100%; }
.loading { display: flex; justify-content: center; padding: 3rem; }
.spinner { width: 32px; height: 32px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: #e4e1d8; border-radius: 8px; min-height: 1rem; }
.empty { text-align: center; padding: 1.5rem; color: var(--muted); } .empty-title { font-weight: 600; }
.alert { padding: .75rem; border-radius: 10px; } .alert-error { background: #fbe3dc; color: var(--neg); }
@media (min-width: 800px) {
	.topnav { display: flex; } .bottomnav { display: none; }
	.quick { bottom: 1.5rem; right: 1.5rem; left: auto; background: none; flex-direction: column; width: 15rem; }
	.page { padding-bottom: 4rem; }
	.kpis { grid-template-columns: repeat(3, 1fr); } .kpi b { font-size: 1.4rem; }
	.cols { grid-template-columns: 1.3fr 1fr; } .jobgrid { grid-template-columns: repeat(3, 1fr); }
	.overlay { align-items: center; } .sheet { border-radius: 20px; }
}
