/* Gestão Glamour — creme e dourado.
   Celular: barra de abas embaixo. A partir de 960px: barra lateral.
   Escala: 11 / 12.5 / 14 / 15 / 17 / 20 / 26 / 32 / display. Raios: 8 / 10 / 12 / 16. */

:root {
  --bg: #F5F0E8; --island: #FFFFFF; --surface: #FAF7F2; --sunken: #EFE9DE;
  --line: #E7E0D2; --line-soft: #F0EBE2;
  --ink: #1D1A14; --ink2: #3E3A31; --muted: #7A7361; --soft: #A8A08B;
  --gold: #C9A24A; --gold-600: #A9802F; --gold-soft: #F7EED9; --gold-line: #E8D3A0; --gold-text: #7A5A16;
  --ok-soft: #E2F0E5; --ok: #2E6B42; --warn-soft: #FAEFCB; --warn: #7B5E00;
  --bad-soft: #F6DED6; --bad: #A13F2A; --info-soft: #E9E9E2; --info: #5C6052;
  --dark-pill: #1D1A14; --dark-pill-ink: #FAF7F2;
  --wa: #1E7B4C;
  --sombra-1: 0 1px 2px rgba(45, 35, 15, .05);
  --sombra: 0 1px 2px rgba(45, 35, 15, .04), 0 6px 20px -8px rgba(45, 35, 15, .10);
  --sombra-alta: 0 2px 6px rgba(45, 35, 15, .06), 0 18px 40px -16px rgba(45, 35, 15, .22);
  --vidro: rgba(245, 240, 232, .82);
  --brilho: rgba(214, 174, 87, .14);

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;

  --gold-grad: linear-gradient(115deg, #A87A2C 0%, #D8B15C 22%, #F1DB9C 40%, #CFA14A 58%, #E6C77E 76%, #B98B33 100%);
  --gold-card: radial-gradient(120% 140% at 0% 0%, rgba(255, 246, 214, .55) 0%, transparent 46%),
               linear-gradient(135deg, #C2953F 0%, #E3C273 45%, #D1A653 72%, #B4872F 100%);
  --gold-text-grad: linear-gradient(90deg, #8E6420 0%, #C9983C 30%, #B7862C 50%, #D4A947 70%, #8E6420 100%);

  --raio: 16px;
  --dur: .18s;
}

/* Escuro: segue o aparelho, a menos que o botão de tema tenha escolhido (data-theme no <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100C; --island: #1B1813; --surface: #17140F; --sunken: #241F18;
    --line: #2F2A21; --line-soft: #26211A;
    --ink: #F3EDE2; --ink2: #D9D1C2; --muted: #A69E8A; --soft: #7A7362;
    --gold-soft: #33291A; --gold-line: #5C4925; --gold-text: #E8C77C; --gold-600: #D2AB55;
    --ok-soft: #1B2D21; --ok: #8FCC9D; --warn-soft: #332911; --warn: #E6C369;
    --bad-soft: #3A1E16; --bad: #EC9C87; --info-soft: #25251E; --info: #BCBFAD;
    --dark-pill: #F3EDE2; --dark-pill-ink: #1D1A14; --wa: #25945C;
    --sombra-1: 0 1px 2px rgba(0, 0, 0, .3);
    --sombra: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px -10px rgba(0, 0, 0, .55);
    --sombra-alta: 0 2px 6px rgba(0, 0, 0, .3), 0 20px 44px -16px rgba(0, 0, 0, .7);
    --vidro: rgba(18, 16, 12, .8);
    --brilho: rgba(214, 174, 87, .08);
    --gold-text-grad: linear-gradient(90deg, #C9983C 0%, #F0D58C 35%, #D4A947 60%, #F0D58C 85%, #C9983C 100%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100C; --island: #1B1813; --surface: #17140F; --sunken: #241F18;
  --line: #2F2A21; --line-soft: #26211A;
  --ink: #F3EDE2; --ink2: #D9D1C2; --muted: #A69E8A; --soft: #7A7362;
  --gold-soft: #33291A; --gold-line: #5C4925; --gold-text: #E8C77C; --gold-600: #D2AB55;
  --ok-soft: #1B2D21; --ok: #8FCC9D; --warn-soft: #332911; --warn: #E6C369;
  --bad-soft: #3A1E16; --bad: #EC9C87; --info-soft: #25251E; --info: #BCBFAD;
  --dark-pill: #F3EDE2; --dark-pill-ink: #1D1A14; --wa: #25945C;
  --sombra-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sombra: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px -10px rgba(0, 0, 0, .55);
  --sombra-alta: 0 2px 6px rgba(0, 0, 0, .3), 0 20px 44px -16px rgba(0, 0, 0, .7);
  --vidro: rgba(18, 16, 12, .8);
  --brilho: rgba(214, 174, 87, .08);
  --gold-text-grad: linear-gradient(90deg, #C9983C 0%, #F0D58C 35%, #D4A947 60%, #F0D58C 85%, #C9983C 100%);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh; color: var(--ink);
  font: 14px/1.5 var(--f-body); font-feature-settings: "ss01", "cv11";
  background: radial-gradient(1100px 520px at 85% -12%, var(--brilho), transparent 70%) fixed, var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: var(--gold-text); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-line); color: var(--ink); }
.mono, .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted, .detalhe { color: var(--muted); }
.small, .detalhe { font-size: 12.5px; line-height: 1.45; }
.erro { color: var(--bad); }
.inline { display: inline; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

@media (prefers-reduced-motion: no-preference) {
  .wrap > * { animation: sobe .38s cubic-bezier(.2, .7, .2, 1) both; }
  .wrap > *:nth-child(2) { animation-delay: .03s; }
  .wrap > *:nth-child(3) { animation-delay: .06s; }
  .wrap > *:nth-child(4) { animation-delay: .09s; }
  .wrap > *:nth-child(5) { animation-delay: .12s; }
  .wrap > *:nth-child(n+6) { animation-delay: .15s; }
}
@keyframes sobe { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.side { display: none; }
main { flex: 1; min-width: 0; padding: 0 16px calc(104px + env(safe-area-inset-bottom, 0px)); }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.topbar {
  position: sticky; top: 0; z-index: 25; margin: 0 -16px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px;
  background: var(--vidro); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; box-shadow: 0 0 0 1px var(--gold-line), var(--sombra-1); }

.tema {
  width: 36px; height: 36px; padding: 0; border-radius: 99px; border: 1px solid var(--line); background: var(--island);
  color: var(--gold-600); display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: background var(--dur), transform var(--dur);
}
.tema:hover { background: var(--gold-soft); }
.tema:active { transform: scale(.94); }
.tema svg { width: 18px; height: 18px; }
.tema .lua { display: none; }
:root[data-theme="dark"] .tema .sol { display: none; }
:root[data-theme="dark"] .tema .lua { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tema .sol { display: none; }
  :root:not([data-theme="light"]) .tema .lua { display: block; }
}
.login-pg .tema { position: fixed; top: max(16px, env(safe-area-inset-top, 0px)); left: 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  background: var(--vidro); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line-soft);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
  color: var(--soft); font-size: 11px; font-weight: 500; padding: 2px 0; transition: color var(--dur);
}
.tabbar a .ic { padding: 5px 16px; border-radius: 99px; display: flex; transition: background var(--dur), color var(--dur); }
.tabbar a.ativo { color: var(--ink); font-weight: 600; }
.tabbar a.ativo .ic { background: var(--gold-soft); color: var(--gold-text); }
.ic svg { width: 20px; height: 20px; }

@media (min-width: 960px) {
  .side {
    display: flex; flex-direction: column; gap: 2px; width: 248px; flex: none; position: sticky; top: 0; height: 100vh;
    padding: 24px 14px 18px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .side .brandbox { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
  .side .brandbox .logo { width: 46px; height: 46px; }
  .side .brandbox .n { font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -.025em; line-height: 1.1; }
  .side .brandbox .detalhe { font-size: 12px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a, .side .em-breve {
    position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
    color: var(--ink2); font-size: 13.5px; font-weight: 500; text-decoration: none; border: 1px solid transparent;
    transition: background var(--dur), color var(--dur), border-color var(--dur);
  }
  .side nav a:hover { background: var(--island); color: var(--ink); }
  .side nav a .ic { color: var(--muted); transition: color var(--dur); }
  .side nav a.ativo { background: var(--island); border-color: var(--line); font-weight: 600; color: var(--ink); box-shadow: var(--sombra-1); }
  .side nav a.ativo::before { content: ""; position: absolute; left: -15px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-grad); }
  .side nav a.ativo .ic { color: var(--gold-600); }
  .side .em-breve { color: var(--soft); cursor: default; }
  .side .em-breve .ic { color: var(--soft); }
  .side .em-breve small { margin-left: auto; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
  .side .ic svg { width: 18px; height: 18px; }
  .side .grow { flex: 1; }
  .side .conta { padding: 12px; gap: 4px; border-radius: 12px; }
  .tabbar, .topbar { display: none; }
  main { padding: 36px 44px 56px; }
  .wrap { gap: 24px; }
}

/* ---------- títulos ---------- */
.head { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
@media (min-width: 960px) { .head { padding-top: 0; } }
.head-linha { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 5.4vw, 44px); letter-spacing: -.045em; line-height: 1.02; margin: 2px 0 0; text-wrap: balance; }
h2 { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
.it {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; font-size: 1.14em;
  background: var(--gold-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em;
}
.sub { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- blocos ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { gap: 16px; } }
.card {
  background: var(--island); border: 1px solid var(--line); border-radius: var(--raio); padding: 18px;
  box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card.flat { box-shadow: none; background: var(--surface); border-color: var(--line-soft); }
a.card { text-decoration: none; color: inherit; transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); border-color: var(--gold-line); }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vazio { padding: 20px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-size: 13px; background: var(--surface); }
.aviso {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; margin: 0;
  background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-line); font-size: 13.5px; font-weight: 500;
}
.aviso::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--gold-600); flex: none; }

/* números grandes */
.kpi { gap: 6px; }
.kpi .big {
  font-family: var(--f-display); font-weight: 600; font-size: 30px; letter-spacing: -.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.kpi.ouro { background: var(--gold-card); border-color: rgba(169, 128, 47, .55); color: #1D1A14; box-shadow: 0 10px 28px -14px rgba(169, 128, 47, .55), var(--sombra-1); }
.kpi.ouro .kicker, .kpi.ouro .small, .kpi.ouro .muted { color: rgba(40, 30, 10, .78); }
.kpi.ouro .var.pos, .kpi.ouro .var.neg, .kpi.ouro .pos, .kpi.ouro .neg { color: #1D1A14; }

/* ---------- etiquetas, botões ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.45; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.t-a_contatar { background: var(--gold-soft); color: var(--gold-text); }
.t-contatada { background: var(--warn-soft); color: var(--warn); }
.t-sem_resposta { background: var(--info-soft); color: var(--info); }
.t-agendou { background: var(--ok-soft); color: var(--ok); }
.t-nao_contatar { background: var(--dark-pill); color: var(--dark-pill-ink); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-bad { background: var(--bad-soft); color: var(--bad); }
.t-neutral { background: var(--sunken); color: var(--muted); }

.btn, button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--island); font-weight: 600; font-size: 13.5px;
  text-decoration: none; color: var(--ink); white-space: nowrap; box-shadow: var(--sombra-1);
  transition: background var(--dur), border-color var(--dur), transform .08s, filter var(--dur);
}
.btn:hover, button[type="submit"]:hover { background: var(--surface); border-color: var(--gold-line); }
.btn:active, button[type="submit"]:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primario { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primario:hover { background: var(--ink2); border-color: var(--ink2); }
.btn.ouro { background: var(--gold-card); border-color: rgba(169, 128, 47, .6); color: #1D1A14; }
.btn.ouro:hover { filter: brightness(1.05); background: var(--gold-card); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { filter: brightness(1.08); background: var(--wa); border-color: var(--wa); }
.btn.pequeno { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { color: var(--ink); background: var(--sunken); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 9px 12px; transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
textarea { line-height: 1.5; resize: vertical; }
input:hover, textarea:hover { border-color: var(--gold-line); }
input:focus, textarea:focus { outline: none; background: var(--island); border-color: var(--gold-600); box-shadow: 0 0 0 4px var(--gold-soft); }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink2); }
label small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.4; }
/* iPhone dá zoom em campos com menos de 16px: no celular todo campo tem 16px. */
@media (max-width: 959px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select, .dval { font-size: 16px !important; }
}

/* ---------- tabelas e listas ---------- */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--island); }
.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.tb th {
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 10px 14px; background: var(--surface); white-space: nowrap; border-bottom: 1px solid var(--line);
}
.tb td { padding: 11px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; background: var(--island); transition: background var(--dur); }
.tb tbody tr:first-child td { border-top: 0; }
.tb tbody tr:hover td { background: var(--surface); }
.tb .r { text-align: right; white-space: nowrap; }
.tb a { font-weight: 600; text-decoration: none; }
.tb a:hover { text-decoration: underline; }
.tb input { max-width: 110px; min-height: 36px; padding: 6px 10px; }
.tb.compacta td, .tb.compacta th { padding: 7px 10px; font-size: 12px; }
/* tabelas largas: a primeira coluna fica parada enquanto o resto rola */
.scroll .tb th:first-child, .scroll .tb td:first-child { position: sticky; left: 0; z-index: 1; }
.scroll .tb td:first-child { box-shadow: 1px 0 0 var(--line-soft); }
.lista > * { border-top: 1px solid var(--line-soft); }
.lista > *:first-child { border-top: 0; }
.ag { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; }
.ag .h { font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-val, .dest b { white-space: nowrap; }

/* ---------- filtros ---------- */
.filtro-bloco { display: flex; flex-direction: column; gap: 8px; }
.filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.filtros a {
  border: 1px solid var(--line); background: var(--island); border-radius: 99px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 600; color: var(--ink2); text-decoration: none; display: inline-flex; gap: 7px; align-items: center;
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.filtros a:hover { border-color: var(--gold-line); background: var(--surface); }
.filtros a b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.filtros a.ativo { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filtros a.ativo b { color: var(--bg); opacity: .7; }
@media (max-width: 719px) {   /* no celular os filtros rolam de lado em vez de ocupar várias linhas */
  .filtros { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .filtros::-webkit-scrollbar { display: none; }
  .filtros a { flex: none; }
}

/* ---------- contatos ---------- */
.semanas { display: flex; align-items: center; gap: 6px; }
.semanas .btn, .seletor-mes .btn { width: 40px; padding: 0; }
.clientes { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .clientes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.cli { gap: 12px; transition: border-color var(--dur), box-shadow var(--dur); }
.cli:hover { border-color: var(--gold-line); }
.cli .nm { font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; line-height: 1.2; }
.cli .fatos { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink2); white-space: nowrap; }
.chip.atraso { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.chip.ouro { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-text); }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acoes form { margin: 0; }
.obs { display: flex; gap: 8px; }
.obs input { flex: 1; min-height: 36px; height: 36px; padding: 0 12px; font-size: 13px; }
.cli.status-agendou { border-color: color-mix(in srgb, var(--ok) 25%, var(--line)); }
.cli.status-nao_contatar { opacity: .62; }

/* lista de status (select em forma de etiqueta) */
.sel { position: relative; display: inline-flex; margin: 0; }
.sel select {
  appearance: none; -webkit-appearance: none; height: 34px; border: 1px solid transparent; border-radius: 99px;
  padding: 0 32px 0 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: inherit; background: var(--sunken);
  transition: filter var(--dur);
}
.sel select:hover { filter: brightness(.97); }
.sel::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-70%) rotate(45deg); opacity: .7;
}
.sel select option { color: var(--ink); background: var(--island); }
.s-a_contatar { color: var(--gold-text); } .s-a_contatar select { background: var(--gold-soft); border-color: var(--gold-line); }
.s-contatada { color: var(--warn); } .s-contatada select { background: var(--warn-soft); }
.s-sem_resposta { color: var(--info); } .s-sem_resposta select { background: var(--info-soft); }
.s-agendou { color: var(--ok); } .s-agendou select { background: var(--ok-soft); }
.s-nao_contatar { color: var(--dark-pill-ink); } .s-nao_contatar select { background: var(--dark-pill); }

/* ---------- métricas da semana ---------- */
.metricas { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metricas .card { padding: 14px; gap: 4px; border-radius: 14px; }
.metricas .big { font-size: 24px; }
.metricas .small { font-size: 12px; line-height: 1.35; }
.metricas .progresso { grid-column: 1 / -1; gap: 10px; }
.metricas > .kpi.ouro { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .metricas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metricas > .kpi.ouro { grid-column: auto; }
}
@media (min-width: 1180px) {
  .metricas { gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); }
  .metricas .card { padding: 16px; border-radius: var(--raio); }
  .metricas .big { font-size: 28px; }
  .metricas .progresso { grid-column: auto; }
}
.track { height: 10px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.fill { height: 100%; border-radius: 99px; background: var(--gold-grad); min-width: 4px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.dias { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dia { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.dia .l { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dia b { font-family: var(--f-display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dia.hoje { background: var(--gold-soft); border-color: var(--gold-line); }
.dia.hoje .l { color: var(--gold-text); }

/* ---------- início ---------- */
.hub { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .hub { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub .card { gap: 10px; }
.hub-top { display: flex; align-items: center; gap: 10px; }
.hub-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-600); flex: none; }
.hub-ic svg { width: 18px; height: 18px; }
.hub .big { font-family: var(--f-display); font-weight: 600; font-size: 30px; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hub .rodape { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.hub .rodape b { color: var(--gold-text); font-weight: 600; }
.agenda-dia .ag .tag { justify-self: end; }
.prox-hora { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 600; }

/* ---------- financeiro ---------- */
.seletor-mes { display: flex; align-items: center; gap: 6px; }
.seletor-mes .sel select { height: 40px; font-size: 14px; padding-left: 14px; background: var(--island); border-color: var(--line); color: var(--ink); box-shadow: var(--sombra-1); }
.fin-resumo .meta-campo { display: flex; align-items: baseline; gap: 4px; }
.fin-resumo .meta-campo span { color: var(--muted); font-size: 14px; font-weight: 600; }
.fin-resumo .meta-campo input {
  min-height: 0; border: 0; border-bottom: 1px dashed var(--gold-line); border-radius: 0; background: transparent; padding: 0;
  font: 600 24px/1.1 var(--f-display); letter-spacing: -.035em; width: 100%; min-width: 0; box-shadow: none;
}
.fin-resumo .meta-campo input:focus { box-shadow: none; background: transparent; border-bottom: 1px solid var(--gold-600); }
@media (min-width: 1180px) { .fin-resumo .meta-campo input { font-size: 28px; } }

#form-fin { display: flex; flex-direction: column; gap: 28px; }
.calendario { display: flex; flex-direction: column; gap: 10px; }
.calendario + input + .detalhe { margin-top: -14px; }
.cal-cab { display: none; }
.semana { padding: 14px; gap: 12px; border-radius: 14px; }
.semana.atual { border-color: var(--gold-line); box-shadow: 0 0 0 1px var(--gold-line), var(--sombra); }
.sem-nome { display: flex; align-items: baseline; gap: 8px; }
.sem-nome b { font-family: var(--f-display); font-size: 16px; letter-spacing: -.02em; }
.semana.atual .sem-nome b { color: var(--gold-text); }
.cal-dias { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
.dcel {
  position: relative; cursor: text; display: flex; flex-direction: column; gap: 2px; padding: 6px 7px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.dcel:hover { border-color: var(--gold-line); }
.dcel:focus-within { border-color: var(--gold-600); box-shadow: 0 0 0 3px var(--gold-soft); background: var(--island); }
.dcel.vazio { background: transparent; border: 1px dashed var(--line-soft); }
.dcel.hoje { background: var(--gold-soft); border-color: var(--gold-line); }
.dn { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dcel.hoje .dn { color: var(--gold-text); }
.dval {
  width: 100%; min-width: 0; min-height: 0 !important; border: 0 !important; background: transparent !important; padding: 1px 0 !important;
  font: 600 14px/1.2 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--ink); box-shadow: none !important;
}
.dval::placeholder { color: var(--soft); font-weight: 400; }
@media (max-width: 400px) { .dn { font-size: 10px; } .cal-dias { gap: 4px; } .dcel { padding: 5px; } }
.fora-op {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; white-space: nowrap;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--island); color: var(--ink2);
  font-size: 12.5px; font-weight: 600; box-shadow: var(--sombra-alta); cursor: pointer;
}
.fora-op:hover { background: var(--surface); }
.dcel.aberta .fora-op { display: block; animation: sobe .15s ease both; }
.cal-dias .dcel:nth-last-child(-n+2) .fora-op { left: auto; right: 0; }
.fora-op .txt-voltar, .dcel.fora .fora-op .txt-tirar { display: none; }
.dcel.fora .fora-op .txt-voltar { display: inline; }
.dcel.fora { background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--sunken) 6px 12px); }
.dcel.fora .dn { text-decoration: line-through; color: var(--soft); }
.cal-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-nums > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cal-nums .rot { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cal-nums b { font-weight: 700; }
.total-mes { background: var(--surface); box-shadow: none; }
.total-mes .cal-dias { display: none; }
.barra-salvar {
  position: sticky; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 15; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--sombra-alta); font-weight: 600;
  animation: sobe .2s ease both;
}
.barra-salvar[hidden] { display: none; }
@media (min-width: 960px) {
  .barra-salvar { bottom: 20px; }
  .cal-cab, .semana { display: grid; grid-template-columns: 132px minmax(0, 1fr) 390px; align-items: center; gap: 16px; }
  .cal-cab { padding: 0 15px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .cal-cab .cal-dias span { text-align: center; }
  .cal-cab .cal-nums { font-size: inherit; }
  .sem-nome { flex-direction: column; gap: 0; }
  .dsem, .cal-nums .rot { display: none; }
  .total-mes .cal-dias { display: grid; }
}

/* ---------- dashboard ---------- */
.dash-sec { display: flex; flex-direction: column; gap: 10px; }
.sec-tit { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; }
.sec-tit h2 { font-size: 16px; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis .card { padding: 14px; gap: 4px; border-radius: 14px; }
.kpis .big { font-size: 24px; }
.kpis .small { font-size: 12px; line-height: 1.35; }
@media (min-width: 720px) { .k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .kpis .big { font-size: 27px; } .kpis .card { padding: 16px; } }
.var { font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .dash-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.legenda { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.lg-barra { background: var(--gold-grad); }
.lg-meta { height: 2px !important; background: var(--ink); }
.lg-novas { background: var(--ok); }
.lg-cinza { background: var(--sunken); border: 1px solid var(--line); }

.vbars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; height: 220px; padding-top: 4px; }
.vbar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.vbar-trilho { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.vbar { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: var(--gold-line); min-height: 3px; transition: filter var(--dur); }
.vbar-col:hover .vbar { filter: brightness(1.06) saturate(1.1); }
.vbar.batida { background: var(--gold-grad); }
.vbar.atual { background: repeating-linear-gradient(135deg, var(--gold-line) 0 6px, var(--gold-soft) 6px 12px); }
.vbar.cinza { background: var(--sunken); border: 1px solid var(--line); }
.vbar-meta { position: absolute; left: 6%; right: 6%; height: 2px; background: var(--ink); border-radius: 2px; opacity: .8; }
.vbars.duplas .vbar-trilho > .vbar { position: absolute; bottom: 0; width: 70%; max-width: 46px; }
.vbars.duplas .vbar:not(.cinza) { background: var(--gold-grad); }
.vbars.duplas .vbar.novas { width: 34%; max-width: 20px; background: var(--ok); }
.vbar-val { font-size: 10.5px; font-weight: 600; color: var(--muted); min-height: 14px; font-variant-numeric: tabular-nums; }
.vbar-rot { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) { .vbars { height: 170px; gap: 3px; } .vbar-val, .vbar-rot { font-size: 9px; } }

.destaques { gap: 0; padding: 4px 18px; }
.dest { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k b" "d d"; gap: 2px 8px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.dest:first-child { border-top: 0; }
.dest .kicker { grid-area: k; align-self: center; }
.dest b { grid-area: b; font-family: var(--f-display); font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dest .detalhe { grid-area: d; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-lin { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "r t v" ". e e"; gap: 2px 12px; align-items: center; }
.hbar-lin.curta { grid-template-columns: 74px minmax(0, 1fr) 36px; grid-template-areas: "r t v"; }
.hbar-rot { grid-area: r; font-size: 13px; font-weight: 600; }
.hbar-trilho { grid-area: t; height: 10px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.hbar { height: 100%; border-radius: 99px; background: var(--gold-grad); min-width: 3px; }
.hbar-val { grid-area: v; font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.hbar-ext { grid-area: e; }

.heat { display: grid; grid-template-columns: 38px repeat(5, minmax(0, 1fr)); gap: 4px; }
.heat-cab { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.heat-rot { font-size: 11px; color: var(--muted); align-self: center; font-variant-numeric: tabular-nums; }
.heat-cel {
  text-align: center; font-size: 11px; font-weight: 600; padding: 6px 0; border-radius: 7px; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, #C9A24A calc(var(--o) * 100%), var(--surface)); color: var(--ink);
}
.heat-cel.vazia { background: transparent; }
.heat-tot { text-align: center; font-size: 12px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }

.proximos { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .proximos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .proximos { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.prox { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.prox b { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.prox.hoje { background: var(--gold-soft); border-color: var(--gold-line); }
.prox.fechado { opacity: .5; }
.prox .track { height: 6px; }

.anel-linha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.anel {
  aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, var(--island) 78%, transparent 79%),
              conic-gradient(var(--gold-600) calc(var(--p) * 1%), var(--sunken) 0);
}
.anel b { font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.faixas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.faixa { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.faixa b { font-family: var(--f-display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.faixa .detalhe { font-size: 11px; }

.semanas-lista { display: flex; flex-direction: column; }
.sl-cab, .sl-lin {
  display: grid; grid-template-columns: 60px minmax(120px, 1fr) repeat(6, 78px); gap: 10px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line-soft); font-size: 13px; font-variant-numeric: tabular-nums;
}
.sl-cab { border-top: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sl-cab .r, .sl-lin .r { text-align: right; }
.sl-sem { font-weight: 700; }
.sl-barra { display: flex; align-items: center; gap: 8px; }
.sl-barra .track { flex: 1; height: 8px; }
@media (max-width: 900px) {
  .sl-cab { display: none; }
  .sl-lin { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .sl-sem, .sl-barra { grid-column: 1 / -1; }
  .sl-lin .r { text-align: left; display: flex; flex-direction: column; font-weight: 600; }
  .sl-lin .r::before { content: attr(data-rot); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
}

/* ---------- login ---------- */
.login-pg { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 390px; text-align: center; gap: 18px; padding: 32px 28px; box-shadow: var(--sombra-alta); }
.login .logo { width: 128px; height: 128px; margin: 0 auto; background: transparent; box-shadow: 0 12px 30px -14px rgba(169, 128, 47, .6); }
.login form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login button { width: 100%; height: 46px; margin-top: 4px; font-size: 14.5px; }
