/* SION Barbearia — chocolate e ouro da marca; Merriweather na marca, Archivo no resto */
:root {
  /* SION Barbearia — identidade nova: chocolate + ouro, como na marca */
  --bg: #140a06;
  --s1: #1c0f09;
  --s2: #26150d;
  --s3: #321c11;
  --line: #2b1810;
  --line-2: #3f2518;
  --text: #f7efe3;
  --text-2: #dccfbe;
  --muted: #a6907c;
  --dim: #6f5a4a;
  --accent: #f2d21b;
  --accent-hi: #f6dc45;
  --accent-bg: rgba(242, 210, 27, .11);
  --accent-line: rgba(242, 210, 27, .32);
  --on-accent: #2b1107;
  --brand-brown: #4f1f0d;
  --ember: #d8501f;
  --ok: #8cc79a;
  --warn: #f0b44d;
  --bad: #ef7457;
  /* nomes antigos usados em alguns trechos de tela */
  --ivory: var(--text); --cream: var(--text); --brass: var(--accent); --brass-hi: var(--accent-hi);
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Merriweather", Georgia, "Times New Roman", serif;
  --r: 10px;
  --r-lg: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.has-sheet { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-hi); text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }
.ico { width: 20px; height: 20px; flex: none; stroke-width: 1.6; }
.serif { font-family: var(--font); font-weight: 700; font-stretch: 110%; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }
.idx { display: none; }
.kicker { font: 500 12.5px/1.3 var(--font); color: var(--muted); }
.brass-text { color: var(--text); }
h1, h2, h3 { font-stretch: 110%; letter-spacing: -.02em; }

/* ================= ENTRADA ================= */
.gate { min-height: 100%; background: var(--bg); }
.gate-inner {
  width: 100%; max-width: 1180px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: calc(22px + var(--safe-t)) 22px calc(22px + var(--safe-b));
  display: grid; grid-template-columns: 1fr; gap: 34px; align-content: space-between;
}
.gate-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.shop-sign { font: 500 13px/1.3 var(--font); color: var(--muted); }
.shop-sign b { color: var(--text); font-weight: 600; }
.clock { font: 500 13px/1 var(--font); color: var(--muted); white-space: nowrap; display: flex; gap: 10px; align-items: baseline; }
.clock .t { color: var(--text); font-weight: 600; }

.brand { display: flex; align-items: center; gap: clamp(16px, 4vw, 28px); }
.wordmark .est { font: 500 13px/1 var(--font); color: var(--muted); }
.wordmark h1 { margin: 12px 0 10px; font: 900 clamp(64px, 18vw, 150px)/.86 var(--display); letter-spacing: .02em; color: var(--text); }
.wordmark .sub { font: 600 clamp(11px, 2.6vw, 15px)/1 var(--font); letter-spacing: .42em; color: var(--accent); }
.brand .smark { width: clamp(84px, 22vw, 168px); height: auto; flex: none; }
.razor-rule { display: none; }

.gate-card { width: 100%; max-width: 380px; }
.gate-card h2 { font: 900 25px/1.2 var(--display); margin: 4px 0 6px; }
.gate-card .hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.chairs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 6px; margin: 16px 0 18px; scrollbar-width: none; }
.chairs::-webkit-scrollbar { display: none; }
.chair { flex: none; width: 68px; background: none; border: 0; padding: 0; text-align: center; color: var(--muted); }
.medal {
  width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  font: 600 16px/1 var(--font); color: var(--text-2); background: var(--s2); transition: background .2s, color .2s, transform .2s var(--ease);
}
.chair .nm { font: 500 12.5px/1.3 var(--font); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chair .rl { display: none; }
.chair:active .medal { transform: scale(.94); }
.chair.on { color: var(--text); }
.chair.on .medal { background: var(--accent); color: var(--on-accent); }

.pin-zone { transition: opacity .25s; }
.pin-dots { display: flex; gap: 12px; margin: 2px 0 20px; height: 12px; align-items: center; }
.pin-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--s3); transition: background .15s, transform .15s var(--ease); }
.pin-dots i.f { background: var(--accent); transform: scale(1.1); }
.pin-dots.err { animation: shake .38s; }
.pin-dots.err i { background: var(--bad); }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { height: 60px; border: 0; border-radius: 12px; background: var(--s2); font: 600 22px/1 var(--font); color: var(--text); display: grid; place-items: center; transition: background .12s, transform .08s; }
.key small { display: none; }
.key:hover { background: var(--s3); }
.key:active { transform: scale(.97); background: var(--line-2); }
.key.fn { background: transparent; font: 500 14px/1 var(--font); color: var(--muted); }
.pin-msg { min-height: 22px; margin-top: 12px; font-size: 13.5px; color: var(--bad); }
.gate-foot { display: flex; gap: 18px; justify-content: space-between; align-items: center; color: var(--dim); font-size: 12.5px; }
.gate-foot .link { background: none; border: 0; color: var(--muted); font: inherit; padding: 4px 0; }

@media (min-width: 900px) {
  .gate-inner { grid-template-columns: 1.25fr .75fr; grid-template-rows: auto 1fr auto; column-gap: 72px; padding: 32px 56px; }
  .gate-top, .gate-foot { grid-column: 1 / -1; }
  .brand { grid-column: 1; grid-row: 2; align-self: center; }
  .gate-card { grid-column: 2; grid-row: 2; align-self: center; background: var(--s1); border-radius: 20px; padding: 30px 28px 26px; }
  .gate-foot { grid-row: 3; }
}
.gate .reveal { opacity: 0; animation: reveal .8s var(--ease) forwards; }
.gate .reveal.d1 { animation-delay: .06s; } .gate .reveal.d2 { animation-delay: .16s; } .gate .reveal.d3 { animation-delay: .26s; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.gate.calm .reveal { animation: none; opacity: 1; transform: none; }
.gate.calm .gate-card > * { animation: fadein .3s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ================= CASCA ================= */
.shell { min-height: 100%; display: grid; grid-template-columns: 1fr; }
.side { display: none; }
.main { min-width: 0; padding-bottom: calc(76px + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--safe-t)) 18px 12px; background: rgba(13, 13, 14, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 2px 0 0; font: 900 23px/1.15 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .kicker { font-size: 12.5px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 0; border-radius: 99px; background: var(--s2); font: 500 12px/1 var(--font); color: var(--text-2); white-space: nowrap; }
.sync-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.sync-pill[data-s=ok] .dot { background: var(--ok); }
.sync-pill[data-s=syncing] .dot { background: var(--accent); animation: blink 1s infinite; }
.sync-pill[data-s=offline] .dot, .sync-pill[data-s=auth] .dot { background: var(--warn); }
.sync-pill[data-s=error] .dot, .sync-pill[data-s=conflict] .dot { background: var(--bad); }
@keyframes blink { 50% { opacity: .3; } }
.me { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: var(--muted); text-align: left; }
.me small { font-size: 12px; }
.mini-medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 12.5px/1 var(--font); color: #fff; background: var(--c, var(--s3)); }
.mini-medal.sm { width: 28px; height: 28px; font-size: 11px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + var(--safe-b)); background: rgba(20, 10, 6, .92); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; text-decoration: none; color: var(--dim); font: 500 10.5px/1 var(--font); }
.tabbar a.on { color: var(--text); }
.tabbar a.on .ico { color: var(--accent-hi); }
.tabbar .ico { width: 23px; height: 23px; }

@media (min-width: 900px) {
  .shell { grid-template-columns: 240px 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 48px; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 26px 0 18px; background: var(--s1); border-right: 1px solid var(--line); }
  .side .logo { padding: 0 24px 28px; display: flex; align-items: center; gap: 10px; }
  .side .logo .smark { width: 30px; height: 30px; }
  .side .logo b { font: 900 25px/1 var(--display); letter-spacing: .04em; color: var(--text); }
  .side .logo span { font: 600 9.5px/1 var(--font); letter-spacing: .28em; color: var(--muted); align-self: flex-end; margin-bottom: 3px; }
  .side nav { display: flex; flex-direction: column; padding: 0 12px; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); color: var(--muted); font: 500 14.5px/1 var(--font); transition: background .15s, color .15s; }
  .side nav a .ico { width: 19px; height: 19px; }
  .side nav a:hover { color: var(--text); background: var(--s2); }
  .side nav a.on { color: var(--text); background: var(--s2); }
  .side nav a.on .ico { color: var(--accent-hi); }
  .side .foot { margin: auto 12px 0; padding: 14px 12px 0; border-top: 1px solid var(--line); }
  .side .foot .me span span { color: var(--text) !important; font-weight: 500; }
  .topbar { padding: 18px 36px 16px; }
  .topbar .me { display: none; }
  .page { padding: 26px 36px; }
}

.page { padding: 18px; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font: 700 22px/1.15 var(--font); font-stretch: 110%; letter-spacing: -.02em; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 12px; }
.section-title h3 { margin: 0; font: 700 18px/1.2 var(--font); font-stretch: 110%; letter-spacing: -.015em; }

/* ================= COMPONENTES ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: var(--r); border: 0; background: var(--s2); color: var(--text);
  font: 600 14.5px/1 var(--font); white-space: nowrap; transition: background .15s, transform .08s;
}
.btn .ico { width: 18px; height: 18px; }
.btn:hover { background: var(--s3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: #d0773f; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--s2); }
.btn.danger { background: rgba(226, 112, 90, .12); color: #f19a86; }
.btn.danger:hover { background: rgba(226, 112, 90, .2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--s2); color: var(--text-2); flex: none; transition: background .15s; }
.icon-btn:hover { background: var(--s3); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.row-actions .btn { flex: 1 1 140px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font: 500 12.5px/1.2 var(--font); color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: var(--r); background: var(--s2);
  border: 1px solid transparent; color: var(--text); outline: none; font-size: 16px; transition: border-color .15s, background .15s;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--s1); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--dim); }
.field input[readonly] { color: var(--muted); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { background: var(--s2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.check { display: flex; gap: 10px; align-items: center; margin: 2px 0 14px; color: var(--text-2); font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.search { position: relative; flex: 1; min-width: 200px; }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 18px; }
.search input { padding-left: 40px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); padding: 8px 13px; border-radius: 8px; font: 500 13.5px/1 var(--font); white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--s3); color: var(--text); }
.seg.full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg.full button { padding: 12px 4px; }
.seg.full button.on { background: var(--accent); color: var(--on-accent); }

.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card.pad { padding: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.stat .k { font: 500 12.5px/1.2 var(--font); color: var(--muted); }
.stat .v { font: 700 26px/1.1 var(--font); font-stretch: 105%; letter-spacing: -.02em; margin-top: 8px; white-space: nowrap; }
.stat .s { font-size: 12px; color: var(--dim); margin-top: 3px; }
.stat.hl { background: var(--accent-bg); border-color: var(--accent-line); }
.stat.hl .v { color: var(--accent-hi); }

.list { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; color: inherit; }
button.li { border-radius: 0; transition: background .12s; }
button.li:hover { background: var(--s1); }
.li .main-col { flex: 1; min-width: 0; }
.li .t { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .r { text-align: right; flex: none; }
.li .r .t { font: 700 18px/1.1 var(--font); }
.li .mini-medal:not([style]) { background: var(--s3); color: var(--text-2); }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font: 500 12px/1 var(--font); color: var(--text-2); background: var(--s2); white-space: nowrap; }
.tag.ok { color: var(--ok); background: rgba(127, 191, 143, .12); }
.tag.warn { color: var(--warn); background: rgba(227, 172, 85, .12); }
.tag.bad { color: var(--bad); background: rgba(226, 112, 90, .12); }
.tag.brass { color: var(--accent-hi); background: var(--accent-bg); }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .serif { font-size: 20px; color: var(--text); margin-bottom: 6px; }
.lead { font-size: 16px; color: var(--text-2); line-height: 1.55; }

.add-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: var(--r); border: 0; background: var(--accent); color: var(--on-accent); font: 600 14px/1 var(--font); }
.add-btn i { display: grid; place-items: center; font-style: normal; }
.add-btn i .ico { width: 18px; height: 18px; stroke-width: 2; }
.add-btn:hover { background: #d0773f; }
.fab { display: none; }

/* ---------- folha / painel ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--s1); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line-2); }
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 20px 12px; }
.sheet-head h2 { margin: 3px 0 0; font: 700 24px/1.1 var(--font); font-stretch: 110%; letter-spacing: -.025em; }
.sheet-body { padding: 8px 20px calc(24px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) {
  .sheet { left: auto; top: 10px; bottom: 10px; right: 10px; width: 460px; max-height: none; border-radius: 18px; border: 1px solid var(--line); transform: translateX(110%); }
  .sheet.wide { width: 620px; }
  .sheet::before { display: none; }
  .sheet-head { padding: 24px 26px 12px; }
  .sheet-body { padding: 8px 26px 26px; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); z-index: 200; transform: translate(-50%, 10px); opacity: 0;
  padding: 12px 18px; border-radius: 99px; background: var(--text); color: var(--bg); font: 500 14px/1.2 var(--font); transition: all .25s var(--ease); max-width: calc(100% - 40px);
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #f3c2b6; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ================= AGENDA ================= */
.agenda-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.date-nav .label { font: 700 20px/1 var(--font); font-stretch: 110%; letter-spacing: -.02em; min-width: 140px; text-align: center; }
.date-nav input[type=date] { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.day-summary { color: var(--muted); font-size: 13px; }
.agenda-bar .add-btn { margin-left: auto; }
.grid-wrap { position: relative; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s1); max-height: calc(100vh - 200px); max-height: calc(100dvh - 210px); }
.sched { display: grid; position: relative; min-width: 100%; }
.sched .corner, .sched .colhead { position: sticky; top: 0; z-index: 5; background: var(--s1); border-bottom: 1px solid var(--line); }
.sched .corner { left: 0; z-index: 6; }
.colhead { padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--line); min-width: 0; }
.colhead .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colhead .ct { font-size: 12px; color: var(--dim); }
.times { position: sticky; left: 0; z-index: 4; background: var(--s1); }
.times div { font: 500 11.5px/1 var(--font); color: var(--dim); text-align: right; padding: 5px 10px 0 0; }
.times div.hr { color: var(--muted); }
.col { position: relative; border-left: 1px solid var(--line); }
.slot { border-bottom: 1px dashed rgba(49, 49, 54, .45); cursor: pointer; transition: background .12s; }
.slot.hr { border-bottom: 1px solid var(--line); }
.slot:hover { background: var(--accent-bg); }
.slot.past { background: rgba(0, 0, 0, .18); }
.appt { position: absolute; left: 4px; right: 4px; padding: 6px 9px 5px 12px; overflow: hidden; cursor: pointer; border-radius: 8px; background: var(--s3); color: var(--text); font-size: 13px; line-height: 1.3; transition: filter .15s; }
.appt:hover { filter: brightness(1.12); }
.appt::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--c, var(--accent)); }
.appt .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .m { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.confirmado .m::after { content: " · confirmado"; color: var(--accent-hi); }
.appt.atendido { background: rgba(127, 191, 143, .12); }
.appt.atendido .m::after { content: " · atendido"; color: var(--ok); }
.appt.faltou, .appt.cancelado { opacity: .5; background: transparent; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.appt.cancelado .n { text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ================= PDV ================= */
.pdv { display: grid; gap: 20px; }
@media (min-width: 1100px) { .pdv { grid-template-columns: 1fr 380px; align-items: start; gap: 28px; } .cart-panel { position: sticky; top: 96px; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.tile {
  text-align: left; padding: 14px 14px 13px; min-height: 104px; position: relative; border: 1px solid transparent; border-radius: var(--r-lg);
  background: var(--s2); color: var(--text); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; transition: background .12s, border-color .12s, transform .08s;
}
.tile:hover { background: var(--s3); }
.tile:active { transform: scale(.98); }
.tile:has(.qty) { border-color: var(--accent); background: var(--accent-bg); }
.tile .nm { font: 600 15.5px/1.2 var(--font); padding-right: 26px; }
.tile .pr { font: 700 17px/1 var(--font); letter-spacing: -.01em; }
.tile .meta { font-size: 12px; color: var(--muted); }
.tile .qty { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--font); }
.cart-panel { padding: 0; overflow: hidden; }
.cart-panel .ch { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cart-panel .ch .serif { font-size: 19px !important; }
.cart-items { padding: 0 18px; max-height: 340px; overflow: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .nm { font-weight: 500; }
.cart-line .ln { text-align: right; font: 700 16px/1 var(--font); }
.qty-ctl { display: inline-flex; align-items: center; gap: 4px; }
.qty-ctl button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--s3); color: var(--text-2); display: grid; place-items: center; }
.qty-ctl button .ico { width: 14px; height: 14px; }
.qty-ctl span { min-width: 24px; text-align: center; font-size: 14px; font-weight: 600; }
.cart-total { padding: 16px 18px 18px; border-top: 1px solid var(--line); background: var(--s2); }
.cart-total .big { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cart-total .big b { font: 800 32px/1 var(--font); font-stretch: 105%; letter-spacing: -.03em; }
.receipt { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: #f4f2ee; color: #1a1a1a; padding: 22px 20px; border-radius: 12px; }
.receipt h4 { margin: 0 0 2px; text-align: center; font: 800 24px/1 var(--font); font-stretch: 125%; letter-spacing: -.02em; }
.receipt .c { text-align: center; font-size: 11px; margin-bottom: 12px; color: #6b6b6b; }
.receipt .l { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.receipt hr { border: 0; border-top: 1px dashed #9a9a9a; margin: 10px 0; }

/* ================= CAIXA ================= */
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font: 500 12.5px/1 var(--font); color: var(--muted); padding: 12px 12px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.v { text-align: right; font-weight: 700; white-space: nowrap; }
.ledger td.in { color: var(--ok); } .ledger td.out { color: var(--bad); }
.ledger tr:hover td { background: var(--s2); }
.chart { width: 100%; height: 190px; display: block; }
.bars-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.bars-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.split { display: grid; gap: 14px; }
@media (min-width: 1000px) { .split { grid-template-columns: 1fr 1fr; } .split.r { grid-template-columns: 1.25fr 1fr; } }
.meter { height: 6px; background: var(--s3); border-radius: 3px; margin-top: 7px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.drawer { padding: 20px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); }
.drawer .k { font: 500 13px/1 var(--font); color: var(--muted); }
.drawer .v { font: 800 48px/1 var(--font); font-stretch: 108%; letter-spacing: -.035em; margin-top: 10px; color: var(--text); }
.drawer .s { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
@media (min-width: 700px) { .actions-grid { grid-template-columns: repeat(4, 1fr); } }

/* ================= EQUIPE ================= */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.member { padding: 18px; display: grid; gap: 16px; text-align: left; color: inherit; cursor: pointer; transition: background .12s; }
.member:hover { background: var(--s2); }
.member .top { display: flex; gap: 14px; align-items: center; }
.member .medal { width: 48px; height: 48px; margin: 0; font-size: 15px; background: var(--chair, var(--s3)); color: #fff; }
.member .nm { font: 700 18px/1.15 var(--font); font-stretch: 108%; letter-spacing: -.015em; }
.member .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.member .mini b { display: block; font: 700 18px/1 var(--font); }
.member .mini span { font-size: 12px; color: var(--muted); }
.vacancy { border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 150px; color: var(--muted); }
.vacancy .ico { width: 26px; height: 26px; color: var(--accent-hi); }
.vacancy .kicker { color: var(--text); font-size: 14px; font-weight: 600; }
.vacancy:hover { border-color: var(--accent); background: var(--accent-bg); }
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.colors label { position: relative; }
.colors input { position: absolute; opacity: 0; }
.colors span { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.colors input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.rank { counter-reset: r; }
.rank .li::before { counter-increment: r; content: counter(r); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--s2); font: 700 12px/1 var(--font); color: var(--text-2); flex: none; }
.rank .li:first-child::before { background: var(--accent); color: var(--on-accent); }

/* ================= MENSAGENS ================= */
.sms-preview { background: var(--s3); border-radius: 18px 18px 18px 5px; padding: 12px 15px; white-space: pre-wrap; font-size: 15px; margin-bottom: 6px; max-width: 440px; }
.counter { font-size: 12px; color: var(--dim); text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.chip { border: 0; background: var(--s2); color: var(--text-2); padding: 7px 11px; border-radius: 99px; font: 500 12.5px/1 var(--font); }
.chip:hover { background: var(--s3); color: var(--text); }

.more-grid { display: grid; gap: 8px; }
.more-grid a { display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); }
.more-grid a .ico { color: var(--accent-hi); }
.more-grid a .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.more-grid a .t { font: 700 17px/1.2 var(--font); font-stretch: 108%; }

.banner { padding: 12px 14px; border-radius: var(--r); background: rgba(227, 172, 85, .1); color: var(--warn); font-size: 14px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner .ico { width: 18px; }
.banner.bad { background: rgba(226, 112, 90, .1); color: var(--bad); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 22px; }
  .drawer .v { font-size: 40px; }
  .seg:not(.full) { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .hide-sm { display: none; }
  .page-head .search { min-width: 100%; }
  .agenda-bar .day-summary { width: 100%; order: 5; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
}

/* ---------- versões: dono, barbeiro, balcão ---------- */
.side .logo { flex-wrap: wrap; }
.mode-tag { flex-basis: 100%; margin-top: 10px; font: 600 11px/1 var(--font); font-style: normal; color: var(--accent-hi); }
.mode-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-hi); font-weight: 600; }
.mode-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.h3 { margin: 0; font: 700 17px/1.2 var(--font); font-stretch: 110%; letter-spacing: -.015em; }
.stat small { font-size: 15px; color: var(--muted); font-weight: 600; }
a.stat { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.stat:hover { border-color: var(--line-2); }
.stat .up { color: var(--ok); font-weight: 600; }
.stat .down { color: var(--bad); font-weight: 600; }

.hello h2 { margin: 0; font: 800 30px/1.08 var(--font); font-stretch: 118%; letter-spacing: -.035em; }
.hello p { margin: 8px 0 18px; }
.next-card { position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 20px 18px; overflow: hidden; cursor: pointer; }
.next-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.next-card.empty-next { cursor: default; }
.next-card.empty-next::before { background: var(--line-2); }
.nx-when { font: 600 12.5px/1 var(--font); color: var(--accent-hi); }
.nx-name { font: 800 34px/1.05 var(--font); font-stretch: 115%; letter-spacing: -.035em; margin: 8px 0 6px; overflow-wrap: anywhere; }
.next-card.empty-next .nx-name { font-size: 24px; color: var(--text-2); }
.nx-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.next-card .row-actions .btn { flex: 0 0 auto; }

.time-col { width: 52px; flex: none; font: 700 15px/1.1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.time-col small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.live.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(127, 191, 143, .15); }
.link-box { background: var(--bg); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 12px 14px; font: 600 14px/1.3 var(--font); color: var(--text); overflow-wrap: anywhere; }
.appt.online::after { content: ""; position: absolute; right: 7px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hi); }
@media (max-width: 640px) {
  .hello h2 { font-size: 26px; }
  .nx-name { font-size: 28px; }
  .next-card .row-actions .btn { flex: 1 1 auto; }
}

/* ---------- PDV: cards do dia, histórico, lançar ---------- */
.pdv-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.pdv-stats { grid-template-columns: 1fr 1fr; }
.launch-btn { display: flex; align-items: center; gap: 14px; padding: 0 26px 0 20px; border: 0; border-radius: var(--r-lg); background: var(--accent); color: var(--on-accent); text-align: left; cursor: pointer; transition: background .15s, transform .1s; }
.launch-btn:hover { background: var(--accent-hi); }
.launch-btn:active { transform: scale(.98); }
.launch-btn .ico { width: 30px; height: 30px; stroke-width: 2; }
.launch-btn b { display: block; font: 800 24px/1 var(--font); font-stretch: 115%; letter-spacing: -.03em; }
.launch-btn small { display: block; font-size: 12.5px; opacity: .85; margin-top: 4px; }
.who-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.who-chips::-webkit-scrollbar { display: none; }
.who-chips.filter { margin-top: 14px; }
.who { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--s1); color: var(--text-2); font: 500 13.5px/1 var(--font); cursor: pointer; }
.who.on { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.who .mini-medal.all { background: var(--s3); color: var(--text-2); }
.who .mini-medal.all .ico { width: 15px; height: 15px; }
.appt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.acard { position: relative; display: flex; flex-direction: column; padding: 14px 14px 12px 16px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.acard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.acard.done { opacity: .6; }
.ac-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ac-time { font: 800 22px/1 var(--font); font-stretch: 110%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ac-name { font: 600 16px/1.2 var(--font); margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-svc { font-size: 13px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; min-height: 34px; }
.ac-who { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); min-width: 0; }
.ac-paid { font: 700 16px/1 var(--font); color: var(--ok); }
.launches .li { gap: 12px; }
.launch-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.who-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; padding: 14px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
@media (max-width: 640px) {
  .pdv-top { grid-template-columns: 1fr; }
  .launch-btn { padding: 16px 20px; justify-content: center; }
  .appt-cards { grid-template-columns: 1fr 1fr; }
  .ac-foot { flex-direction: column; align-items: stretch; }
  .ac-foot .btn { width: 100%; }
}
.nx-when.late { color: var(--warn); }

/* ---------- fotos dos barbeiros ---------- */
.mini-medal, .medal, .pro-av { overflow: hidden; }
.mini-medal img, .medal img, .pro-av img, .photo-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.medal.has-photo, .photo-big.has-photo { background: var(--s3); }
.chair.on .medal.has-photo { box-shadow: 0 0 0 3px var(--accent); background: var(--s3); }
.photo-pick { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.photo-big { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--chair, var(--s3)); color: #fff; font: 700 24px/1 var(--font); }
.photo-pick label.btn { cursor: pointer; }

/* ---------- clube e conta do cliente (app da barbearia) ---------- */
.club-mark { display: inline-block; padding: 2px 7px; border-radius: 99px; background: var(--accent-bg); color: var(--accent-hi); font: 700 10.5px/1.3 var(--font); letter-spacing: .02em; vertical-align: 1px; }
.acct-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); vertical-align: 2px; margin-left: 4px; }
.club-card, .acct-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--s2); margin-bottom: 8px; }
.club-card.on { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.club-card .t, .acct-card .t { font-weight: 600; margin-top: 4px; }
.club-card .s, .acct-card .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.acct-card .code { font: 800 18px/1 var(--font); letter-spacing: .12em; color: var(--accent-hi); }
.acct-card + .stats { margin-top: 14px; }
.club-note { padding: 10px 12px; border-radius: var(--r); background: var(--accent-bg); color: var(--text); font-size: 13.5px; margin: 0 0 10px; }
.client-face { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin-bottom: 14px; }
.client-face img { width: 100%; height: 100%; object-fit: cover; }

/* ================= MARCA SION ================= */
.smark { display: block; fill: var(--accent); overflow: visible; }
.smark.anim .sa { animation: smark-a 1s cubic-bezier(.7, 0, .2, 1) both; }
.smark.anim .sb { animation: smark-b 1s cubic-bezier(.7, 0, .2, 1) both; }
@keyframes smark-a { 0% { transform: translate(34px, 0); opacity: 0; } 35% { opacity: 1; } 100% { transform: none; } }
@keyframes smark-b { 0% { transform: translate(-34px, 0); opacity: 0; } 35% { opacity: 1; } 100% { transform: none; } }
.gate.calm .smark.anim path { animation: none; }
@media (prefers-reduced-motion: reduce) { .smark.anim path { animation: none; } }
