/* =========================================================================
 * FLOW v2 — Design System (Super Megavendas)
 * Single consolidated stylesheet. Import this one file and you get:
 *   · Brand tokens (Apron + Work Sans fonts, SMV color ladder)
 *   · FLOW v2 app theme tokens (light + dark, theme-aware)
 *   · Core components: cards, buttons, badges, KPIs, charts, sidebar, topbar
 *   · Application patterns: forms, tables, modals, WhatsApp inbox, login
 *
 * USAGE
 *   <link rel="stylesheet" href="flow-ds.css">
 *   Wrap your app in <div class="flow-app"> … </div>
 *   Toggle dark mode with  <div class="flow-app" data-theme="dark">
 *   Density:  data-density="compact | regular | comfy"
 *
 * Do NOT introduce colors outside the tokens below. Everything keys off
 * --accent (SMV yellow #ffc70b) + a warm neutral ladder + 3 semantic hues.
 * ========================================================================= */


/* ==========================================================================
 * BRAND TOKENS — fonts, SMV color ladder, type scale, radii
 * Source of truth for fonts + brand palette. Site-level type classes (.smv-*).
 * ========================================================================== */

/* =========================================================================
 * Super Megavendas — Colors & Typography
 * Extracted from site-super-megavendas/app/globals.css
 * ========================================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Apron";
  font-weight: 300;
  font-style: normal;
  src: url("./fonts/Apron-Light.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Apron";
  font-weight: 400;
  font-style: normal;
  src: url("./fonts/ApronRegular.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Apron";
  font-weight: 400;
  font-style: italic;
  src: url("./fonts/ApronHeavyItalic.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Apron";
  font-weight: 800;
  font-style: normal;
  src: url("./fonts/Apron-Heavy.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  font-weight: 400;
  src: url("./fonts/WorkSans-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  font-weight: 600;
  src: url("./fonts/WorkSans-SemiBold.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  font-weight: 400;
  src: url("./fonts/Poppins-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  /* ---------- Brand colors ---------- */
  --smv-yellow: #ffc70b;          /* primary brand yellow (CTA, highlights) */
  --smv-yellow-50: #ffe385;       /* light yellow — hover / gradients */
  --smv-yellow-100: #ffd958;      /* mid yellow — gradient stop */
  --smv-yellow-ghost: rgba(255, 199, 11, 0.2); /* tinted background */

  /* ---------- Blacks (dark theme ladder) ---------- */
  --smv-black-bg: #101010;        /* page background (blacksmv1) */
  --smv-black-main: #1a1b1a;      /* blackMain */
  --smv-black-card: #121212;      /* feature card background */
  --smv-black-elev-1: #151515;    /* footer nav strip, modal surfaces */
  --smv-black-elev-2: #1b1b1c;    /* pill tag bg */
  --smv-black-1: #201e1c;
  --smv-black-2: #2b2927;
  --smv-black-3: #302e2c;
  --smv-black-4: #32302e;
  --smv-black-5: #343230;
  --smv-black-6: #393735;
  --smv-black-7: #3b3937;
  --smv-black-8: #3f3d3c;
  --smv-black-9: #41403e;
  --smv-black-10: #444240;
  --smv-font-black: #212121;      /* on-yellow text */

  /* ---------- Grays (foregrounds) ---------- */
  --smv-white-1: #ffffffde;       /* whitecolor1 (primary text on dark) */
  --smv-white-2: #fafaf9;
  --smv-gray-2: #e2e2e1;          /* graycolor2 — main heading color */
  --smv-gray-font-sec: #a6a5a4;   /* secondary paragraph text */
  --smv-gray-font: #a5a5a5;
  --smv-brand-black-50: #8c8d8c;  /* muted labels */
  --smv-gray-main: #616161;
  --smv-gray-3: #262626;
  --smv-gray-4: #3b3b3b;
  --smv-gray-5: #515151;
  --smv-gray-6: #98989a;
  --smv-gray-7: #919191;
  --smv-gray-8: #a7a7a7;
  --smv-gray-9: #bcbcbc;
  --smv-legal-text: #484948;      /* tiny fine print */
  --smv-footer-link: #7c7e80;

  /* ---------- Semantic aliases ---------- */
  --bg:            var(--smv-black-bg);
  --bg-elev-1:     var(--smv-black-elev-1);
  --bg-card:       var(--smv-black-card);
  --fg:            var(--smv-gray-2);
  --fg-strong:     var(--smv-white-1);
  --fg-muted:      var(--smv-gray-font-sec);
  --fg-subtle:     var(--smv-brand-black-50);
  --accent:        var(--smv-yellow);
  --accent-hover:  var(--smv-yellow-50);
  --on-accent:     var(--smv-font-black);
  --border-subtle: rgba(255,255,255,0.08);
  --border-accent: rgba(255, 199, 11, 0.5);

  /* ---------- Gradients (from globals.css) ---------- */
  --grad-ano-destaque: linear-gradient(190.2deg, #ffc70b 21.57%, #ffd958 68.77%);
  --grad-resultados:   linear-gradient(190.2deg, #ffc70b 21.57%, #ffd958 68.77%);
  --grad-resultados-hover: linear-gradient(190.2deg, #ffe385 21.57%, #ffe385 68.77%);
  --grad-card-empresa: linear-gradient(150.89deg, rgba(250,250,249,0.07) 13.89%, rgba(148,148,147,0.07) 85.01%);
  --grad-mensagem:     linear-gradient(0deg, #212121 30%, rgba(63,63,64,0.10) 100%);
  --grad-feature-even: linear-gradient(304.13deg, rgba(255,255,255,0) 10.07%, rgba(248,251,255,0.024) 99.5%);
  --grad-card-yellow:  linear-gradient(to bottom, #FFE38552, #FFE3851A, #FFE38529);
  --grad-pill-glass:   linear-gradient(135deg, rgba(248,251,255,0.2) 0%, rgba(255,255,255,0) 100%);

  /* ---------- Radii ---------- */
  --r-xs: 6px;
  --r-sm: 10px;    /* menu pills */
  --r-md: 12px;    /* inner cards */
  --r-lg: 16px;    /* buttons */
  --r-xl: 24px;    /* headers, modals */
  --r-2xl: 32px;   /* feature cards, image frames */
  --r-full: 9999px;

  /* ---------- Shadows ---------- */
  --shadow-card: 0px 4px 16px 0px rgba(16,16,16,0.6);
  --shadow-drop: drop-shadow(0 10px 30px rgba(12,12,13,0.55));
  --shadow-pulse: 0 0 0 rgba(255,199,11,0.0);

  /* ---------- Spacing scale (4px grid, matches Tailwind) ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* ---------- Type families ---------- */
  --font-display: "Apron", "Fraunces", sans-serif;     /* display / H1-H2, supports italic accent */
  --font-ui:      "Work Sans", "Inter", sans-serif;    /* UI, CTA, tags, paragraphs */
  --font-body:    "Poppins", "Work Sans", sans-serif;  /* body default (layout.tsx sets Poppins) */

  /* ---------- Type scale ---------- */
  --fs-xs:  12px;
  --fs-sm:  14px;
  --fs-base:16px;
  --fs-lg:  18px;
  --fs-xl:  20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;
  --fs-4xl: 40px;
  --fs-5xl: 48px;
}

/* ---------- Semantic typography (how the site uses it) ---------- */

/* Display H1 — "O maior ecossistema de IMPULSIONAMENTO DE VENDAS…" */
.smv-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.05;
  color: var(--smv-gray-2);
  letter-spacing: -0.01em;
}
.smv-h1 em,
.smv-h1 .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--smv-yellow-100);
}

/* Section H2 — "Conheça as ferramentas…" */
.smv-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  color: var(--smv-gray-2);
}
.smv-h2-accent {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: inherit;
  color: #fff;
}

/* Subtitle inside feature cards */
.smv-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 40px);
  line-height: 1.1;
  color: var(--smv-gray-2);
}

/* Eyebrow pill label — "FERRAMENTA" */
.smv-eyebrow {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--smv-gray-2);
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: linear-gradient(to top, #1B1B1C, #3b3b3c);
  display: inline-block;
}

/* Body */
.smv-body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--smv-gray-font-sec);
}
.smv-body-lg {
  font-family: var(--font-ui);
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--smv-gray-font-sec);
}
.smv-caption {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--smv-brand-black-50);
}
.smv-tiny {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--smv-legal-text);
}

/* Yellow/brand emphasis inline */
.smv-brand { color: var(--smv-yellow); }
.smv-brand-strong { color: var(--smv-yellow); font-weight: 700; font-family: var(--font-display); }

/* Primary CTA button ("Acelerar vendas AGORA!") */
.smv-btn-primary {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  color: var(--smv-font-black);
  background: var(--grad-resultados);
  border: none;
  border-radius: var(--r-lg);
  padding: 16px 24px;
  cursor: pointer;
  transition: background .25s ease;
}
.smv-btn-primary:hover { background: var(--grad-resultados-hover); }

/* Secondary CTA (header "Entre em contato") */
.smv-btn-secondary {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--smv-yellow);
  background: transparent;
  border: 1px solid var(--smv-yellow);
  border-radius: var(--r-lg);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.smv-btn-secondary:hover { background: var(--smv-yellow); color: #000; }

/* Text-link CTA ("Quero conhecer o Flow →") */
.smv-btn-link {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--smv-yellow);
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
}
.smv-btn-link:hover { color: var(--smv-yellow-50); }


/* ==========================================================================
 * FLOW v2 APP THEME — light + dark tokens, core components
 * The app shell: surfaces, text, cards, sidebar, topbar, KPIs, charts, badges, buttons.
 * ========================================================================== */

/* =========================================================================
 * FLOW v2 — light hybrid theme built on top of the SMV design tokens.
 * Dark sidebar (preserved FLOW identity) + airy Crextio-style content.
 * ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.flow-app {
  /* ---- accent + semantics ---- */
  --accent: #ffc70b;
  --accent-2: #ffd958;
  --accent-soft: #ffe385;
  --accent-ghost: rgba(255, 199, 11, 0.16);
  --accent-ink: #1b1709;

  --ink-card: #161513;          /* dark contrast cards */
  --ink-card-2: #1f1d1a;

  --pos: #15a75c;
  --pos-soft: #e6f6ec;
  --warn: #ef8c1a;
  --warn-soft: #fdefda;
  --risk: #f0545c;
  --risk-soft: #fde8e9;
  --info: #6b7cff;

  --surface: #f5f0e6;
  --surface-2: #ede7d9;
  --surface-3: #c9bc98;   /* darker warm beige — selected/active rows (fills the gap to --ink-card) */
  --text-1: #1c1b19;
  --text-2: #6c6a64;
  --text-3: #9d9a92;
  --line: rgba(22, 20, 14, 0.07);
  --line-2: rgba(22, 20, 14, 0.32);

  /* ---- tweakable shell vars (overridden inline by App) ---- */
  --card-radius: 26px;
  --card-radius-sm: 18px;
  --card-bg: linear-gradient(165deg, #f7f3ea 0%, #efe9da 100%);
  --track-bg: #ece9e0;
  --card-shadow: 0 10px 30px rgba(60, 52, 24, 0.10);
  --card-border: 1px solid rgba(40, 34, 16, 0.08);
  --page-bg:
    radial-gradient(120% 90% at 88% -10%, rgba(255, 199, 11, 0.16) 0%, rgba(255,199,11,0) 46%),
    radial-gradient(90% 80% at 100% 110%, rgba(255, 217, 88, 0.12) 0%, rgba(255,217,88,0) 50%),
    linear-gradient(135deg, #e6e2d6 0%, #e9e1cd 55%, #ede0bf 100%);
  --gap: 16px;
  --pad: 22px;

  font-family: var(--font-ui);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* density variants */
.flow-app[data-density="compact"] { --gap: 13px; --pad: 17px; }
.flow-app[data-density="comfy"]   { --gap: 24px; --pad: 28px; }

/* =====================================================================
 * App frame
 * ===================================================================== */
.flow-shell {
  display: flex;
  min-height: 100vh;
  background: var(--page-bg);
  background-attachment: fixed;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 246px;
  flex-shrink: 0;
  background: #111110;
  color: #e9e8e5;
  padding: 22px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar::-webkit-scrollbar { width: 0; }

.sb-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 20px;
}
.sb-logo img { height: 22px; width: auto; }

.sb-section {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a6862;
  padding: 16px 12px 7px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #b9b7b1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  position: relative;
  text-decoration: none;
}
.sb-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }
.sb-item:hover { background: rgba(255,255,255,0.05); color: #f4f3f0; }
.sb-item.active {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 199, 11, 0.22);
}
.sb-item.active svg { stroke-width: 2.1; }
.sb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-left: auto;
}
.sb-item.active .sb-dot { background: var(--accent-ink); }

.sb-spacer { flex: 1; }
.sb-version { margin-top: 18px; padding: 14px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5a5852; font-weight: 600; }
.sb-help {
  margin-top: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
  font-size: 12px;
  color: #9b9992;
}
.sb-help b { color: #f2f1ee; font-weight: 600; }

/* ---------- Main column ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(233,228,216,0.9), rgba(233,228,216,0.45));
  border-bottom: 1px solid rgba(22,20,14,0.05);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: var(--card-border);
  box-shadow: 0 2px 8px rgba(48,44,22,0.05);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  white-space: nowrap;
}
.chip .muted { color: var(--text-3); font-weight: 500; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.chip svg { width: 15px; height: 15px; color: var(--text-2); }
.chip-tag {
  background: #111110; color: #fff; border-color: transparent;
}
.chip-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); }
.chip-tag .x { color: #8a8884; }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: var(--card-border);
  box-shadow: 0 2px 8px rgba(48,44,22,0.05);
  cursor: pointer;
  position: relative;
}
.icon-btn svg { width: 18px; height: 18px; color: var(--text-1); }
.icon-btn .badge {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--risk); border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 3px 12px 3px 4px;
  border-radius: var(--r-full);
  background: var(--surface); border: var(--card-border);
  box-shadow: 0 2px 8px rgba(48,44,22,0.05);
  cursor: pointer;
}
.user-chip .ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.user-chip .nm { font-size: 12.5px; font-weight: 600; line-height: 1.15; }
.user-chip .rl { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* ---------- Content scroll ---------- */
.content {
  padding: 26px 30px 60px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- Greeting ---------- */
.greet {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}
.greet h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-1);
}
.greet h1 em { font-style: italic; color: var(--accent); }
.greet .sub { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.greet-meta { display: flex; gap: 10px; align-items: center; }

/* =====================================================================
 * Generic card
 * ===================================================================== */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--pad);
  position: relative;
}
.card.dark {
  background: linear-gradient(165deg, var(--ink-card-2), var(--ink-card));
  border-color: rgba(255,255,255,0.06);
  color: #f1efe9;
  /* Card escuro dentro do tema claro: vira TODO o ladder (texto, linha e
     superfície) para o equivalente escuro, para que qualquer var(--text-*) /
     var(--surface-*) inline renderize legível (sub-caixas escuras + texto claro). */
  --text-1: #f2f0ea;
  --text-2: #a9a69d;
  --text-3: #76736b;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --surface: #1f1e1a;
  --surface-2: #232220;
}
.card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.card-title {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.card.dark .card-title { color: #8c8a83; }
.card-title-lg {
  font-family: var(--font-display); font-weight: 600;
  font-size: 21px; letter-spacing: -0.01em; color: var(--text-1);
  text-transform: none;
}
.card.dark .card-title-lg { color: #f4f2ec; }
.head-spacer { flex: 1; }

.chip-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-ghost);
}
.chip-icon svg { width: 18px; height: 18px; color: var(--accent-ink); }
.chip-icon.soft-green { background: var(--pos-soft); }
.chip-icon.soft-green svg { color: var(--pos); }
.chip-icon.soft-warn { background: var(--warn-soft); }
.chip-icon.soft-warn svg { color: var(--warn); }
.chip-icon.soft-risk { background: var(--risk-soft); }
.chip-icon.soft-risk svg { color: var(--risk); }
.chip-icon.dark { background: rgba(255,255,255,0.07); }
.chip-icon.dark svg { color: var(--accent); }
.chip-icon.brand { background: #ffffff; box-shadow: 0 2px 8px rgba(48,44,22,0.10); }

.expand-btn {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); border: var(--card-border);
  cursor: pointer; color: var(--text-2);
}
.card.dark .expand-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: #d6d4cd; }
.expand-btn svg { width: 15px; height: 15px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--gap); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid { grid-template-columns: repeat(3, 1fr); }
.g3-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g2-1 { grid-template-columns: 2fr 1fr; }
.g1-1 { grid-template-columns: 1fr 1fr; }
.g-led { grid-template-columns: 1.55fr 1fr; }

/* ---------- Nina banner ---------- */
.nina {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(100deg, #fff7df 0%, #fffdf6 60%);
  border: 1px solid rgba(255,199,11,0.32);
  border-radius: var(--card-radius);
  padding: 16px 22px;
  box-shadow: var(--card-shadow);
}
.nina .nina-ic {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
}
.nina .nina-ic svg { width: 22px; height: 22px; }
.nina p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.nina p b { color: var(--text-1); font-weight: 600; }
.nina p .y { color: #b07d00; font-weight: 600; }
.nina .pct {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--font-display); font-size: 34px; color: var(--accent);
  font-weight: 400;
}

/* ---------- Hero KPI ---------- */
.hero-kpi { display: flex; align-items: center; gap: 26px; padding: 26px 30px; }
.hero-kpi .lead { flex: 1; }
.hero-kpi .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #b9b6ae; font-weight: 600; margin-bottom: 14px;
}
.hero-kpi .eyebrow .ic { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,0.07); display:grid; place-items:center; }
.hero-kpi .eyebrow .ic svg { width: 15px; height: 15px; color: var(--accent); }
.hero-kpi .nums { display: flex; align-items: baseline; gap: 14px; }
.hero-kpi .big {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(46px, 6vw, 78px); line-height: 0.9; color: var(--accent);
  letter-spacing: -0.02em;
}
.hero-kpi .of { font-family: var(--font-display); font-weight: 600; font-size: 34px; color: #6f6d66; }
.hero-kpi .conv { margin-top: 12px; font-size: 13.5px; color: #b9b6ae; }
.hero-kpi .conv b { color: #f1efe9; }
.hero-kpi .reach {
  flex-shrink: 0; text-align: right;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); border-radius: 18px; padding: 18px 22px; min-width: 190px;
}
.hero-kpi .reach .rl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .7; }
.hero-kpi .reach .rn { font-family: var(--font-display); font-weight: 600; font-size: 40px; line-height: 1; margin: 4px 0 2px; }
.hero-kpi .reach .rs { font-size: 11.5px; font-weight: 600; }

/* ---------- Stat (mini KPI) ---------- */
.stat .stat-top { display: flex; align-items: flex-start; }
.stat .label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
/* Numero/KPI generico (display Apron, peso 600). Sem tamanho/margem proprios:
   o componente controla font-size. .stat .value (abaixo) e mais especifico e
   mantem o layout do card de estatistica. */
.value { font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text-1); }
.stat .value { font-family: var(--font-display); font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -0.02em; margin: 10px 0 5px; }
.stat .value.green { color: var(--text-1); }
.stat .value.warn { color: var(--warn); }
.stat .foot { font-size: 12px; color: var(--text-2); }
.stat .foot .pos { color: var(--pos); font-weight: 600; }
.stat .foot .warn { color: var(--warn); font-weight: 600; }
.online-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); padding: 3px 9px; border-radius: var(--r-full); margin-top: 8px;
}
.online-pill .d { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* ---------- Funnel ---------- */
.funnel { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 4px; }
.funnel .seg {
  width: 100%; text-align: center; color: #fff;
  padding: 14px 10px; position: relative;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}
.funnel .seg .sl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.funnel .seg .sv { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.05; }
.funnel .seg .sp { font-size: 11px; opacity: .85; }
.funnel .s1 { background: linear-gradient(180deg, #4a4843, #35332f); width: 100%; }
.funnel .s2 { background: linear-gradient(180deg, #3a3834, #2a2825); width: 84%; }
.funnel .s3 { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); width: 68%; }
.funnel .s3 .sl { opacity: .65; }

/* ---------- Progress / confirmados ---------- */
.confetti-card { overflow: hidden; }
.conf-row { display: flex; gap: 26px; }
.conf-block .ct { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; line-height: 1.3; max-width: 110px; }
.conf-block .cv { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1; margin-top: 8px; }
.conf-block .cv.green { color: var(--text-1); }
.conf-block .cs { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.meta-bar-wrap { margin-top: 20px; }
.meta-bar-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.meta-bar-head b { color: var(--text-1); }
.meta-bar { height: 12px; border-radius: var(--r-full); background: var(--track-bg); overflow: hidden; }
.meta-bar > span { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, #1b1a17, #3a3834); }
.meta-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); padding-top: 12px; border-top: 1px dashed var(--line-2); }

/* ---------- Leader ---------- */
.leader {
  display: flex; align-items: center; gap: 20px;
  background:
    radial-gradient(120% 200% at 0% 50%, rgba(255,199,11,0.14), rgba(255,199,11,0) 55%),
    var(--surface);
  border: 1px solid rgba(255,199,11,0.3);
}
.leader .lava { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); flex-shrink: 0; }
.leader .ltag { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); font-weight: 700; }
.leader .lname { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.05; margin: 3px 0; letter-spacing: -0.01em; }
.leader .lquote { font-size: 13px; font-style: italic; color: var(--text-2); }
.leader .lnum { margin-left: auto; text-align: right; flex-shrink: 0; }
.leader .lnum .n { font-family: var(--font-display); font-weight: 600; font-size: 56px; line-height: 0.9; color: var(--accent); }
.leader .lnum .l { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }

/* ---------- Ranking list ---------- */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .pos { width: 22px; font-size: 12px; font-weight: 700; color: var(--text-3); text-align: center; }
.rank-row .pava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.rank-row .pnm { font-size: 12.5px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .pbar { width: 90px; height: 6px; border-radius: var(--r-full); background: var(--track-bg); overflow: hidden; }
.rank-row .pbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: var(--r-full); }
.rank-row .pv { width: 38px; text-align: right; font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.kv-pair { display: flex; gap: 14px; }
.kv-pair .kv { text-align: center; }
.kv-pair .kv .k { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.kv-pair .kv .v { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--accent-ink); }

/* ---------- Risk list ---------- */
.risk-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.risk-tab { flex: 1; border-radius: 14px; padding: 10px; text-align: center; border: 1px solid var(--line); }
.risk-tab.on { background: var(--risk-soft); border-color: rgba(240,84,92,0.3); }
.risk-tab .rn { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; }
.risk-tab.on .rn { color: var(--risk); }
.risk-tab .rl { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-top: 3px; }
.risk-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.risk-row:last-child { border-bottom: 0; }
.risk-row .rava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.risk-row .rinfo { flex: 1; min-width: 0; }
.risk-row .rnm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-row .rsub { font-size: 11px; color: var(--text-3); }
.badge-soft { font-size: 10px; font-weight: 600; padding: 4px 9px; border-radius: var(--r-full); white-space: nowrap; }
.badge-risk { background: var(--risk-soft); color: var(--risk); }
.badge-pos { background: var(--pos-soft); color: var(--pos); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Buttons ---------- */
.btn { font-family: var(--font-ui); font-weight: 600; font-size: 12.5px; border-radius: var(--r-full); padding: 10px 18px; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px; }
.btn svg { width: 15px; height: 15px; }
.btn-dark { background: #161513; color: #fff; }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(255,199,11,0.22); }
.flow-app[data-theme="dark"] .btn-dark { background: #2a2824; }
.btn-risk { background: var(--risk); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--text-1); border: var(--card-border); }

/* ---------- Charts ---------- */
.chart-legend { display: flex; gap: 16px; align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.lg .sw { width: 10px; height: 10px; border-radius: 3px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-col .bw { width: 100%; max-width: 46px; display: flex; align-items: flex-end; flex: 1; }
.bar-col .b { width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); position: relative; transition: filter .15s ease; }
.bar-col .b.peak { background: linear-gradient(180deg, #161513, #2a2825); }
.bar-col:hover .b { filter: brightness(1.05); }
.bar-col .bv { font-size: 10.5px; font-weight: 700; color: var(--text-2); }
.bar-col .bl { font-size: 11px; color: var(--text-3); }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.dl-row .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dl-row .nm { color: var(--text-2); flex: 1; }
.dl-row .vl { font-weight: 700; color: var(--text-1); }
.dl-row .pc { color: var(--text-3); width: 38px; text-align: right; }

.spark-wrap { position: relative; }
.spark-pill { position: absolute; top: 0; right: 0; display: flex; gap: 4px; background: var(--surface-2); border-radius: var(--r-full); padding: 4px; border: var(--card-border); }
.spark-pill button { border: none; background: transparent; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 4px 12px; border-radius: var(--r-full); cursor: pointer; }
.spark-pill button.on { background: #161513; color: #fff; }

/* ---------- misc ---------- */
.muted { color: var(--text-3); }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap8 { gap: 8px; }
.subtle-note { font-size: 12px; color: var(--text-2); margin-top: -8px; }

/* =====================================================================
 * DARK MODE — yellow-on-black, the SMV-native palette
 * ===================================================================== */
.flow-app[data-theme="dark"] {
  --surface: #1b1a17;
  --surface-2: #232220;
  --text-1: #f2f0ea;
  --text-2: #a9a69d;
  --text-3: #76736b;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --card-bg: linear-gradient(168deg, #1f1e1a 0%, #171612 100%);
  --track-bg: rgba(255,255,255,0.10);
  --pos-soft: rgba(21,167,92,0.16);
  --warn-soft: rgba(239,140,26,0.16);
  --risk-soft: rgba(240,84,92,0.18);
}
.flow-app[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(18,17,14,0.88), rgba(18,17,14,0.42));
  border-bottom-color: rgba(255,255,255,0.06);
}
.flow-app[data-theme="dark"] .nina {
  background: linear-gradient(100deg, rgba(255,199,11,0.10) 0%, rgba(255,255,255,0.02) 60%);
  border-color: rgba(255,199,11,0.24);
}
.flow-app[data-theme="dark"] .nina p { color: var(--text-2); }
.flow-app[data-theme="dark"] .leader {
  background:
    radial-gradient(120% 200% at 0% 50%, rgba(255,199,11,0.16), rgba(255,199,11,0) 55%),
    var(--surface);
  border-color: rgba(255,199,11,0.3);
}
.flow-app[data-theme="dark"] .meta-bar > span { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.flow-app[data-theme="dark"] .bar-col .b.peak { background: linear-gradient(180deg, #fbf8f0, #d6d2c6); }
.flow-app[data-theme="dark"] .funnel .s1 { background: linear-gradient(180deg, #3c3a35, #2c2a26); }
.flow-app[data-theme="dark"] .funnel .s2 { background: linear-gradient(180deg, #322f2b, #262420); }
.flow-app[data-theme="dark"] .spark-pill button.on { background: var(--accent); color: var(--accent-ink); }
.flow-app[data-theme="dark"] .risk-tab.on { background: rgba(240,84,92,0.16); border-color: rgba(240,84,92,0.35); }
.flow-app[data-theme="dark"] .icon-btn .badge { border-color: var(--surface); }
.flow-app[data-theme="dark"] .chip-tag { background: #000; }
.flow-app[data-theme="dark"] .kv-pair .kv .v { color: var(--text-1); }
.flow-app[data-theme="dark"] .meta-line { border-top-color: var(--line-2); }
.flow-app[data-theme="dark"] .btn-dark { background: #2a2824; }
.flow-app[data-theme="dark"] .expand-btn { background: var(--surface-2); }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .g2-1, .g1-1, .g-led { grid-template-columns: 1fr; }
  .hero-kpi { flex-direction: column; align-items: flex-start; }
  .hero-kpi .reach { align-self: stretch; text-align: left; }
}

@media (max-width: 760px) {
  .content { padding: 18px 15px 48px; gap: 13px; }
  .topbar { padding: 12px 15px; }
  .user-chip .nm, .user-chip .rl { display: none; }
  .user-chip { padding: 3px; }
  .greet { flex-direction: column; align-items: flex-start; gap: 12px; }
  .greet-meta { width: 100%; }
  .nina { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .nina .pct { margin-left: auto; }
  .leader { flex-wrap: wrap; }
  .leader .lnum { margin-left: auto; }
  .conf-row { gap: 16px; }
}

@media (max-width: 560px) {
  .kpi-grid, .g4, .g3, .g3-auto { grid-template-columns: 1fr; }
  /* compact horizontal KPI cards — removes empty vertical space on phones */
  .stat { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: center; padding: 15px 18px; }
  .stat .chip-icon { display: none; }
  .stat .stat-top { grid-column: 1; grid-row: 1; }
  .stat .value { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; font-size: 32px; }
  .stat .foot { grid-column: 1; grid-row: 2; }
  .stat .online-pill { grid-column: 1; grid-row: 2; margin-top: 4px; }
  .hero-kpi { padding: 22px; }
  .hero-kpi .big { font-size: 52px; }
}


/* ==========================================================================
 * PATTERN — confirmation & action modals
 * Overlay, modal-card, icons, summary blocks, footer buttons.
 * ========================================================================== */

/* FLOW v2 — confirmation modals */

.modal-page {
  min-height: 100vh;
  background: var(--page-bg);
  background-attachment: fixed;
  padding: 40px 48px 80px;
}
.modal-page .page-head { max-width: 1240px; margin: 0 auto 30px; }
.modal-page h1 {
  font-family: var(--font-display); font-weight: 400; font-size: 40px;
  letter-spacing: -0.02em; margin: 0; color: var(--text-1);
}
.modal-page h1 em { font-style: italic; color: var(--accent); }
.modal-page .lead { font-size: 15px; color: var(--text-2); margin-top: 8px; max-width: 640px; }

.trigger-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.trigger {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(165deg, #f7f3ea, #efe9da);
  border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: var(--r-full); padding: 10px 18px;
  font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--text-1);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.trigger:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(60,52,24,0.12); }
.trigger .tdot { width: 8px; height: 8px; border-radius: 50%; }

/* gallery */
.gallery { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.frame { }
.frame-label { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.frame-label .nm { font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; color: var(--text-1); }
.frame-label .tg { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); }
.tg-risk { background: var(--risk-soft); color: var(--risk); }
.tg-pos { background: var(--pos-soft); color: var(--pos); }
.tg-warn { background: var(--warn-soft); color: var(--warn); }
.tg-accent { background: var(--accent-ghost); color: #9a7400; }
.tg-info { background: #e7ebfd; color: #4a57c4; }

.stage {
  position: relative; border-radius: 28px; overflow: hidden;
  display: grid; place-items: center; padding: 34px 24px;
  background:
    repeating-linear-gradient(135deg, rgba(22,20,14,0.05) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, #2b2926, #181714);
}

/* ===== modal card ===== */
.modal-card {
  width: 430px; max-width: 100%;
  background: linear-gradient(168deg, #faf6ee 0%, #f2ecdf 100%);
  border: 1px solid rgba(40,34,16,0.08);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(12,11,8,0.45), 0 2px 0 rgba(255,255,255,0.5) inset;
  padding: 28px;
  position: relative;
  text-align: left;
}
.modal-x {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(40,34,16,0.05); border: none; color: var(--text-2);
  transition: background .15s ease;
}
.modal-x:hover { background: rgba(40,34,16,0.1); }
.modal-x svg { width: 16px; height: 16px; }

.modal-icon {
  width: 56px; height: 56px; border-radius: 17px;
  display: grid; place-items: center; margin-bottom: 18px;
}
.modal-icon svg { width: 27px; height: 27px; }
.mi-risk { background: var(--risk-soft); color: var(--risk); box-shadow: 0 0 0 6px rgba(240,84,92,0.08); }
.mi-pos { background: var(--pos-soft); color: var(--pos); box-shadow: 0 0 0 6px rgba(21,167,92,0.08); }
.mi-warn { background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 6px rgba(239,140,26,0.08); }
.mi-accent { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: 0 0 0 6px rgba(255,199,11,0.12); }
.mi-info { background: #e7ebfd; color: #4a57c4; box-shadow: 0 0 0 6px rgba(74,87,196,0.08); }

.modal-title {
  font-family: var(--font-display); font-weight: 400; font-size: 25px;
  line-height: 1.12; letter-spacing: -0.01em; color: var(--text-1); margin: 0 0 9px;
}
.modal-body { font-family: var(--font-ui); font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0; }
.modal-body b { color: var(--text-1); font-weight: 600; }
.modal-body .y { color: #9a7400; font-weight: 600; }

/* summary / context blocks */
.modal-summary {
  margin-top: 18px; background: rgba(40,34,16,0.04);
  border: 1px solid rgba(40,34,16,0.06); border-radius: 16px; padding: 6px 16px;
}
.ms-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(40,34,16,0.07); }
.ms-row:last-child { border-bottom: 0; }
.ms-row .k { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 9px; }
.ms-row .k svg { width: 16px; height: 16px; color: var(--text-3); }
.ms-row .v { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.ms-row .v.big { font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.ms-row .v.green { color: var(--pos); }

.modal-person { display: flex; align-items: center; gap: 12px; margin-top: 18px; background: rgba(40,34,16,0.04); border-radius: 14px; padding: 12px 14px; }
.modal-person .pn { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.modal-person .ps { font-size: 12px; color: var(--text-3); }

.modal-stat { margin-top: 18px; text-align: center; background: var(--warn-soft); border: 1px solid rgba(239,140,26,0.22); border-radius: 18px; padding: 16px; }
.modal-stat .sn { font-family: var(--font-display); font-size: 38px; line-height: 1; color: var(--warn); }
.modal-stat .sl { font-size: 12px; color: #a86a18; font-weight: 600; margin-top: 4px; }

.modal-note { display: flex; gap: 10px; margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.modal-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--warn); }

/* turno picker */
.turno-label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 20px 0 9px; }
.turno-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.turno {
  border: 1.5px solid rgba(40,34,16,0.12); border-radius: 13px; padding: 11px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
  background: transparent; transition: all .14s ease; font-family: var(--font-ui);
}
.turno svg { width: 18px; height: 18px; color: var(--text-2); }
.turno .tl { font-size: 12px; font-weight: 600; color: var(--text-1); }
.turno.on { border-color: var(--accent); background: var(--accent-ghost); }
.turno.on svg { color: #9a7400; }
.modal-input { width: 100%; margin-top: 16px; border: 1.5px solid rgba(40,34,16,0.14); border-radius: 13px; padding: 12px 14px; font-family: var(--font-ui); font-size: 14px; color: var(--text-1); background: rgba(255,255,255,0.5); box-sizing: border-box; outline: none; }
.modal-input:focus { border-color: var(--accent); }
.modal-input::placeholder { color: var(--text-3); }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.field-hint code { font-family: var(--font-mono, monospace); color: var(--risk); font-weight: 700; background: var(--risk-soft); padding: 1px 6px; border-radius: 5px; }

/* footer buttons */
.modal-footer { display: flex; gap: 11px; margin-top: 24px; }
.mbtn { flex: 1; font-family: var(--font-ui); font-weight: 600; font-size: 14px; border: none; border-radius: 14px; padding: 13px 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s ease, background .15s ease; }
.mbtn svg { width: 16px; height: 16px; }
.mbtn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.mbtn-primary:hover { filter: brightness(1.04); }
.mbtn-risk { background: var(--risk); color: #fff; }
.mbtn-risk:hover { filter: brightness(1.05); }
.mbtn-pos { background: var(--pos); color: #fff; }
.mbtn-pos:hover { filter: brightness(1.05); }
.mbtn-ghost { background: transparent; border: 1.5px solid rgba(40,34,16,0.14); color: var(--text-1); }
.mbtn-ghost:hover { background: rgba(40,34,16,0.05); }
.mbtn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* live overlay */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: rgba(16,15,12,0.55); backdrop-filter: blur(7px); animation: ov-in .18s ease; }
.overlay .modal-card { animation: card-in .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr; }
  .modal-page { padding: 28px 18px 60px; }
}


/* ==========================================================================
 * PATTERN — forms, chips, tables, KPIs (Check-in module)
 * Reusable: ci-input, ci-chip, ci-select, ci-table, lv-* sale modal, range pills.
 * ========================================================================== */

/* FLOW v2 — Check-in module styles (built on styles.css tokens) */

/* ---------- page header + tabs ---------- */
.ci-page { display: flex; flex-direction: column; gap: var(--gap); }
.ci-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ci-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 3.2vw, 40px); line-height: 1; letter-spacing: -0.02em; margin: 0; color: var(--text-1);
}
.ci-head .sub { font-size: 13px; color: var(--text-2); margin-top: 7px; letter-spacing: .02em; }
.ci-head .sub b { color: var(--text-1); font-weight: 600; }
.ci-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ci-tabset { display: inline-flex; gap: 4px; background: var(--surface); border: var(--card-border); border-radius: var(--r-full); padding: 4px; box-shadow: var(--card-shadow); }
.ci-tab {
  display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 12.5px; color: var(--text-2);
  padding: 9px 15px; border-radius: var(--r-full); background: transparent; transition: all .15s ease;
}
.ci-tab svg { width: 15px; height: 15px; }
.ci-tab:hover { color: var(--text-1); }
.ci-tab.on { background: #161513; color: #fff; }
.flow-app[data-theme="dark"] .ci-tab.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- search ---------- */
.ci-search-card { padding: 20px 22px; }
.ci-search-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 11px; }
.ci-search-row { display: flex; gap: 10px; }
.ci-search { flex: 1; position: relative; }
.ci-search > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); }
.ci-search input {
  width: 100%; height: 52px; border-radius: 15px; border: 1.5px solid var(--line-2);
  background: var(--surface-2); padding: 0 16px 0 46px; font-family: var(--font-ui); font-size: 15px;
  color: var(--text-1); outline: none; transition: border-color .15s ease;
}
.ci-search input:focus { border-color: var(--accent); }
.ci-search input::placeholder { color: var(--text-3); }

/* Generic form input/textarea (documented in DESIGN_SYSTEM.md §6).
   No fixed height: sizing comes from Tailwind padding utilities on the element. */
.ci-input {
  width: 100%; border-radius: 14px; border: 1.5px solid var(--line-2);
  background: var(--surface-2); font-family: var(--font-ui); font-size: 14px;
  color: var(--text-1); outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.ci-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ghost); }
.ci-input::placeholder { color: var(--text-3); }
.ci-input:disabled { opacity: .6; cursor: not-allowed; }
textarea.ci-input { min-height: 88px; padding: 12px 14px; resize: vertical; }
.ci-qr { width: 52px; height: 52px; flex-shrink: 0; border-radius: 15px; background: #161513; color: #fff; border: none; display: grid; place-items: center; cursor: pointer; }
.ci-qr svg { width: 22px; height: 22px; }
.flow-app[data-theme="dark"] .ci-qr { background: var(--accent); color: var(--accent-ink); }

/* ---------- today's list ---------- */
.ci-section-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.ci-section-head .t { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ci-section-head .n { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--accent); }
.ci-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; }
.ci-empty .ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-ghost); color: #9a7400; }
.ci-empty .ic svg { width: 28px; height: 28px; }
.ci-empty p { margin: 0; font-size: 14px; color: var(--text-2); font-weight: 500; }

/* ---------- lead result + form ---------- */
.ci-lead { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px dashed var(--line-2); margin-bottom: 20px; }
.ci-lead .nm { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1; color: var(--text-1); }
.ci-lead .ph { font-size: 13.5px; color: var(--text-2); margin: 5px 0 10px; }
.ci-lead .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.ci-tagpill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px; border-radius: var(--r-full); }
.ci-tagpill.ok { background: var(--accent-ghost); color: #9a7400; }
.ci-tagpill.v { background: rgba(40,34,16,0.06); color: var(--text-2); }
.flow-app[data-theme="dark"] .ci-tagpill.v { background: rgba(255,255,255,0.08); color: var(--text-2); }
.ci-lead .visit { margin-left: auto; text-align: right; flex-shrink: 0; }
.ci-lead .visit .vn { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; color: var(--accent); }
.ci-lead .visit .vl { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-top: 4px; }

.ci-flabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.ci-flabel:first-child { margin-top: 0; }
.ci-flabel .req { color: var(--risk); font-weight: 700; }
.ci-flabel .opt { color: var(--text-3); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; }

.ci-select {
  width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2);
  background: var(--surface-2); padding: 0 14px; display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-3); cursor: pointer; transition: border-color .15s ease;
}
.ci-select.req-empty { border-color: rgba(240,84,92,0.5); background: rgba(240,84,92,0.04); }
.ci-select.filled { color: var(--text-1); border-color: var(--accent); background: var(--accent-ghost); }
.ci-select svg.lead-ic { width: 17px; height: 17px; color: var(--text-3); }
.ci-select .chev { margin-left: auto; width: 16px; height: 16px; color: var(--text-3); }

.ci-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface-2); border-radius: 12px;
  padding: 9px 14px; font-family: var(--font-ui); font-weight: 600; font-size: 12px; color: var(--text-2);
  transition: all .14s ease;
}
.ci-chip svg { width: 15px; height: 15px; color: var(--text-3); }
.ci-chip:hover { border-color: var(--line-strong, rgba(40,34,16,0.25)); color: var(--text-1); }
.ci-chip.on { border-color: var(--accent); background: var(--accent-ghost); color: var(--text-1); }
.ci-chip.on svg { color: #9a7400; }
.flow-app[data-theme="dark"] .ci-chip.on svg { color: var(--accent); }

.ci-veh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ci-veh {
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface-2); border-radius: 14px; padding: 16px;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--text-1); transition: all .14s ease;
}
.ci-veh svg { width: 18px; height: 18px; color: var(--text-2); }
.ci-veh:hover { border-color: var(--accent); }
.ci-veh.on { border-color: var(--accent); background: var(--accent-ghost); }
.ci-veh.on svg { color: #9a7400; }

.ci-confirm {
  width: 100%; margin-top: 22px; height: 56px; border: none; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink);
  font-family: var(--font-ui); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(255,199,11,0.28); transition: filter .15s ease;
}
.ci-confirm:hover { filter: brightness(1.04); }
.ci-confirm svg { width: 18px; height: 18px; }

/* ---------- dashboard: KPI tiles ---------- */
.ci-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.ci-cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
.ci-kpi { padding: 18px 20px; }
.ci-kpi .top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ci-kpi .lbl { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ci-kpi .val { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1; color: var(--text-1); letter-spacing: -0.02em; }
.ci-cat { padding: 16px 18px; }
.ci-cat .lbl { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ci-cat .val { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; margin-top: 8px; color: var(--text-1); }
.ci-cat.zero .val { color: var(--text-3); }

/* receita banner (dark, DS-native) */
.ci-receita {
  display: flex; align-items: center; gap: 20px; padding: 22px 28px; overflow: hidden;
  background: linear-gradient(120deg, #1b1a17 0%, #131210 100%);
  border: 1px solid rgba(255,199,11,0.18); color: #f1efe9;
}
.ci-receita .ric { width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.ci-receita .ric svg { width: 26px; height: 26px; }
.ci-receita .rl { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #b9b6ae; font-weight: 700; }
.ci-receita .rv { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1; color: var(--accent); letter-spacing: -0.01em; margin-top: 5px; }
.ci-receita .deco { margin-left: auto; opacity: .12; flex-shrink: 0; }
.ci-receita .deco svg { width: 90px; height: 90px; color: var(--accent); }

/* conversão dark card */
.ci-conv { display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.ci-conv .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.ci-conv .eyebrow .d { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ci-conv .sub { font-size: 12px; color: #8c8a83; margin-top: 4px; }
.ci-conv .big { font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 6vw, 64px); line-height: 0.95; color: #f1efe9; margin: 18px 0; letter-spacing: -0.02em; }
.ci-conv .foot { display: flex; gap: 28px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; }
.ci-conv .foot .k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #76736b; font-weight: 600; }
.ci-conv .foot .v { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #f1efe9; margin-top: 2px; }

/* seller / vehicle / media lists */
.ci-list-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-list-row:last-child { border-bottom: 0; }
/* Linha selecionável (ex.: escolher número no TURBO) — estado escolhido com
   gradiente sutil do accent + anel, sem deslocar o conteúdo dos vizinhos. */
.ci-list-row.on { background: linear-gradient(135deg, var(--accent-ghost) 0%, rgba(255, 217, 88, 0.05) 100%); border-radius: var(--r-md); border-bottom-color: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); padding: 12px; margin: 0 -12px; transition: background .15s ease, box-shadow .15s ease; }
.ci-rank { position: relative; flex-shrink: 0; }
.ci-rank .badge-n { position: absolute; bottom: -3px; right: -3px; width: 17px; height: 17px; border-radius: 50%; background: #161513; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.ci-rank.top1 .badge-n { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.ci-list-row .info { flex: 1; min-width: 0; }
.ci-list-row .nm { font-size: 12.5px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-list-row .pbar { height: 6px; border-radius: var(--r-full); background: var(--track-bg); overflow: hidden; margin-top: 6px; }
.ci-list-row .pbar > span { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.ci-list-row .price { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.ci-list-row .cnt { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--text-1); flex-shrink: 0; }
.ci-list-row .chev { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.ci-veh-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--accent-ghost); display: grid; place-items: center; flex-shrink: 0; color: #9a7400; }
.flow-app[data-theme="dark"] .ci-veh-ic { color: var(--accent); }
.ci-veh-ic svg { width: 18px; height: 18px; }

.ci-att-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ci-att-row:last-child { border-bottom: 0; }
.ci-att-row .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ci-att-row .who .nm { font-size: 12px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-att-row .who .pbar { width: 120px; height: 5px; border-radius: var(--r-full); background: var(--track-bg); overflow: hidden; margin-top: 5px; }
.ci-att-row .who .pbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: var(--r-full); }
.ci-att-row .col { text-align: center; min-width: 42px; }
.ci-att-row .col .v { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-1); }
.ci-att-row .col .v.muted { color: var(--text-3); }
.ci-att-row .col .cv { font-size: 12px; font-weight: 700; }
.ci-att-head { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; padding-bottom: 8px; border-bottom: 1.5px solid var(--line-2); }
.ci-att-head .h { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 700; text-align: center; min-width: 42px; }
.ci-att-head .h:first-child { text-align: left; }

.ci-media-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ci-media-row:last-child { border-bottom: 0; }
.ci-media-row .mic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.ci-media-row .mic svg { width: 18px; height: 18px; }
.ci-media-row .body { flex: 1; min-width: 0; }
.ci-media-row .nm { font-size: 12.5px; font-weight: 600; color: var(--text-1); }
.ci-media-row .pbar { height: 7px; border-radius: var(--r-full); background: var(--track-bg); overflow: hidden; margin-top: 7px; }
.ci-media-row .pbar > span { display: block; height: 100%; border-radius: var(--r-full); }
.ci-media-row .cnt { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--text-1); flex-shrink: 0; }

/* date range pills */
.ci-range { display: inline-flex; gap: 4px; background: var(--surface); border: var(--card-border); border-radius: var(--r-full); padding: 4px; box-shadow: var(--card-shadow); }
.ci-range button { border: none; background: transparent; font-family: var(--font-ui); font-weight: 600; font-size: 11.5px; color: var(--text-2); padding: 7px 14px; border-radius: var(--r-full); cursor: pointer; letter-spacing: .04em; }
.ci-range button.on { background: #161513; color: #fff; }
.flow-app[data-theme="dark"] .ci-range button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- table (Lista / Excel) ---------- */
.ci-table-card { padding: 0; overflow: hidden; }
.ci-table-top { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ci-table-search { flex: 1; min-width: 200px; position: relative; }
.ci-table-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.ci-table-search input { width: 100%; height: 42px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 14px 0 38px; font-family: var(--font-ui); font-size: 13.5px; color: var(--text-1); outline: none; }
.ci-table-search input:focus { border-color: var(--accent); }
.ci-minisel { height: 42px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-1); cursor: pointer; }
.ci-minisel .mut { color: var(--text-3); font-weight: 500; }
.ci-minisel svg { width: 14px; height: 14px; color: var(--text-3); }
.ci-table-wrap { overflow-x: auto; }
.ci-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.ci-table thead th { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 700; text-align: left; padding: 12px 16px; background: var(--surface-2); position: sticky; top: 0; }
.ci-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-1); vertical-align: middle; }
.ci-table tbody tr:hover { background: var(--accent-ghost); }
.ci-table tbody tr.sold { background: rgba(255,199,11,0.05); }
.ci-table .td-date { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.ci-table .td-lead { font-weight: 700; }
.ci-table .td-phone { color: var(--text-2); white-space: nowrap; }
.ci-table .td-seller { color: var(--text-2); }
.ci-status { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r-full); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.ci-status.vendeu { background: #161513; color: var(--accent); }
.flow-app[data-theme="dark"] .ci-status.vendeu { background: var(--accent); color: var(--accent-ink); }
.ci-status.loja { background: var(--accent-ghost); color: #9a7400; }
.flow-app[data-theme="dark"] .ci-status.loja { color: var(--accent); }
.ci-status.saiu { background: rgba(40,34,16,0.07); color: var(--text-3); }
.flow-app[data-theme="dark"] .ci-status.saiu { background: rgba(255,255,255,0.08); }
.ci-media-tag { font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 5px; background: rgba(40,34,16,0.05); color: var(--text-2); }
.flow-app[data-theme="dark"] .ci-media-tag { background: rgba(255,255,255,0.06); }
.ci-media-tag svg { width: 12px; height: 12px; }
.ci-rowbtn { font-family: var(--font-ui); font-weight: 600; font-size: 11.5px; border-radius: 10px; padding: 8px 13px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-1); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .14s ease; }
.ci-rowbtn:hover { border-color: var(--accent); background: var(--accent-ghost); }
.ci-rowbtn svg { width: 13px; height: 13px; }
.ci-rowbtn.edit { border-style: dashed; }
.ci-sale-val { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text-1); white-space: nowrap; }

@media (max-width: 1100px) {
  .ci-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ci-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .ci-head { flex-direction: column; }
  .ci-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .ci-veh-row { grid-template-columns: 1fr; }
}

/* =====================================================================
 * Lançar venda — modal (multi-step)
 * ===================================================================== */
.lv-modal { width: 480px; max-width: 100%; max-height: 88vh; overflow-y: auto; padding: 0; }
.lv-modal::-webkit-scrollbar { width: 8px; }
.lv-modal::-webkit-scrollbar-thumb { background: rgba(40,34,16,0.18); border-radius: 8px; }
.lv-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 22px 26px 18px; background: linear-gradient(180deg, #faf6ee, rgba(250,246,238,0.92)); border-bottom: 1px solid rgba(40,34,16,0.07); backdrop-filter: blur(6px); }
.lv-head .lv-ic { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.lv-head .lv-ic svg { width: 22px; height: 22px; }
.lv-head .eyebrow { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.lv-head .ttl { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.05; color: var(--text-1); margin-top: 2px; }
.lv-head .lv-x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(40,34,16,0.05); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.lv-head .lv-x:hover { background: rgba(40,34,16,0.1); }
.lv-head .lv-x svg { width: 16px; height: 16px; }
.lv-body { padding: 22px 26px 26px; }

.lv-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.lv-back { width: 34px; height: 34px; border-radius: 11px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.lv-back:hover { border-color: var(--accent); }
.lv-back svg { width: 16px; height: 16px; }
.lv-step-head .eyebrow { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.lv-step-head .ttl { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.05; color: var(--text-1); margin-top: 2px; }

.lv-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin: 18px 0 9px; display: flex; align-items: center; gap: 8px; }
.lv-label:first-child { margin-top: 0; }
.lv-label .req { color: var(--risk); font-weight: 700; }
.lv-label .opt { color: var(--text-3); font-weight: 500; text-transform: none; letter-spacing: 0; }
.lv-label .note { margin-left: auto; font-weight: 600; color: var(--text-2); text-transform: none; letter-spacing: 0; font-size: 11px; }
.lv-label .note b { color: var(--text-1); }

.lv-input { width: 100%; height: 50px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 15px; font-family: var(--font-ui); font-size: 14px; color: var(--text-1); outline: none; box-sizing: border-box; }
.lv-input:focus { border-color: var(--accent); }
.lv-input::placeholder { color: var(--text-3); }
.lv-input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }

/* type cards */
.lv-tipo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lv-tipo { border: 1.5px solid var(--line-2); background: var(--surface-2); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: all .14s ease; }
.lv-tipo .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-ghost); color: #9a7400; }
.flow-app[data-theme="dark"] .lv-tipo .ic { color: var(--accent); }
.lv-tipo .ic svg { width: 18px; height: 18px; }
.lv-tipo .nm { font-family: var(--font-ui); font-weight: 600; font-size: 11px; color: var(--text-1); text-align: center; line-height: 1.1; }
.lv-tipo:hover { border-color: var(--accent); }
.lv-tipo.on { border-color: var(--accent); background: var(--accent-ghost); box-shadow: 0 0 0 3px rgba(255,199,11,0.12); }

/* segmented */
.lv-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lv-seg button { border: 1.5px solid var(--line-2); background: var(--surface-2); border-radius: 12px; padding: 13px 8px; font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; color: var(--text-2); cursor: pointer; transition: all .14s ease; }
.lv-seg button:hover { color: var(--text-1); border-color: var(--accent); }
.lv-seg button.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; }

.lv-drop { width: 100%; height: 52px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 16px; display: flex; align-items: center; font-family: var(--font-ui); font-weight: 600; font-size: 15px; color: var(--text-1); cursor: pointer; }
.lv-drop.placeholder { color: var(--text-3); font-weight: 500; }
.lv-drop svg { margin-left: auto; width: 17px; height: 17px; color: var(--text-3); }
.lv-marca-note { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin: 4px 0 0; }
.lv-marca-note b { color: var(--text-1); }

.lv-locked { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lv-locked svg { width: 26px; height: 26px; color: var(--text-3); }
.lv-locked p { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); }

/* add venda + venda items */
.lv-add { width: 100%; border: 1.5px dashed var(--accent); background: var(--accent-ghost); border-radius: 14px; padding: 15px; font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; color: #9a7400; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: filter .14s ease; }
.flow-app[data-theme="dark"] .lv-add { color: var(--accent); }
.lv-add:hover { filter: brightness(0.97); }
.lv-add svg { width: 17px; height: 17px; }
.lv-venda-item { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 13px; padding: 12px 14px; margin-bottom: 9px; }
.lv-venda-item .vic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-ghost); color: #9a7400; display: grid; place-items: center; flex-shrink: 0; }
.flow-app[data-theme="dark"] .lv-venda-item .vic { color: var(--accent); }
.lv-venda-item .vic svg { width: 17px; height: 17px; }
.lv-venda-item .vbody { flex: 1; min-width: 0; }
.lv-venda-item .vnm { font-size: 13px; font-weight: 700; color: var(--text-1); }
.lv-venda-item .vsub { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.lv-venda-item .vval { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-1); }
.lv-venda-item .vdel { border: none; background: transparent; color: var(--text-3); cursor: pointer; padding: 4px; }
.lv-venda-item .vdel:hover { color: var(--risk); }
.lv-venda-item .vdel svg { width: 16px; height: 16px; }
.lv-empty-venda { text-align: center; font-size: 12.5px; color: var(--text-3); padding: 6px 0 14px; }

.lv-total { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.lv-total .tl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.lv-total .tv { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--accent); }

.lv-footer { display: flex; gap: 11px; margin-top: 24px; }
.lv-footer .mbtn { flex: 1; }

@media (max-width: 540px) {
  .lv-tipo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================================
 * Modo de operação — Balcão (touch/tablet) vs Gestor (desktop denso)
 * ===================================================================== */
.flow-app[data-mode="balcao"] { --gap: 22px; --pad: 26px; }
.flow-app[data-mode="balcao"] .ci-head h1 { font-size: clamp(32px, 3.6vw, 46px); }
.flow-app[data-mode="balcao"] .ci-search input { height: 60px; font-size: 16.5px; border-radius: 17px; }
.flow-app[data-mode="balcao"] .ci-qr { width: 60px; height: 60px; border-radius: 17px; }
.flow-app[data-mode="balcao"] .ci-chip { padding: 13px 18px; font-size: 13.5px; border-radius: 14px; }
.flow-app[data-mode="balcao"] .ci-chip svg { width: 17px; height: 17px; }
.flow-app[data-mode="balcao"] .ci-chips { gap: 10px; }
.flow-app[data-mode="balcao"] .ci-select { height: 58px; font-size: 15.5px; }
.flow-app[data-mode="balcao"] .ci-veh { padding: 20px; font-size: 15.5px; }
.flow-app[data-mode="balcao"] .ci-veh svg { width: 21px; height: 21px; }
.flow-app[data-mode="balcao"] .ci-confirm { height: 66px; font-size: 17px; border-radius: 18px; }
.flow-app[data-mode="balcao"] .ci-flabel { font-size: 12px; margin: 24px 0 12px; }
.flow-app[data-mode="balcao"] .btn { padding: 12px 22px; font-size: 14px; }
.flow-app[data-mode="balcao"] .ci-tab { padding: 11px 18px; font-size: 13.5px; }
.flow-app[data-mode="balcao"] .ci-lead .nm { font-size: 27px; }
.flow-app[data-mode="balcao"] .lv-input,
.flow-app[data-mode="balcao"] .lv-drop { height: 58px; font-size: 16px; }
.flow-app[data-mode="balcao"] .lv-tipo { padding: 16px 6px; }
.flow-app[data-mode="balcao"] .lv-seg button { padding: 16px 8px; font-size: 13.5px; }

.flow-app[data-mode="gestor"] { --gap: 14px; --pad: 18px; }
.flow-app[data-mode="gestor"] .ci-chip { padding: 7px 12px; font-size: 11.5px; }
.flow-app[data-mode="gestor"] .ci-chip svg { width: 14px; height: 14px; }
.flow-app[data-mode="gestor"] .ci-search input { height: 48px; }
.flow-app[data-mode="gestor"] .ci-qr { width: 48px; height: 48px; }
.flow-app[data-mode="gestor"] .ci-select { height: 46px; }
.flow-app[data-mode="gestor"] .ci-confirm { height: 50px; font-size: 14px; }
.flow-app[data-mode="gestor"] .ci-veh { padding: 13px; }


/* ==========================================================================
 * PATTERN — chat inbox (WhatsApp Oficial module)
 * Two-pane inbox: conversation list, chat bubbles, composer.
 * ========================================================================== */

/* FLOW v2 — WhatsApp Oficial (inbox) module styles.
   WhatsApp green is used ONLY for product-authentic semantics
   (connected number, online dots, outgoing bubbles, send, reply tab).
   Everything else follows the FLOW DS (amber accent, dark active, neutrals). */

:root { --wa-green: #1faa5b; --wa-green-2: #25d366; --wa-green-soft: #e4f6ec; }
.flow-app[data-theme="dark"] { --wa-green-soft: rgba(37,211,102,0.14); }

/* page fills the viewport — no page scroll, panes scroll internally */
.wa-shell { height: 100vh; overflow: hidden; }
.wa-content {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: 22px 30px 24px; gap: 16px;
}

/* ---------- header ---------- */
.wa-head { flex-shrink: 0; }
.wa-head .row1 { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wa-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3vw, 36px); line-height: 1; letter-spacing: -0.02em; margin: 0; color: var(--text-1);
}
.wa-num {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 0 12px;
  border-radius: var(--r-full); background: var(--wa-green-soft); border: 1px solid rgba(31,170,91,0.28);
  font-family: var(--font-ui); font-weight: 700; font-size: 15px; color: var(--wa-green);
}
.flow-app[data-theme="dark"] .wa-num { color: var(--wa-green-2); }
.wa-num .wic { width: 26px; height: 26px; display: grid; place-items: center; }
.wa-head .desc { font-size: 13px; color: var(--text-2); margin-top: 9px; }
.wa-head .grp { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin-top: 4px; }
.wa-head-spacer { flex: 1; }

/* ---------- inbox grid ---------- */
.wa-inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 384px 1fr; gap: 16px; }
.wa-card {
  background: var(--surface); border-radius: var(--card-radius); border: var(--card-border);
  box-shadow: var(--card-shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}

/* ---------- conversations pane ---------- */
.wa-list-top { padding: 18px 18px 12px; flex-shrink: 0; border-bottom: 1px solid var(--line); }
.wa-list-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wa-list-title h2 { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 0; color: var(--text-1); letter-spacing: -0.01em; }
.wa-open-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-full); background: var(--accent-ghost); color: #9a7400; letter-spacing: .02em; }
.flow-app[data-theme="dark"] .wa-open-badge { color: var(--accent); }
.wa-refresh { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; border: var(--card-border); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.wa-refresh:hover { color: var(--text-1); border-color: var(--accent); }
.wa-refresh svg { width: 15px; height: 15px; }

.wa-search { position: relative; }
.wa-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.wa-search input { width: 100%; height: 44px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 14px 0 40px; font-family: var(--font-ui); font-size: 13.5px; color: var(--text-1); outline: none; }
.wa-search input:focus { border-color: var(--accent); }
.wa-search input::placeholder { color: var(--text-3); }

.wa-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.wa-filter { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: var(--r-full); padding: 7px 14px; font-family: var(--font-ui); font-weight: 600; font-size: 12px; color: var(--text-2); cursor: pointer; transition: all .14s ease; }
.wa-filter:hover { color: var(--text-1); }
.wa-filter.on { background: #161513; color: #fff; border-color: transparent; }
.flow-app[data-theme="dark"] .wa-filter.on { background: var(--accent); color: var(--accent-ink); }

.wa-tags-row { display: flex; align-items: center; gap: 8px; padding: 11px 18px; flex-shrink: 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.wa-tags-row .lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-size: 10px; }
.wa-tags-row .lbl svg { width: 13px; height: 13px; }
.wa-tags-row .none { color: var(--text-3); }
.wa-tags-row .manage { margin-left: auto; color: var(--accent); font-weight: 600; cursor: pointer; }
.flow-app[data-theme="dark"] .wa-tags-row .manage { color: var(--accent); }

.wa-list { flex: 1; min-height: 0; overflow-y: auto; }
.wa-list::-webkit-scrollbar { width: 8px; }
.wa-list::-webkit-scrollbar-thumb { background: rgba(40,34,16,0.16); border-radius: 8px; }
.flow-app[data-theme="dark"] .wa-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

.wa-conv { display: flex; gap: 12px; padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--line); position: relative; transition: background .12s ease; }
.wa-conv:hover { background: var(--surface-2); }
.wa-conv.on { background: var(--surface-3); }
.wa-conv.on:hover { background: var(--surface-3); }
.wa-conv.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.wa-conv .av-wrap { position: relative; flex-shrink: 0; }
.wa-unread-dot { position: absolute; left: -9px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.wa-conv .body { flex: 1; min-width: 0; }
.wa-conv .l1 { display: flex; align-items: center; gap: 6px; }
.wa-conv .nm { font-size: 13.5px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv .l1 .time { margin-left: auto; font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.wa-conv .l1 .star { color: var(--text-3); cursor: pointer; flex-shrink: 0; }
.wa-conv .l1 .star svg { width: 14px; height: 14px; }
.wa-conv .l1 .star.on svg { fill: var(--accent); color: var(--accent); }
.wa-conv .msg { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 6px; }
.wa-conv .meta { display: flex; align-items: center; gap: 7px; }
.wa-conv .invited { font-size: 11px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.wa-conv .invited .dt { width: 6px; height: 6px; border-radius: 50%; background: #c7c2b5; flex-shrink: 0; }
.wa-conv .invited b { color: var(--text-2); font-weight: 600; }
.wa-badge-24 { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: var(--r-full); background: var(--warn-soft); color: var(--warn); white-space: nowrap; }

/* ---------- chat pane ---------- */
.wa-chat { flex: 1; min-width: 0; }
.wa-chat-head { display: flex; align-items: center; gap: 13px; padding: 15px 22px; flex-shrink: 0; border-bottom: 1px solid var(--line); }
.wa-chat-head .av-wrap { position: relative; flex-shrink: 0; }
.wa-online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--wa-green-2); border: 2.5px solid var(--surface); }
.wa-chat-head .who { min-width: 0; }
.wa-chat-head .nm { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.1; color: var(--text-1); }
.wa-chat-head .ph { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.wa-chat-head .last { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.wa-chat-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.wa-act { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: var(--r-full); padding: 8px 14px; font-family: var(--font-ui); font-weight: 600; font-size: 12.5px; color: var(--text-1); cursor: pointer; transition: all .14s ease; }
.wa-act svg { width: 14px; height: 14px; }
.wa-act.tag { color: #9a7400; border-color: rgba(255,199,11,0.4); background: var(--accent-ghost); }
.flow-app[data-theme="dark"] .wa-act.tag { color: var(--accent); }
.wa-act.transfer { color: var(--info); border-color: rgba(107,124,255,0.35); }
.wa-act.blacklist { color: var(--risk); border-color: rgba(240,84,92,0.35); }
.wa-act:hover { filter: brightness(0.98); transform: translateY(-1px); }

/* Abas de atendimento (Pré-atendimento Nina × Atendimento humano) — controle
   segmentado acima da busca. Os sub-filtros (lidas/não lidas/favoritas) operam
   dentro da aba ativa. */
.wa-atabs { display: flex; gap: 5px; padding: 4px; margin: 0 0 10px; background: var(--surface-2); border-radius: var(--r-full); }
.wa-atab { flex: 1; min-width: 0; text-align: center; padding: 9px 10px; border: none; background: transparent; border-radius: var(--r-full); font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: all .14s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-atab:hover { color: var(--text-1); }
.wa-atab.on { background: var(--surface); color: var(--text-1); box-shadow: var(--card-shadow); }

/* Mobile: o cabeçalho da conversa numa linha só esmagava o nome ("D..") e quebrava
   o telefone/"última mensagem". Empilha — contato ocupa a 1ª linha (nome/telefone
   legíveis) e os botões descem pra uma 2ª linha que rola na horizontal. */
@media (max-width: 767px) {
  .wa-chat-head { flex-wrap: wrap; padding: 12px 14px; gap: 9px 10px; }
  .wa-chat-head .who { flex: 1 1 0; min-width: 0; }
  .wa-chat-head .nm { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wa-chat-head .ph { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wa-chat-head .last { white-space: nowrap; }
  .wa-chat-actions { margin-left: 0; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; gap: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .wa-chat-actions::-webkit-scrollbar { display: none; }
  .wa-chat-actions > * { flex-shrink: 0; }
  .wa-act { padding: 7px 12px; font-size: 12px; }
}

.wa-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,199,11,0.05), transparent 30%),
    var(--surface-2);
}
.flow-app[data-theme="dark"] .wa-msgs { background: rgba(0,0,0,0.16); }
.wa-msgs::-webkit-scrollbar { width: 8px; }
.wa-msgs::-webkit-scrollbar-thumb { background: rgba(40,34,16,0.16); border-radius: 8px; }
.wa-date { align-self: center; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface); border: var(--card-border); padding: 5px 14px; border-radius: var(--r-full); margin: 4px 0; box-shadow: var(--card-shadow); }
.wa-bubble { max-width: 64%; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.45; color: var(--text-1); position: relative; box-shadow: 0 1px 2px rgba(40,34,16,0.05); }
.wa-bubble .t { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 5px; text-align: right; }
.wa-bubble.in { align-self: flex-start; background: var(--surface); border: var(--card-border); border-bottom-left-radius: 5px; }
.wa-bubble.out { align-self: flex-end; background: var(--wa-green-soft); border: 1px solid rgba(31,170,91,0.18); border-bottom-right-radius: 5px; }
.wa-bubble.out .t { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; color: var(--wa-green); }
.wa-bubble.out .t svg { width: 14px; height: 14px; }

/* ── Simulação do WhatsApp (prévia do template no TURBO) ─────────────────── */
.wa-sim { width: 100%; max-width: 360px; margin: 0 auto; border-radius: 26px; overflow: hidden; background: #efeae2; border: 1px solid var(--hairline); box-shadow: 0 18px 44px rgba(40,34,16,0.16); font-family: var(--font-ui); display: flex; flex-direction: column; }
.wa-sim-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px; background: #008069; color: #fff; }
.wa-sim-back { font-size: 22px; opacity: .95; }
.wa-sim-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,0.22); display: grid; place-items: center; }
.wa-sim-av img { width: 100%; height: 100%; object-fit: cover; }
.wa-sim-av span { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; }
.wa-sim-who { flex: 1; min-width: 0; line-height: 1.15; }
.wa-sim-nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-sim-st { font-size: 12px; opacity: .85; }
.wa-sim-acts { display: flex; align-items: center; gap: 16px; }
.wa-sim-acts .material-symbols-outlined { font-size: 20px; opacity: .95; }
.wa-sim-body { padding: 16px 14px 20px; min-height: 260px; display: flex; flex-direction: column; gap: 10px;
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%239a8f7d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.5'%3E%3Cpath d='M34 52c0-7 11-9 13-2 2-7 13-5 13 2 0 8-13 16-13 16S34 60 34 52z'/%3E%3Ccircle cx='168' cy='40' r='13'/%3E%3Ccircle cx='163' cy='37' r='1.5'/%3E%3Ccircle cx='173' cy='37' r='1.5'/%3E%3Cpath d='M162 44c3 4 9 4 12 0'/%3E%3Crect x='150' y='150' width='34' height='24' rx='7'/%3E%3Cpath d='M160 174v7l7-7'/%3E%3Cpath d='M44 150v22m0-22l14-3v18'/%3E%3Ccircle cx='41' cy='173' r='3.5'/%3E%3Ccircle cx='55' cy='168' r='3.5'/%3E%3Cpath d='M104 96c-10-10-26 2-16 14 6 7 16 9 16 9s10-2 16-9c10-12-6-24-16-14z'/%3E%3Cpath d='M22 110c8 0 8 10 16 10s8-10 16-10'/%3E%3C/g%3E%3C/svg%3E");
}
.flow-app[data-theme="dark"] .wa-sim { background: #0b141a; }
.flow-app[data-theme="dark"] .wa-sim-body { background-color: #0b141a; }
.wa-sim-date { display: flex; justify-content: center; }
.wa-sim-date span { background: #ffffff; color: var(--text-3); font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.flow-app[data-theme="dark"] .wa-sim-date span { background: #1d282f; color: #8ba2ab; }
/* balão recebido (branco, à esquerda, com cantinho) */
.wa-in { align-self: flex-start; max-width: 86%; background: #ffffff; border-radius: 8px; border-top-left-radius: 0; overflow: hidden; box-shadow: 0 1px 1.5px rgba(0,0,0,0.13); }
.flow-app[data-theme="dark"] .wa-in { background: #1f2c33; }
.wa-in-img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.wa-in-pad { padding: 7px 9px 5px; }
.wa-in-time { font-size: 10.5px; text-align: right; margin-top: 3px; color: var(--text-3); }
.wa-in-btns { border-top: 1px solid rgba(0,0,0,0.06); }
.wa-in-btn { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 8px; font-size: 13.5px; font-weight: 500; color: #027eb5; border-top: 1px solid rgba(0,0,0,0.06); }
.wa-in-btn:first-child { border-top: 0; }
.flow-app[data-theme="dark"] .wa-in-btn { color: #53bdeb; border-top-color: rgba(255,255,255,0.08); }
.wa-sim-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; background: transparent; }
.flow-app[data-theme="dark"] .wa-sim-bar { background: #0b141a; }
.wa-sim-inp { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: var(--r-full); padding: 9px 13px; color: var(--text-3); box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.wa-sim-inp .material-symbols-outlined { font-size: 20px; }
.flow-app[data-theme="dark"] .wa-sim-inp { background: #1f2c33; }
.wa-sim-ph { flex: 1; font-size: 14px; }
.wa-sim-send { width: 42px; height: 42px; border-radius: 50%; background: #008069; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.wa-sim-send .material-symbols-outlined { font-size: 21px; }
.wa-sim-empty { width: 100%; max-width: 360px; margin: 0 auto; border: 1px dashed var(--hairline); border-radius: 18px; padding: 48px 22px; text-align: center; color: var(--text-3); font-size: 13px; background: var(--surface-2); }

/* Passo "Template" do TURBO: formulário à esquerda, prévia fixa à direita */
.tw-tpl-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.tw-tpl-side { min-width: 0; }
@media (min-width: 860px) {
  .tw-tpl-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
  .tw-tpl-side { position: sticky; top: 16px; }
}

/* composer */
.wa-composer { flex-shrink: 0; border-top: 1px solid var(--line); padding: 13px 20px 16px; }
.wa-comp-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.wa-comp-tab { display: inline-flex; align-items: center; gap: 7px; border: none; border-radius: var(--r-full); padding: 8px 15px; font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; cursor: pointer; background: var(--surface-2); color: var(--text-2); transition: all .14s ease; }
.wa-comp-tab svg { width: 14px; height: 14px; }
.wa-comp-tab.on { background: var(--wa-green); color: #fff; }
.wa-comp-tab.note.on { background: var(--accent); color: var(--accent-ink); }
.wa-comp-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: 16px; padding: 6px 6px 6px 14px; }
.wa-comp-row.note-mode { background: rgba(255,199,11,0.06); border-color: rgba(255,199,11,0.3); }
.wa-comp-ic { border: none; background: transparent; color: var(--text-3); cursor: pointer; padding: 6px; display: grid; place-items: center; flex-shrink: 0; }
.wa-comp-ic:hover { color: var(--text-1); }
.wa-comp-ic svg { width: 19px; height: 19px; }
.wa-comp-input { flex: 1; border: none; background: transparent; outline: none; font-family: var(--font-ui); font-size: 14px; color: var(--text-1); height: 40px; }
.wa-comp-input::placeholder { color: var(--text-3); }
.wa-send { width: 44px; height: 44px; border-radius: 13px; border: none; background: var(--wa-green); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 6px 14px rgba(31,170,91,0.28); transition: filter .14s ease; }
.wa-send:hover { filter: brightness(1.05); }
.wa-send svg { width: 19px; height: 19px; }

@media (max-width: 1080px) {
  .wa-inbox { grid-template-columns: 320px 1fr; }
}


/* ==========================================================================
 * PATTERN — split brand login
 * Brand panel + form panel, watermark, bloom, wordmark.
 * ========================================================================== */

/* FLOW v2 — Login. Dark-first per the SMV DS, with v2 polish.
   Reuses tokens.css + styles.css (fonts + .flow-app vars). */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  font-family: var(--font-ui);
  color: var(--text-1);
  overflow: hidden;
}

/* =====================  LEFT — brand panel  ===================== */
.lg-brand {
  position: relative;
  background: #0d0d0c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px;
  overflow: hidden;
}
/* tiled SMV watermark */
.lg-watermark {
  position: absolute; inset: -10% -6%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 28px;
  transform: rotate(-16deg) scale(1.18);
  opacity: 1;
  pointer-events: none;
}
.lg-watermark span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 78px;
  letter-spacing: -0.04em;
  color: #fff;
  opacity: 0.028;
  text-align: center;
  user-select: none;
}
/* yellow bloom */
.lg-bloom {
  position: absolute;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,199,11,0.20) 0%, rgba(255,199,11,0.05) 38%, transparent 66%);
  filter: blur(20px);
  animation: lg-pulse 5.5s ease-in-out infinite;
}
@keyframes lg-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .lg-bloom { animation: none; } }

.lg-brand-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 40px; }

/* SUPER MEGA VENDAS lockup */
.lg-lockup { text-align: center; line-height: 0.86; }
.lg-lockup .super {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  color: #fff; font-size: 30px; letter-spacing: 0.32em; text-indent: 0.32em;
  display: block; margin-bottom: 8px;
}
.lg-lockup .mega {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  color: var(--accent); font-size: 118px; letter-spacing: -0.02em; display: block;
  text-shadow: 0 8px 40px rgba(255,199,11,0.28);
}
.lg-lockup .vendas {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  color: #fff; font-size: 84px; letter-spacing: 0.02em; display: block; margin-top: -6px;
}

/* proof pill */
.lg-proof {
  display: inline-flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  padding: 12px 6px;
  backdrop-filter: blur(12px);
}
.lg-proof .stat { padding: 0 22px; text-align: center; position: relative; }
.lg-proof .stat + .stat::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 26px; width: 1px; background: rgba(255,255,255,0.12); }
.lg-proof .n { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--accent); line-height: 1; }
.lg-proof .l { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8884; font-weight: 600; margin-top: 4px; }

.lg-tagline { font-family: var(--font-display); font-size: 19px; color: #cfcdc7; text-align: center; max-width: 360px; line-height: 1.35; }
.lg-tagline em { font-style: italic; color: var(--accent); }

/* =====================  RIGHT — form panel  ===================== */
.lg-form-wrap {
  background: var(--surface);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 56px;
  position: relative;
}
.lg-form { width: 100%; max-width: 392px; display: flex; flex-direction: column; }
.lg-logo { height: 30px; width: auto; align-self: center; margin-bottom: 44px; }
.lg-wordmark {
  align-self: center; margin-bottom: 44px;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 32px; line-height: 1; letter-spacing: -0.01em;
  color: var(--text-1); display: inline-flex; align-items: baseline; gap: 4px;
}
.lg-wordmark span { color: var(--accent); }

.lg-h1 { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; color: var(--text-1); margin: 0; text-align: center; }
.lg-sub { font-size: 15px; color: var(--text-2); text-align: center; margin: 12px 0 40px; line-height: 1.45; }

.lg-field { margin-bottom: 22px; }
.lg-label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin-bottom: 10px; }
.lg-input-wrap { position: relative; display: flex; align-items: center; }
.lg-input-wrap > .lead { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.lg-input {
  width: 100%; height: 56px; border-radius: 15px;
  border: 1.5px solid var(--line-2); background: var(--surface-2);
  padding: 0 16px 0 46px; font-family: var(--font-ui); font-size: 15px; color: var(--text-1);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ghost); }
.lg-input::placeholder { color: var(--text-3); }
.lg-eye { position: absolute; right: 14px; width: 34px; height: 34px; border: none; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; border-radius: 9px; }
.lg-eye:hover { color: var(--text-1); background: var(--surface); }
.lg-eye svg { width: 19px; height: 19px; }

.lg-cta {
  position: relative; width: 100%; height: 58px; margin-top: 14px;
  border: none; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  font-family: var(--font-ui); font-weight: 800; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 14px 30px rgba(255,199,11,0.32);
  transition: filter .15s ease, transform .12s ease;
}
.lg-cta:hover { filter: brightness(1.04); transform: translateY(-1px); }
.lg-cta:active { transform: translateY(0); }
.lg-cta svg { width: 18px; height: 18px; }

.lg-forgot { align-self: center; margin-top: 22px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); background: none; border: none; cursor: pointer; transition: color .15s ease; }
.lg-forgot:hover { color: var(--accent); }

.lg-footer { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.lg-footer svg { width: 13px; height: 13px; }

/* =====================  centered-card layout  ===================== */
.login.centered { grid-template-columns: 1fr; position: relative; }
.login.centered .lg-brand { position: absolute; inset: 0; padding: 0; }
.login.centered .lg-brand-inner { transform: scale(0.78); opacity: 0.5; }
.login.centered .lg-form-wrap {
  position: relative; z-index: 3; background: transparent; padding: 24px;
}
.login.centered .lg-form {
  background: var(--surface); border-radius: 28px; padding: 48px 44px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5); border: 1px solid var(--line-2);
}
.login.centered .lg-footer { color: rgba(255,255,255,0.4); }

/* dark form theme (data-theme=dark on .flow-app handles tokens) */

@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; }
  .lg-brand { display: none; }
  .login.centered .lg-brand { display: block; }
}
