:root {
  --blue: #01619E;
  --blue-700: #014E80;
  --blue-50: #EAF3FA;
  --blue-100: #D5E7F4;
  --ink: #0B2A4A;          /* texto principal e texto sobre o amarelo */
  --yellow: #F5C100;
  --yellow-50: #FFF8DB;
  --muted: #5F6F84;
  --faint: #9AA7B6;
  --line: #DCE4EE;
  --soft: #F4F7FB;
  --danger: #9B2C1F;
  --danger-50: #FCEDEA;
  --white: #fff;
  --page: #E9EEF4;          /* fundo atrás do app no computador */
  --surface: #fff;          /* fundo do app, cartões, folhas */
  --accent: #01619E;        /* azul de textos e ícones */
  --on-yellow: #0B2A4A;     /* texto sobre o amarelo */
  --past-border: #E8EDF3;
  --empty-border: #E5C04A;
  --empty-ink: #6B5A10;
  --full-bg: #EBEFF4;
  --full-count: #DDE3EA;
  --switch-off: #CDD6E0;
  --nav-bg: rgba(255, 255, 255, .97);
  --danger-strong: #9B2C1F;
  --toast: #0B2A4A;
  --av2: #FCE7D6;
  --av3: #E3E0F6;
  --av4: #DDEFE3;
  --radius: 16px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 76px;
  --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; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
a { color: inherit; }

#app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  box-shadow: 0 0 40px rgba(11, 42, 74, .08);
}

.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.screen.has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.screen.has-footer { padding-bottom: calc(150px + var(--safe-b)); }

/* ─── Cabeçalho azul ─────────────────────────────────────────────────────── */
.hero {
  background: var(--blue);
  color: var(--white);
  border-radius: 0 0 28px 28px;
  padding: calc(20px + var(--safe-t)) 20px 22px;
  position: relative;
}
.hero-row { display: flex; align-items: center; gap: 12px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.01em;
  flex: 1;
}
.hero .sub { margin: 4px 0 0; font-size: 14px; font-weight: 600; opacity: .85; }
.hero-label { font-size: 13px; font-weight: 600; margin: 18px 0 8px; opacity: .9; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .14);
}
.icon-btn svg { width: 20px; height: 20px; }

/* ─── Avatares ───────────────────────────────────────────────────────────── */
.avatar {
  --s: 30px;
  width: var(--s); height: var(--s); border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  font-size: calc(var(--s) * .36); font-weight: 800; letter-spacing: .02em;
  background: var(--blue-100); color: var(--ink);
  border: 2px solid var(--surface);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.me { background: var(--yellow); }
.avatar.more { background: var(--surface); color: var(--ink); }
.avatar.lg { --s: 48px; border-color: var(--white); background: var(--yellow); }
.avatar.xl { --s: 72px; border-width: 3px; background: var(--yellow); }
.avatar:nth-child(5n+2):not(.me):not(.more) { background: var(--av2); }
.avatar:nth-child(5n+3):not(.me):not(.more) { background: var(--av3); }
.avatar:nth-child(5n+4):not(.me):not(.more) { background: var(--av4); }
.stack { display: inline-flex; }
.stack .avatar + .avatar { margin-left: -9px; }

/* ─── Seletor de duração (pílulas) ───────────────────────────────────────── */
.pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pill {
  height: 44px; border-radius: 999px;
  font-weight: 800; font-size: 15px;
  background: rgba(255, 255, 255, .16); color: var(--white);
  transition: background .15s, color .15s, transform .1s;
}
.pill:active { transform: scale(.97); }
.pill[aria-pressed="true"] { background: var(--yellow); color: var(--on-yellow); }

/* ─── Calendário mensal ──────────────────────────────────────────────────── */
.section { padding: 0 16px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 4px 14px; }
.month-nav h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0; text-transform: capitalize; }
.circle-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--line); color: var(--accent);
  display: grid; place-items: center;
}
.circle-btn:disabled { opacity: .35; }
.circle-btn svg { width: 20px; height: 20px; }

.weekdays, .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.weekdays span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .06em; padding-bottom: 8px; }
.day {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: var(--ink);
  transition: transform .1s;
}
.day:active:not(:disabled) { transform: scale(.95); }
.day.blank { border: 0; background: none; }
.day.past { background: var(--soft); color: var(--faint); border-color: var(--past-border); font-weight: 600; }
.day.mine { background: var(--yellow); border-color: var(--yellow); }
.day.today { box-shadow: inset 0 0 0 2px var(--accent); border-color: var(--accent); }
.day.full { color: var(--faint); }
.day.full .num { display: inline-flex; align-items: center; gap: 3px; }
.day.full .num svg { width: 11px; height: 11px; }
.badge {
  position: absolute; top: -7px; right: -6px;
  min-width: 24px; height: 24px; padding: 0 5px;
  border-radius: 999px; border: 2px solid var(--surface);
  background: var(--blue); color: var(--white);
  font-size: 11.5px; font-weight: 800;
  display: grid; place-items: center;
}
.cal.loading .day:not(.blank) { color: transparent; background: var(--soft); border-color: transparent; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 16px 4px 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot-badge { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.legend .sw { width: 18px; height: 18px; border-radius: 5px; background: var(--yellow); }
.legend svg { width: 13px; height: 13px; }
.legend-note { font-size: 12.5px; color: var(--faint); padding: 0 4px; margin: 0; }

.kicker { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 26px 4px 12px; }

.row-card {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 16px 16px; margin-bottom: 10px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  font-weight: 700; font-size: 15.5px; text-align: left;
}
.row-card .ydot { width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); flex: none; }
.row-card .txt { flex: 1; }
.row-card .chev { color: var(--accent); width: 18px; height: 18px; flex: none; }
.row-card.past { opacity: .5; }
.empty-note { color: var(--muted); font-size: 14.5px; line-height: 1.5; padding: 4px 4px; margin: 0; }

/* ─── Barra inferior ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--nav-bg); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end;
  z-index: 20;
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-bottom: 12px; text-decoration: none;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .fab {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--yellow); color: var(--on-yellow);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(245, 193, 0, .45);
  margin-top: -30px;
}
.nav .fab svg { width: 28px; height: 28px; }
.nav a.center { color: var(--ink); }

/* ─── Visão do dia ───────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: 14px; color: var(--accent);
}
.chip[aria-pressed="true"] { background: var(--blue-50); border-color: var(--accent); }
.day-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 20px 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.day-legend span { display: inline-flex; align-items: center; gap: 6px; }
.day-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.slots { padding: 8px 16px 0; }
.slot-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; scroll-margin-top: 12px; }
.slot-time { font-size: 14.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot-time.hour { font-weight: 800; color: var(--ink); }
.slot {
  min-height: 52px; border-radius: 14px; padding: 8px 10px 8px 12px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  font-weight: 700; font-size: 14.5px;
  transition: transform .1s, opacity .15s;
}
.slot:active:not(:disabled) { transform: scale(.98); }
.slot .label { flex: 1; min-width: 0; }
.slot .count {
  flex: none; font-size: 13px; font-weight: 800;
  padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.slot.empty { border: 1.5px dashed var(--empty-border); background: var(--yellow-50); color: var(--empty-ink); }
.slot.empty .count { background: var(--surface); color: var(--empty-ink); }
.slot.busy { background: var(--blue); color: var(--white); }
.slot.busy .count { background: var(--yellow); color: var(--on-yellow); }
.slot.mine { background: var(--yellow); color: var(--on-yellow); }
.slot.mine .count { background: var(--on-yellow); color: #fff; }
.slot.full { background: var(--full-bg); color: var(--muted); }
.slot.full .count { background: var(--full-count); color: var(--muted); }
.slot.full .label { display: inline-flex; align-items: center; gap: 6px; }
.slot.full .label svg { width: 14px; height: 14px; }
.slot.past { opacity: .45; }
.slot.nostart:not(.past) { opacity: .5; }
.slot.selected { box-shadow: 0 0 0 3px var(--ink); }

/* ─── Marcar turno ───────────────────────────────────────────────────────── */
.form { padding: 4px 16px 0; }
.field-label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 24px 0 10px; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.date-strip::-webkit-scrollbar { display: none; }
.date-btn {
  flex: none; width: 64px; height: 76px; border-radius: 14px;
  border: 1.5px solid var(--line); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  scroll-snap-align: start;
}
.date-btn .wd { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.date-btn .dn { font-size: 24px; font-weight: 800; color: var(--ink); }
.date-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--accent); color: var(--white); }
.date-btn[aria-pressed="true"] .dn { color: var(--white); }

.stepper {
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--line); border-radius: 20px; padding: 18px 20px;
}
.stepper .step {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center;
}
.stepper .step:disabled { opacity: .3; }
.stepper .step svg { width: 22px; height: 22px; }
.stepper .val { text-align: center; }
.stepper .big { font-family: var(--font-display); font-weight: 600; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.stepper .until { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.period-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.period-chips .chip { padding: 0 6px; height: 42px; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; background: var(--blue-50); border-radius: 18px; }
.seg button { height: 50px; border-radius: 14px; font-weight: 800; font-size: 16px; color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--blue); color: var(--white); box-shadow: 0 4px 10px rgba(1, 97, 158, .25); }

.occ { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.occ-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; font-variant-numeric: tabular-nums; }
.occ-row + .occ-row { border-top: 1px solid var(--line); }
.occ-row .t { font-weight: 800; font-size: 15px; }
.occ-row .t small { font-weight: 600; color: var(--muted); font-size: 11.5px; display: block; }
.dots { display: flex; gap: 5px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); display: inline-block; }
.dots i.taken { background: var(--blue); border-color: var(--accent); }
.dots i.you { background: var(--yellow); border-color: var(--ink); }
.tag { font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; background: var(--yellow); color: var(--on-yellow); white-space: nowrap; }
.tag.bad { background: var(--danger-50); color: var(--danger); }

.toggle-card { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 18px; width: 100%; text-align: left; }
.toggle-card svg.ic { width: 24px; height: 24px; color: var(--accent); flex: none; }
.toggle-card .tt { flex: 1; }
.toggle-card b { display: block; font-size: 16px; }
.toggle-card span { font-size: 14px; color: var(--muted); font-weight: 600; }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--switch-off); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch.on { background: var(--blue); }
.switch.on::after { transform: translateX(20px); }

.footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 16px calc(14px + var(--safe-b));
  z-index: 20;
}
.footer .summary { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--muted); margin: 0 0 10px; min-height: 20px; }
.footer .summary.bad { color: var(--danger); }
.btn {
  width: 100%; height: 58px; border-radius: 18px;
  font-weight: 800; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .1s, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--yellow); color: var(--on-yellow); box-shadow: 0 8px 20px rgba(245, 193, 0, .35); }
.btn-outline { border: 1.5px solid var(--accent); color: var(--accent); height: 50px; font-size: 16px; border-radius: 14px; }
.btn-soft { background: var(--soft); color: var(--danger); height: 50px; font-size: 16px; border-radius: 14px; }
.btn-ghost { color: var(--accent); height: 48px; font-size: 15.5px; }
.btn svg { width: 20px; height: 20px; }

/* ─── Meus turnos ────────────────────────────────────────────────────────── */
.profile { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.profile b { font-size: 20px; display: block; }
.profile span { font-size: 14px; font-weight: 600; opacity: .9; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { background: rgba(255, 255, 255, .14); border-radius: 16px; padding: 14px 16px; }
.stat b { font-family: var(--font-display); font-size: 32px; font-weight: 600; display: block; line-height: 1.1; }
.stat span { font-size: 14px; font-weight: 600; }

.shift-card { border: 1.5px solid var(--line); border-radius: 20px; padding: 18px 16px 16px; margin-bottom: 14px; }
.shift-card .top { display: flex; gap: 14px; }
.date-tile { width: 68px; height: 70px; border-radius: 16px; background: var(--blue); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date-tile .wd { font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.date-tile .dn { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; }
.shift-card .info { flex: 1; min-width: 0; }
.shift-card .time { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.shift-card .desc { color: var(--muted); font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.shift-card .who { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.chip-yellow { display: inline-flex; align-items: center; gap: 5px; background: var(--yellow); color: var(--on-yellow); font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.chip-yellow svg { width: 13px; height: 13px; }
.chip-blue { display: inline-flex; background: var(--blue-50); color: var(--accent); font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.shift-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.cta-card { background: var(--yellow-50); border: 1.5px dashed var(--empty-border); border-radius: 20px; padding: 18px; display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.cta-card b { display: block; font-size: 16px; }
.cta-card span { font-size: 14px; color: var(--muted); font-weight: 600; }
.cta-card .go { background: var(--yellow); color: var(--on-yellow); font-weight: 800; padding: 10px 16px; border-radius: 999px; flex: none; font-size: 14.5px; }

/* ─── Login ──────────────────────────────────────────────────────────────── */
.login {
  min-height: 100dvh; background: var(--blue); color: var(--white);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(48px + var(--safe-t)) 28px calc(28px + var(--safe-b));
  position: relative; overflow: hidden; text-align: center;
}
.login .rings { position: absolute; left: 50%; top: 34%; width: 0; height: 0; pointer-events: none; }
.login .rings i { position: absolute; border: 1px solid rgba(255, 255, 255, .07); border-radius: 50%; transform: translate(-50%, -50%); }
.login .logo-top { height: 40px; width: auto; max-width: 70%; position: relative; }
.login .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 24px 0; }
.tower-mark { width: 152px; height: 152px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; margin-bottom: 28px; }
.tower-mark span { width: 122px; height: 122px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); display: grid; place-items: center; }
.tower-mark svg { width: 56px; height: 56px; }
.login h1 { font-family: var(--font-display); font-weight: 600; font-size: 50px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.login .tagline { font-size: 18px; color: rgba(255, 255, 255, .82); margin: 14px 0 0; font-weight: 500; }
.login .bottom { width: 100%; position: relative; }
.login .btn-primary { box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.login .note { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .72); margin: 16px 8px 0; }
.login .logo-bottom { height: 22px; width: auto; margin-top: 28px; opacity: .9; }
.login .alert { background: rgba(155, 44, 31, .9); color: var(--white); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.dev-login { margin-top: 18px; display: flex; gap: 8px; }
.dev-login input { flex: 1; height: 44px; border-radius: 12px; border: 0; padding: 0 12px; font: inherit; font-size: 15px; }
.dev-login button { height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(255,255,255,.18); color: var(--white); font-weight: 700; font-size: 14px; }
.dev-hint { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 6px; }

/* ─── Instalar app ───────────────────────────────────────────────────────── */
.install {
  margin: 16px 16px 0; padding: 14px 14px 14px 16px;
  background: var(--blue-50); border-radius: 16px;
  display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.4;
}
.install .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); color: var(--yellow); display: grid; place-items: center; flex: none; }
.install .ic svg { width: 22px; height: 22px; }
.install p { margin: 0; flex: 1; }
.install .share { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; color: var(--accent); }
.install .act { font-weight: 800; color: var(--accent); flex: none; padding: 6px 4px; }
.install .x { width: 28px; height: 28px; color: var(--muted); flex: none; display: grid; place-items: center; }
.install .x svg { width: 16px; height: 16px; }

/* ─── Folha inferior e aviso ─────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(11, 42, 74, .45); z-index: 40; animation: fade .15s ease-out; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 41;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b));
  animation: up .2s cubic-bezier(.2, .8, .2, 1);
  max-height: 88dvh; overflow-y: auto;
}
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0 0 6px; }
.sheet .lead { color: var(--muted); font-weight: 600; margin: 0 0 16px; font-size: 15.5px; }
.sheet .stack-btns { display: grid; gap: 10px; margin-top: 18px; }
@keyframes up { from { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 20px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--toast); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px;
  width: max-content; max-width: min(440px, calc(100% - 32px)); text-align: center;
  transition: opacity .2s, transform .2s; z-index: 60;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { background: #0F5C3A; }
#toast.bad { background: var(--danger); }

.loader { display: grid; place-items: center; min-height: 40dvh; color: var(--faint); font-weight: 600; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-quiet { display: block; margin: 24px auto 0; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 481px) {
  body { padding: 0; }
}

a.btn { text-decoration: none; }
.row-card .chev { display: grid; color: var(--accent); }
.row-card .chev svg { width: 18px; height: 18px; }
.toggle-card .ic-wrap { display: grid; color: var(--accent); flex: none; }
.toggle-card .ic-wrap svg { width: 24px; height: 24px; }
.hero a.icon-btn { color: #fff; }
.hero-row > a:not(.icon-btn) { display: grid; text-decoration: none; }

/* ─── Turnos contínuos num cartão só ─────────────────────────────────────── */
.slot-row { align-items: start; }
.slot-times { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot-times span { height: 52px; display: flex; align-items: center; scroll-margin-top: 12px; }
.slot-times span.hour { font-weight: 800; color: var(--ink); }
.slot { width: 100%; min-height: calc(52px * var(--k, 1) + 8px * (var(--k, 1) - 1)); }
.slot .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Desmarcar vários ───────────────────────────────────────────────────── */
.kicker-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kicker-row .kicker { margin-right: auto; }
.text-btn { color: var(--accent); font-weight: 800; font-size: 14.5px; padding: 8px 4px; }
.shift-card.selectable { display: block; width: 100%; text-align: left; transition: border-color .15s, background .15s; }
.shift-card.selectable:disabled { opacity: .45; }
.shift-card.picked { border-color: var(--danger); background: var(--danger-50); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; flex: none; align-self: center; font-weight: 800; font-size: 14px; color: var(--white); }
.check.on { background: var(--danger); border-color: var(--danger); }
.btn-danger { background: var(--danger-strong); color: var(--white); height: 50px; font-size: 16px; border-radius: 14px; }
.select-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b));
  width: 100%; max-width: 480px; z-index: 21;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(11, 42, 74, .08);
  font-weight: 700;
}
.select-bar span { flex: 1; }
.select-bar .btn { width: auto; padding: 0 22px; }
.screen.selecting { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 100px); }
.pick-list { margin: 0; padding-left: 20px; color: var(--ink); font-weight: 600; line-height: 1.8; }


/* ─── Texto escuro sobre o amarelo (vale nos dois temas) ─────────────────── */
.avatar.me, .avatar.lg, .avatar.xl, .day.mine { color: var(--on-yellow); }

/* ─── Modo noturno ───────────────────────────────────────────────────────── */
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #060C13;
  --surface: #0F1A27;
  --soft: #15212F;
  --line: #24364A;
  --past-border: #1A2736;
  --ink: #E7EEF6;
  --muted: #9FB1C5;
  --faint: #66788D;
  --accent: #6DB9EE;
  --blue-50: #12283C;
  --blue-100: #1C3550;
  --yellow-50: #221D0A;
  --empty-border: #6E5B18;
  --empty-ink: #E6C65A;
  --full-bg: #1A2634;
  --full-count: #233243;
  --switch-off: #34475C;
  --nav-bg: rgba(15, 26, 39, .96);
  --danger: #F08372;
  --danger-50: #3A1A16;
  --danger-strong: #B8402D;
  --toast: #24364A;
  --av2: #4A3426;
  --av3: #36325A;
  --av4: #24402E;
}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .login { background: #0A4E80; }
html[data-theme="dark"] .date-tile,
html[data-theme="dark"] .slot.busy,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .legend .dot-badge,
html[data-theme="dark"] .date-btn[aria-pressed="true"],
html[data-theme="dark"] .seg button[aria-pressed="true"],
html[data-theme="dark"] .dots i.taken { background: #1673B3; border-color: #1673B3; }
html[data-theme="dark"] .date-btn[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .seg button[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .install .ic { background: #1673B3; }
html[data-theme="dark"] #app { box-shadow: none; }
html[data-theme="dark"] .shift-card.picked { border-color: var(--danger); }

/* seletor de aparência */
.theme-card { border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; margin: 6px 0 16px; }
.theme-card b { display: block; font-size: 16px; margin-bottom: 12px; }
.theme-card .seg { grid-template-columns: repeat(3, 1fr); }
.theme-card .seg button { height: 46px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.theme-card .seg svg { width: 18px; height: 18px; }

.now-chip { display: inline-block; background: #fff; color: var(--on-yellow); font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; margin-right: 8px; vertical-align: 1px; }
.slot.mine .now-chip { background: var(--on-yellow); color: #fff; }

/* ─── Cartão do dia em duas linhas, sem passar da largura ────────────────── */
.slot-row { grid-template-columns: 52px minmax(0, 1fr); }
.slot { min-width: 0; padding: 8px 10px 8px 12px; }
.slot .label { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.2; white-space: normal; }
.slot .label b, .slot .label small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .label b { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.slot .label b svg { width: 14px; height: 14px; flex: none; }
.slot .label small { font-size: 13px; font-weight: 600; opacity: .85; display: flex; align-items: center; }
.slot.empty .label { flex-direction: row; align-items: baseline; gap: 6px; }
.slot.empty .label small { opacity: .75; }
.slot .stack .avatar { --s: 30px; }
.now-chip { font-size: 10.5px; padding: 2px 7px; margin-right: 6px; vertical-align: 0; flex: none; }
.slot.full .label { display: flex; }

.reminder-card { margin: 6px 0 12px; }

/* ─── Elementos que só aparecem no computador ────────────────────────────── */
.nav-brand, .nav-user { display: none; }
.day-legend i.lg-busy { background: var(--blue); }
html[data-theme="dark"] .day-legend i.lg-busy { background: #1673B3; }
.day-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0; }
.day-head p { margin: 4px 0 0; color: var(--muted); font-weight: 600; font-size: 14px; }

/* ═══ Versão para computador (telas a partir de 1024px) ═══════════════════ */
@media (min-width: 1024px) {
  :root { --side-w: 256px; }
  body { background: var(--page); }
  #app {
    max-width: none; margin: 0; box-shadow: none;
    background: var(--page); min-height: 100vh;
    padding-left: var(--side-w);
  }

  /* menu lateral no lugar da barra inferior */
  .nav {
    position: fixed; inset: 0 auto 0 0; transform: none;
    width: var(--side-w); max-width: none; height: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 24px 16px; border-top: 0; border-right: 1px solid var(--line);
    background: var(--surface); backdrop-filter: none;
  }
  .nav .nav-brand {
    display: flex; align-items: center; gap: 12px; padding: 4px 8px 28px;
  }
  .nav-brand .mark { width: 46px; height: 46px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); display: grid; place-items: center; flex: none; }
  .nav-brand .mark svg { width: 26px; height: 26px; }
  .nav-brand b { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.1; color: var(--ink); }
  .nav a {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: 12px; font-size: 15.5px;
  }
  .nav a:hover { background: var(--soft); }
  .nav a[aria-current="page"] { background: var(--blue-50); color: var(--accent); }
  .nav a.center { background: var(--yellow); color: var(--on-yellow); margin: 6px 0; }
  .nav a.center:hover { filter: brightness(.97); background: var(--yellow); }
  .nav .fab { width: 24px; height: 24px; margin: 0; background: none; box-shadow: none; color: inherit; }
  .nav .fab svg { width: 22px; height: 22px; }
  .nav a.nav-user {
    display: flex; margin-top: auto; padding: 12px; gap: 10px; align-items: center;
    border: 1px solid var(--line); color: var(--ink);
  }
  .nav-user .avatar { --s: 38px; }
  .nav-user span { display: flex; flex-direction: column; min-width: 0; }
  .nav-user b, .nav-user small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-user b { font-size: 14.5px; }
  .nav-user small { font-size: 12.5px; color: var(--muted); font-weight: 600; }

  /* telas comuns centralizadas */
  .screen { max-width: 820px; margin: 0 auto; min-height: 100vh; }
  .screen.has-nav { padding-bottom: 48px; }
  .screen .hero { border-radius: 28px; margin: 24px 16px 0; }
  .hero-avatar { display: none !important; }

  /* Torre: calendário + painel do dia */
  .desk {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
    gap: 24px; padding: 24px; max-width: 1360px; align-items: start;
  }
  .desk-main .hero { border-radius: 28px; }
  .desk-main .section { padding: 0 4px; }
  .desk-main .cal { gap: 10px; }
  .desk-main .day { aspect-ratio: 1.35 / 1; font-size: 20px; }
  .desk-main .day:not(:disabled):hover { border-color: var(--accent); }
  .day.sel { box-shadow: 0 0 0 3px var(--accent); border-color: var(--accent); }
  .desk-main .row-card { margin-bottom: 8px; }
  .desk-day {
    position: sticky; top: 24px; height: calc(100vh - 48px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
    padding-bottom: 16px;
  }
  .desk-day .day-head {
    position: sticky; top: 0; z-index: 2; background: var(--surface);
    padding: 20px 16px 6px; border-bottom: 1px solid var(--line);
  }
  .desk-day .chips { padding: 12px 0 2px; }
  .desk-day .day-legend { padding: 8px 2px 10px; }
  .desk-day .slots { padding-top: 12px; }
  .slot:hover:not(.past) { filter: brightness(1.04); }

  /* Marcar turno: botão de confirmar dentro do formulário */
  .screen.has-footer { padding-bottom: 48px; max-width: 720px; }
  .footer { position: static; transform: none; width: auto; max-width: none; border-top: 0; background: none; padding: 24px 16px 0; }
  .date-strip { flex-wrap: wrap; overflow: visible; }

  /* Meus turnos em grade */
  .screen:has(.cards) { max-width: 1040px; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
  .cards .shift-card { margin: 0; }
  .select-bar { left: var(--side-w); transform: none; width: auto; right: 0; max-width: none; bottom: 0; padding-left: 32px; padding-right: 32px; }
  .screen.selecting { padding-bottom: 120px; }
  .theme-card, .reminder-card, .cta-card { max-width: 560px; }

  /* janelas no centro, não por baixo */
  .sheet {
    top: 50%; bottom: auto; left: calc(50% + var(--side-w) / 2);
    transform: translate(-50%, -50%); border-radius: 24px; max-width: 480px;
    padding: 24px; animation: pop .18s ease-out;
  }
  .sheet .grab { display: none; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }

  #toast { left: calc(50% + var(--side-w) / 2); bottom: 32px; }
  .install { max-width: 680px; }

  /* tela de login: cartão centralizado */
  .login { min-height: 100vh; }
}
@media (min-width: 1024px) {
  body:has(.login) #app { padding-left: 0; }
  body:has(.login) { background: var(--blue); }
  .login .bottom, .login .center { max-width: 420px; }
  .login .bottom { margin: 0 auto; }
}

/* ─── Quem está orando (mouse / segurar) ─────────────────────────────────── */
.slot[data-run] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#people-pop {
  position: fixed; z-index: 70; width: max-content; min-width: 240px; max-width: min(340px, calc(100vw - 16px));
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(11, 42, 74, .22);
  padding: 10px 12px; pointer-events: none;
  animation: popIn .12s ease-out;
}
#people-pop[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(4px); } }
.pop-head { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding: 2px 2px 8px; }
.pop-person { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.pop-person + .pop-person { border-top: 1px solid var(--line); }
.pop-person .avatar { --s: 34px; border-width: 0; }
.pop-person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pop-person .who b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-person .who small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pop-person .when { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] #people-pop { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
