/* =====================================================================
   Alta Linha Prime — identidade visual dos painéis (Painel + LP Hub)
   ---------------------------------------------------------------------
   Derivada do front-end aprovado do site (site/_fonte/estaticos/styles.css
   e site.css):
     tinta #0b0b0b · tinta-2 #151412 · grafite #1d1b18 · papel #faf8f4 ·
     pedra #efe9df · pedra-2 #e3dbcd · linha #d9d1c3 · neutro #5c574f ·
     acento (bronze) #7a5f36 · acento claro #d8bf8f · WhatsApp #1f9e50 ·
     fonte dos títulos "Prime Serif" (peso 500, -.025em) · texto em sans do
     sistema · cantos 28/18 + pílula 999 · eyebrow em caixa alta bronze
     (.18em, 800) · sombra quente 0 24px 70px rgba(11,11,11,.14).

   Regras do sistema:
     - sidebar PRETA (como o cabeçalho do site) com o logotipo branco;
     - página em papel, cards brancos com borda #d9d1c3 e sombra quente;
     - ação primária = tinta (o .btn-dark do site); o bronze marca
       rótulos, foco, estados "novo" e o item ativo do menu;
     - títulos em serifa leve (500) contra rótulos em caixa alta
       espaçados — o mesmo contraste do site;
     - botões sempre pílula; campos com cantos 14px (como o formulário
       de 7 etapas do site).

   As classes são as mesmas nos dois painéis — este arquivo é copiado tal
   qual para painel/public/assets/css/admin.css e
   lp-hub/public/assets/css/admin.css.
   ===================================================================== */

@font-face {
  font-family: "Prime Serif";
  src: url("../fonts/prime-serif.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- superfície ------------------------------------------------- */
  --bg:        #faf8f4;   /* papel: fundo da página            */
  --bg-2:      #f4f0e8;   /* hover, cabeçalho de tabela        */
  --surface:   #ffffff;   /* cards                             */
  --surface-2: #efe9df;   /* pedra: trilhas, chips neutros     */
  --border:    #d9d1c3;
  --border-2:  #c9bfae;

  /* --- escuros (cabeçalho/sidebar) -------------------------------- */
  --black:     #0b0b0b;
  --graphite:  #1d1b18;
  --dark-line: #2a2724;

  /* --- texto ------------------------------------------------------ */
  --text:      #0b0b0b;
  --text-2:    #35322d;
  --text-3:    #5c574f;

  /* --- marca ------------------------------------------------------ */
  --brand:      #7a5f36;   /* bronze do site                         */
  --brand-dark: #5e4827;
  --brand-lite: #d8bf8f;   /* bronze claro, legível sobre o preto    */
  --brand-dim:  #f3ecdf;
  --brand-dim2: rgba(122, 95, 54, .16);
  --wa:         #1f9e50;
  --wa-dark:    #188443;

  /* --- estados ---------------------------------------------------- */
  --ok:         #1f7a45;
  --ok-dim:     rgba(31, 122, 69, .10);
  --warn:       #9a5b12;
  --warn-dim:   rgba(176, 108, 25, .12);
  --danger:     #a8302a;
  --danger-dim: rgba(168, 48, 42, .10);
  --info-dim:   rgba(11, 11, 11, .06);

  /* --- forma ------------------------------------------------------ */
  --radius:    22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --pill:      999px;

  /* --- sombra (quente, como no site) ------------------------------- */
  --shadow-sm:    0 1px 2px rgba(11, 11, 11, .04), 0 3px 10px -3px rgba(11, 11, 11, .08);
  --shadow:       0 2px 5px rgba(11, 11, 11, .04), 0 16px 40px -14px rgba(11, 11, 11, .14);
  --shadow-lg:    0 24px 70px rgba(11, 11, 11, .14), 0 4px 10px rgba(11, 11, 11, .05);
  --shadow-brand: 0 12px 28px -12px rgba(11, 11, 11, .55);

  /* --- ritmo fluido ----------------------------------------------- */
  --pad-x:     clamp(16px, 2.4vw, 32px);
  --pad-y:     clamp(18px, 1.8vw, 26px);
  --gap:       clamp(12px, 1.2vw, 18px);
  --sidebar-w: 250px;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Prime Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; }
img { height: auto; }

a { color: var(--brand-dark); text-decoration: none; font-weight: 600; }
a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: rgba(216, 191, 143, .45); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.shell > *, .main > *, .content > * { min-width: 0; }

/* Títulos: a serifa do site, leve e apertada. */
h1, h2, h3 { font-weight: 500; }

/* Eyebrow: rótulo pequeno em caixa alta, bronze — a assinatura do site. */
.eyebrow {
  display: block; margin: 0 0 .5rem;
  font-size: 11px; line-height: 1.4; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand);
}
.on-dark .eyebrow { color: var(--brand-lite); }

/* ------------------------------------------------------------ layout */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--black);
  color: rgba(255, 255, 255, .84);
  border-right: 1px solid var(--dark-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 11px;
}
/* O logotipo da Prime já traz "ALTA LINHA" + "Prime": o símbolo separado
   fica escondido na sidebar e só o wordmark (branco) aparece. */
.brand-mark { display: none; width: 34px; height: 34px; flex: none; object-fit: contain; border-radius: 9px; }
.brand-word { height: 58px; width: auto; max-width: 100%; display: block; object-fit: contain; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 15px; letter-spacing: -.02em; color: #fff; }
.brand-sub {
  font-size: 10px; color: var(--brand-lite);
  letter-spacing: .18em; text-transform: uppercase; font-weight: 800; margin-top: 6px;
}

.nav { padding: 12px 12px; flex: 1; }
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: rgba(255, 255, 255, .4); padding: 16px 12px 7px; font-weight: 800;
}
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .76); font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: background .12s, color .12s, box-shadow .12s;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.active {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(122, 95, 54, .9);
}
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .count, .nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 800; flex: none;
  background: rgba(216, 191, 143, .18); color: var(--brand-lite);
  padding: 2px 8px; border-radius: var(--pill); font-variant-numeric: tabular-nums;
}
.nav a.active .count, .nav a.active .nav-badge { background: rgba(255, 255, 255, .22); color: #fff; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.sidebar-foot .who { color: #fff; font-weight: 700; margin-bottom: 2px; font-size: 12.5px; }
.sidebar-foot div { overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot form { margin-top: 10px; }
.sidebar-foot .btn-ghost { color: rgba(255, 255, 255, .78); border-color: rgba(255, 255, 255, .22); }
.sidebar-foot .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .4); }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px var(--pad-x); border-bottom: 1px solid var(--border);
  background: rgba(250, 248, 244, .92); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 {
  font-family: var(--serif); font-size: clamp(22px, 1.9vw, 28px); font-weight: 500; margin: 0;
  letter-spacing: -.025em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar .crumb {
  font-size: 10.5px; color: var(--brand); margin-bottom: 4px;
  font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.topbar .spacer { flex: 1; }
.topbar > div:first-child { min-width: 0; }

.content { padding: var(--pad-y) var(--pad-x) 56px; max-width: 1320px; width: 100%; }

/* ----------------------------------------------------------- botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 18px; border-radius: var(--pill);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  letter-spacing: -.005em; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s, color .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg-2); border-color: var(--text); text-decoration: none; transform: translateY(-1px); color: var(--text); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn svg { width: 15px; height: 15px; flex: none; }

/* Ação primária = tinta, como o .btn-dark do site. */
.btn-primary, .btn-red, .btn-dark {
  background: var(--black); border-color: var(--black); color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover, .btn-red:hover, .btn-dark:hover { background: #2a2825; border-color: #2a2825; color: #fff; }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }

.btn-danger { background: var(--surface); border-color: rgba(168, 48, 42, .38); color: var(--danger); }
.btn-danger:hover { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); border-color: transparent; transform: none; }

.btn-sm { min-height: 32px; padding: 5px 13px; font-size: 12px; }
.btn-lg { min-height: 50px; padding: 12px 28px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr));
  gap: var(--gap); margin-bottom: var(--gap);
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  min-width: 0;
}
.card-stat .label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--text-3); font-weight: 800; margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-stat .value {
  font-family: var(--serif); font-size: clamp(28px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.card-stat .sub { font-size: 11.5px; color: var(--text-3); margin-top: 8px; font-weight: 500; }
.card-stat .value.ok { color: var(--ok); }
.card-stat .value.warn { color: var(--warn); }
.card-stat .value.brand { color: var(--brand); }

/* Card de destaque: escuro, como as seções de autoridade do site. */
.card-hero, .card-stat.hero {
  background: var(--black); border-color: var(--black); color: #fff;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
}
.card-stat.hero .label { color: var(--brand-lite); }
.card-stat.hero .sub { color: rgba(255, 255, 255, .66); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: var(--gap);
  box-shadow: var(--shadow); min-width: 0;
}
.panel-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-family: var(--serif); font-size: 18px; font-weight: 500; margin: 0; letter-spacing: -.02em; }
.panel-head .spacer { flex: 1; }
.panel-head .hint { font-size: 11px; color: var(--text-3); font-weight: 600; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 0; }
.panel.dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.panel.dark .panel-head { border-bottom-color: rgba(255, 255, 255, .1); }
.panel.dark .hint { color: rgba(255, 255, 255, .6); }

.split-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap); }
@media (max-width: 1080px) { .split-wide { grid-template-columns: 1fr; } }

.split-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  gap: var(--gap); align-items: start;
}
@media (max-width: 900px) { .split-detail { grid-template-columns: 1fr; } }

.wizard-grid {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: var(--gap); align-items: start;
}
@media (max-width: 1000px) { .wizard-grid { grid-template-columns: 1fr; } }

.kv-tight { grid-template-columns: minmax(0, 104px) minmax(0, 1fr); }
@media (max-width: 700px) { .kv-tight { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- tabelas */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-3); font-weight: 800; padding: 12px 18px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-2);
}
table.data td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
table.data .muted { color: var(--text-3); font-size: 11.5px; font-weight: 500; }
table.data a.title { font-weight: 700; color: var(--text); }
table.data a.title:hover { color: var(--brand); }

.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.empty strong { display: block; font-family: var(--serif); color: var(--text); font-size: 20px; margin-bottom: 6px; font-weight: 500; letter-spacing: -.02em; }

/* ------------------------------------------------------------ badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--pill);
  font-size: 11px; font-weight: 750; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-published { background: var(--ok-dim); color: var(--ok); }
.badge-offline   { background: var(--warn-dim); color: var(--warn); }
.badge-draft     { background: var(--info-dim); color: var(--text-2); }
.badge-archived  { background: var(--danger-dim); color: var(--danger); }
.badge-novo        { background: var(--brand-dim); color: var(--brand-dark); }
.badge-visualizado { background: var(--info-dim); color: var(--text-2); }
.badge-em_contato  { background: var(--warn-dim); color: var(--warn); }
.badge-qualificado { background: var(--black); color: #fff; }
.badge-convertido  { background: var(--ok-dim); color: var(--ok); }
.badge-perdido     { background: var(--danger-dim); color: var(--danger); }
.badge-plain { background: var(--info-dim); color: var(--text-2); }
.badge-plain::before { display: none; }

/* Tag de unidade (Além Ponte, Washington Luiz) */
.badge-loja { background: var(--brand-dim); color: var(--brand-dark); }
.badge-loja::before { display: none; }

.chip {
  display: inline-block; padding: 3px 10px; border-radius: var(--pill);
  background: var(--brand-dim); border: 1px solid transparent;
  font-family: var(--mono); font-size: 11px; color: var(--brand-dark); font-weight: 600;
  max-width: 100%; overflow-wrap: anywhere;
}

/* ---------------------------------------------------------- formulários */

label.field { display: block; margin-bottom: 16px; min-width: 0; }
label.field > span.lbl {
  display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 7px;
}
label.field > span.help { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 6px; font-weight: 500; }

input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel],
input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; max-width: 100%; min-height: 46px; padding: 10px 15px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: inherit; font-weight: 500;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--text); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(11, 11, 11, .08);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input::placeholder, textarea::placeholder { color: #8a8479; font-weight: 400; }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c574f' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 14px;
  padding-right: 36px;
}

.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--black); flex: none; }
.check .txt { font-size: 13px; font-weight: 600; }
.check .txt small { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 2px; font-weight: 500; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0 16px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.filters label.field { margin: 0; flex: 1 1 150px; min-width: 0; }
.filters input, .filters select { min-width: 0; background: var(--surface); }
.filters .grow { flex: 2 1 190px; }
.filters .btn { flex: none; }

/* ---------------------------------------------------------- slug/url */

.slug-row { display: flex; align-items: stretch; min-width: 0; }
.slug-row input { min-width: 0; }
.slug-row input:not(.with-prefix) {
  border-top-right-radius: 0; border-bottom-right-radius: 0; text-align: right;
  font-family: var(--mono); letter-spacing: -.01em;
}
.slug-row .suffix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-2); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; font-weight: 600; flex: none;
}
.slug-row .prefix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
  white-space: nowrap; font-weight: 700; flex: none;
}
.slug-row input.with-prefix {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; text-align: left; border-left: none;
  font-family: var(--mono);
}

.slug-status { font-size: 12px; margin-top: 7px; display: flex; align-items: center; gap: 6px; min-height: 18px; font-weight: 700; }
.slug-status.ok { color: var(--ok); }
.slug-status.bad { color: var(--danger); }
.slug-status.loading { color: var(--text-3); font-weight: 600; }

.url-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--brand-dim); border: 1px dashed rgba(122, 95, 54, .45);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: var(--mono); font-size: 12px; color: var(--brand-dark);
  overflow-wrap: anywhere; font-weight: 600; min-width: 0;
}
.url-box .spacer { flex: 1; }

/* ------------------------------------------------------------ dropzone */

.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px) 20px; text-align: center; cursor: pointer;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-dim); }
.dropzone .dz-icon { width: 42px; height: 42px; margin: 0 auto 12px; color: var(--brand); }
.dropzone .dz-title { font-family: var(--serif); font-size: 19px; font-weight: 500; margin-bottom: 4px; letter-spacing: -.02em; }
.dropzone .dz-sub { font-size: 12px; color: var(--text-3); font-weight: 600; }
.dropzone input[type=file] { display: none; }

.file-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 14px; margin-top: 13px;
  box-shadow: var(--shadow-sm);
}
.file-card .fc-icon {
  width: 38px; height: 38px; border-radius: 12px; background: var(--brand-dim);
  display: grid; place-items: center; color: var(--brand); flex: none;
}
.file-card .fc-name { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.file-card .fc-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-weight: 600; }
.file-card .fc-body { flex: 1; min-width: 0; }

.progress { height: 6px; background: var(--surface-2); border-radius: var(--pill); overflow: hidden; margin-top: 9px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--black); border-radius: var(--pill); transition: width .18s ease; }

/* --------------------------------------------------------- validação */

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600;
}
.check-list li:last-child { border-bottom: none; }
.check-list li > div { min-width: 0; overflow-wrap: anywhere; }
.check-list .mark {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; padding: 4px;
}
.check-list .mark.ok { color: var(--ok); background: var(--ok-dim); }
.check-list .mark.bad { color: var(--danger); background: var(--danger-dim); }
.check-list .mark.warn { color: var(--warn); background: var(--warn-dim); }
.check-list .entry {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  display: block; margin-top: 3px; overflow-wrap: anywhere; font-weight: 500;
}

.alert {
  border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px;
  border: 1px solid; margin-bottom: var(--gap); line-height: 1.6; font-weight: 600;
  overflow-wrap: anywhere;
}
.alert-error   { background: var(--danger-dim); border-color: rgba(168, 48, 42, .3); color: var(--danger); }
.alert-success { background: var(--ok-dim); border-color: rgba(31, 122, 69, .3); color: var(--ok); }
.alert-warning { background: var(--warn-dim); border-color: rgba(176, 108, 25, .3); color: var(--warn); }
.alert-info    { background: var(--bg-2); border-color: var(--border); color: var(--text-2); }
.alert strong { display: block; margin-bottom: 3px; font-weight: 800; }
.alert ul { margin: 6px 0 0; padding-left: 17px; font-weight: 500; }

/* Aviso com ponto bronze, como a faixa de confiança do site */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px;
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 13px;
}
.notice::before { content: ""; flex: 0 0 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--brand); }

.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 200; width: min(380px, calc(100vw - 32px)); }
.flash-stack .alert { box-shadow: var(--shadow-lg); background: var(--surface); animation: slideIn .22s ease; }
.flash-stack .alert-error   { background: #fbf1f0; }
.flash-stack .alert-success { background: #f0f8f2; }
.flash-stack .alert-warning { background: #fbf4ea; }
.flash-stack .alert-info    { background: var(--surface); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- passos */

.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--gap); }
.step {
  flex: 1 1 168px; min-width: 0; padding: 12px 15px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 10px; font-weight: 700;
}
.step .n {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--surface-2); display: grid; place-items: center;
  font-family: var(--serif); font-size: 12px; font-weight: 500; color: var(--text-3);
}
.step.active {
  border-color: var(--black); color: #fff; background: var(--black);
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6);
}
.step.active .n { background: var(--brand); color: #fff; }
.step.done { color: var(--ok); border-color: rgba(31, 122, 69, .3); }
.step.done .n { background: var(--ok-dim); color: var(--ok); }

/* --------------------------------------------------------------- tabs */

.tabs {
  display: flex; gap: 3px; border-bottom: 1px solid var(--border);
  margin-bottom: var(--gap); overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tabs a {
  padding: 11px 15px; font-size: 13px; font-weight: 700; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------ gráfico */

.chart { width: 100%; height: clamp(160px, 18vw, 200px); display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-top: 10px; font-weight: 600; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 50px; align-items: center; gap: 12px; font-size: 12.5px; }
.bar-row .lbl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar-row .track { height: 8px; background: var(--surface-2); border-radius: var(--pill); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--brand); border-radius: var(--pill); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }

/* Funil de status (dashboard do painel de leads) */
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.funnel-row .track { height: 24px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.funnel-row .track i { display: block; height: 100%; background: var(--text); border-radius: 8px; min-width: 3px; }
.funnel-row.novo .track i { background: var(--brand); }
.funnel-row.convertido .track i { background: var(--ok); }
.funnel-row.perdido .track i { background: var(--border-2); }

/* ---------------------------------------------------------------- misc */

.kv { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--text-3); font-size: 12px; font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }

.file-tree { font-family: var(--mono); font-size: 12px; max-height: 480px; overflow: auto; }
.file-tree .row { display: flex; align-items: center; gap: 7px; padding: 4px 20px; }
.file-tree .row:hover { background: var(--bg-2); }
.file-tree .row .sz { margin-left: auto; color: var(--text-3); font-size: 11px; flex: none; padding-left: 10px; }
.file-tree .row.dir { color: var(--brand-dark); font-weight: 600; }
.file-tree .row .depth { display: inline-block; flex: none; }

pre.code {
  background: var(--black); border: 1px solid var(--dark-line); border-radius: var(--radius-sm);
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12px;
  line-height: 1.65; color: #ece7de; margin: 0; max-width: 100%;
}
pre.code .cm { color: #8c857c; }
code.inline {
  font-family: var(--mono); font-size: 12px; background: var(--brand-dim);
  padding: 2px 6px; border-radius: 6px; color: var(--brand-dark); font-weight: 600;
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 8, 8, .72); backdrop-filter: blur(6px);
  display: none; place-items: center; z-index: 300; padding: 16px;
}
.modal-backdrop.open { display: grid; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  width: min(480px, 100%); box-shadow: 0 30px 100px rgba(0, 0, 0, .35); overflow: hidden;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal header { padding: 22px 24px 0; }
.modal header h3 { font-family: var(--serif); margin: 0 0 6px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.modal header p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.6; font-weight: 500; }
.modal .body { padding: 18px 24px; overflow-y: auto; }
.modal footer {
  display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px; flex-wrap: wrap;
  background: var(--bg-2); border-top: 1px solid var(--border);
}

.pagination {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 14px 20px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); font-weight: 600;
}
.pagination .spacer { flex: 1; }
.pagination a, .pagination span.cur {
  min-width: 34px; padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--border-2);
  color: var(--text-2); font-size: 12px; text-decoration: none; font-weight: 700; text-align: center;
}
.pagination a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; border-color: var(--text); }
.pagination span.cur { background: var(--text); border-color: var(--text); color: #fff; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
table.data .actions { flex-wrap: nowrap; }
table.data td:last-child { white-space: nowrap; width: 1%; }
.inline-form { display: inline; }

.preview-frame {
  width: 100%; height: clamp(380px, 55vh, 620px); border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; display: block; box-shadow: var(--shadow-lg);
}
.preview-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.preview-toolbar .dev-btn { padding: 5px 13px; font-size: 12px; min-height: 32px; }
.preview-toolbar .dev-btn.active { background: var(--text); border-color: var(--text); color: #fff; }

.success-hero { text-align: center; padding: clamp(28px, 4vw, 44px) 18px; }
.success-hero .ring {
  width: 60px; height: 60px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; margin: 0 auto 18px; color: #fff;
}
.success-hero h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 8px; font-weight: 500; letter-spacing: -.025em; }
.success-hero p { color: var(--text-2); margin: 0 0 22px; font-weight: 500; }

/* ------------------------------------------------------------- login */

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, #3a332a 0%, #16140f 45%, #0b0b0b 100%);
}
.login-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; padding: clamp(24px, 5vw, 32px); box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}
/* Bloco escuro para o logotipo branco dentro do card claro. */
.login-card .brand {
  border: none; margin: -4px 0 22px; padding: 22px 20px; justify-content: center;
  background: var(--black); border-radius: 18px;
}
.login-card .brand-word { height: 64px; }
.login-card h1 { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -.025em; margin: 0 0 4px; line-height: 1.1; }
.login-card .lead { color: var(--text-2); font-size: 13px; margin: 0 0 20px; }
.login-card .btn-primary { min-height: 48px; font-size: 14px; }

/* ------------------------------------------- alternador de seção (pílula) */
.seg-wrap {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.seg {
  pointer-events: auto;
  display: inline-flex; gap: 3px; padding: 4px;
  border-radius: var(--pill); background: var(--surface-2);
  border: 1px solid var(--border);
}
.seg a {
  padding: 7px 16px; border-radius: var(--pill);
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  text-decoration: none; white-space: nowrap;
}
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--text); color: #fff; }

/* ------------------------------------------------- miniaturas */
.thumb {
  width: 46px; height: 46px; border-radius: var(--radius-xs); flex: none;
  background: var(--brand-dim); color: var(--brand);
  display: grid; place-items: center; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb svg { width: 22px; height: 22px; }
.thumb-wide { width: 82px; }

/* Linha do tempo (histórico do lead) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; font-size: 12.5px; }
.timeline li::before { content: ""; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--brand); }
.timeline li .when { color: var(--text-3); font-size: 11px; font-weight: 600; margin-top: 2px; }

/* -------------------------------------------------------- responsivo */

@media (max-width: 1180px) {
  :root { --sidebar-w: 218px; }
  .nav a { font-size: 12.5px; gap: 9px; padding: 9px 11px; }
  .brand-word { height: 50px; }
}

@media (max-width: 980px) {
  .topbar { position: static; flex-wrap: wrap; }
  .seg-wrap { position: static; inset: auto; flex-basis: 100%; order: 10; margin-top: 4px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--dark-line); }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; }
  .nav-label { display: none; }
  .nav a { flex: 1 1 132px; }
  .sidebar-foot { display: flex; align-items: center; gap: 12px; }
  .sidebar-foot form { margin: 0 0 0 auto; }
}

@media (max-width: 700px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 9px; }
  .step { flex: 1 1 100%; }
  .filters { padding: 12px 14px; }
  .filters label.field, .filters .grow { flex: 1 1 100%; }
  .panel-body { padding: 16px; }
  .panel-head { padding: 14px 16px; }
  table.data th, table.data td { padding: 10px 13px; }
  .actions { justify-content: flex-start; }
  .flash-stack { top: 10px; right: 10px; left: 10px; width: auto; }
  .modal { border-radius: 22px; }
}

@media (max-width: 460px) {
  .brand { padding: 16px 14px; }
  .brand-word { height: 44px; }
  .nav a { flex: 1 1 100%; }
  .content { padding-bottom: 40px; }
  .btn { padding: 9px 15px; }
  .bar-row, .funnel-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "lbl val" "track track";
    gap: 5px 10px;
  }
  .bar-row .lbl, .funnel-row .lbl { grid-area: lbl; white-space: normal; }
  .bar-row .val, .funnel-row .val { grid-area: val; }
  .bar-row .track, .funnel-row .track { grid-area: track; }
  .modal footer .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
