/* Nuvy — estilo. Identidade: verde Nuvy #1b7a55, acento Sol #ffc857, Inter / Inter Display. */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/Inter-Regular.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/fonts/Inter-Medium.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/Inter-SemiBold.woff) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(/fonts/Inter-Bold.woff) format('woff'); }
@font-face { font-family: 'Inter Display'; font-weight: 700; font-display: swap; src: url(/fonts/InterDisplay-Bold.woff) format('woff'); }
:root {
  --ink: #131a17;
  --ink-2: #4b5651;
  --ink-3: #8a948f;
  --line: #e7eae8;
  --line-2: #f0f2f1;
  --shell: #e4e8ea;
  --panel: #ffffff;
  --brand: #1b7a55;
  --brand-ink: #ffffff;
  --brand-soft: #e8f1ec;
  --danger: #c0392b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 8px 28px rgba(20, 30, 25, .07);
  --font-display: "Inter Display", Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --hour: 56px;
  --surface: #ffffff;
  --surface-2: #fcfdfc;
  --fill: #f3f5f4;
  --fill-2: #eaeeec;
  --work-bg: #eef6f1;
  --line-3: #dfe4e1;
  --line-4: #c5cdc9;
  --ink-nav: #2b3631;
  --ink-solid: #0f1412;
  --on-ink: #ffffff;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .94);
  --side-bg: linear-gradient(165deg, #eef3f2 0%, #e1ebea 60%, #dbe7e8 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.4; color: var(--ink);
  background: var(--shell); -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 550; font-size: 13px; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--fill); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #18503a; }
.btn.dark { background: var(--ink-solid); border-color: var(--ink-solid); color: var(--on-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--fill-2); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; justify-content: center; }
.btn.icon.sm { width: 30px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-3); border-radius: 12px; background: var(--surface); width: 100%; outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 72px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 92, 68, .14); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--fill); border: 1px solid transparent;
  font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap;
}
.chip:hover { background: var(--fill-2); }
.chip.on { background: var(--ink-solid); color: var(--on-ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #999); }
.chip.on .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--soft, #eee); color: var(--ink, #333); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* ---------- estrutura ---------- */
#app { height: 100%; display: flex; padding: 10px; gap: 6px; }
.sidebar {
  width: 236px; flex: none; display: flex; flex-direction: column; padding: 14px 10px 12px;
  background: var(--side-bg); border-radius: 22px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.035em; }
.brand svg { width: 30px; height: 30px; }
.nav-title { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 12px; color: var(--ink-nav); text-decoration: none; font-weight: 550; font-size: 13.5px; margin-bottom: 2px; cursor: pointer;
}
.nav a svg { font-size: 17px; color: var(--ink-2); }
.nav a:hover { background: var(--glass); }
.nav a.active { background: var(--surface); box-shadow: 0 1px 3px rgba(20, 30, 25, .08); }
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--ink-solid); color: var(--on-ink); font-size: 11px; display: grid; place-items: center; }
.area-toggle { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 10px; width: 100%; background: none; border: 0; text-align: left; font-weight: 550; font-size: 13px; color: var(--ink-nav); }
.area-toggle:hover { background: var(--glass); }
.area-toggle .sw { width: 10px; height: 10px; border-radius: 4px; background: var(--c); flex: none; }
.area-toggle.off { color: var(--ink-3); }
.area-toggle.off .sw { background: transparent; box-shadow: inset 0 0 0 2px var(--c); opacity: .6; }
.side-foot { margin-top: auto; padding-top: 14px; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.account .who { min-width: 0; flex: 1; }
.account .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .nm { font-weight: 650; font-size: 13px; line-height: 1.2; }
.account .sub { font-size: 11.5px; color: var(--ink-3); }
.sync-pill { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 8px 10px; border-radius: 12px; background: var(--glass); font-size: 12px; color: var(--ink-2); cursor: pointer; border: 0; width: calc(100% - 8px); text-align: left; }
.sync-pill .sd { width: 8px; height: 8px; border-radius: 50%; background: #9aa5a0; flex: none; }
.sync-pill.ok .sd { background: #2f9e6b; }
.sync-pill.err .sd { background: var(--danger); }

.main { flex: 1; min-width: 0; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.main-scroll { flex: 1; overflow: auto; padding: 22px 26px 28px; display: flex; flex-direction: column; min-height: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 750; line-height: 1.15; }
.page-head .sub { color: var(--ink-3); margin-top: 3px; font-size: 13.5px; }

/* ---------- captura rápida ---------- */
.capture { position: relative; margin-bottom: 18px; }
.capture-box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border: 1.5px solid var(--line-3); border-radius: 16px; background: var(--surface-2); transition: border-color .12s, box-shadow .12s, background .12s; }
.capture-box:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px rgba(31, 92, 68, .1); }
.capture-box svg { color: var(--brand); font-size: 18px; }
.capture-box input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; height: 100%; min-width: 0; }
.capture-box kbd { font: 600 11px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--surface); }
.capture-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 4px 0; min-height: 24px; font-size: 12.5px; color: var(--ink-2); }
.capture-preview .tag { height: 24px; }

/* ---------- cartões ---------- */
.grid-today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; min-height: 0; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h3 .grow { flex: 1; }
.card.soft { background: var(--surface-2); border-color: #eef1ef; }
.now-card { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--soft, #f3f5f4); border: 1px solid transparent; }
.now-card .bar { width: 5px; align-self: stretch; border-radius: 4px; background: var(--c, #999); }
.now-card .k { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); opacity: .8; }
.now-card .t { font-size: 20px; font-weight: 720; letter-spacing: -.01em; margin: 2px 0; color: var(--ink, #111); }
.now-card .s { color: var(--ink-2); font-size: 13px; }
.empty { text-align: center; color: var(--ink-3); padding: 18px 8px; font-size: 13px; }

/* ---------- tarefas ---------- */
.task { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 10px; cursor: grab; position: relative; }
.task:hover { background: var(--fill); }
.task.dragging { opacity: .4; }
.task .cb { width: 20px; height: 20px; border-radius: 7px; border: 1.8px solid var(--line-4); background: var(--surface); display: grid; place-items: center; flex: none; padding: 0; color: #fff; }
.task .cb:hover { border-color: var(--brand); }
.task.done .cb { background: var(--brand); border-color: var(--brand); }
.task.done .tt { text-decoration: line-through; color: var(--ink-3); }
.task .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.task .ad { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.task .due { font-size: 11px; font-weight: 600; color: var(--ink-3); flex: none; }
.task .due.late { color: var(--danger); }
.task .star { border: 0; background: none; color: var(--line-4); padding: 2px; display: grid; }
.task .star:hover, .task .star.on { color: #e0a21a; }
.task .star.on svg { fill: #e0a21a; }
.task .x { border: 0; background: none; color: var(--ink-3); opacity: 0; padding: 2px; display: grid; }
.task:hover .x { opacity: 1; }
.subhead { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 8px 6px 4px; }
.add-task { display: flex; gap: 8px; margin-top: 8px; }
.add-task input { height: 36px; border-radius: 10px; border: 1px dashed var(--line-4); padding: 0 12px; flex: 1; outline: none; background: transparent; min-width: 0; }
.add-task input:focus { border-style: solid; border-color: var(--brand); background: var(--surface); }
.hint { font-size: 12px; color: var(--ink-3); margin: 8px 6px 0; }

/* ---------- metas ---------- */
.goal { padding: 6px 0 10px; }
.goal .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 650; font-size: 13.5px; }
.goal .top small { color: var(--ink-3); font-weight: 550; font-size: 12px; }
.pips { display: flex; gap: 6px; margin: 8px 0 6px; }
.pip { height: 10px; flex: 1; border-radius: 6px; background: var(--fill); max-width: 80px; }
.pip.done { background: var(--c); }
.pip.sched { background: repeating-linear-gradient(135deg, var(--c) 0 4px, transparent 4px 8px); opacity: .55; }
.goal .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.goal .meta .grow { flex: 1; }

/* ---------- escala ---------- */
.shift-now { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.shift-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.shift-badge.work { background: var(--brand); color: #fff; }
.shift-badge.off { background: var(--fill); color: var(--ink-2); }
.shift-now .t { font-weight: 720; font-size: 15px; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sd-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 12px; font-size: 11px; color: var(--ink-3); background: transparent; border: 0; }
.sd-cell .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 12.5px; color: var(--ink-2); background: var(--fill); }
.sd-cell.work .n { background: var(--brand); color: #fff; }
.sd-cell.today .n { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.sd-cell.swap .n::after { content: ""; position: absolute; }
.sd-cell:hover { background: var(--fill); }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }

/* ---------- linha do tempo (dia e semana) ---------- */
.tl-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tl-scroll { overflow: auto; position: relative; flex: 1; min-height: 0; }
.tl-inner { min-width: calc(56px + var(--n) * var(--colmin, 150px)); }
.tl-head, .tl-grid { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); }
.tl-head { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-head .hc { padding: 8px 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; background: none; border-top: 0; border-right: 0; border-bottom: 0; }
.tl-head .hc .dn { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tl-head .hc .dd { font-size: 15px; font-weight: 700; padding: 2px 10px; border-radius: 8px; }
.tl-head .hc.today .dd { background: var(--ink-solid); color: var(--on-ink); }
.tl-head .hc .sb { font-size: 10.5px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 1px 7px; border-radius: 99px; }
.tl-allday { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tl-allday .ac { border-left: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 8px; }
.ad-chip { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--soft); color: var(--ink); border-left: 3px solid var(--c); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-hours { position: relative; height: calc(24 * var(--hour)); }
.tl-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-col { position: relative; height: calc(24 * var(--hour)); border-left: 1px solid var(--line-2); cursor: cell;
  background-image: linear-gradient(to bottom, var(--line) 0 1px, transparent 1px); background-size: 100% var(--hour); }
.tl-col.today { background-color: var(--surface-2); }
.tl-shift { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(31, 92, 68, .10) 0 8px, rgba(31, 92, 68, .05) 8px 16px); border-top: 2px solid rgba(31, 92, 68, .45); pointer-events: none; }
.tl-shift span { position: absolute; top: 4px; right: 6px; font-size: 10.5px; font-weight: 700; color: var(--brand); background: rgba(255, 255, 255, .85); padding: 1px 7px; border-radius: 99px; }
.ev { position: absolute; border-radius: 10px; padding: 5px 8px 5px 10px; background: var(--soft); color: var(--ink); overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.25; z-index: 2; border: 1px solid var(--glass); box-shadow: 0 1px 2px rgba(20, 30, 25, .06); transition: box-shadow .12s, transform .12s; }
.ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.ev:hover { box-shadow: 0 4px 14px rgba(20, 30, 25, .14); z-index: 4; }
.ev .et { font-weight: 650; display: flex; align-items: center; gap: 5px; }
.ev .et span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .tm { color: var(--ink-2); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.done { opacity: .62; }
.ev.done .et span { text-decoration: line-through; }
.ev.ext { background: repeating-linear-gradient(135deg, #f3f5f7 0 6px, #eceff2 6px 12px); color: #3b4650; }
.ev.ext::before { background: var(--c); opacity: .85; }
.ev.compact .tm { display: none; }
.nowline { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #0f1412; z-index: 5; pointer-events: none; }
.nowline .pill { position: absolute; left: -48px; top: -10px; background: var(--ink-solid); color: var(--on-ink); font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.drop-line { position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 3px; background: var(--brand); z-index: 7; pointer-events: none; }
.drop-line::after { content: attr(data-t); position: absolute; right: 0; top: -20px; font-size: 11px; font-weight: 700; background: var(--brand); color: #fff; padding: 1px 7px; border-radius: 99px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .title { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-right: 6px; }
.week-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; }
.week-layout.rail { grid-template-columns: minmax(0, 1fr) 300px; }
.main-scroll.fill { overflow: hidden; }
.main-scroll:not(.fill) > * { flex: none; }

/* ---------- mês ---------- */
.month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: 1; min-height: 420px; display: grid; grid-template-rows: auto 1fr; background: var(--surface); }
.month .wh, .month .wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .wh div { padding: 9px 10px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.month .weeks { display: grid; grid-template-rows: repeat(6, minmax(86px, 1fr)); }
.mcell { border: 0; border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); background: var(--surface); padding: 6px 7px; text-align: left; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; cursor: pointer; }
.mcell:first-child { border-left: 0; }
.mcell:hover { background: var(--surface-2); }
.mcell.out .dn { color: var(--line-4); }
.mcell.work { background: var(--work-bg); }
.mcell.work:hover { background: var(--work-bg); }
.mcell .dn { font-size: 12.5px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; }
.mcell .dn b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; }
.mcell.today .dn b { background: var(--ink-solid); color: var(--on-ink); }
.mcell .pl { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--brand); color: #fff; }
.mcell .pl.swap { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.mcell .fl { font-size: 10.5px; font-weight: 700; color: var(--ink-3); }
.mline { display: flex; gap: 5px; align-items: center; font-size: 11.5px; line-height: 1.25; min-width: 0; color: var(--ink-2); }
.mline i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.mline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mline.more { color: var(--ink-3); font-weight: 600; }
.checker { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--fill); font-size: 12.5px; }
.checker input { border: 0; background: transparent; outline: none; height: 26px; font-size: 12.5px; }
.checker .ans { font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.checker .ans.work { background: var(--brand); color: #fff; }
.checker .ans.off { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-4); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 22, 19, .38); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: 0 20px 60px rgba(10, 20, 15, .3); padding: 22px; animation: rise .16s ease-out; }
.modal.wide { width: min(640px, 100%); }
.modal h2 { margin: 0 0 16px; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.modal h2 .grow { flex: 1; }
.form { display: flex; flex-direction: column; gap: 14px; }
.areas-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.area-opt { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid transparent; background: var(--soft); color: var(--ink); font-weight: 600; font-size: 12.5px; }
.area-opt .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.area-opt.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--surface) inset; }
.wd { display: flex; gap: 6px; }
.wd button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 650; color: var(--ink-2); }
.wd button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-4); position: relative; transition: background .15s; flex: none; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; align-items: center; }
.modal-actions .grow { flex: 1; }
.err { color: var(--danger); font-size: 13px; font-weight: 550; }
.note { font-size: 12.5px; color: var(--ink-2); background: var(--fill); border-radius: 12px; padding: 10px 12px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.seg.wrap { flex-wrap: wrap; border-radius: 18px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow b { font-weight: 650; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--ink-solid); color: var(--on-ink); border-radius: 999px; padding: 10px 14px 10px 18px; display: flex; align-items: center; gap: 12px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: rise .18s ease-out; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 99px; height: 26px; padding: 0 11px; font-weight: 650; font-size: 12px; }

/* ---------- configurações ---------- */
.settings { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.settings .card { padding: 20px 22px; }
.settings h3 { font-size: 15px; margin-bottom: 4px; }
.settings .desc { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.steps b { color: var(--ink); }
.copybox { display: flex; gap: 8px; }
.copybox input { font-size: 12px; }
.cal-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.cal-item i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; }
.status .sd { width: 8px; height: 8px; border-radius: 50%; background: #9aa5a0; }
.status.ok .sd { background: #2f9e6b; }
.status.err .sd { background: var(--danger); }

/* ---------- entrar ---------- */
/* #app é flex: sem flex:1 a tela encolhia até o tamanho do conteúdo e ficava desalinhada */
.auth { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 100%; display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(420px, 1fr); gap: 6px; }
.auth-art { border-radius: 26px; background: radial-gradient(120% 90% at 0% 0%, #2a7a58 0%, transparent 55%), linear-gradient(165deg, #1f5c44 0%, #123628 100%); color: #fff; padding: clamp(28px, 3.6vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; isolation: isolate; }
.auth-art .orb { position: absolute; border-radius: 50%; filter: blur(40px); z-index: -1; pointer-events: none; }
.auth-art .o1 { width: 340px; height: 340px; right: -90px; top: 8%; background: rgba(120, 220, 170, .22); }
.auth-art .o2 { width: 260px; height: 260px; left: -80px; bottom: 18%; background: rgba(255, 255, 255, .08); }
.auth-art .o3 { width: 200px; height: 200px; right: 20%; bottom: -60px; background: rgba(224, 162, 26, .16); }
.auth-art .brand { color: #fff; position: relative; text-decoration: none; width: fit-content; display: flex; align-items: center; gap: 14px; font-size: 34px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; }
.auth-art .brand { padding: 0; }
.auth-art .brand svg { width: 56px; height: 56px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .28)); }
.auth-brand-mobile svg { width: 48px; height: 48px; }
.auth-pitch { position: relative; }
.auth-art h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.08; margin: 0 0 22px; max-width: 16ch; }
.auth-art ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.auth-art li { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.auth-art li .fi { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.auth-art li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-art li b { font-size: 14px; }
.auth-art li div span { opacity: .78; font-size: 12.5px; line-height: 1.4; }

/* ilustração: cartões flutuando */
.stage { position: relative; flex: 1 1 auto; min-height: 300px; max-height: 420px; width: 100%; max-width: 560px; margin: 0 auto; }
.fc { position: absolute; background: #fff; color: #131a17; border-radius: 18px; box-shadow: 0 18px 44px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .12); animation: float 7s ease-in-out infinite; }
.fc-day { left: 2%; top: 2%; width: min(300px, 62%); padding: 16px 18px 18px; transform: rotate(-2deg); }
.fc-eyebrow { font-size: 10.5px; letter-spacing: .1em; font-weight: 700; color: #6b7873; }
.fc-title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 12px; }
.fc-shift { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #1f5c44; color: #fff; border-radius: 14px; padding: 13px 14px; }
.fc-shift div { display: flex; flex-direction: column; gap: 2px; }
.fc-shift b { font-size: 15px; }
.fc-shift span { font-size: 12px; opacity: .8; }
.fc-shift em { font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .18); padding: 5px 10px; border-radius: 99px; }
.fc-ev { display: flex; gap: 11px; align-items: center; padding: 12px 16px 12px 12px; right: 0; top: 14%; transform: rotate(2.5deg); animation-delay: -2s; min-width: 210px; }
.fc-ev i { width: 5px; align-self: stretch; border-radius: 4px; background: var(--c); }
.fc-ev div { display: flex; flex-direction: column; gap: 2px; }
.fc-ev b { font-size: 14px; }
.fc-ev span { font-size: 12px; color: #6b7873; }
.fc-ev2 { right: 9%; top: 36%; transform: rotate(-1.5deg); animation-delay: -4s; }
.fc-week { left: 8%; bottom: 8%; display: flex; gap: 8px; padding: 12px 14px; transform: rotate(1.5deg); animation-delay: -1s; }
.fc-week div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.fc-week small { font-size: 10px; color: #6b7873; font-weight: 600; }
.fc-week span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #eef1ef; color: #4b5651; }
.fc-week span.on { background: #3a9970; color: #fff; }
.fc-week span.today { box-shadow: inset 0 0 0 2px #131a17; }
.fc-sync { right: 4%; bottom: 14%; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12.5px; font-weight: 650; border-radius: 99px; animation-delay: -3s; }
.fc-sync i { width: 8px; height: 8px; border-radius: 50%; background: #2fb36c; box-shadow: 0 0 0 4px rgba(47, 179, 108, .2); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .fc { animation: none; } }
.auth-credit { position: relative; font-size: 13px; opacity: .65; }
.auth-form { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 24px 32px; }
.auth-back { position: absolute; top: 20px; left: 24px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; padding: 8px 4px; }
.auth-back:hover { color: var(--brand); }
.auth-form .box { width: min(400px, 100%); align-self: center; display: flex; flex-direction: column; gap: 18px; }
.auth-form h1 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.auth-sub { margin: 4px 0 0; color: var(--ink-3); font-size: 14.5px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 999px; padding: 4px; }
.auth-tabs button { border: 0; background: transparent; height: 38px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pw { position: relative; display: flex; }
.pw .input { width: 100%; padding-right: 84px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 650; padding: 8px 10px; border-radius: 8px; }
.eye:hover { color: var(--brand); }
.auth-submit { height: 48px; justify-content: center; font-size: 15px; }
.auth-credit-mobile { display: none; position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.auth-brand-mobile { display: none; align-items: center; gap: 12px; font-weight: 800; font-size: 28px; letter-spacing: -.02em; }

/* ---------- celular ---------- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  body { overflow: auto; }
  #app { padding: 0; height: 100dvh; }
  .sidebar { display: none; }
  .main { border-radius: 0; box-shadow: none; padding-bottom: 64px; }
  .main-scroll { padding: 16px 14px 24px; }
  .grid-today { grid-template-columns: 1fr; }
  .week-layout.rail { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--glass-strong); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 650; color: var(--ink-3); padding: 4px 12px; border-radius: 12px; text-decoration: none; }
  .bottom-nav a svg { font-size: 21px; }
  .bottom-nav a.active { color: var(--brand); }
  .page-head h1 { font-size: 22px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .tl-inner { --colmin: 112px; }
  .month .weeks { grid-template-rows: repeat(6, minmax(64px, 1fr)); }
  .mcell { padding: 4px; }
  .mline span { display: none; }
  .mline { justify-content: center; }
  .mcell .pl { font-size: 0; padding: 0; width: 8px; height: 8px; }
  .auth { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-art { display: none; }
  .auth-form { align-items: stretch; justify-content: flex-start; padding: calc(56px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-right)); }
  .auth-back { top: calc(14px + env(safe-area-inset-top)); left: max(20px, env(safe-area-inset-left)); }
  .auth-brand-mobile { display: flex; }
  .auth-credit-mobile { display: block; }
  .toast { bottom: 80px; }
  .modal { padding: 18px; }
}
@media (hover: none) { .task .x { opacity: 1; } }

/* ---------- administração ---------- */
.admin-shell { flex: 1 1 auto; width: 100%; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; background: var(--panel); }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 14px max(20px, 4vw); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.admin-top .brand { padding: 0; text-decoration: none; color: var(--ink); }
.admin-top .brand .pill { margin-left: 4px; }
.admin-top .grow { flex: 1; }
.admin-top .who { font-size: 12.5px; }
.admin-shell .main-scroll { padding: 24px max(20px, 4vw) 48px; overflow: visible; }
.admin-shell .settings { max-width: 1100px; }
.admin-gone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 100dvh; text-align: center; padding: 24px; }
.admin-gone h1 { margin: 0; font-size: 22px; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--brand-ink); }
.auth-keep { font-size: 13.5px; color: var(--ink-2); }
.astats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.astat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.astat b { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.astat span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.astat small { font-size: 12px; color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atable th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.atable td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.atable td.ar { text-align: right; white-space: nowrap; }
.pill { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 650; }
.row .pill { margin-left: 0; }
.pill.warn { background: #fbecd0; color: #8a5a00; }
.temp-pass { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--fill); border: 1px dashed var(--line-4); }
.temp-pass code { font-size: 20px; font-weight: 700; letter-spacing: .04em; user-select: all; word-break: break-all; }
.alog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.alog li span { color: var(--ink-3); margin-right: 10px; font-size: 12.5px; }

/* ---------- instalar no celular ---------- */
.inst-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.inst-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.inst-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; margin-top: 1px; }
.inst-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 8px; background: var(--fill); border: 1px solid var(--line-3); color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; vertical-align: middle; }
.install-hint { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 24px)); display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line-3); border-radius: 18px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(10, 20, 15, .22); animation: rise .2s ease-out; }
.install-hint .ih-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; background: #1f5c44; color: #fff; display: grid; place-items: center; }
.install-hint .ih-txt { flex: 1 1 160px; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); }
.install-hint .ih-txt b { color: var(--ink); font-size: 14px; }
.install-hint .ih-act { display: flex; gap: 6px; margin-left: auto; }
.auth-install { display: block; margin: 16px auto 0; border: 0; background: none; color: var(--brand); font-weight: 650; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }

/* ---------- modo escuro ---------- */
:root[data-theme="dark"] {
  --ink: #e8eeea;
  --ink-2: #b4bfb9;
  --ink-3: #8a968f;
  --line: #2a332f;
  --line-2: #222a27;
  --line-3: #36403b;
  --line-4: #4a564f;
  --shell: #0c100e;
  --panel: #151b18;
  --surface: #151b18;
  --surface-2: #181f1c;
  --fill: #1e2623;
  --fill-2: #28322e;
  --work-bg: #17261f;
  --brand: #2f8f6a;
  --brand-soft: #1c3a2d;
  --ink-nav: #d6dfda;
  --ink-solid: #e8eeea;
  --on-ink: #0f1412;
  --danger: #ef7a6c;
  --glass: rgba(255, 255, 255, .07);
  --glass-strong: rgba(21, 27, 24, .94);
  --side-bg: linear-gradient(165deg, #1a2420 0%, #141c19 60%, #111816 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="dark"] .btn { background: var(--surface-2); }
:root[data-theme="dark"] .btn:hover { background: var(--fill-2); border-color: var(--line-3); }
:root[data-theme="dark"] .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn.primary:hover { background: #3aa57c; }
:root[data-theme="dark"] .btn.ghost { background: transparent; }
:root[data-theme="dark"] .input:focus { box-shadow: 0 0 0 3px rgba(47, 143, 106, .3); }
:root[data-theme="dark"] .nav a.active { background: var(--fill-2); box-shadow: none; }
:root[data-theme="dark"] .ev,
:root[data-theme="dark"] .ad-chip,
:root[data-theme="dark"] .now-card,
:root[data-theme="dark"] .area-opt {
  background: color-mix(in srgb, var(--c) 24%, var(--surface));
  color: color-mix(in srgb, var(--c) 35%, #ffffff);
}
:root[data-theme="dark"] .tl-shift { background: repeating-linear-gradient(135deg, rgba(47, 143, 106, .16) 0 8px, rgba(47, 143, 106, .08) 8px 16px); border-top-color: rgba(47, 143, 106, .6); }
:root[data-theme="dark"] .tl-shift span { background: rgba(21, 27, 24, .9); color: #7fd0ac; }
:root[data-theme="dark"] .tl-head .hc .sb { color: #7fd0ac; background: #1c3a2d; }
:root[data-theme="dark"] .seg button.on { background: var(--fill-2); }
:root[data-theme="dark"] .auth-art { background: radial-gradient(120% 90% at 0% 0%, #24694e 0%, transparent 55%), linear-gradient(165deg, #1b5240 0%, #0c241b 100%); }
:root[data-theme="dark"] img { opacity: .95; }

/* correções de contraste do modo escuro */
:root[data-theme="dark"] .btn.dark { background: var(--ink-solid); border-color: var(--ink-solid); color: var(--on-ink); }
:root[data-theme="dark"] .btn.dark:hover { background: #fff; }
:root[data-theme="dark"] .now-card .t { color: inherit; }

/* histórico de sincronização */
.hist { margin-top: 14px; font-size: 13px; }
.hist summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.hist-row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hist-row span:first-child { color: var(--ink-3); min-width: 110px; }
.hist-row.bad { color: var(--danger); }

/* ---------- iPhone e celulares: ajustes finos (v0.3) ---------- */
@media (max-width: 900px) {
  /* 16px nos campos evita o zoom automático do Safari ao tocar */
  input, select, textarea, .input, .capture-box input, .checker input { font-size: 16px; }
  .capture-box kbd { display: none !important; }
  .capture-box { height: 52px; }
  /* área segura: entalhe, ilha dinâmica e barra inferior */
  .main-scroll { padding-top: max(16px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .bottom-nav { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  .bottom-nav a { min-width: 64px; padding: 6px 10px; }
  .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* cabeçalhos: título numa linha, controles na de baixo (nada fica sozinho na linha seguinte) */
  .toolbar { gap: 8px; }
  .toolbar .title { flex: 1 1 100%; font-size: 22px; margin: 0; }
  .toolbar > .grow { display: none; }
  .toolbar .btn { flex: 0 0 auto; }
  .toolbar .btn.primary { margin-left: auto; }
  .toolbar .checker { order: 9; }
  .toolbar .area-chips { order: 10; }
  .toolbar .area-chips.row.wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; margin: 0 -14px; padding: 2px 14px; -webkit-overflow-scrolling: touch; }
  .toolbar .area-chips::-webkit-scrollbar { display: none; }
  .toolbar .area-chips .chip { flex: 0 0 auto; }
  .checker { flex: 1 1 100%; justify-content: space-between; }
  .checker input { min-width: 0; flex: 1; }
  .legend { flex-wrap: wrap; gap: 6px 14px; }
  .legend .muted { flex-basis: 100%; }
  .page-head { gap: 8px; }
  /* janelas viram "folha" colada embaixo, como no iOS */
  .overlay { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 20px max(18px, env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom)); }
  .modal-actions { flex-wrap: wrap; }
}
/* dedos precisam de alvos de pelo menos 44 px */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .btn.icon { min-width: 44px; }
  .chip { min-height: 40px; }
  .seg button { height: 36px; }
  .auth-tabs button { height: 44px; }
  .eye { padding: 12px; }
}
.input.sm, select.input.sm { height: 32px; width: auto; min-width: 110px; padding: 0 8px; font-size: 13px; border-radius: 10px; }

/* aviso de conflito com a escala (janela de evento) */
.shift-hint { display: none; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2, #f3f5f4); color: var(--ink-2); }
.shift-hint.warn, .shift-hint.ok, .shift-hint.info { display: flex; }
.shift-hint.warn { background: #fdf0e3; color: #8a4b0a; }
.shift-hint.ok { background: #e6f4ec; color: #1b7a55; }
.shift-hint.info { background: #eef2f6; color: #3d4b5c; }
:root[data-theme="dark"] .shift-hint.warn { background: #3b2a16; color: #f0b777; }
:root[data-theme="dark"] .shift-hint.ok { background: #16342a; color: #7fd1a8; }
:root[data-theme="dark"] .shift-hint.info { background: #222b35; color: #b4c2d1; }

/* folgas livres (visão de mês) */
.free-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.free-days .chip { padding: 3px 10px; }

/* "saia às" (tempo de viagem) e local no cartão do evento */
.leave-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: #eef2f6; color: #3d4b5c; }
:root[data-theme="dark"] .leave-hint { background: #222b35; color: #b4c2d1; }
.ev .tm.loc { display: flex; align-items: center; gap: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .85; }
.now-card .s.leave { font-weight: 600; }
.note a, .steps a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* Títulos com Inter Display (identidade) */
.page-head h1, .toolbar .title, .fc-title, .auth-brand-mobile { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; }
