:root {
  --bg: #EEEEEC;
  --card: #FFFFFF;
  --ink: #151515;
  --ink-2: #2B2B2A;
  --muted: #5F5F5C;
  --soft: #7A7A76;
  --line: #DEDEDA;
  --line-2: #E8E8E4;
  --fill: #F5F5F3;
  --ok: #17633A;     --ok-bg: #E3F1E8;
  --warn: #8A4500;   --warn-bg: #FBEBD9;
  --late: #9E1C12;   --late-bg: #FBE4E1;
  --off: #4A4A47;    --off-bg: #E4E4E0;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --radius: 18px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex-shrink: 0; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
#app { max-width: 600px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { padding: calc(18px + var(--safe-t)) 16px calc(var(--nav-h) + 96px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: fade .18s ease-out; }
.screen.no-nav { padding-bottom: calc(40px + var(--safe-b)); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.topbar .left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.title { font-family: var(--display); font-weight: 800; font-size: 32px; text-transform: uppercase; letter-spacing: .5px; line-height: 1; }
.title.sm { font-size: 28px; }
.sub { font-size: 13px; font-weight: 700; color: var(--muted); }
.section-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 40px; height: 44px; }
.brand .hello { font-size: 12px; color: var(--muted); font-weight: 700; display: block; }
.brand .name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .5px; text-transform: uppercase; line-height: 1; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h3 { font-size: 15px; font-weight: 800; }
.card-head .sub { font-size: 12px; }

.hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hero .k { font-size: 12px; font-weight: 700; color: #BDBDB8; text-transform: uppercase; letter-spacing: 1px; }
.hero .big { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; }
.hero .big small { font-size: 24px; color: #8F8F8A; }
.hero .bar { height: 8px; border-radius: 99px; background: #333331; overflow: hidden; }
.hero .bar i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .6s ease; }
.hero .foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #BDBDB8; font-weight: 600; }
.hero-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hero-split div { background: #262625; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.hero-split span { font-size: 12px; font-weight: 700; color: #BDBDB8; }
.hero-split b { font-size: 16px; font-weight: 800; }
.pos { color: #7FD9A0; } .neg { color: #F2A39A; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; text-align: left; text-decoration: none; }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat b { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; }
.stat em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.c-warn { color: var(--warn) !important; } .c-late { color: var(--late) !important; } .c-ok { color: var(--ok) !important; } .c-muted { color: var(--muted) !important; }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
.row.plain { border: none; border-radius: 0; border-bottom: 1px solid var(--bg); background: transparent; padding: 11px 12px; }
.row.plain:last-child { border-bottom: none; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row .name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--muted); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.ico-box { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico-box.ok { background: var(--ok-bg); color: var(--ok); } .ico-box.late { background: var(--late-bg); color: var(--late); }
.amount { font-weight: 800; font-size: 14px; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.b-hoje { background: var(--warn-bg); color: var(--warn); }
.b-amanha { background: var(--bg); color: #3A3A38; }
.b-atrasado { background: var(--late-bg); color: var(--late); }
.b-em_dia { background: var(--ok-bg); color: var(--ok); }
.b-inativo { background: var(--off-bg); color: var(--off); }

/* ---------- buttons ---------- */
.btn { height: 48px; padding: 0 16px; border-radius: 14px; border: none; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.sm { height: 40px; padding: 0 13px; border-radius: 12px; font-size: 13px; }
.btn.lg { height: 56px; border-radius: 16px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.outline { background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.danger { background: var(--card); color: var(--late); border: 1.5px solid #E9B8B2; }
.btn.wa { background: #1E7A46; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.dot.on { background: #1E9E55; } .dot.wait { background: #D97706; } .dot.off { background: #C0352B; }

.fab { position: fixed; right: max(16px, calc(50% - 300px + 16px)); bottom: calc(var(--nav-h) + 18px + var(--safe-b)); width: 58px; height: 58px; border-radius: 20px; background: var(--ink); color: #fff; border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 20; }

/* ---------- chips / segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip b { font-weight: 800; opacity: .6; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; background: var(--line); padding: 4px; border-radius: 14px; }
.seg button { height: 40px; border-radius: 11px; border: none; background: transparent; font-weight: 800; font-size: 13px; color: #3A3A38; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.seg.dark { background: var(--bg); }
.seg.dark button.on { background: var(--ink); color: #fff; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; }
.field small { font-weight: 600; color: var(--muted); font-size: 12px; }
.input, .field input, .field select, .field textarea { width: 100%; min-width: 0; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; font-size: 16px; font-weight: 600; background: var(--fill); outline: none; transition: border-color .15s, background .15s; }
.field textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.45; resize: vertical; font-size: 15px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: #fff; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.search input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; min-width: 0; }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--fill); border: 1px solid var(--line-2); cursor: pointer; }
.toggle-row .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.toggle-row .txt b { font-weight: 800; font-size: 14px; }
.toggle-row .txt span { font-size: 12px; color: var(--muted); font-weight: 600; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #C9C9C5; transition: background .15s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- bottom nav ---------- */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 600px; height: calc(var(--nav-h) + var(--safe-b)); padding: 6px 6px calc(8px + var(--safe-b)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); z-index: 30; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--soft); font-size: 11px; font-weight: 800; position: relative; }
.nav a span { width: 48px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.nav a.on { color: var(--ink); }
.nav a.on span { background: var(--bg); }
.nav a .count { position: absolute; top: 0; left: calc(50% + 8px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--late); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---------- sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(21,21,21,.55); z-index: 50; animation: bd .2s ease-out; display: flex; align-items: flex-end; justify-content: center; }
@keyframes bd { from { opacity: 0; } }
.sheet { width: 100%; max-width: 600px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 16px calc(22px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: up .25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: #D4D4D0; align-self: center; flex-shrink: 0; }
.sheet .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet .head h2 { font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1.05; }
.sheet .head .icon-btn { background: var(--bg); border: none; }
.sheet p.lead { font-size: 14px; color: var(--muted); font-weight: 600; line-height: 1.45; }
.preview-msg { background: #E7F3EA; border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; font-weight: 500; color: #1d2b22; }

/* ---------- toast ---------- */
#toast-root { position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; padding: 0 16px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.25); animation: tin .2s ease-out; max-width: 520px; display: flex; gap: 8px; align-items: center; }
.toast.err { background: var(--late); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 30px 16px; color: var(--muted); font-weight: 600; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico-box { width: 56px; height: 56px; border-radius: 18px; background: var(--card); }
.skel { background: linear-gradient(90deg, #e4e4e0 0%, #f0f0ee 50%, #e4e4e0 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.splash img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .6; transform: scale(.96); } }
.banner { border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; }
.banner .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.banner .txt b { font-size: 14px; font-weight: 800; }
.banner .txt span { font-size: 12px; color: #BDBDB8; font-weight: 600; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.warn .txt span { color: var(--warn); }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--bg); }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--muted); font-weight: 600; }
.kv b { font-weight: 800; text-align: right; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; border-bottom: 1px solid var(--bg); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.menu-item:last-child { border-bottom: none; }
.menu-item .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.menu-item .txt b { font-size: 15px; font-weight: 800; }
.menu-item .txt span { font-size: 12px; color: var(--muted); font-weight: 600; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars button { border: 1px dashed #A9A9A4; background: var(--fill); border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 700; }

/* chart */
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 120px; padding-top: 8px; }
.bars .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .pair i { width: 40%; max-width: 16px; border-radius: 4px 4px 1px 1px; min-height: 2px; display: block; }
.bars .r { background: var(--ink); } .bars .d { background: #B3B3AE; }
.bars .lbl { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: capitalize; }
.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.catbar { display: flex; flex-direction: column; gap: 4px; }
.catbar .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.catbar .track { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.catbar .track i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* personal agenda */
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.day { height: 68px; gap: 0 !important; line-height: 1.15; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.day b { font-size: 13px; font-weight: 800; }
.day strong { font-size: 15px; font-weight: 800; }
.day span { font-size: 10px; font-weight: 700; color: var(--muted); }
.day.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day.on span { color: #BDBDB8; }
.day.today b::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: 4px; vertical-align: 2px; }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slot { display: flex; gap: 10px; align-items: stretch; min-height: 50px; }
.slot .hr { width: 46px; font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; }
.slot .body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.slot .busy { border-radius: 12px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; min-height: 50px; border: none; width: 100%; text-align: left; gap: 8px; }
.slot .busy b { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .free { border-radius: 12px; background: transparent; border: 1.5px dashed #A9A9A4; color: #3A3A38; font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 50px; width: 100%; text-align: left; }
.slot.past { opacity: .5; }
.week { display: grid; grid-template-columns: 44px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; font-size: 11px; font-weight: 800; }
.week .h { color: var(--muted); display: flex; align-items: center; justify-content: center; height: 26px; }
.week .c { height: 26px; border-radius: 6px; border: none; padding: 0; }
.week .c.free { background: #fff; border: 1px dashed #BDBDB8; }
.week .c.part { background: #8F8F8A; }
.week .c.full { background: var(--ink); }
.week .c.off { background: transparent; }

/* login */
.login { min-height: 100vh; min-height: 100dvh; background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 32px 22px calc(32px + var(--safe-b)); gap: 28px; max-width: 600px; margin: 0 auto; }
.login .logo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login .logo .w { font-family: var(--display); font-weight: 800; font-size: 54px; letter-spacing: 4px; line-height: .9; }
.login .logo .f { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 8px; color: #BDBDB8; }
.login .logo .f::before, .login .logo .f::after { content: ''; width: 26px; height: 2px; background: #8F8F8A; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login .field { color: #fff; }
.login .field input { background: #222221; border-color: #3A3A38; color: #fff; }
.login .field input:focus { background: #262625; border-color: #fff; }
.login p { color: #BDBDB8; font-size: 14px; text-align: center; font-weight: 600; line-height: 1.45; }

/* whatsapp */
.qr-box { width: 260px; height: 260px; max-width: 100%; border-radius: 18px; border: 2px solid var(--ink); padding: 10px; display: flex; align-items: center; justify-content: center; background: #fff; align-self: center; }
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; }
.pair-code { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: 6px; text-align: center; padding: 14px; border-radius: 14px; background: var(--bg); }
.steps { display: flex; flex-direction: column; gap: 12px; }
.steps div { display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 600; }
.steps b { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--bg); border-radius: 10px; padding: 10px; word-break: break-all; user-select: all; }

/* ---------- blocos de layout (celular: tudo empilhado) ---------- */
.dash-top, .cols, .stack, .toolbar, .tpl-grid, .narrow { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nav-brand { display: none; }
.week .c span { display: none; }
.scope-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.dark button svg { margin-right: 4px; vertical-align: -3px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-stats div { background: var(--fill); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-stats span { font-size: 12px; font-weight: 700; color: var(--muted); }
.mini-stats b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.method { background: var(--fill); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.method span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.method b { font-size: 16px; font-weight: 800; }
.qr-card { width: 100%; }

@media (min-width: 640px) {
  .screen { padding-left: 20px; padding-right: 20px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- PC ---------- */
@media (min-width: 1024px) {
  :root { --side: 248px; }
  body { background: var(--bg); }
  #app { max-width: none; margin: 0 0 0 var(--side); }
  .screen { max-width: 1240px; margin: 0 auto; padding: 32px 40px 120px; gap: 18px; }
  .topbar .brand img { display: none; }
  .screen.no-nav { padding-bottom: 56px; }
  .title { font-size: 40px; }
  .title.sm { font-size: 34px; }
  .topbar { min-height: 52px; }

  /* menu lateral */
  .nav { left: 0; top: 0; bottom: 0; transform: none; width: var(--side); max-width: none; height: 100vh; padding: 24px 14px; border-top: none; border-right: 1px solid var(--line); background: #fff; backdrop-filter: none; display: flex; flex-direction: column; gap: 4px; }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
  .nav-brand div { display: flex; flex-direction: column; line-height: 1; }
  .nav-brand b { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 2px; }
  .nav-brand span { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 5px; color: var(--muted); margin-top: 3px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; height: 48px; padding: 0 12px; border-radius: 14px; font-size: 15px; color: var(--muted); transition: background .12s, color .12s; }
  .nav a span { width: auto; height: auto; background: none !important; }
  .nav a:hover { background: var(--bg); color: var(--ink); }
  .nav a.on { background: var(--ink); color: #fff; }

  .fab { right: 40px; bottom: 36px; }
  .fab:hover { transform: translateY(-2px); }

  /* grades */
  .dash-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; }
  .dash-top .hero { justify-content: center; }
  .dash-top .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .agenda-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .stack.sticky { position: sticky; top: 24px; }
  .toolbar { flex-direction: row; align-items: center; gap: 14px; }
  .toolbar .search { width: 360px; flex-shrink: 0; }
  .toolbar .chips { margin: 0; padding: 0; flex: 1; flex-wrap: wrap; }
  .list.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .narrow { max-width: 720px; width: 100%; }
  .scope-seg { max-width: 420px; }
  .bars { height: 170px; }
  .hero .big { font-size: 52px; }

  /* semana do personal com nomes */
  .week { gap: 4px; }
  .week .c { height: 34px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .week .h { height: 34px; }
  .week .c span { display: block; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

  /* janelas viram modal central */
  .backdrop { align-items: center; padding: 24px; }
  .sheet { max-width: 540px; border-radius: 24px; padding: 22px 24px 24px; max-height: 88vh; animation: pop .18s ease-out; }
  .sheet .grab { display: none; }
  @keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }

  /* hover */
  .row, .stat, .menu-item, .chip, .day, .btn, .icon-btn, .week .c { transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; }
  a.row:hover, button.row:hover, .stat:hover { border-color: #C9C9C5; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
  .row.plain:hover, .menu-item:hover { background: var(--fill); }
  .btn:hover { filter: brightness(1.15); }
  .btn.outline:hover, .btn.ghost:hover, .btn.light:hover, .btn.danger:hover { filter: none; background: var(--fill); }
  .icon-btn:hover, .chip:not(.on):hover, .day:not(.on):hover { border-color: var(--ink); }
  .slot .free:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
  .week .c:hover { outline: 2px solid var(--ink); outline-offset: 1px; }

  /* login */
  .login { max-width: none; align-items: center; }
  .login > * { width: 100%; max-width: 400px; }
}
