/* =============================================
   Enfy v2 — Design System
   Pantone pastel palette · Premium clean UI
   ============================================= */

@font-face { font-family:'Quicksand'; src:url('../fonts/Quicksand-Regular.ttf') format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:'Quicksand'; src:url('../fonts/Quicksand-Medium.ttf') format('truetype'); font-weight:500; font-display:swap; }
@font-face { font-family:'Quicksand'; src:url('../fonts/Quicksand-SemiBold.ttf') format('truetype'); font-weight:600; font-display:swap; }
@font-face { font-family:'Quicksand'; src:url('../fonts/Quicksand-Bold.ttf') format('truetype'); font-weight:700; font-display:swap; }

:root {
  /* Palette: Pantone vibrante — Flame, Cobalt, Jade, Violet, Amber */
  --teal:       #00827F;   /* Pantone 3295 C — Teal */
  --teal-d:     #005F61;
  --teal-dd:    #00403F;
  --teal-light: #E6F4F4;
  --teal-glow:  rgba(0,130,127,.15);

  /* Surfaces */
  --bg:         #F6F8F8;
  --surface:    #FFFFFF;
  --surface-2:  #EEF2F2;
  --border:     #D8E4E4;
  --border-2:   #E5EDED;

  /* Text */
  --text:       #162020;
  --text-2:     #466060;
  --text-3:     #8AACAC;

  /* Semantic */
  --red:        #C0392B;
  --amber:      #D4851A;
  --accent:     #E8572A;   /* Pantone 167 C — Flame — anotações */

  /* Layout */
  --safe-top:   env(safe-area-inset-top, 0px);
  --safe-bot:   env(safe-area-inset-bottom, 0px);
  --hdr-h:      calc(52px + var(--safe-top));
  --radius:     14px;
  --radius-sm:  9px;
  --radius-xs:  6px;

  /* Shadows */
  --shadow:     0 2px 10px rgba(0,0,0,.07);
  --shadow-md:  0 4px 18px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 28px rgba(0,0,0,.13);
}


/* ── DARK MODE ── */
body.dark {
  --bg:         #101e1d;
  --surface:    #182523;
  --surface-2:  #1e2f2d;
  --border:     #2a3f3d;
  --border-2:   #243533;
  --text:       #e0eeec;
  --text-2:     #7aada9;
  --text-3:     #4a706d;
  --teal-light: #1a3330;
  --shadow:     0 2px 12px rgba(0,0,0,.28);
  --shadow-md:  0 4px 20px rgba(0,0,0,.36);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.46);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior:smooth; }
body {
  font-family:'Quicksand','Segoe UI',system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  overscroll-behavior-y:none;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding-bottom:calc(20px + var(--safe-bot));
  overflow-x:hidden;
}

/* ── SIDEBAR ── */
.sidebar-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.38);
  z-index:200; opacity:0; pointer-events:none;
  transition:opacity .22s;
}
.sidebar-overlay.show { opacity:1; pointer-events:all; }

.sidebar {
  position:fixed; top:0; left:0; bottom:0; width:272px;
  background:var(--surface); z-index:201;
  transform:translateX(-100%);
  transition:transform .26s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column;
  box-shadow:6px 0 28px rgba(0,0,0,.14);
  padding-top:var(--safe-top);
  overflow-y:auto;
}
.sidebar.open { transform:translateX(0); }

.sidebar-header {
  display:flex; align-items:center; gap:12px;
  padding:18px 18px 14px;
  background:linear-gradient(140deg, var(--teal-dd) 0%, var(--teal-d) 100%);
  color:#fff;
  flex-shrink:0;
}
.sb-logo { width:40px; height:40px; border-radius:10px; background:#fff; padding:4px; object-fit:contain; }
.sb-appname { font-size:18px; font-weight:700; letter-spacing:-.2px; }
.sb-version  { font-size:11px; opacity:.65; font-weight:500; margin-top:1px; }

.sb-user { padding:14px 16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.btn-google {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:11px 14px; border-radius:var(--radius-sm);
  background:var(--surface); color:var(--text-2);
  font-size:13px; font-weight:600;
  border:1px solid var(--border); cursor:pointer;
  box-shadow:var(--shadow);
  transition:box-shadow .18s, background .15s;
  font-family:inherit;
}
.btn-google:hover { box-shadow:var(--shadow-md); background:var(--surface-2); }

/* Perfil Google */
.sb-profile {
  display:flex; align-items:center; gap:10px;
  padding:4px 0;
}
.sb-avatar {
  width:38px; height:38px; border-radius:50%;
  object-fit:cover; border:2px solid var(--primary);
  flex-shrink:0;
}
.sb-profile-info { flex:1; min-width:0; }
.sb-profile-name {
  font-size:13px; font-weight:700; color:var(--text-1);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sb-profile-email {
  font-size:11px; color:var(--text-3);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.btn-google-sair {
  background:none; border:none; cursor:pointer;
  color:var(--text-3); padding:4px; border-radius:6px;
  display:flex; align-items:center;
  transition:color .15s, background .15s;
  flex-shrink:0;
}
.btn-google-sair:hover { color:var(--danger,#e55); background:var(--surface-2); }

.sb-nav { list-style:none; padding:8px 0; flex:1; }
.sb-nav-item {
  display:flex; align-items:center; gap:12px;
  padding:13px 18px; cursor:pointer;
  font-weight:600; font-size:14px; color:var(--text-2);
  transition:background .14s, color .14s;
  user-select:none;
}
.sb-nav-item svg { opacity:.7; flex-shrink:0; transition:opacity .14s; }
.sb-nav-item:hover { background:var(--teal-light); color:var(--teal-d); }
.sb-nav-item:hover svg { opacity:1; }
.sb-nav-item.active { background:var(--teal-light); color:var(--teal-d); }
.sb-nav-item.active svg { opacity:1; }
.sb-nav-divider { height:1px; background:var(--border); margin:6px 0; }

/* ── HEADER ── */
.app-header {
  position:fixed; top:0; left:0; right:0; z-index:100;
  padding-top:var(--safe-top);
  height:var(--hdr-h);
  background:linear-gradient(140deg, var(--teal-dd) 0%, var(--teal-d) 100%);
  display:flex; align-items:center; justify-content:space-between;
  padding-left:6px; padding-right:6px;
  box-shadow:0 1px 12px rgba(0,0,0,.18);
}
.hdr-title { font-size:17px; font-weight:700; color:#fff; letter-spacing:-.3px; opacity:.95; }
.hdr-actions { display:flex; align-items:center; position:relative; gap:2px; }
.hdr-btn {
  width:40px; height:40px; border-radius:50%;
  background:transparent; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,.88); transition:background .14s, transform .12s;
}
.hdr-btn:hover  { background:rgba(255,255,255,.14); }
.hdr-btn:active { background:rgba(255,255,255,.22); transform:scale(.92); }

/* DROPDOWN */
.dropdown-menu {
  position:absolute; top:calc(100% + 6px); right:0;
  background:var(--surface); border-radius:var(--radius-sm);
  box-shadow:var(--shadow-lg); min-width:220px;
  border:1px solid var(--border); z-index:300;
  overflow:hidden; opacity:0;
  transform:translateY(-6px) scale(.97);
  pointer-events:none;
  transition:opacity .16s, transform .16s;
}
.dropdown-menu.show { opacity:1; transform:none; pointer-events:all; }
.dropdown-item {
  display:flex; align-items:center; gap:10px;
  padding:13px 15px; cursor:pointer;
  font-size:13px; font-weight:600; color:var(--text);
  transition:background .12s;
}
.dropdown-item svg { opacity:.55; flex-shrink:0; }
.dropdown-item:hover { background:var(--teal-light); color:var(--teal-d); }
.dropdown-item:hover svg { opacity:1; }

/* ── MAIN / PAGES ── */
main { padding-top:var(--hdr-h); min-height:100vh; }
.page { display:none; }
.page.active { display:block; }

.page-inner { max-width:600px; margin:0 auto; padding:20px 16px; }
.page-title { font-size:19px; font-weight:700; color:var(--teal-dd); margin-bottom:5px; }
.page-desc  { font-size:13px; color:var(--text-2); margin-bottom:18px; font-weight:500; }

/* ── PAGE LOCAIS HEADER ── */
.page-header-row {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:6px;
}
.btn-add-local {
  display:flex; align-items:center; gap:7px;
  padding:9px 16px; border-radius:var(--radius-sm);
  background:var(--teal-d); color:#fff;
  border:none; cursor:pointer; font-family:inherit;
  font-size:13px; font-weight:700;
  box-shadow:0 2px 10px var(--teal-glow);
  transition:filter .15s, transform .12s;
}
.btn-add-local:active { filter:brightness(.92); transform:scale(.97); }

/* ── LOCAIS LISTA (PAGE) ── */
.locais-lista-page { display:flex; flex-direction:column; gap:10px; }

.local-item-page {
  display:flex; align-items:center; gap:10px;
  padding:13px 14px; border-radius:var(--radius-sm);
  background:var(--surface); border:1px solid var(--border);
  box-shadow:var(--shadow);
}
.local-item-left { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.local-dot { width:22px; height:22px; border-radius:50%; flex-shrink:0; }
.local-info { flex:1; min-width:0; }
.local-nome { font-size:14px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.local-horario { font-size:12px; color:var(--text-2); font-weight:500; margin-top:2px; }

.local-actions { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.local-btn-edit, .local-btn-del {
  width:34px; height:34px; border-radius:var(--radius-xs);
  background:none; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--text-3); transition:color .14s, background .14s;
}
.local-btn-edit:hover { color:var(--teal-d); background:var(--teal-light); }
.local-btn-del:hover  { color:var(--red);    background:#f9eded; }
body.dark .local-btn-del:hover { background:#2a1a1a; }

.lista-vazia {
  text-align:center; padding:40px 20px;
  font-size:14px; color:var(--text-3); font-weight:500; line-height:1.7;
}

/* ── CALENDÁRIO ── */
.cal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px 8px;
  position:sticky; top:var(--hdr-h); z-index:50;
  background:var(--bg);
}
.cal-mesano {
  font-size:16px; font-weight:700; color:var(--teal-dd);
  text-transform:capitalize; letter-spacing:-.2px;
}
.nav-btn {
  width:36px; height:36px; border-radius:50%;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--teal-d); cursor:pointer;
  box-shadow:var(--shadow); transition:transform .14s, box-shadow .14s;
}
.nav-btn:active { transform:scale(.90); box-shadow:none; }

.cal-dow {
  display:grid; grid-template-columns:repeat(7,1fr);
  padding:0 8px 4px; gap:4px;
}
.cal-dow span {
  text-align:center; font-size:10px; font-weight:700;
  color:var(--text-3); text-transform:uppercase; padding:3px 0; letter-spacing:.4px;
}

.cal-grid {
  display:grid; grid-template-columns:repeat(7,1fr);
  padding:0 8px 8px; gap:4px;
}
.cal-dia {
  aspect-ratio:1; border-radius:var(--radius-sm);
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding-top:0;
  cursor:pointer; position:relative;
  background:var(--surface);
  border:none;
  box-shadow:var(--shadow);
  transition:transform .11s;
  overflow:hidden;
}
.cal-dia:active { transform:scale(.90); }
.cal-dia.vazio { background:transparent; box-shadow:none; cursor:default; }

.cal-dia.feriado-nacional { background:#faf6ee; }
body.dark .cal-dia.feriado-nacional { background:#2a2410; }

.cal-dia .dia-num { font-size:1.35rem; font-weight:700; line-height:1; color:var(--text-2); }
.cal-dia.hoje .dia-num {
  color:var(--teal-d);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
}

.feriados {
  padding:4px 14px 12px;
  font-size:11px; color:var(--text-3); font-weight:500;
  min-height:20px; letter-spacing:.1px;
}

/* ── BORDA PROPORCIONAL AOS LOCAIS ── */
.cal-dia.tem-locais { position:relative; }
.cal-dia.tem-locais::before {
  content:'';
  position:absolute; inset:0;
  border-radius:inherit;
  padding:5px;
  background:var(--borda-locais);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
          mask-composite:exclude;
  pointer-events:none; z-index:0;
}
.cal-dia.tem-locais > * { position:relative; z-index:1; }

/* ── MARCADOR DE ANOTAÇÃO ── */
/* Ícone post-it com alfinete — SVG inline via CSS não é possível, usamos pseudo + background SVG codificado */
.dia-anotacao-flag { display:none !important; }

.cal-dia .marcador-anotacao {
  position:absolute;
  top:3px; right:3px;
  width:22px; height:22px;
  z-index:3;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='4' width='10' height='9' rx='1.5' fill='%23c9945a' opacity='.9'/%3E%3Crect x='3' y='5.5' width='5' height='1' rx='.5' fill='%23fff' opacity='.7'/%3E%3Crect x='3' y='7.5' width='7' height='1' rx='.5' fill='%23fff' opacity='.7'/%3E%3Crect x='3' y='9.5' width='5' height='1' rx='.5' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='11' cy='3.5' r='1.8' fill='%23516865'/%3E%3Cline x1='11' y1='5.2' x2='8' y2='8' stroke='%23516865' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size:contain;
  background-repeat:no-repeat;
}

/* ── POPOVER ANOTAÇÃO ── */
.anotacao-pop {
  position:fixed; z-index:450;
  max-width:230px; min-width:140px;
  background:var(--surface);
  border:1px solid var(--teal);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow-lg);
  padding:10px 12px;
  opacity:0; transform:translateY(6px) scale(.96);
  transition:opacity .16s, transform .16s;
}
.anotacao-pop.show { opacity:1; transform:none; }
.anotacao-pop-head { font-size:12px; font-weight:700; color:var(--teal-d); margin-bottom:6px; }
.anotacao-pop-body { display:flex; flex-direction:column; gap:5px; }
.anotacao-pop-item {
  font-size:12px; line-height:1.45; color:var(--text);
  background:var(--bg); border-radius:6px; padding:5px 8px;
}

/* ── LEGENDA DOS LOCAIS ── */
.locais-legenda { padding:4px 14px 18px; display:flex; flex-direction:column; gap:8px; }
.legenda-vazia { font-size:12px; color:var(--text-3); padding:4px 0 8px; font-weight:500; }

.legenda-item {
  display:flex; align-items:center; gap:9px;
  padding:9px 12px; border-radius:var(--radius-sm);
  background:var(--surface); border:1px solid var(--border);
  cursor:pointer; transition:transform .13s;
  box-shadow:var(--shadow);
}
.legenda-item:active { transform:scale(.97); }
.legenda-circle { width:18px; height:18px; border-radius:50%; flex-shrink:0; }
.legenda-info { flex:1; min-width:0; }
.legenda-nome    { font-size:13px; font-weight:700; color:var(--text); }
.legenda-horario { font-size:11px; color:var(--text-2); font-weight:500; margin-top:1px; }

.legenda-edit, .legenda-trash {
  background:none; border:none; cursor:pointer; color:var(--text-3);
  padding:5px; border-radius:var(--radius-xs);
  display:flex; align-items:center; flex-shrink:0;
  transition:color .14s, background .14s;
}
.legenda-edit:hover  { color:var(--teal-d); background:var(--teal-light); }
.legenda-trash:hover { color:var(--red); background:#f9eded; }
body.dark .legenda-trash:hover { background:#2a1a1a; }

/* ── FORMS ── */
.form-group { margin-bottom:14px; }
.form-group label, label.checkbox-label span {
  display:block; font-size:11px; font-weight:700;
  color:var(--text-3); text-transform:uppercase;
  letter-spacing:.5px; margin-bottom:6px;
}
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width:100%; padding:12px 13px;
  border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:14px; font-weight:600; background:var(--surface); color:var(--text);
  font-family:inherit; outline:none;
  transition:border-color .16s, box-shadow .16s;
  -webkit-appearance:none; appearance:none;
  box-shadow:var(--shadow);
}
input:focus, select:focus, textarea:focus {
  border-color:var(--teal); box-shadow:0 0 0 3px var(--teal-glow);
}
select {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ab5b2' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 11px center;
  padding-right:30px;
}
textarea { resize:vertical; min-height:76px; line-height:1.5; }

label.checkbox-label {
  display:flex; align-items:center; gap:10px;
  cursor:pointer; font-size:14px; font-weight:600; color:var(--text);
}
label.checkbox-label input[type="checkbox"] { width:17px; height:17px; accent-color:var(--teal-d); flex-shrink:0; }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* ── BOTÕES ── */
.btn-primary {
  background:linear-gradient(140deg, var(--teal-d), var(--teal-dd));
  color:#fff; border:none; padding:13px 18px;
  border-radius:var(--radius-sm); font-size:14px; font-weight:700;
  cursor:pointer; font-family:inherit;
  box-shadow:0 4px 14px var(--teal-glow);
  transition:transform .13s, filter .16s;
  letter-spacing:.1px;
}
.btn-primary:active { transform:scale(.97); filter:brightness(.93); }

.btn-secondary {
  background:var(--surface); color:var(--teal-d);
  border:1px solid var(--teal); padding:13px 18px;
  border-radius:var(--radius-sm); font-size:14px; font-weight:700;
  cursor:pointer; font-family:inherit;
  transition:background .14s;
}
.btn-secondary:active { background:var(--teal-light); }

.btn-icon {
  width:30px; height:30px; border-radius:50%;
  background:var(--teal-d); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:#fff; flex-shrink:0;
  transition:filter .13s;
}
.btn-icon:active { filter:brightness(.88); }

.w100 { width:100%; }
.btn-row { display:flex; gap:10px; }
.btn-row .btn-secondary, .btn-row .btn-primary { flex:1; }

/* ── ESCALA ROWS ── */
.escala-row { display:flex; align-items:center; gap:7px; }
.escala-num  { width:58px !important; text-align:center; padding:10px 6px !important; flex-shrink:0; }
.escala-x    { font-size:16px; font-weight:700; color:var(--text-3); flex-shrink:0; }
.escala-label { font-size:12px; font-weight:600; color:var(--text-3); white-space:nowrap; flex-shrink:0; }
.escala-sel  { flex:1; padding:10px 8px !important; }

.cor-row  { display:flex; align-items:center; gap:10px; }
.cor-input { width:50px !important; height:44px; padding:3px !important; border-radius:var(--radius-sm); cursor:pointer; }
.cor-presets { display:flex; gap:7px; flex-wrap:wrap; }
.cor-preset {
  width:28px; height:28px; border-radius:50%; cursor:pointer;
  border:2.5px solid transparent; transition:transform .13s, border-color .13s;
}
.cor-preset:hover { transform:scale(1.18); }
.cor-preset.selected { border-color:var(--text); }

/* ── MODAL ── */
.modal-overlay {
  position:fixed; inset:0; z-index:400;
  background:rgba(0,0,0,.44); backdrop-filter:blur(3px);
  display:flex; align-items:flex-end;
  opacity:0; pointer-events:none; transition:opacity .22s;
}
.modal-overlay.show { opacity:1; pointer-events:all; }
.modal-overlay.show .modal-sheet { transform:translateY(0); }

.modal-sheet {
  background:var(--surface); width:100%; max-width:600px; margin:0 auto;
  border-radius:20px 20px 0 0; max-height:92vh; overflow-y:auto;
  transform:translateY(100%);
  transition:transform .28s cubic-bezier(.4,0,.2,1);
  padding-bottom:var(--safe-bot);
}
.modal-dia-sheet { max-height:84vh; }

.modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px 0; position:sticky; top:0;
  background:var(--surface); z-index:10; padding-bottom:11px;
  border-bottom:1px solid var(--border);
}
.modal-title { font-size:16px; font-weight:700; color:var(--text); }
.modal-back {
  width:34px; height:34px; border-radius:50%;
  background:var(--teal-light); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--teal-d); transition:background .13s;
}
.modal-back:hover { background:var(--border); }
.modal-body { padding:18px 14px; }

/* ── DIA MODAL ── */
.dia-section { margin-bottom:22px; }
.dia-section-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:10px; padding-bottom:7px;
  border-bottom:1.5px solid var(--border);
  font-size:14px; font-weight:700; color:var(--teal-d);
}
.dia-items-list { display:flex; flex-direction:column; gap:7px; }
.dia-escala-item {
  display:flex; align-items:center; gap:9px;
  padding:9px 11px; border-radius:var(--radius-sm);
  background:var(--bg); border:1px solid var(--border-2);
}
.dia-escala-dot  { width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.dia-escala-info { flex:1; min-width:0; }
.dia-escala-nome { font-size:13px; font-weight:700; }
.dia-escala-hora { font-size:11px; color:var(--text-2); margin-top:1px; }
.dia-item-del {
  background:none; border:none; cursor:pointer; color:var(--text-3);
  display:flex; align-items:center; padding:4px; border-radius:var(--radius-xs);
  transition:color .13s, background .13s;
}
.dia-item-del:hover { color:var(--red); background:#f9eded; }
body.dark .dia-item-del:hover { background:#2a1a1a; }

.dia-anotacao-item {
  padding:9px 11px; border-radius:var(--radius-sm);
  background:var(--bg); border:1px solid var(--border-2);
  display:flex; align-items:flex-start; gap:7px;
}
.dia-anotacao-text { flex:1; font-size:13px; line-height:1.55; color:var(--text); }
.anotacao-form { margin-top:9px; }
.anotacao-form textarea { margin-bottom:9px; }
.dia-empty { font-size:12px; color:var(--text-3); font-style:italic; padding:3px 0; }

/* ── BACKUP ── */
.backup-grid { display:flex; flex-direction:column; gap:12px; margin-top:20px; }
.backup-btn {
  display:flex; flex-direction:column; align-items:center; gap:9px;
  padding:28px 22px; border-radius:var(--radius);
  background:var(--surface); border:1px solid var(--border);
  cursor:pointer; font-family:inherit; font-size:14px; font-weight:700;
  color:var(--text-2); transition:background .14s, box-shadow .18s;
  box-shadow:var(--shadow);
}
.backup-btn svg { color:var(--teal-d); opacity:.8; }
.backup-btn:hover { background:var(--teal-light); box-shadow:var(--shadow-md); color:var(--teal-d); }
.backup-btn:hover svg { opacity:1; }

/* ── RESUMO ── */
.resumo-filtros { display:flex; gap:10px; margin-bottom:18px; }
.resumo-filtros select { flex:1; }
.resumo-card {
  background:var(--surface); border-radius:var(--radius); padding:14px;
  border:1px solid var(--border); margin-bottom:10px;
  box-shadow:var(--shadow);
}
.resumo-total { border-color:var(--teal); }
.resumo-local-nome {
  font-size:14px; font-weight:700; color:var(--text);
  margin-bottom:10px; display:flex; align-items:center; gap:8px;
}
.resumo-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.resumo-stat { background:var(--bg); border-radius:var(--radius-sm); padding:10px; }
.resumo-stat-val   { font-size:22px; font-weight:700; color:var(--teal-d); }
.resumo-stat-label { font-size:10px; color:var(--text-3); font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-top:2px; }
.sem-dados { font-size:13px; color:var(--text-3); padding:20px 0; text-align:center; }

/* ── RELATÓRIO ── */
.rel-row {
  padding:10px 0; border-bottom:1px solid var(--border-2);
  font-size:13px; color:var(--text);
  display:flex; flex-wrap:wrap; gap:3px; align-items:baseline;
}
.rel-data    { font-weight:700; color:var(--text); min-width:60px; }
.rel-feriado { font-size:12px; color:var(--amber); font-weight:600; }
.rel-escala  { color:var(--teal-d); font-weight:600; }
.rel-anota   { font-size:12px; color:var(--text-3); font-style:italic; width:100%; padding-top:2px; }

/* ── PREFERÊNCIAS ── */
.pref-page { padding-bottom: 32px; }

.pref-group {
  background: var(--surface);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.pref-group-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--teal-d);
  background: var(--teal-bg);
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
}

.pref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  gap: 10px;
}
.pref-row:last-child { border-bottom: none; }

.pref-row-left {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}

.pref-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--teal-bg);
}
.pref-icon-google { background: #f8f8f8; }

.pref-label { font-size: 14px; font-weight: 600; color: var(--text); }
.pref-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }

.pref-select {
  font-size: 13px; font-weight: 600; color: var(--teal-d);
  background: var(--teal-bg); border: none; border-radius: 8px;
  padding: 6px 10px; cursor: pointer; flex-shrink: 0;
  -webkit-appearance: none; appearance: none;
  text-align: center;
  max-width: 100px;
  min-width: 80px;
}

/* Fix antec row so select doesn't overlap label */
.pref-row { flex-wrap: nowrap; gap: 10px; }
.pref-row-left { min-width: 0; flex: 1; }
.pref-row-left > div { min-width: 0; overflow: hidden; }

.pref-btn-action {
  font-size: 12px; font-weight: 700; color: var(--teal-d);
  background: var(--teal-bg); border: none; border-radius: 8px;
  padding: 7px 13px; cursor: pointer; flex-shrink: 0;
  white-space: nowrap;
}
.pref-btn-action:active { opacity: .75; }

.pref-btn-google {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #444;
  background: #fff; border: 1.5px solid #ddd; border-radius: 8px;
  padding: 6px 12px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.pref-btn-google:active { opacity: .75; }

.pref-btn-logout {
  font-size: 12px; font-weight: 700; color: #c0392b;
  background: #fff0f0; border: none; border-radius: 8px;
  padding: 7px 13px; cursor: pointer; flex-shrink: 0;
}
.pref-btn-logout:active { opacity: .75; }

.pref-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border);
}

.pref-autosave-note {
  text-align: center; font-size: 12px; color: var(--text-3);
  margin-top: 4px;
}

.toggle { position:relative; display:inline-block; width:44px; height:24px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.slider {
  position:absolute; inset:0; background:var(--border);
  border-radius:24px; transition:.26s;
}
.slider::before {
  content:''; position:absolute;
  width:18px; height:18px; left:3px; bottom:3px;
  background:#fff; border-radius:50%;
  transition:.26s; box-shadow:0 1px 5px rgba(0,0,0,.22);
}
.toggle input:checked + .slider { background:var(--teal-d); }
.toggle input:checked + .slider::before { transform:translateX(20px); }
.toggle input:disabled + .slider { opacity: .45; }


/* ── SOBRE ── */
.sobre-hero { text-align:center; padding:36px 20px 22px; }
.sobre-logo { width:72px; height:72px; border-radius:18px; object-fit:contain; margin-bottom:14px; box-shadow:var(--shadow-lg); }
.sobre-hero h1 { font-size:26px; font-weight:700; color:var(--teal-dd); }
.sobre-hero p  { font-size:14px; color:var(--text-2); margin-top:5px; }
.sobre-version { display:inline-block; background:var(--teal-light); color:var(--teal-d); font-size:12px; font-weight:700; padding:3px 11px; border-radius:20px; margin-top:9px; }
.sobre-desc { padding:0 18px 36px; font-size:14px; color:var(--text); line-height:1.75; }

/* ── PRIVACIDADE ── */
.privacidade-texto { font-size:13px; line-height:1.75; color:var(--text); }
.privacidade-texto h3 { font-size:14px; font-weight:700; color:var(--teal-d); margin:18px 0 6px; }
.privacidade-texto p  { color:var(--text-2); }

/* ── PADRÃO PERSONALIZADO ── */
.padrao-grid-wrap { margin:14px 0; overflow-x:auto; }
.padrao-header-row { display:flex; gap:4px; padding:4px 0; }
.padrao-body { display:flex; flex-direction:column; gap:4px; }
.padrao-row  { display:flex; gap:4px; }
.padrao-cell {
  width:38px; height:38px; border-radius:7px; flex-shrink:0;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:700; cursor:pointer;
  transition:background .11s; color:var(--text-3);
  user-select:none;
}
.padrao-cell.off { background:var(--surface-2); color:var(--text-3); }
body.dark .padrao-cell.off { background:#1a2a28; }
.padrao-head-cell {
  width:38px; text-align:center; font-size:9px;
  font-weight:700; color:var(--text-3); flex-shrink:0; letter-spacing:.3px;
}
.padrao-actions { margin-top:14px; }

/* ── TOAST ── */
.toast {
  position:fixed; bottom:calc(22px + var(--safe-bot)); left:50%;
  transform:translateX(-50%) translateY(16px);
  background:#1a2e2c; color:#daf0ee;
  padding:11px 20px; border-radius:28px;
  font-size:13px; font-weight:600;
  opacity:0; pointer-events:none;
  transition:opacity .22s, transform .22s;
  z-index:500; white-space:nowrap;
  box-shadow:0 6px 22px rgba(0,0,0,.28);
  letter-spacing:.1px;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── MODAL CONFIRMAÇÃO ── */
.modal-confirm-sheet { max-height:auto; border-radius:20px; margin:auto 16px; }
.confirm-icon {
  width:52px; height:52px; border-radius:50%;
  background:#FEF0EE; color:var(--red);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 14px;
}
body.dark .confirm-icon { background:#2a1515; }
.confirm-msg {
  font-size:15px; font-weight:600; color:var(--text);
  text-align:center; line-height:1.55; margin-bottom:20px;
}
.confirm-btns { display:flex; gap:10px; }
.confirm-btns .btn-secondary, .confirm-btns .btn-danger { flex:1; }
.btn-danger {
  background:var(--red); color:#fff; border:none;
  padding:13px 18px; border-radius:var(--radius-sm);
  font-size:14px; font-weight:700; cursor:pointer;
  font-family:inherit; transition:filter .15s;
}
.btn-danger:active { filter:brightness(.88); }

/* ── SININHO DE ALARME POR LOCAL ── */
.btn-sininho {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: color .15s, background .15s;
  flex-shrink: 0; padding: 0;
}
.btn-sininho.ativo { color: var(--teal-d); }
.btn-sininho:hover { background: var(--teal-bg); color: var(--teal-d); }
.btn-sininho.ativo svg { fill: var(--teal-d); stroke: var(--teal-d); }
.btn-sininho:not(.ativo) svg { fill: none; stroke: var(--text-3); }

/* ── FERIADOS MUNICIPAIS NO CADASTRO DE LOCAL ── */
.feriados-locais-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 8px; min-height: 0;
}
.feriado-local-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--teal-bg); border-radius: 8px;
  padding: 7px 10px; font-size: 13px;
}
.feriado-local-item .feriado-data {
  font-weight: 700; color: var(--teal-d);
  min-width: 38px; flex-shrink: 0;
}
.feriado-local-item .feriado-nome {
  flex: 1; color: var(--text);
}
.feriado-local-item .btn-rm-feriado {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 2px; border-radius: 4px;
  line-height: 0; flex-shrink: 0;
  transition: color .15s;
}
.feriado-local-item .btn-rm-feriado:hover { color: var(--red); }
.feriados-add-row {
  display: flex; gap: 6px; align-items: center;
}
.feriado-nome-input {
  flex: 1; padding: 8px 10px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text); font-family: inherit;
}
.feriado-data-input {
  width: 64px; flex-shrink: 0;
  padding: 8px 8px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text); font-family: inherit;
  text-align: center;
}
.btn-feriado-add {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--teal-d); border: none; border-radius: 8px;
  color: #fff; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: filter .15s;
}
.btn-feriado-add:active { filter: brightness(.88); }
