/* MiHub Market — Astra Noir. Tema preto/lilás/roxo com transições. */
:root {
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --motion-feedback: 160ms; --motion-filter: 200ms; --motion-nav: 280ms;
  --motion-page: 480ms; --motion-item: 420ms; --motion-stagger-step: 60ms;
  --motion-sheet-in: 420ms; --motion-sheet-out: 280ms;
  --t-fast: var(--motion-feedback); --t-mid: var(--motion-nav); --t-slow: var(--motion-page);
  --ease: cubic-bezier(.22,.61,.36,1);
  --radius: 12px; --radius-lg: 16px; --touch: 44px;
  --sheet-w: 520px;
}
/* Tema escuro (padrão) */
:root, :root[data-theme="dark"] {
  --bg: #09060F; --bg-2: #100B1B; --surface: #150F24; --surface-2: #1C1430;
  --border: #2C2145; --border-strong: #3D2F5E; --text: #F2EDFB; --muted: #B3A6D1;
  --lilac: #CBB5FF; --purple: #7C3AED; --purple-hover: #6D28D9;
  --success: #6EE7B7; --warning: #FBBF24; --danger: #FB7185;
  --glow: rgba(124, 58, 237, 0.35); --glass: rgba(255, 255, 255, 0.03);
  --overlay: rgba(9, 6, 15, 0.7); --topbar: rgba(9, 6, 15, 0.72); --sheet: rgba(21, 15, 36, 0.96); --banner-bg: #1F1633;
  --bg-glow-1: rgba(124, 58, 237, 0.18); --bg-glow-2: rgba(203, 181, 255, 0.08);
  --hero-1: rgba(28, 20, 48, 0.7); --hero-2: rgba(21, 15, 36, 0.4);
  --map-land-1: #1B1330; --map-land-2: #120C22; --map-sea: #0C0818; --map-sea-2: #0A0714; --map-grid: rgba(203,181,255,0.06); --map-road: rgba(203,181,255,0.28);
  --particle-rgb: 203, 181, 255; --particle-line-rgb: 124, 58, 237;
  color-scheme: dark;
}
/* Tema claro */
:root[data-theme="light"] {
  --bg: #FFFFFF; --bg-2: #F7F5FB; --surface: #FFFFFF; --surface-2: #F3EEFA;
  --border: #E6E0F0; --border-strong: #CFC3E6; --text: #1C1530; --muted: #5E5477;
  --lilac: #6B3FC4; --purple: #6D28D9; --purple-hover: #5B21B6;
  --success: #157A55; --warning: #8A5A00; --danger: #B4233B;
  --glow: rgba(109, 40, 217, 0.18); --glass: rgba(109, 40, 217, 0.025);
  --overlay: rgba(255, 255, 255, 0.9); --topbar: rgba(255, 255, 255, 0.84); --sheet: rgba(255, 255, 255, 0.98); --banner-bg: #F3EEFA;
  --bg-glow-1: rgba(109, 40, 217, 0.035); --bg-glow-2: rgba(203, 181, 255, 0.06);
  --hero-1: rgba(247, 245, 251, 0.95); --hero-2: rgba(255, 255, 255, 0.7);
  --map-land-1: #F3EEFA; --map-land-2: #EAE3F6; --map-sea: #FFFFFF; --map-sea-2: #FBFAFE; --map-grid: rgba(109,40,217,0.07); --map-road: rgba(109,40,217,0.32);
  --particle-rgb: 109, 40, 217; --particle-line-rgb: 109, 40, 217;
  color-scheme: light;
}* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, var(--bg-glow-2), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--lilac); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(203,181,255,.15); }
button:focus:not(:focus-visible) { outline: none; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 10px 14px; z-index: 100; min-height: var(--touch); display: inline-flex; align-items: center; }
.skip-link:focus { left: 8px; top: 8px; }

/* Banner */
.demo-banner { background: var(--banner-bg); color: var(--lilac); border-bottom: 1px solid var(--border); padding: 6px 20px; font-size: 12.5px; position: sticky; top: 0; z-index: 30; }

/* Topbar */
.topbar { position: sticky; top: 31px; z-index: 29; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 24px; background: var(--topbar); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.brand-name span { color: var(--muted); font-weight: 400; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--purple), var(--lilac)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; box-shadow: 0 0 18px var(--glow); }
.nav { position: relative; display: flex; gap: 4px; }
.nav-item { background: transparent; border: 0; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: var(--touch); border-radius: 10px; transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.nav-item:hover { color: var(--text); background: var(--glass); }
.nav-item[aria-current="page"] { color: var(--text); }
.nav-indicator { position: absolute; bottom: -11px; height: 2px; left: 0; width: 0; background: linear-gradient(90deg, var(--purple), var(--lilac)); border-radius: 2px; box-shadow: 0 0 12px var(--glow); transition: left var(--motion-nav) var(--ease), width var(--motion-nav) var(--ease); }
.topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.pill-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; min-height: 32px; }
.pill-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.btn-icon { width: var(--touch); height: var(--touch); border-radius: 50%; border: 1px solid var(--border); background: var(--glass); color: var(--text); transition: border-color var(--t-fast), background var(--t-fast); }
.btn-icon:hover { border-color: var(--border-strong); background: var(--surface-2); }

.main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 120px; min-width: 0; }
.tela.enter > .build-layer { animation: build-surface var(--motion-page) var(--ease) both; animation-delay: min(calc(var(--build-i, 0) * 60ms), 180ms); }
.tela.enter > .build-layer-parent { animation: build-fade var(--motion-page) var(--ease) both; animation-delay: min(calc(var(--build-i, 0) * 60ms), 180ms); }
.tela.enter .stagger > * { animation: build-item var(--motion-item) var(--ease) both; animation-delay: min(calc((var(--i, 0) * var(--motion-stagger-step)) + 90ms), 270ms); }
@keyframes build-surface { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes build-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes build-item { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 500; white-space: nowrap; transition: background var(--t-fast) var(--ease), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 6px 20px var(--glow); }
.btn-primary:hover { background: var(--purple-hover); box-shadow: 0 8px 26px var(--glow); }
.btn-secondary { background: var(--glass); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--lilac); }
.btn-ghost { background: transparent; color: var(--lilac); }
.btn-ghost:hover { background: var(--glass); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field select, .field input { min-width: 0; max-width: 100%; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea, .search input { min-height: var(--touch); padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(203,181,255,.12); outline: none; }
.field select option { background: var(--surface); }
.field textarea { min-height: 88px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Hero */
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: 36px 32px 28px; border: 1px solid var(--border); background: linear-gradient(180deg, var(--hero-1), var(--hero-2)); margin-bottom: 20px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > * { position: relative; }
.hero-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.hero h1 { margin: 8px 0 6px; background: linear-gradient(90deg, var(--text), var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); max-width: 640px; }
.env { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.env .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.hero-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.effect-toggle { min-height: var(--touch); padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--glass); color: var(--muted); font-size: 12px; transition: color var(--motion-feedback), border-color var(--motion-feedback), background var(--motion-feedback); }
.effect-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.effect-toggle[aria-pressed="true"] { color: var(--lilac); }
.search-row { display: grid; grid-template-columns: 1fr 200px auto; gap: 12px; margin-top: 22px; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.segmented { display: inline-flex; gap: 4px; background: var(--glass); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 0 14px; min-height: 38px; border-radius: 9px; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--purple); color: #fff; box-shadow: 0 0 16px var(--glow); }

/* Explorar layout */
.explore { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.map-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); min-height: 440px; }
.map-card svg { width: 100%; height: 100%; display: block; }
.map-chip { position: absolute; left: 14px; top: 14px; background: var(--overlay); border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 12px; font-size: 13px; backdrop-filter: blur(8px); }
.map-legend { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 12px; font-size: 12px; background: var(--overlay); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; }
.map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.map-note { position: absolute; right: 14px; bottom: 14px; font-size: 12px; color: var(--muted); background: var(--overlay); border-radius: 999px; padding: 6px 12px; border: 1px solid var(--border); }
.map-tools { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; }
.map-tools .btn-icon { border-radius: 10px; }
.pin { cursor: pointer; }
.pin circle.halo { fill: var(--purple); opacity: .25; transition: opacity var(--t-fast), r var(--t-fast); }
.pin:hover circle.halo, .pin.selected circle.halo { opacity: .5; }
.pin circle.core { fill: var(--bg); stroke: var(--lilac); stroke-width: 2; }
.pin.selected circle.core { stroke: #fff; fill: var(--purple); }
.pin text { fill: var(--text); font-size: 3.4px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.map-city { fill: var(--muted); font-size: 3px; }
.map-label { fill: var(--lilac); font-size: 2.6px; letter-spacing: .6px; opacity: .6; }

.side { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 16px; min-height: 440px; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.count { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; color: var(--lilac); }
.cand { display: block; width: 100%; text-align: left; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; color: var(--text); transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.cand:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.cand.selected { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 0 24px var(--glow); }
.cand-top { display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; color: var(--lilac); flex: 0 0 auto; }
.cand-name { font-weight: 600; }
.cand-sub { font-size: 12.5px; color: var(--muted); }
.cand-why { margin: 8px 0 6px; font-size: 14px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; font-size: 12px; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--lilac); }
.tag.warn { color: var(--warning); border-color: rgba(251,191,36,.35); }
.tag.ok { color: var(--success); border-color: rgba(110,231,183,.35); }
.tag.danger { color: var(--danger); border-color: rgba(251,113,133,.35); }
.tag.seg-software { color: var(--lilac); } .tag.seg-conectividade { color: var(--warning); } .tag.seg-expansao { color: var(--success); }
.side-hint { color: var(--muted); font-size: 13px; }
.empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.tile { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--glass); padding: 18px; transition: border-color var(--t-fast), transform var(--t-fast); }
.tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tile .ico { font-size: 20px; color: var(--lilac); }
.tile h3 { margin: 8px 0 4px; }
.tile p { color: var(--muted); font-size: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--lilac); font-weight: 600; min-height: var(--touch); display: inline-flex; align-items: center; }
.link-btn:hover { text-decoration: underline; }

/* Lista (Explorar) */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* Oportunidades */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 6px 0 4px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; align-items: start; }
.column { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--glass); padding: 10px; min-height: 260px; }
.column-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 12px; font-weight: 600; font-size: 14px; }
.column-head .accent { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.column[data-etapa="qualificar"] .accent { background: var(--lilac); } .column[data-etapa="proposta"] .accent { background: var(--purple); box-shadow: 0 0 8px var(--glow); } .column[data-etapa="conversa"] .accent { background: var(--warning); } .column[data-etapa="concluida"] .accent { background: var(--success); }
.column-empty { color: var(--muted); font-size: 13px; padding: 8px 6px; }
.kcard { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text); margin-bottom: 8px; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.kcard:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.kcard.selected { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 0 20px var(--glow); }
.kcard .name { font-weight: 600; margin: 6px 0 2px; }
.kcard .act { font-size: 13px; color: var(--muted); }
.kcard .who { font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 6px; }

/* Sheets (painéis deslizantes) */
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: var(--sheet-w); max-width: 100vw; background: var(--sheet); backdrop-filter: blur(16px); border-left: 1px solid var(--border-strong); box-shadow: -24px 0 60px rgba(0,0,0,.5); z-index: 50; display: flex; flex-direction: column; transform: translateX(105%); transition: transform var(--motion-sheet-out) var(--ease); }
.sheet.open { transform: translateX(0); transition-duration: var(--motion-sheet-in); }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { font-size: 20px; }
.sheet-head .close { margin-left: auto; }
.sheet-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.sheet-foot { border-top: 1px solid var(--border); padding: 12px 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.headline { font-size: 22px; font-weight: 600; margin: 10px 0 8px; line-height: 1.25; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--glass); }
.box h4 { margin: 0 0 6px; font-size: 13.5px; }
.box ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.box li { margin-bottom: 4px; }
.box.ok { border-color: rgba(110,231,183,.25); } .box.warn { border-color: rgba(251,191,36,.25); }
.signal { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.signal .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sec-title { font-weight: 600; margin: 18px 0 8px; }
.alert { border-radius: var(--radius); padding: 10px 12px; font-size: 14px; border: 1px solid; margin: 10px 0; }
.alert.ok { color: var(--success); border-color: rgba(110,231,183,.35); background: rgba(110,231,183,.06); }
.alert.warn { color: var(--warning); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); }
.alert.info { color: var(--lilac); border-color: rgba(203,181,255,.35); background: rgba(203,181,255,.06); }

/* Camis */
.sheet-camis { width: 480px; }
.camis-mark { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--purple), var(--lilac)); color: #fff; box-shadow: 0 0 16px var(--glow); }
.ctx-chip { background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.4); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.camis-msg { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--glass); margin-bottom: 12px; font-size: 14px; }
.camis-msg.user { border-color: var(--border-strong); background: var(--surface-2); }
.camis-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.camis-actions .btn { justify-content: flex-start; white-space: normal; text-align: left; }
.camis-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.camis-fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px 0 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--sheet); backdrop-filter: blur(12px); color: var(--text); font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px var(--glow); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.camis-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 32px var(--glow); }
.camis-fab .fab-note { color: var(--muted); font-weight: 400; font-size: 12px; }

/* Estúdio */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mode { border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass); padding: 14px 10px; text-align: center; color: var(--muted); min-height: 72px; transition: border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.mode:hover { border-color: var(--border-strong); color: var(--text); }
.mode[aria-pressed="true"] { border-color: var(--purple); color: var(--text); box-shadow: 0 0 0 1px var(--purple), 0 0 18px var(--glow); }
.mode .ico { display: block; font-size: 18px; color: var(--lilac); margin-bottom: 4px; }
.card-form { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.preview-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--glass); padding: 18px; position: sticky; top: 110px; }
.preview { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 26px; min-height: 380px; background: radial-gradient(600px 300px at 90% 0%, rgba(203,181,255,.25), transparent 60%), linear-gradient(160deg, #1E1438, #0C0818); border: 1px solid var(--border-strong); display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,.5); transition: box-shadow var(--t-mid); }
.preview::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 4px); pointer-events: none; }
.preview .p-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.preview .p-eyebrow { margin-top: auto; }
.preview h2 { font-size: 28px; line-height: 1.15; margin: 8px 0 10px; }
.preview .p-msg { color: var(--muted); max-width: 420px; }
.preview .p-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 18px; }
.preview .p-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--lilac); color: #1B1030; font-weight: 600; }
.preview .p-status { text-align: right; font-size: 11px; color: var(--muted); font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.pulse { animation: pulse 320ms var(--ease); }
@keyframes pulse { 0% { box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 0 rgba(203,181,255,.5); } 100% { box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 16px rgba(203,181,255,0); } }

/* Resultados */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--glass); padding: 16px; }
.stat .n { font-size: 30px; font-weight: 600; font-family: var(--mono); color: var(--lilac); }
.stat .l { color: var(--muted); font-size: 13px; }
.results-note { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* Status + modal */
.status-bar { position: fixed; left: 0; right: 0; bottom: 92px; z-index: 55; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.status-bar:empty { display: none; }
.status-inner { pointer-events: auto; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: build-surface var(--motion-nav) var(--ease); max-width: 680px; }
.modal { position: fixed; inset: 0; background: rgba(9,6,15,.55); backdrop-filter: blur(6px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 520px; animation: build-surface var(--motion-nav) var(--ease); }
.modal-box h2 { margin-bottom: 10px; }
.modal-box ul { color: var(--muted); padding-left: 18px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* Responsivo */
@media (max-width: 1100px) {
  .explore { grid-template-columns: 1fr; }
  .side { min-height: 0; }
  .studio { grid-template-columns: 1fr; }
  .preview-wrap { position: static; }
  .board { grid-template-columns: repeat(5, minmax(200px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .column { scroll-snap-align: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .demo-banner { padding: 6px 12px; }
  .topbar { grid-template-columns: 1fr auto; padding: 8px 12px; top: 0; position: relative; backdrop-filter: none; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--topbar); backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 4px; justify-content: space-around; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 4px 6px; min-height: 56px; flex: 1; }
  .nav-indicator { display: none; }
  .pill-status { display: none; }
  .main { padding: 16px 16px 150px; }
  h1 { font-size: 24px; }
  .hero { padding: 24px 18px 20px; }
  .search-row { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .form-row, .two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: repeat(5, 84vw); }
  .sheet, .sheet-camis { width: 100vw; }
  .camis-fab { right: 12px; bottom: 76px; min-height: 48px; }
  .camis-fab .fab-note { display: none; }
  .status-bar { bottom: 136px; }
  .map-card { min-height: 360px; }
  .segmented button, .btn-sm, .link-btn { min-height: var(--touch); }
  .segmented { flex-wrap: wrap; }
  .segmented button { padding: 0 10px; flex: 1 1 auto; }
  .btn { white-space: normal; }
  .studio > *, .explore > *, .card-form > * { min-width: 0; }
  .map-tools { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0ms !important; animation-delay: 0ms !important; transition-duration: 0ms !important; }
  .effect-toggle { display: none; }
}

/* Alternância de tema */
.btn-theme { min-width: var(--touch); padding: 0 12px; border-radius: 999px; gap: 6px; font-size: 13px; }
.btn-theme .ico { font-size: 15px; }
@media (max-width: 767px) { .btn-theme .lbl { display: none; } }

:root[data-theme="light"] .cand, :root[data-theme="light"] .kcard, :root[data-theme="light"] .tile, :root[data-theme="light"] .stat, :root[data-theme="light"] .side, :root[data-theme="light"] .map-card, :root[data-theme="light"] .card-form, :root[data-theme="light"] .preview-wrap, :root[data-theme="light"] .column { box-shadow: 0 1px 2px rgba(28,21,48,.04), 0 6px 18px rgba(109,40,217,.06); }
:root[data-theme="light"] .column { background: var(--bg-2); }
