/* =====================================================================
   Lecore Media — estilos (base visual igual ao app da EQL Group)
   Cores em variáveis: o modo escuro só troca os valores (lá embaixo).
   ===================================================================== */
:root {
  --bg: #E9ECEF;
  --shell: #F4F5F6;
  --card: #FFFFFF;
  --soft: #F7F8F9;
  --chip: #F1F2F4;
  --line: #E3E6EA;
  --line-strong: #C5CAD1;
  --ink: #16181D;
  --on-ink: #FFFFFF;
  --text-2: #4B5260;
  --muted: #5F6672;
  --field: #FFFFFF;
  --overlay: rgba(22, 24, 29, .45);

  /* identidade Lecore: preto e branco, como o site */
  --brand: #111827;
  --brand-ink: #FFFFFF;
  --brand-soft: #E9EAEE;
  --brand-text: #111827;
  --navy: #0B0F17;

  /* destaque principal (botões) */
  --lime: #111827;
  --on-lime: #FFFFFF;
  --lime-soft: #EEF0F3;
  --lime-ink: #111827;
  --hero-a: #1F2937;
  --hero-b: #05070B;
  --on-pastel: #16181D;
  --lav: #CFC8F5;
  --blue: #BFDAF6;
  --mint: #A9CEF5;
  --peach: #F8C9B4;
  --late-bg: #FCE2D6;
  --late-ink: #9A3412;
  --yellow: #FBE38E;
  --yellow-soft: #FFF6D1;
  --yellow-line: #EBCB55;
  --yellow-ink: #6B4E00;
  --yellow-dot: #E0B000;
  --red: #C62828;
  --red-soft: #F9C4C0;
  --red-tint: #FFEDEB;
  --red-line: #E98A82;
  --red-text: #7F1414;
  --green-dot: #3E9B54;   /* só para "online agora" */
  --out-row: #FAFAFB;
  --today: #F3F8FE;

  --radius-xl: 28px;
  --radius-l: 24px;
  --radius-m: 16px;
  --radius-s: 12px;
  --pad-card: 18px;
  --pad-item: 12px 14px;
  --gap-main: 22px;
  --cell-h: 52px;
  color-scheme: light;
}

/* ---------- Modo escuro ---------- */
:root[data-tema="escuro"] {
  --bg: #080C11;
  --shell: #0F151D;
  --card: #161E28;
  --soft: #1D2733;
  --chip: #243140;
  --line: #2A3644;
  --line-strong: #3A4858;
  --ink: #E9EEF4;
  --on-ink: #0B1016;
  --text-2: #B8C2CD;
  --muted: #94A1AE;
  --field: #111922;
  --overlay: rgba(0, 0, 0, .6);
  --brand: #F3F4F6;
  --brand-ink: #0B0F17;
  --brand-soft: #253041;
  --brand-text: #F3F4F6;
  --lime: #F3F4F6;
  --on-lime: #0B0F17;
  --lime-soft: #1E2733;
  --lime-ink: #E5E7EB;
  --hero-a: #1D2633;
  --hero-b: #0E141C;
  --yellow-soft: #2E2812;
  --yellow-line: #7C6517;
  --yellow-ink: #6B4E00;
  --red-tint: #33191A;
  --red-line: #8C3A35;
  --red-text: #FFB4AC;
  --late-bg: #3A2015;
  --late-ink: #FFB590;
  --out-row: #121A23;
  --today: #111F30;
  color-scheme: dark;
}

/* ---------- Tamanho do texto e densidade ---------- */
:root[data-texto="p"] { zoom: .9; }
:root[data-texto="g"] { zoom: 1.12; }
:root[data-texto="gg"] { zoom: 1.25; }
:root[data-densidade="compacta"] {
  --pad-card: 12px;
  --pad-item: 8px 10px;
  --gap-main: 14px;
  --cell-h: 40px;
}
:root[data-densidade="compacta"] .stat { padding: 14px; }
:root[data-densidade="compacta"] .stat-value { font-size: 26px; }
:root[data-densidade="compacta"] .group, :root[data-densidade="compacta"] .col { gap: 8px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
/* altura real da tela no celular (sem a barra do navegador/WhatsApp) */
:root { --vh: 100vh; }
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
/* celular: campos com 16px para o iPhone não dar zoom sozinho ao tocar */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em) !important; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell ---------- */
.page { min-height: var(--vh); padding: 20px; }
.shell {
  max-width: 1600px; margin: 0 auto; background: var(--shell);
  border-radius: var(--radius-xl); display: flex; flex-wrap: wrap;
  min-height: calc(var(--vh) - 40px); overflow: hidden;
}
.sidebar {
  flex: 1 1 220px; max-width: 100%; background: var(--card);
  padding: 28px 18px; display: flex; flex-direction: column; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--brand); color: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 12px; border: 0; min-height: 44px; padding: 0 14px;
  border-radius: 14px; background: transparent; font-weight: 500; text-align: left;
}
.nav button:hover { background: var(--soft); }
.nav button.on { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.nav .soon { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--muted); background: var(--chip); padding: 3px 7px; border-radius: 999px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: var(--shell); }
.me-nome { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { border: 0; background: none; padding: 0; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; position: relative; overflow: visible;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar .on-dot {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-dot); border: 2px solid var(--card);
}
.avatar.lg .on-dot { width: 16px; height: 16px; }

.main { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: var(--gap-main); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.head .date { margin-top: 4px; color: var(--muted); }
.head .date::first-letter { text-transform: uppercase; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pill {
  border: 0; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); white-space: nowrap;
}
.pill:hover { background: var(--soft); }
.pill.on { background: var(--ink); color: var(--on-ink); }
.pill.lime { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.pill.lime:hover { filter: brightness(1.08); background: var(--lime); }
.pill.dark { background: var(--ink); color: var(--on-ink); font-weight: 700; }
.pill.ghost { background: var(--chip); }
.pill.danger { background: var(--late-bg); color: var(--late-ink); }
.pill:disabled { opacity: .5; cursor: default; }

.card { background: var(--card); border-radius: var(--radius-l); padding: var(--pad-card); }
.card-title { font-size: 16px; font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.placeholder { padding: 40px; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.placeholder p { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--muted); padding: 5px 10px; border-radius: 999px; }
.note { font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 6px; border: 0; text-align: left; color: var(--on-pastel); }
.stat.on { outline: 3px solid var(--brand); outline-offset: 2px; }
.stat-label { font-size: 13px; font-weight: 600; color: #2A2F38; }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.stat-hint { font-size: 12px; color: #3A404B; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.col-title { display: flex; align-items: center; gap: 10px; }
.col-title h2 { font-size: 16px; font-weight: 800; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.count { font-size: 12px; font-weight: 700; background: var(--chip); padding: 4px 10px; border-radius: 999px; }
.group { display: flex; flex-direction: column; gap: 8px; }
.group-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.item {
  display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%;
  border: 2px solid transparent; background: var(--soft); border-radius: var(--radius-m); padding: var(--pad-item);
}
.item:hover { border-color: var(--line); }
.item.so-ver { cursor: default; }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.item-name { font-weight: 700; font-size: 14px; }
.due { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--chip); color: var(--text-2); }
.due.atrasada { background: var(--red); color: #fff; }
.due.urgente { background: var(--red-soft); color: #7F1414; }
.due.semana { background: var(--yellow); color: var(--yellow-ink); }
.item.sit-semana { background: var(--yellow-soft); border-color: var(--yellow-line); }
.item.sit-urgente { background: var(--red-tint); border-color: var(--red-line); }
.item.sit-atrasada { background: var(--red-tint); border-color: var(--red); }
.item.sit-atrasada .item-name, .item.sit-urgente .item-name { color: var(--red-text); }
.item.sit-urgente .bar > span, .item.sit-atrasada .bar > span { background: var(--red); }
.item-meta { font-size: 12px; color: var(--muted); }
.prog { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.pct { font-size: 12px; font-weight: 700; min-width: 34px; text-align: right; }
.add-line {
  border: 1.5px dashed var(--line); background: transparent; border-radius: var(--radius-m);
  min-height: 44px; color: var(--muted); font-weight: 600; font-size: 13px;
}
.add-line:hover { border-color: var(--line-strong); color: var(--ink); }
.empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: var(--overlay); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal { background: var(--card); border-radius: var(--radius-l); width: 100%; max-width: 620px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.modal-kicker { font-size: 12px; font-weight: 700; color: var(--muted); }
.icon-btn { border: 0; background: var(--chip); width: 40px; height: 40px; border-radius: 12px; font-size: 20px; line-height: 1; flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .input {
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--field);
  min-height: 44px; padding: 0 12px; outline: none; color: var(--ink);
}
.field textarea { padding: 10px 12px; min-height: 70px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--brand); }
.field input:disabled, .field select:disabled { opacity: .6; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--chip); padding: 4px; border-radius: 14px; }
.seg button { border: 0; background: transparent; min-height: 40px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.seg button:disabled { cursor: default; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); min-height: 44px; }
.range-row .input { width: 84px; }
.prod-box { background: var(--lime-soft); border-radius: var(--radius-m); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.prod-sum { font-size: 13px; color: var(--lime-ink); font-weight: 600; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 0; background: var(--card); border-radius: 999px; min-height: 36px; padding: 0 12px; font-weight: 700; font-size: 12px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.danger { background: var(--late-bg); color: var(--late-ink); }

/* ---------- Equipe / Frotas / Configurações ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-m); background: var(--soft); }
.person .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .nm { font-weight: 700; }
.person .sub { font-size: 12px; color: var(--muted); }
.person input { border: 1.5px solid var(--line); border-radius: 10px; min-height: 36px; padding: 0 8px; width: 100%; background: var(--field); }
.mini { border: 0; background: var(--chip); min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.mini.lime { background: var(--lime); color: var(--on-lime); }
.add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.add-form .field { flex: 1 1 180px; }

.vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vehicle { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-m); background: var(--soft); }
.vehicle .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.vehicle .nm { font-weight: 800; font-size: 16px; }
.vehicle .sub { font-size: 12px; color: var(--muted); }
.plate { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12px; background: var(--field); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 8px; letter-spacing: .06em; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--text-2); align-self: flex-start; }
.badge.red { background: var(--red); color: #fff; }
.badge.yellow { background: var(--yellow); color: var(--yellow-ink); }
.badge.green { background: var(--lime-soft); color: var(--lime-ink); }
.badge.blue { background: var(--brand-soft); color: var(--brand-text); }

.users { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: grid; grid-template-columns: auto minmax(160px, 1.4fr) minmax(140px, 1fr) minmax(150px, 1fr); gap: 14px;
  align-items: center; padding: 12px; border-radius: var(--radius-m); background: var(--soft);
}
.user-row .nm { font-weight: 700; }
.user-row .sub { font-size: 12px; color: var(--muted); }
.user-row .times { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.user-row select, .user-row .input { min-height: 38px; }
.photo-btn { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; }
.photo-btn .foto-tag {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 10px; font-weight: 700;
  background: var(--ink); color: var(--on-ink); padding: 1px 6px; border-radius: 999px; white-space: nowrap;
}
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.preview-text { font-size: 13px; color: var(--text-2); }

/* ---------- Login ---------- */
.login { min-height: var(--vh); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.err { background: var(--late-bg); color: var(--late-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }

.toast {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 120;
  background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 14px; font-weight: 600; max-width: calc(100% - 32px);
}

/* ---------- Computador: tela cheia ----------
   O menu fica fixo à esquerda (mesma largura e no mesmo lugar ao rolar a página ou mudar o zoom);
   o conteúdo ocupa todo o resto da tela e cresce junto com ela. */
@media (min-width: 900px) {
  .page { padding: 12px; }
  .shell { max-width: none; flex-wrap: nowrap; min-height: calc(var(--vh) - 24px); overflow: clip; }
  .sidebar { flex: 0 0 248px; width: 248px; position: sticky; top: 12px; align-self: flex-start;
    height: calc(var(--vh) - 24px); overflow-y: auto; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
  .main { flex: 1 1 auto; padding: 28px 32px; }
}
@media (min-width: 1800px) { .main { padding: 32px 40px; } }

/* ---------- Modo TV ---------- */
.tv .page { padding: 0; }
.tv .shell { border-radius: 0; min-height: var(--vh); max-width: none; }
.tv .main { padding: 32px 40px; }
.tv .item-name { font-size: 17px; }
.tv .item-meta, .tv .due, .tv .pct { font-size: 14px; }
.tv .head h1 { font-size: 38px; }

@media (max-width: 640px) {
  .page { padding: 0; }
  .shell { border-radius: 0; }
  .main { padding: 16px max(14px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .head h1 { font-size: 26px; }
  .user-row { grid-template-columns: auto 1fr; }
  .user-row > :nth-child(n+3) { grid-column: 1 / -1; }
}
/* ---------- Celular e tablet (até 899 px): barra de cima + abas flutuantes embaixo (estilo Instagram) ---------- */
.m-topo, .m-abas { display: none; }
.nav-sub { display: none; }
@media (max-width: 899px) {
  .page.com-abas-celular { --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .page.com-abas-celular .sidebar { display: none; }
  .page.com-abas-celular .shell { overflow: clip; }
  .page.com-abas-celular .main { padding-left: var(--gut); padding-right: var(--gut); padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .m-topo { display: block; position: sticky; top: var(--faixa-h, 0px); z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
  body.com-faixa .m-topo { padding-top: 0; }
  .m-topo-linha { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 56px; padding: 0 calc(var(--gut) - 6px); }
  .m-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: 12px; display: grid; place-items: center; padding: 0; }
  .m-btn:active { background: var(--soft); }
  .m-eu { justify-self: end; }
  .m-eu .avatar { width: 34px; height: 34px; font-size: 13px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--line); }
  .m-marca { justify-self: center; display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px; color: var(--ink); }
  .m-marca img { border-radius: 9px; display: block; }
  .m-marca span { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
  .m-subs { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gut) 10px; scrollbar-width: none; }
  .m-subs::-webkit-scrollbar { display: none; }
  .m-subs button { flex: none; border: 0; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--soft); color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
  .m-subs button.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
  /* barra flutuante embaixo */
  .m-abas { display: flex; position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 2 * var(--gut, 16px))); justify-content: space-around; align-items: center; height: 62px; padding: 0 8px;
    border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
    border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06); }
  .m-abas button { position: relative; flex: 1; height: 100%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; border-radius: 16px; }
  .m-abas button:active { transform: scale(.92); }
  .m-abas button.on { color: var(--brand); }
  .m-abas-ponto { position: absolute; bottom: 8px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; opacity: 0; }
  .m-abas button.on .m-abas-ponto { opacity: 1; }
  body.tv .m-abas { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
/* gaveta do menu (abre pela esquerda) */
.m-gaveta-fundo { position: fixed; inset: 0; z-index: 900; background: rgba(10, 14, 22, .42); animation: m-fade .18s ease-out; }
body.com-faixa .m-gaveta-fundo { top: var(--faixa-h); }
.m-gaveta { position: absolute; top: 0; bottom: 0; left: 0; width: min(330px, 86vw); background: var(--card); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 8px) 12px calc(14px + env(safe-area-inset-bottom)); box-shadow: 12px 0 40px rgba(0, 0, 0, .18); animation: m-entra .22s cubic-bezier(.2, .8, .2, 1); }
.m-gaveta-topo { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px 8px; }
.m-marca.estatica { display: inline-flex; align-items: center; gap: 9px; }
.m-marca.estatica img { border-radius: 9px; }
.m-marca.estatica span { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.m-gaveta-lista { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.m-gaveta-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 12px; border: 0; background: transparent; border-radius: 14px; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left; }
.m-gaveta-item svg { width: 24px; height: 24px; color: var(--muted); }
.m-gaveta-item.on { background: var(--brand-soft); color: var(--brand-text); }
.m-gaveta-item.on svg { color: var(--brand); }
.m-gaveta-item .soon { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--chip); padding: 3px 7px; border-radius: 999px; }
.m-gaveta-sem-icone { width: 24px; height: 24px; flex: none; }
.m-gaveta-sub { display: block; width: calc(100% - 50px); margin-left: 50px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-2); }
.m-gaveta-sub.on { background: var(--soft); color: var(--brand-text); }
.m-gaveta-eu { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-top: 8px; border: 0; border-radius: 16px; background: var(--shell); text-align: left; }
.m-gaveta-eu span { display: flex; flex-direction: column; min-width: 0; }
.m-gaveta-eu b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-gaveta-eu small { font-size: 12px; color: var(--muted); }
@keyframes m-entra { from { transform: translateX(-100%); } }
@keyframes m-fade { from { opacity: 0; } }

/* ---------- Registro de atividades ---------- */
.log-day { display: flex; flex-direction: column; gap: 6px; }
.log-day > .group-name::first-letter { text-transform: uppercase; }
.log-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--soft); }
.log-item .avatar { width: 32px; height: 32px; font-size: 12px; }
.log-text { font-size: 13px; line-height: 1.45; }
.log-changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.log-changes span { color: var(--muted); }
.log-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Sub-abas do menu ---------- */
.nav button.parent { font-weight: 700; color: var(--brand-text); }
.nav button.sub { min-height: 38px; margin-left: 48px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text-2); border-radius: 12px; }
.nav button.sub.on { background: var(--soft); color: var(--brand-text); font-weight: 700; }
@media (max-width: 640px) { .nav button.sub { margin-left: 0; border-left: 0; border-radius: 14px; } }

/* ---------- Início ---------- */
.home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.today-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-m); background: var(--soft); border: 2px solid transparent; }
.today-card.sit-semana { border-color: var(--yellow-line); }
.today-card.sit-urgente { border-color: var(--red-line); }
.today-card.sit-atrasada { border-color: var(--red); }
.today-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.today-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.today-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.today-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--lav); color: var(--on-pastel); }
.t-chip.veic { background: var(--mint); }
.t-chip.folga { background: #E1E4E9; }
.t-chip.ferias { background: var(--yellow); }
.t-chip.livre { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.card-title .count { margin-left: 6px; vertical-align: middle; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--soft); }
.pl-name { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; }
.pl-name small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.warn-text { color: var(--late-ink); font-weight: 600; }
@media (max-width: 640px) {
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-stats .stat { padding: 14px; }
  .home-stats .stat-value { font-size: 28px; }
  .today-list { grid-template-columns: 1fr; }
}
.brand-logo { width: 44px; height: 44px; flex: none; display: block; }

/* ---------- Início: saudação (hero) ---------- */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: 28px;
  background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); color: #fff; }
.hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.hero-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; z-index: 1; }
.hero-data { font-size: 14px; opacity: .8; }
.hero-data::first-letter { text-transform: uppercase; }
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hero-linha { font-size: 22px; font-weight: 600; line-height: 1.3; }
.hero-linha b { font-weight: 800; }
.hero.fin .hero-linha b { font-size: 34px; letter-spacing: -0.02em; display: inline-block; margin-left: 4px; }
.hero-alerta { color: #FFD9C7; }
.hero-frase { font-size: 15px; opacity: .85; margin-top: 4px; font-style: italic; }
.hero-lado { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; z-index: 1; flex: none; }
.hero-acoes { display: flex; gap: 8px; align-items: center; }
.hero-seg { display: flex; background: rgba(255, 255, 255, .16); padding: 4px; border-radius: 999px; }
.hero-seg button { border: 0; background: transparent; color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px; min-height: 36px; }
.hero-seg button.on { background: #fff; color: #111827; }
.hero-btn { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 13px; padding: 0 16px; border-radius: 999px; min-height: 44px; }
.hero-btn:hover, .hero-seg button:not(.on):hover { background: rgba(255, 255, 255, .26); }
.hero .painel-clock { color: #fff; }
.hero .painel-clock small { color: rgba(255, 255, 255, .7); }
.hero-mes { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 4px; font-weight: 700; font-size: 13px; }
.hero-mes button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; }
.hero-mes button:disabled { opacity: .35; cursor: default; }
.hero-mes span { min-width: 130px; text-align: center; }
.tv .hero h1 { font-size: 48px; }
.painel-sec { font-size: 20px; font-weight: 800; margin-top: 8px; }

/* hoje em cartões */
.hoje { display: flex; flex-direction: column; gap: 16px; }
.hoje-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hoje-tile { border: 0; text-align: left; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--card); color: var(--ink); min-width: 0; }
button.hoje-tile:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.hoje-tile-l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.hoje-tile-v { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hoje-tile-h { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoje-tile.t-agenda { background: var(--mint); color: var(--on-pastel); }
.hoje-tile.t-ativas { background: var(--lav); color: var(--on-pastel); }
.hoje-tile.t-agenda .hoje-tile-l, .hoje-tile.t-agenda .hoje-tile-h, .hoje-tile.t-ativas .hoje-tile-l, .hoje-tile.t-ativas .hoje-tile-h { color: var(--on-pastel); opacity: .8; }
.hoje-tile.t-atencao.tem { background: var(--late-bg); color: var(--late-ink); }
.hoje-tile.t-atencao.tem .hoje-tile-l, .hoje-tile.t-atencao.tem .hoje-tile-h { color: var(--late-ink); }
.equipes-hoje { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.equipe-card { border-radius: 16px; background: var(--soft); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.equipe-card.sit-atrasada, .equipe-card.sit-urgente { border-color: var(--late-ink); }
.equipe-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.equipe-top strong { font-size: 15px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equipe-top .due { font-size: 11px; }
.equipe-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.eq-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--on-pastel); }
.eq-chip.p { background: var(--lav); }
.eq-chip.v { background: var(--mint); }
.eq-chip.vazio { background: var(--chip); color: var(--muted); }
.frota-hoje { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.frota-hoje li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.frota-hoje li.uso { background: var(--mint); color: var(--on-pastel); }
.frota-n { display: flex; flex-direction: column; }
.frota-n small { font-size: 11.5px; opacity: .75; }
.frota-d { font-size: 13px; font-weight: 700; text-align: right; }
.frota-hoje li:not(.uso) .frota-d { color: var(--muted); font-weight: 600; }

/* ---------- Puxar para atualizar (celular) ---------- */
html, body { overscroll-behavior-y: none; } /* o do navegador fica desligado: usamos o nosso, igual em todo celular */
.puxar { position: fixed; left: 50%; top: calc(var(--faixa-h, 0px) + env(safe-area-inset-top) + 8px); z-index: 1100; width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); display: grid; place-items: center; font-size: 22px; font-weight: 800;
  transform: translate(-50%, -50px); opacity: 0; pointer-events: none; }
.puxar.pronto { background: var(--brand); color: var(--brand-ink); }
.puxar.carregando span { display: inline-block; animation: puxar-gira .7s linear infinite; }
@keyframes puxar-gira { to { transform: rotate(360deg); } }

/* ---------- Início (painel) no celular e tablet: mesmo painel do computador, reorganizado ---------- */
@media (max-width: 899px) {
  .painel { gap: 14px; }
  .hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 18px 18px; border-radius: 24px; }
  .hero::after { width: 220px; height: 220px; right: -70px; top: -90px; }
  .hero-lado { order: -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-lado .painel-clock { display: none; }
  .hero-acoes { width: 100%; }
  .hero-acoes .hero-btn { display: none; } /* modo TV não faz sentido no celular */
  .hero-seg { width: 100%; }
  .hero-seg button { flex: 1; }
  .hero h1 { font-size: 28px; }
  .hero-linha { font-size: 17px; }
  .hero.fin .hero-linha b { font-size: 26px; }
  .hero-frase { font-size: 14px; }
  .hoje-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hoje-tile { border-radius: 20px; padding: 14px; }
  .hoje-tile-v { font-size: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .painel-grid, .painel-grid.g-2-1 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .painel-today, .today-list { grid-template-columns: minmax(0, 1fr); }
  .painel .card { padding: 16px; border-radius: 22px; }
  .hbar-row { grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
  .hbar-label { font-size: 12px; min-width: 0; }
  .frota-hoje li { flex-wrap: wrap; }
  .frota-d { text-align: left; }
  .plain-list li { flex-wrap: wrap; }
  .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fin-kpi { border-radius: 20px; padding: 14px; }
  .fin-kpi-v { font-size: 21px; }
  .fin-custo { grid-template-columns: 92px minmax(0, 1fr) auto; }
  .fin-obra { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; }
  .fin-obra > :nth-child(1) { grid-column: 1 / -1; }
  .fin-obra > :nth-child(2), .fin-obra > :nth-child(3) { display: none; } /* no celular: obra, resultado e margem */
  .fin-obra.cab > :nth-child(1) { display: none; }
}

/* ---------- Menu lateral do computador: mesmo visual do menu do celular (ícones, sub-abas sempre abertas) ---------- */
.sidebar .nav { gap: 2px; }
.sidebar .nav > button:not(.sub) { min-height: 48px; gap: 14px; padding: 0 12px; border-radius: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sidebar .nav > button:not(.sub) svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.sidebar .nav > button.on, .sidebar .nav > button.parent { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; }
.sidebar .nav > button.on svg, .sidebar .nav > button.parent svg { color: var(--brand); }
.sidebar .nav > button:not(.on):not(.parent):hover { background: var(--soft); }
.sidebar .nav > button:not(.sub) { min-height: 44px; }
.sidebar .nav > button span:not(.soon) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .nav .soon { flex: none; }
.nav button.sub { min-height: 34px; }
@media (min-width: 900px) { .sidebar { gap: 20px; padding: 22px 14px 16px; } }

/* ---------- Campo de senha com olhinho ---------- */
.senha-campo { position: relative; display: flex; }
.senha-campo input { flex: 1; min-width: 0; padding-right: 48px; }
.senha-olho {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 40px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--radius-s);
}
.senha-olho:hover, .senha-olho[aria-pressed="true"] { color: var(--ink); }
.senha-olho:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* esconde o olho próprio do Edge para não ficar duplicado */
.senha-campo input::-ms-reveal { display: none; }

/* ---------- Configurações em abas ---------- */
.cfg-abas { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--card); border-radius: 999px; scrollbar-width: none; margin-top: 8px; }
.cfg-abas::-webkit-scrollbar { display: none; }
.cfg-abas button { flex: 1 0 auto; border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.cfg-abas button.on { background: var(--brand); color: var(--brand-ink); }
.cfg-n { font-size: 11px; background: var(--chip); color: var(--text-2); border-radius: 999px; padding: 1px 7px; }
.cfg-abas button.on .cfg-n { background: color-mix(in srgb, var(--brand-ink) 22%, transparent); color: var(--brand-ink); }
.cfg-desc { margin: -4px 4px 0; }
.cfg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cfg-kpis > div { background: var(--soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cfg-kpis b { font-size: 22px; }
.cfg-kpis b.ok { color: var(--green-dot); }
.cfg-kpis span { font-size: 12px; color: var(--muted); }
.cfg-alerta { background: var(--red-soft); color: var(--late-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.cfg-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cfg-filtros > .input { flex: 1 1 240px; }
.chips-filtro { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-filtro .pill { min-height: 34px; font-size: 13px; }
.cfg-ajuda { background: var(--soft); border-radius: 16px; padding: 14px; }
.user-tags { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 700px) { .cfg-kpis { grid-template-columns: 1fr 1fr; } }

/* clientes */
.cli-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cli-card { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 16px; padding: 14px; }
.cli-card.off { opacity: .6; }
.cli-card-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.cli-card-nome { font-size: 17px; }
.cli-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.cli-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.cli-portal { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cli-card .cli-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cli-card .cli-acoes .pill { min-height: 36px; font-size: 13px; }

/* frases */
.frases-semana { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.frases-semana > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.frases-semana > div.hoje { background: var(--brand-soft); }
.frases-semana span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: capitalize; }
.frases-semana p { font-size: 13px; margin: 0; }

/* visualizações do portal */
.vis { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.vis-escopos { display: flex; flex-direction: column; gap: 4px; padding: 12px; position: sticky; top: 12px; }
.vis-rot { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 8px; }
.vis-escopo { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--ink); }
.vis-escopo small { font-size: 11px; color: var(--muted); }
.vis-escopo.on { background: var(--brand-soft); }
.vis-escopo.on small { color: var(--brand-text); }
.vis-corpo { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vis-cab-l1 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.vis-resumo { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--text-2); margin: 0; }
.vis-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.vis-grupo h3, .vis-obras h3 { font-size: 15px; font-weight: 800; }
.vis-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.vis-item:first-of-type { border-top: 0; }
.vis-item.sub { padding-left: 16px; }
.vis-item.desl { opacity: .5; }
.vis-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vis-item-txt b { font-size: 14px; font-weight: 600; }
.vis-item-txt small { font-size: 12px; color: var(--muted); }
.vis-mexido { color: var(--brand-text) !important; font-weight: 600; }
.vis-mexido .link-btn { font-size: 12px; }
.chave { flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; border: 0; background: var(--line-strong); position: relative; transition: background .15s; padding: 0; }
.chave i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.chave.on { background: var(--brand); }
.chave.on i { transform: translateX(18px); }
.chave:disabled { cursor: not-allowed; }
.vis-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vis-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.vis-lista li:first-child { border-top: 0; }
.vis-lista li .vis-item-txt { flex: 1; }
.vis-lista li.off .vis-item-txt b { color: var(--muted); text-decoration: line-through; }
@media (max-width: 900px) {
  .vis { grid-template-columns: 1fr; }
  .vis-escopos { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .vis-rot { display: none; }
  .vis-escopo { flex: 0 0 auto; }
}
.pc-colunas.so-obras { grid-template-columns: 1fr; }
.pc-pedido { cursor: default; }
.cfg-abas { scroll-margin-top: 84px; }
.pc-tipo { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text); margin-bottom: -6px; }

/* ---------- Controle do relatório (admin e gerente) ---------- */
.rel-controle { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.rel-controle-acoes { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rel-controle-acoes .link-btn { margin-left: auto; }
.rel-editar { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 14px; padding: 12px; }
.rel-pedido { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; background: var(--yellow); color: var(--yellow-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 0; }
.rel-pedido-acoes { display: flex; gap: 8px; }
.rel-pedidos { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--yellow); }
.rel-pedido-linha { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: 13px; }

/* =====================================================================
   Lecore Media — telas próprias
   ===================================================================== */

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand.compacta { padding: 0; gap: 8px; }
.brand.compacta .brand-name { font-size: 18px; }
.simbolo { flex: none; display: block; }
.marca-logo { display: flex; align-items: center; padding: 4px 8px; }
.marca-logo img { display: block; height: 34px; width: auto; max-width: 200px; object-fit: contain; }
.marca-logo.compacta { padding: 0; }
.marca-logo.compacta img { height: 26px; max-width: 150px; }
img.inverter { filter: invert(1); }
.m-marca .marca-logo img { border-radius: 0; }

/* ---------- Menu ---------- */
.sidebar .novo-rel { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; font-size: 15px; }
.sidebar .novo-rel svg { width: 20px; height: 20px; }
.me { border: 0; text-align: left; width: 100%; }
.me.on { box-shadow: inset 0 0 0 2px var(--brand); }
.m-abas .m-abas-novo { flex: none; width: 52px; height: 52px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; margin: 0 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.m-abas .m-abas-novo svg { width: 26px; height: 26px; }
@media (max-width: 899px) { .m-marca { min-width: 0; } }

/* ---------- Comuns ---------- */
.voltar { border: 0; background: none; padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 13px; color: var(--muted); }
.voltar:hover { color: var(--ink); }
.danger-text { color: var(--late-ink) !important; }
.opt-rot { font-size: 12px; font-weight: 700; color: var(--muted); }
.busca-grande { min-height: 52px; font-size: 16px; border-radius: 16px; }
.vazio-grande { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; max-width: 640px; }
.vazio-grande h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.vazio-icone { font-size: 34px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.campo-num { position: relative; display: flex; }
.campo-num input { width: 100%; font-variant-numeric: tabular-nums; }
.campo-num.moeda input { padding-left: 40px; }
.campo-num-pre { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: 14px; pointer-events: none; }
.campo-calc { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--radius-s); background: var(--soft); border: 1.5px dashed var(--line); font-variant-numeric: tabular-nums; }
.logo-cli { flex: none; border-radius: 50%; overflow: hidden; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.logo-cli img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-cli.vazio { background: var(--brand); color: var(--brand-ink); font-weight: 800; box-shadow: none; }
.enviar-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.enviar-logo-prev { width: 150px; height: 76px; border-radius: 14px; background: var(--soft); border: 1.5px dashed var(--line); display: grid; place-items: center; padding: 10px; }
.enviar-logo-prev.escuro { background: #0C0C14; border-color: #2A2A36; }
.enviar-logo-prev { overflow: hidden; }
.enviar-logo-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.midia-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--text-2); white-space: nowrap; }
.midia-tag.m-meta { background: #E7EFFF; color: #0B4CC2; }
.midia-tag.m-google { background: #E3F4E8; color: #1C6B35; }
.midia-tag.m-tiktok { background: #FFE5EA; color: #A3122F; }
.midia-tag.m-linkedin { background: #E3EEF9; color: #0A4F96; }
:root[data-tema="escuro"] .midia-tag.m-meta { background: #14284D; color: #A9C6FF; }
:root[data-tema="escuro"] .midia-tag.m-google { background: #133220; color: #9BE0B0; }
:root[data-tema="escuro"] .midia-tag.m-tiktok { background: #3D1520; color: #FFB0C0; }
:root[data-tema="escuro"] .midia-tag.m-linkedin { background: #112A44; color: #A3CBF2; }
.midias-esc { display: flex; flex-wrap: wrap; gap: 8px; }
.midia-esc { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--field); font-weight: 600; font-size: 13px; }
.midia-esc.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.midia-ponto { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cor { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.cor.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.cor.livre { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.cor.livre input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- Início ---------- */
.painel { display: flex; flex-direction: column; gap: var(--gap-main); }
.hero-btn.claro { background: #fff; color: #111827; min-height: 46px; padding: 0 20px; font-size: 14px; }
.hero-btn.claro:hover { background: #E5E7EB; }
.hoje-tile.t-ativas { background: var(--brand); color: var(--brand-ink); }
.hoje-tile.t-ativas .hoje-tile-l, .hoje-tile.t-ativas .hoje-tile-h { color: var(--brand-ink); opacity: .75; }
.hoje-tile.t-agenda { background: var(--card); color: var(--ink); }
.hoje-tile.t-agenda .hoje-tile-l, .hoje-tile.t-agenda .hoje-tile-h { color: var(--text-2); opacity: 1; }
.hoje-tile-v.txt { font-size: 28px; padding: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-mini { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.rel-mini-num { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rel-mini-num small { font-weight: 500; font-size: 11px; color: var(--muted); }
.plain-list li:has(> .rel-mini):hover { background: var(--chip); }
.mini-acao { min-height: 30px; padding: 0 12px; font-size: 12px; }
@media (max-width: 899px) { .hoje-tile-v.txt { font-size: 22px; } }

/* ---------- Relatórios: lista ---------- */
/* chips de período dentro de cartões */
.card .chips-filtro .pill:not(.on) { background: var(--chip); }
.rel-mes { text-transform: none; letter-spacing: 0; font-size: 13px; }
.rel-mes::first-letter { text-transform: uppercase; }
.rel-lista { display: flex; flex-direction: column; gap: 8px; }
.rel-item { display: grid; grid-template-columns: auto minmax(160px, 1.6fr) auto minmax(110px, .8fr) minmax(150px, 1fr) minmax(110px, auto); align-items: center; gap: 14px;
  width: 100%; border: 0; background: var(--card); border-radius: var(--radius-m); padding: 12px 16px; text-align: left; color: var(--ink); }
.rel-item:hover { box-shadow: inset 0 0 0 2px var(--line-strong); }
.rel-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rel-item-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-item-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-item-num { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-variant-numeric: tabular-nums; }
.rel-item-num small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-item-num b { font-size: 14px; white-space: nowrap; }
.rel-item-num em { font-style: normal; font-weight: 600; color: var(--text-2); }
.rel-item-quem { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
@media (max-width: 1100px) {
  .rel-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; }
  .rel-item .logo-cli { grid-row: span 2; }
  .rel-item-num { grid-column: 2; flex-direction: row; gap: 6px; align-items: baseline; }
  .rel-item-num:nth-of-type(2) { grid-column: 2 / -1; }
  .rel-item-quem { grid-column: 3; grid-row: 2; }
  .rel-item-num + .rel-item-num { display: none; }
}

/* ---------- Relatórios: escolher cliente ---------- */
.escolher-cli { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.escolher-cli-item { display: flex; align-items: center; gap: 12px; border: 0; background: var(--card); border-radius: var(--radius-m); padding: 12px 14px; text-align: left; color: var(--ink); }
.escolher-cli-item:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.escolher-cli-item span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.escolher-cli-item b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escolher-cli-item small { font-size: 12px; color: var(--muted); }
.escolher-cli-item.off { opacity: .6; }
.escolher-cli-item.novo { background: transparent; border: 1.5px dashed var(--line-strong); }

/* ---------- Relatórios: editor + prévia ---------- */
.rel-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 480px); gap: 20px; align-items: start; }
.rel-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rel-previa { position: sticky; top: 16px; }
.rel-previa-card { gap: 14px; }
.rel-previa .opt > span:empty { display: none; }
.rel-previa .seg { min-width: 180px; }
.rel-tela { border-radius: 18px; overflow: hidden; background: var(--soft); line-height: 0; transition: opacity .15s; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.rel-tela.desenhando { opacity: .85; }
.rel-tela canvas { width: 100%; height: auto; display: block; }
.rel-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rel-acoes .pill { min-height: 46px; }
.rel-cli { display: flex; align-items: center; gap: 14px; }
.rel-cli-nome { font-size: 18px; font-weight: 800; display: block; }
.aba-celular-rel { display: none; }
@media (max-width: 1100px) {
  .rel-editor { grid-template-columns: minmax(0, 1fr); }
  .rel-previa { position: static; }
  .aba-celular-rel { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 999px; position: sticky; top: calc(var(--faixa-h, 0px) + 64px); z-index: 30; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
  .aba-celular-rel button { flex: 1; border: 0; background: transparent; min-height: 42px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); }
  .aba-celular-rel button.on { background: var(--brand); color: var(--brand-ink); }
  .rel-editor.mostra-dados .rel-previa, .rel-editor.mostra-previa .rel-form { display: none; }
}
@media (min-width: 900px) and (max-width: 1100px) { .aba-celular-rel { top: 12px; } }

/* ---------- Clientes ---------- */
.cli-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cli-cartao { display: flex; flex-direction: column; gap: 12px; border: 0; background: var(--card); border-radius: var(--radius-l); padding: 16px; text-align: left; color: var(--ink); }
.cli-cartao:hover { box-shadow: inset 0 0 0 2px var(--line-strong); }
.cli-cartao.off { opacity: .6; }
.cli-cartao-top { display: flex; align-items: center; gap: 12px; }
.cli-cartao-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cli-cartao-nome b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-cartao-nome small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-cartao-midias { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tipo-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); white-space: nowrap; }
.tipo-tag.parceiro { background: var(--yellow); color: var(--yellow-ink); }
.cli-fee { margin-left: auto; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.cli-cartao-rel { font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 10px; }
.ficha-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ficha-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ficha-logo .note { flex: 1 1 160px; }
.card-title .badge { margin-left: 6px; vertical-align: middle; font-size: 11px; }
a.pill { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
