/* =====================================================================
   Anesta — Escalas de Anestesiologia
   Estilo minimalista, cores harmônicas e fonte Arial (conforme pedido).
   ===================================================================== */

/* ---- Paleta de cores (mudar aqui muda o app inteiro) ---- */
:root {
  --bg: #F4F6F7;            /* fundo geral, quase branco */
  --surface: #FFFFFF;      /* cartões */
  --surface-2: #F0F3F4;    /* fundo suave para blocos internos */
  --primary: #0E7C7B;      /* verde-azulado calmo (cor principal) */
  --primary-strong: #0B6463;
  --primary-soft: #E4F1F0; /* fundo suave da cor principal */
  --text: #1E2A2E;         /* texto principal */
  --text-muted: #6C7B81;   /* texto secundário */
  --line: #E7ECEE;         /* linhas e bordas finas */

  /* Cores por tipo de evento (com fundo suave para os "chips") */
  --plantao: #2F6FED;      --plantao-bg: #E9F0FE;
  --folga:   #1F9D62;      --folga-bg:   #E5F5EC;
  --ferias:  #E08A2B;      --ferias-bg:  #FBEFDD;
  --extra:   #7A5AF0;      --extra-bg:   #EDE8FD;
  --sobreaviso: #B7791F;   --sobreaviso-bg: #FBF3DF;
  --risco:  #C43D6B;       --risco-bg:  #FBE7EE;

  --danger: #DC5B5B;
  --warning: #E0A020;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(20, 40, 45, 0.06);
  --shadow-soft: 0 2px 10px rgba(20, 40, 45, 0.05);
}

/* ---- Base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  /* Fonte Arial em todo o aplicativo (requisito do projeto) */
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(1200px 800px at 20% -10%, #E9F1F1 0%, #DDE6E7 40%, #D2DDDE 100%);
}

/* ---- "Celular" que envolve o app ---- */
.phone {
  position: relative;
  width: min(430px, 100vw);
  height: min(900px, 100vh);
  background: var(--bg);
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px rgba(15, 40, 45, 0.28), 0 0 0 10px #0f1417, 0 0 0 11px #2a3236;
}

/* Em telas pequenas (celular de verdade) ocupa tudo, sem moldura */
@media (max-width: 480px) {
  body { padding: 0; background: var(--bg); }
  .phone {
    width: 100vw; height: 100vh; border-radius: 0;
    box-shadow: none;
  }
}

/* ---- Barra de status falsa (relógio + ícones) ---- */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 4px;
  font-size: 13px; font-weight: bold; color: var(--text);
  flex: 0 0 auto;
}
.statusbar .dots { display: flex; gap: 5px; align-items: center; }
.statusbar .bars { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.statusbar .bars i { width: 3px; background: var(--text); border-radius: 1px; display: block; }
.statusbar .bars i:nth-child(1){ height: 4px; }
.statusbar .bars i:nth-child(2){ height: 6px; }
.statusbar .bars i:nth-child(3){ height: 8px; }
.statusbar .bars i:nth-child(4){ height: 11px; }
.statusbar .batt { width: 22px; height: 11px; border: 1.5px solid var(--text); border-radius: 3px; position: relative; }
.statusbar .batt::after { content:""; position:absolute; right:-3px; top:3px; width:2px; height:5px; background: var(--text); border-radius: 0 1px 1px 0; }
.statusbar .batt i { position:absolute; inset:1.5px; width: 75%; background: var(--text); border-radius: 1px; }

/* ---- Barra de título de cada tela ---- */
.appbar {
  flex: 0 0 auto;
  padding: 6px 20px 14px;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
}
.appbar h1 { font-size: 22px; font-weight: bold; letter-spacing: -0.3px; }
.appbar .sub { font-size: 13px; color: var(--text-muted); font-weight: normal; }
.appbar .spacer { flex: 1; }
.appbar .iconbtn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); cursor: pointer;
}
.appbar .backbtn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: bold; font-size: 15px;
  flex: 0 0 auto;
}
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }

/* ---- Área de conteúdo com rolagem ---- */
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 18px 110px;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { width: 0; }

/* ---- Cartões ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.section-title {
  font-size: 15px; font-weight: bold; margin: 22px 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .link { color: var(--primary); font-size: 13px; font-weight: bold; cursor: pointer; }

/* ---- Cartão de destaque (próximo plantão) ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #14958f 100%);
  color: #fff; border: none;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 26px rgba(14, 124, 123, 0.30);
}
.hero .label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.hero .date { font-size: 24px; font-weight: bold; margin: 4px 0 2px; }
.hero .meta { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.hero .meta .row { display: flex; align-items: center; gap: 9px; font-size: 14px; opacity: 0.96; }
.hero .meta .row .icon { opacity: 0.9; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.18); padding: 5px 11px; border-radius: 20px;
  font-size: 12px; font-weight: bold; margin-top: 12px;
}
.hero.empty { background: var(--surface); color: var(--text-muted); box-shadow: var(--shadow-soft); border: 1px dashed var(--line); text-align: center; }
.hero.empty .date { color: var(--text); font-size: 18px; }

/* ---- Grade de estatísticas ---- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px;
  box-shadow: var(--shadow-soft);
}
.stat .top { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12.5px; }
.stat .num { font-size: 26px; font-weight: bold; margin-top: 6px; }
.stat .chip-dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }

/* ---- Chips de tipo ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: bold;
}
.chip .d { width: 7px; height: 7px; border-radius: 50%; }
.chip.plantao { background: var(--plantao-bg); color: var(--plantao); }
.chip.folga   { background: var(--folga-bg);   color: var(--folga); }
.chip.ferias  { background: var(--ferias-bg);  color: var(--ferias); }
.chip.extra   { background: var(--extra-bg);   color: var(--extra); }
.chip.plantao .d { background: var(--plantao); }
.chip.folga .d   { background: var(--folga); }
.chip.ferias .d  { background: var(--ferias); }
.chip.extra .d   { background: var(--extra); }
.chip.sobreaviso { background: var(--sobreaviso-bg); color: var(--sobreaviso); }
.chip.risco      { background: var(--risco-bg);      color: var(--risco); }
.chip.sobreaviso .d { background: var(--sobreaviso); }
.chip.risco .d      { background: var(--risco); }

.status-chip { font-size: 11px; font-weight: bold; padding: 3px 9px; border-radius: 20px; }
.status-chip.ok   { background: var(--folga-bg); color: var(--folga); }
.status-chip.wait { background: #FBF1DA; color: var(--warning); }
.status-chip.no   { background: #F0F3F4; color: var(--text-muted); }

/* Selo de representante do ano */
.rep-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: bold; padding: 2px 8px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-strong);
  margin-left: 5px; vertical-align: middle;
}

/* ---- Item de lista (plantão / folga / extra) ---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 14px;
  box-shadow: var(--shadow-soft); cursor: pointer;
  transition: transform .08s ease;
}
.item:active { transform: scale(0.99); }
.item .daybox {
  width: 50px; flex: 0 0 auto; text-align: center;
  border-radius: 10px; padding: 7px 4px; background: var(--surface-2);
}
.item .daybox .dnum { font-size: 19px; font-weight: bold; line-height: 1; }
.item .daybox .dwk { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }
.item .body { flex: 1; min-width: 0; }
.item .body .t1 { font-size: 14.5px; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.item .body .t2 { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item .edge { color: var(--line); }
.item .accent { width: 4px; align-self: stretch; border-radius: 4px; }
.item .accent.plantao { background: var(--plantao); }
.item .accent.folga   { background: var(--folga); }
.item .accent.ferias  { background: var(--ferias); }
.item .accent.extra   { background: var(--extra); }
.item .accent.sobreaviso { background: var(--sobreaviso); }
.item .accent.risco      { background: var(--risco); }

.empty-note {
  text-align: center; color: var(--text-muted); font-size: 13.5px;
  padding: 30px 20px; line-height: 1.5;
}
.empty-note .big { font-size: 30px; display:block; margin-bottom: 8px; }

/* ---- Filtros ---- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.filters::-webkit-scrollbar { height: 0; }
.filter {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: bold; color: var(--text-muted); cursor: pointer;
}
.filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Calendário ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 12px; }
.cal-head .m { font-size: 17px; font-weight: bold; }
.cal-nav { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wk { text-align: center; font-size: 11px; font-weight: bold; color: var(--text-muted); padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1 / 1; border-radius: 12px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13.5px; cursor: pointer; background: var(--surface); border: 1px solid transparent;
}
.cal-day.blank { background: transparent; cursor: default; }
.cal-day.muted { color: #B9C4C7; }
.cal-day.today { border-color: var(--primary); color: var(--primary); font-weight: bold; }
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day.selected .dots i { outline: 1.5px solid #fff; }
.cal-day .dots { display: flex; gap: 3px; margin-top: 4px; height: 6px; }
.cal-day .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.dot-plantao { background: var(--plantao); }
.dot-folga { background: var(--folga); }
.dot-ferias { background: var(--ferias); }
.dot-extra { background: var(--extra); }
.dot-sobreaviso { background: var(--sobreaviso); }
.dot-risco { background: var(--risco); }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 4px 0; }
.legend .lg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.legend .lg i { width: 9px; height: 9px; border-radius: 50%; display: block; }

/* ---- Perfil ---- */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0 4px; }
.profile-head .name { font-size: 20px; font-weight: bold; margin-top: 12px; }
.profile-head .role { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.role-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; background: var(--primary-soft); color: var(--primary-strong); }

.menu { display: flex; flex-direction: column; margin-top: 8px; }
.menu .mi {
  display: flex; align-items: center; gap: 13px; padding: 15px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14.5px;
}
.menu .mi:last-child { border-bottom: none; }
.menu .mi .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--primary); }
.menu .mi .spacer { flex: 1; }
.menu .mi .chev { color: #C4CED1; }
.menu .mi.danger { color: var(--danger); }
.menu .mi.danger .ic { background: #FBEBEB; color: var(--danger); }

.info-line { display: flex; justify-content: space-between; padding: 11px 2px; font-size: 14px; border-bottom: 1px solid var(--line); }
.info-line:last-child { border-bottom: none; }
.info-line .k { color: var(--text-muted); }
.info-line .v { font-weight: bold; }

/* ---- Barra de navegação inferior ---- */
.tabbar {
  flex: 0 0 auto;
  display: flex; align-items: stretch;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  position: absolute; left: 0; right: 0; bottom: 0;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); cursor: pointer; font-size: 10.5px; font-weight: bold;
  padding: 4px 0; border: none; background: none;
}
.tab.active { color: var(--primary); }
.tab.add .plus { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(14,124,123,0.4); margin-top: -18px; }

/* ---- Horas de plantão / gráficos ---- */
.chart-title { font-size: 15px; font-weight: bold; margin-bottom: 2px; }
.chart-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.chart-svg { width: 100%; height: auto; font-family: Arial, Helvetica, sans-serif; display: block; }
.chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.chart-legend .lg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.chart-legend .lg i { width: 11px; height: 11px; border-radius: 3px; display: block; }

.cat-group { margin-bottom: 20px; }
.cat-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: bold; color: var(--text); margin: 0 2px 12px; }
.cat-head .cat-dot { width: 11px; height: 11px; border-radius: 3px; display: block; }
.cat-head .cat-sum { margin-left: auto; font-size: 12px; color: var(--text-muted); font-weight: normal; }

.hbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hbar-name { width: 112px; flex: 0 0 auto; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-name .voce { font-size: 9.5px; background: var(--primary-soft); color: var(--primary-strong); padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
.hbar-track { flex: 1; height: 15px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 8px; min-width: 4px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.hbar-val { width: 46px; flex: 0 0 auto; text-align: right; font-size: 12.5px; font-weight: bold; }

/* Controles da tela de horas: métrica (Total/Média) + seletor de residente */
.horas-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 2px 2px 6px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; flex: 0 0 auto; }
.seg button { border: none; background: none; padding: 8px 15px; border-radius: 9px; font-weight: bold; font-size: 12.5px; color: var(--text-muted); cursor: pointer; font-family: inherit; }
.seg button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-soft); }
.horas-controls select {
  flex: 1 1 150px; min-width: 140px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: bold; cursor: pointer;
}
.horas-controls select:focus { outline: none; border-color: var(--primary); }

.cmp-line {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; line-height: 1.4;
}
.cmp-line b { color: var(--text); }

.rodizio-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-soft); color: var(--primary-strong); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; }

/* Linha do tempo do histórico de rodízios */
.timeline { position: relative; margin-top: 4px; }
.tl-item { position: relative; padding-left: 24px; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--line); }
.tl-item.atual .tl-dot { background: var(--folga); box-shadow: 0 0 0 3px var(--folga-bg); }
.tl-body { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow-soft); }
.tl-top { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tl-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }

.hbar-row.focus { background: var(--primary-soft); border-radius: 10px; padding: 7px 8px; margin: 0 -8px 10px; }
.hbar-row.focus .hbar-name { color: var(--primary-strong); font-weight: bold; }
.hbar-row.focus .hbar-val { color: var(--primary-strong); }

.horas-stats { display: flex; text-align: center; align-items: stretch; }
.horas-stats > .col { flex: 1; padding: 2px 4px; }
.horas-stats .hv { font-size: 23px; font-weight: bold; }
.horas-stats .hv small { font-size: 13px; font-weight: bold; color: var(--text-muted); }
.horas-stats .hl { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.horas-stats .sep { flex: 0 0 1px; width: 1px; background: var(--line); }

/* ---- Botão flutuante (adicionar) ---- */
.fab {
  position: absolute; right: 18px; bottom: 92px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(14, 124, 123, 0.42);
}
.fab:active { background: var(--primary-strong); transform: scale(0.96); }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; border-radius: 14px;
  background: var(--primary); color: #fff; border: none;
  font-size: 15px; font-weight: bold; cursor: pointer; font-family: inherit;
}
.btn:active { background: var(--primary-strong); }
.btn.ghost { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }
.btn.subtle { background: var(--surface-2); color: var(--text); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 11px; }
.btn.danger { background: var(--danger); }

/* ---- Formulários ---- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: bold; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; font-family: inherit; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field .row2 { display: flex; gap: 10px; }
.field .row2 > * { flex: 1; }

/* ---- Modal / folha inferior ---- */
.overlay {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(15, 30, 33, 0.42);
  display: flex; align-items: flex-end;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; background: var(--surface);
  border-radius: 26px 26px 0 0; padding: 10px 20px 26px;
  max-height: 88%; overflow-y: auto;
  animation: up .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: #DCE3E4; margin: 0 auto 14px; }
.sheet h2 { font-size: 18px; margin-bottom: 4px; }
.sheet .sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* ---- Tela de login ---- */
.auth { flex: 1; display: flex; flex-direction: column; padding: 40px 26px 30px; overflow-y: auto; }
.auth .brand { display: flex; flex-direction: column; align-items: center; margin: 24px 0 30px; }
.auth .brand .logo {
  width: 78px; height: 78px; border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), #17a39c);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 14px 30px rgba(14,124,123,0.35); margin-bottom: 16px;
}
.auth .brand h1 { font-size: 27px; letter-spacing: -0.5px; }
.auth .brand p { color: var(--text-muted); font-size: 14px; margin-top: 4px; text-align: center; }
.auth .tabs { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 20px; }
.auth .tabs button { flex: 1; padding: 10px; border: none; background: none; border-radius: 10px; font-weight: bold; font-size: 14px; color: var(--text-muted); cursor: pointer; font-family: inherit; }
.auth .tabs button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-soft); }
.auth .divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; margin: 22px 0 16px; }
.auth .divider::before, .auth .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth .demo-row { display: flex; gap: 10px; }
.auth .demo-row .btn { font-size: 13.5px; padding: 12px; }
.role-pick { display: flex; gap: 10px; }
.role-pick label {
  flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px;
  text-align: center; cursor: pointer; font-size: 13.5px; font-weight: bold; color: var(--text-muted);
}
.role-pick input { display: none; }
.role-pick input:checked + span { color: var(--primary); }
.role-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* ---- Ícones ---- */
.icon { display: inline-block; vertical-align: middle; }

/* ---- Aviso de somente-leitura ---- */
.readonly-note {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); color: var(--text-muted);
  padding: 10px 12px; border-radius: 12px; font-size: 12.5px; margin-top: 8px;
}

/* ---- Toast ---- */
.toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 13.5px; font-weight: bold; z-index: 80; box-shadow: var(--shadow);
  animation: toastin .2s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--surface-2); border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
