:root { --bg: #161616; --card: #202020; --line: #333; --bone: #efe9df; --mut: #9a948a; --red: #c8102e; }
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--bone); font-family: 'Inter', system-ui, sans-serif; }
body { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: var(--bone); }
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 1px; color: var(--mut); }
.top b { color: var(--bone); font-weight: 600; }
.top button { color: var(--bone); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 1px; padding: 6px 0; min-height: 40px; }
main { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 24px; }
.pad { padding: 20px 0; }
.big { font-family: 'Anton', sans-serif; font-size: 46px; line-height: .95; letter-spacing: .5px; text-transform: uppercase; }
.tag { align-self: flex-start; background: var(--red); color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 4px 8px; letter-spacing: 1px; }
.lbl { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 2px; color: var(--mut); margin-top: 4px; text-transform: uppercase; }
.mut { color: var(--mut); }
.small { font-size: 13px; }
.svc { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; min-height: 64px; }
.svc[aria-pressed="true"] { border-color: var(--bone); box-shadow: inset 0 0 0 1px var(--bone); }
.svc .n { font-weight: 700; font-size: 16px; }
.svc .d { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--mut); margin-top: 3px; }
.svc .p { font-family: 'Anton', sans-serif; font-size: 24px; }
.btn { display: block; width: 100%; background: var(--bone); color: #111; font-weight: 800; font-size: 16px; text-align: center; padding: 16px; border-radius: 14px; letter-spacing: .5px; text-decoration: none; min-height: 52px; }
.btn:disabled { opacity: .35; cursor: default; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--bone); border: 1px solid var(--line); }
.foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22%); padding-bottom: 6px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 58px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 8px 0; min-height: 62px; }
.day .w { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--mut); }
.day .n { font-family: 'Anton', sans-serif; font-size: 24px; }
.day[aria-pressed="true"] { background: var(--bone); color: #111; } .day[aria-pressed="true"] .w { color: #555; }
.day:disabled { opacity: .3; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 12px 0; font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 600; min-height: 46px; }
.slot[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.sum { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.field span { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1.5px; color: var(--mut); }
.field input { background: transparent; border: 0; outline: 0; font-size: 17px; padding: 4px 0; }
.field:focus-within { border-color: var(--bone); }
.err { color: #ff8a8a; font-size: 14px; min-height: 18px; }
.check { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--bone); display: flex; align-items: center; justify-content: center; align-self: center; margin-top: 18px; }
.center { text-align: center; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--mut); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-family: 'JetBrains Mono', monospace; font-size: 12px; border: 1px solid var(--line); border-radius: 20px; padding: 8px 12px; min-height: 40px; }
.pill[aria-pressed="true"] { background: var(--bone); color: #111; border-color: var(--bone); }
/* agenda do barbeiro */
.ag { display: flex; gap: 12px; align-items: stretch; }
.ag .h { width: 46px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--mut); padding-top: 12px; flex: none; }
.ag .c { flex: 1; background: var(--card); border-left: 3px solid var(--bone); border-radius: 10px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; }
.ag .c.free { border: 1px dashed var(--line); background: transparent; color: var(--mut); font-size: 13px; }
.ag .c.blk { border-left-color: var(--red); }
.ag .c.pend { border-left-color: #e0b23c; background: #262218; }
.ag button.x.acc { background: var(--bone); color: #111; border-color: var(--bone); font-weight: 600; }
.ag .c.cx { opacity: .45; text-decoration: line-through; }
.ag .n { font-weight: 700; font-size: 15px; }
.ag .d { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--mut); margin-top: 2px; }
.ag a, .ag button.x { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--bone); border: 1px solid var(--line); border-radius: 16px; padding: 7px 10px; text-decoration: none; white-space: nowrap; min-height: 34px; display: inline-flex; align-items: center; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet > div { background: var(--bg); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 20px 18px 26px; display: flex; flex-direction: column; gap: 12px; max-height: 90dvh; overflow: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
select { font: inherit; color: var(--bone); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 48px; width: 100%; }
@media (max-width: 360px) { .big { font-size: 40px; } .slot { font-size: 14px; } }
/* ---- agenda v2 (estrutura do MAZE) ---- */
.alert { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--red); background: rgba(200,16,46,.12); border-radius: 14px; padding: 10px 12px 10px 16px; font-weight: 700; }
.btn.small { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.kpis b { font-family: 'Anton', sans-serif; font-size: 24px; font-weight: 400; }
.kpis span { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--mut); }
.req { background: #262218; border: 1px solid #e0b23c; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.req-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.req-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.req-b .btn { width: 100%; }
.req-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: #e0b23c; }
.req-t { font-family: 'Anton', sans-serif; font-size: 21px; letter-spacing: .3px; }
.req-d { font-size: 14px; }
.chip { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(255,255,255,.08); border-radius: 20px; padding: 4px 9px; white-space: nowrap; color: var(--bone); }
.req .chip { background: #e0b23c; color: #111; font-weight: 600; }
.day .dots { font-size: 10px; line-height: 1; color: var(--red); letter-spacing: 1px; min-height: 10px; }
.day[aria-pressed="true"] .dots { color: var(--red); }
.dayhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 4px; }
.tl { display: flex; flex-direction: column; gap: 10px; }
.ag button.c { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.ag .c.free { justify-content: space-between; }
.ag .c.free span { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--bone); opacity: .7; }
.ag .c.next { border-left-color: var(--red); box-shadow: 0 0 0 1px rgba(200,16,46,.5); }
#dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 15; display: flex; align-items: center; gap: 14px; }
#dock button { width: 56px; height: 56px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--bone); display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
#dock button.main { width: 120px; border-radius: 30px; background: var(--red); border-color: var(--red); color: #fff; }
#dock i { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #e0b23c; color: #111; font: 700 11px/20px 'Inter', sans-serif; font-style: normal; text-align: center; padding: 0 5px; }
.sheet > div { position: relative; padding-top: 22px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); color: var(--bone); font-size: 16px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; font-weight: 700; font-size: 15px; min-height: 92px; }
.tile svg { color: var(--red); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { padding: 10px 0; border-radius: 10px; font-weight: 700; font-size: 14px; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--bone); color: #111; }
.bar { display: flex; flex-direction: column; gap: 6px; }
.bar-t { display: flex; justify-content: space-between; font-size: 14px; }
.bar-t span:last-child { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--mut); }
.bar-b { height: 10px; background: var(--card); border-radius: 6px; overflow: hidden; }
.bar-b i { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inp { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; min-height: 48px; color-scheme: dark; }
.field input[type="time"], .field input[type="date"] { color-scheme: dark; }
