/* Virtex Partner Portal — visual identity: near-black canvas, violet accent, lavender micro-labels */

/* Tema claro (padrão) e escuro. Neutros frios, Space Grotesk, linhas de destaque e o violeta da Virtex como cor de acento. O escuro é ativado por data-theme="dark". */
:root {
  color-scheme: light;
  --bg: #f6f7fa;
  --bg-2: #eff1f6;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --surface-3: #e8ebf2;
  --line: rgba(12, 17, 30, 0.09);
  --line-2: rgba(12, 17, 30, 0.16);
  --grid: rgba(12, 17, 30, 0.05);

  --text-strong: #0b1020;
  --text: #1c2333;
  --text-2: #495468;
  --text-3: #5a6273;

  --violet: #7c5cfc;
  --violet-btn: #6a47f0;
  --violet-btn-hi: #5b38e3;
  --lavender: #5b3fd6;
  --pill: #efebfe;
  --accent-soft: rgba(124, 92, 252, 0.08);
  --accent-line: rgba(124, 92, 252, 0.34);
  --accent-wash: rgba(124, 92, 252, 0.06);
  --accent-tint: rgba(124, 92, 252, 0.13);
  --ring: 0 0 0 2px #ffffff, 0 0 0 4px #6a47f0;
  --glow: rgba(124, 92, 252, 0.14);

  --ok: #15803d;      --ok-bg: #e7f7ee;   --ok-line: #b9e6cc;
  --warn: #b45309;    --warn-bg: #fff4e2; --warn-line: #f2d9ac;
  --bad: #be123c;     --bad-bg: #fdecec;  --bad-line: #f3c4c4;
  --info: #1d5fc4;    --info-bg: #e8f0fc; --info-line: #bfd3f3;
  --mute-bg: rgba(12, 17, 30, 0.05);
  --crit-bg: #fbdada; --crit-fg: #9f1239;

  --topbar-bg: rgba(246, 247, 250, 0.86);
  --scrim: rgba(18, 22, 32, 0.5);
  --shadow: 0 22px 50px -18px rgba(16, 22, 40, 0.26);
  --shadow-sm: 0 1px 2px rgba(16, 22, 40, 0.04), 0 10px 26px -16px rgba(16, 22, 40, 0.2);

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --topbar: 64px;
  --sidebar: 248px;
  --font-head: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-2: #0e1117;
  --surface: #111419;
  --surface-2: #161a21;
  --surface-3: #1b2029;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --grid: rgba(255, 255, 255, 0.045);

  --text-strong: #ffffff;
  --text: #edeff3;
  --text-2: #a9b0bc;
  --text-3: #9ba3b1;

  --violet: #7c5cfc;
  --violet-btn: #6f4df5;
  --violet-btn-hi: #8168ff;
  --lavender: #a68bfa;
  --pill: #1e1a38;
  --accent-soft: rgba(124, 92, 252, 0.14);
  --accent-line: rgba(124, 92, 252, 0.42);
  --accent-wash: rgba(124, 92, 252, 0.08);
  --accent-tint: rgba(124, 92, 252, 0.2);
  --ring: 0 0 0 2px #0a0c11, 0 0 0 4px #a68bfa;
  --glow: rgba(124, 92, 252, 0.22);

  --ok: #4ade80;      --ok-bg: #12291c;   --ok-line: #1e4630;
  --warn: #fbbf24;    --warn-bg: #2a2013; --warn-line: #4a3618;
  --bad: #fb7185;     --bad-bg: #2c1618;  --bad-line: #4d2225;
  --info: #60a5fa;    --info-bg: #11213a; --info-line: #1f3a63;
  --mute-bg: rgba(255, 255, 255, 0.06);
  --crit-bg: #3a181c; --crit-fg: #ffa3b1;

  --topbar-bg: rgba(10, 12, 17, 0.82);
  --scrim: rgba(4, 7, 12, 0.72);
  --shadow: 0 26px 64px -16px rgba(0, 0, 0, 0.9);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 calc(15px * var(--fs))/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 100% at 100% 0%, var(--glow), transparent 70%);
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--lavender); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 14px; height: 14px; }
.ic.lg { width: 22px; height: 22px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ───────── Shell ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--topbar-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand-name { font: 800 calc(18px * var(--fs)) var(--font-head); letter-spacing: -0.02em; }
.brand-sep { width: 1px; height: 22px; background: var(--line-2); }
.brand-sub { color: var(--text-2); font-size: calc(14px * var(--fs)); }
.topbar .spacer { flex: 1; }
.partner-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: calc(13px * var(--fs)); color: var(--text-2);
}
.partner-chip b { color: var(--text); font-weight: 600; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pill); color: var(--lavender); font: 700 calc(13px * var(--fs)) var(--font-head);
  border: 1px solid rgba(166, 139, 250, 0.35);
}
.user-block { display: flex; align-items: center; gap: 10px; }
.user-block .who { text-align: right; line-height: 1.25; }
.user-block .who b { display: block; font-size: calc(14px * var(--fs)); font-weight: 600; }
.user-block .who span { font-size: calc(12px * var(--fs)); color: var(--text-3); }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--mute-bg); color: var(--text); }
.menu-btn { display: none; }

.layout { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar));
  padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto;
}
.nav-group + .nav-group { margin-top: 22px; }
.nav-label { padding: 0 12px 8px; font: 600 calc(11px * var(--fs)) var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--lavender); }
.nav-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: calc(14.5px * var(--fs)); border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--mute-bg); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--pill); color: var(--text); border-color: rgba(166, 139, 250, 0.25); }
.nav-link[aria-current="page"] .ic { color: var(--lavender); }
.nav-count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--bad-bg); color: var(--bad); font-size: calc(12px * var(--fs)); font-weight: 600;
}
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); font-size: calc(13px * var(--fs)); color: var(--text-3); }
.sidebar-foot a { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
.scrim { display: none; }

.main { padding: 32px 36px 64px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: calc(30px * var(--fs)); font-weight: 800; }
.page-head p { color: var(--text-2); margin-top: 6px; max-width: 62ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; margin-bottom: 10px;
  background: var(--pill); color: var(--lavender); border-radius: 999px; font: 600 calc(11.5px * var(--fs)) var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
}
.demo-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-bottom: 20px;
  border: 1px dashed rgba(166, 139, 250, 0.4); border-radius: var(--r); color: var(--text-2); font-size: calc(13px * var(--fs)); background: rgba(124, 92, 252, 0.06);
}
.demo-bar .ic { color: var(--lavender); }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: calc(14px * var(--fs)); transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--violet-btn); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -8px rgba(124, 92, 252, 0.7); }
.btn.primary:hover { background: var(--violet-btn-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--mute-bg); color: var(--text); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: calc(13px * var(--fs)); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ───────── Cards, badges ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: calc(16px * var(--fs)); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head .ic { color: var(--lavender); }
.card-link { font-size: calc(13px * var(--fs)); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: grid; gap: 16px; align-content: start; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  font-size: calc(12px * var(--fs)); font-weight: 600; line-height: 1.6; background: var(--mute-bg); color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.violet { background: var(--pill); color: var(--lavender); }
.sev-critical { background: var(--crit-bg); color: var(--crit-fg); }
.sev-high { background: var(--bad-bg); color: var(--bad); }
.sev-medium { background: var(--warn-bg); color: var(--warn); }
.sev-low { background: var(--info-bg); color: var(--info); }
.sev-info { background: var(--mute-bg); color: var(--text-2); }

.kpi { position: relative; overflow: hidden; padding: 18px 20px 20px; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--kpi, var(--violet)); }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: calc(13.5px * var(--fs)); font-weight: 500; }
.kpi-value { font: 800 calc(34px * var(--fs))/1.1 var(--font-head); margin-top: 10px; letter-spacing: -0.02em; }
.kpi-note { margin-top: 6px; font-size: calc(13px * var(--fs)); color: var(--text-3); }
.kpi-note.bad { color: var(--bad); }
.kpi-note.warn { color: var(--warn); }
.kpi-note.ok { color: var(--ok); }
.kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--lavender)); transition: width 0.5s var(--ease); }
.progress.ok > i { background: var(--ok); }
.progress.warn > i { background: var(--warn); }
.progress.bad > i { background: var(--bad); }
.ring { --p: 0; width: 64px; height: 64px; flex: none; }
.ring text { font: 800 calc(15px * var(--fs)) var(--font-head); fill: var(--text); }

/* ───────── Banner ───────── */
.focus {
  display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 20px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.03)); border: 1px solid rgba(248, 113, 113, 0.28);
}
.focus.calm { background: var(--ok-bg); border-color: rgba(52, 211, 153, 0.25); }
.focus .ic-wrap { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(248, 113, 113, 0.18); color: var(--bad); flex: none; }
.focus.calm .ic-wrap { background: rgba(52, 211, 153, 0.18); color: var(--ok); }
.focus h2 { font-size: calc(15px * var(--fs)); margin-bottom: 6px; }
.focus li { font-size: calc(14px * var(--fs)); color: var(--text-2); padding: 2px 0; }
.focus li b { color: var(--text); font-weight: 600; }
.focus li a { color: inherit; }
.focus .x { margin-left: auto; align-self: flex-start; }

/* ───────── PoC cards ───────── */
.poc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.poc-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.poc-card:hover { border-color: rgba(166, 139, 250, 0.45); transform: translateY(-2px); box-shadow: 0 16px 40px -24px rgba(124, 92, 252, 0.6); text-decoration: none; }
.poc-card .top { height: 3px; background: var(--c, var(--violet)); }
.poc-card .head { display: flex; gap: 14px; padding: 18px 20px 14px; align-items: flex-start; }
.logo-tile {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--line-2); font: 800 calc(16px * var(--fs)) var(--font-head); color: var(--lavender);
}
.poc-card h3 { font-size: calc(17px * var(--fs)); font-weight: 700; }
.poc-card .sub { font-size: calc(13px * var(--fs)); color: var(--text-3); margin-top: 2px; }
.poc-card .body { padding: 0 20px 18px; display: grid; gap: 12px; }
.poc-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: calc(13.5px * var(--fs)); color: var(--text-2); }
.poc-card .row b { color: var(--text); font-weight: 600; }
.poc-card .foot { margin-top: auto; padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: calc(13px * var(--fs)); color: var(--lavender); font-weight: 600; }

/* phase mini-stepper */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps i { height: 6px; border-radius: 999px; background: var(--surface-3); }
.steps i.done { background: var(--ok); }
.steps i.active { background: var(--violet); }
.steps i.blocked { background: var(--bad); }

/* ───────── Detail header & tabs ───────── */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: calc(14px * var(--fs)); margin-bottom: 14px; }
.crumb:hover { color: var(--text); text-decoration: none; }
.poc-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; margin-bottom: 20px; }
.poc-head .ident { display: flex; gap: 16px; align-items: center; }
.poc-head .logo-tile { width: 58px; height: 58px; font-size: calc(20px * var(--fs)); border-radius: 14px; }
.poc-head h1 { font-size: calc(28px * var(--fs)); font-weight: 800; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: var(--text-2); font-size: calc(13.5px * var(--fs)); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .ic { color: var(--text-3); }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; white-space: nowrap; color: var(--text-2);
  font-weight: 500; font-size: calc(14px * var(--fs)); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--violet); }
.tab .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--mute-bg); font-size: calc(12px * var(--fs)); text-align: center; color: var(--text-2); }

/* ───────── Journey / gantt ───────── */
.journey { position: relative; padding-top: 6px; }
.journey .bar { display: grid; gap: 4px; }
.journey .seg { position: relative; height: 38px; border-radius: 8px; background: var(--surface-3); overflow: hidden; display: flex; align-items: center; padding: 0 10px; font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.journey .seg > i { position: absolute; inset: 0 auto 0 0; background: rgba(124, 92, 252, 0.28); }
.journey .seg.done > i { background: rgba(52, 211, 153, 0.22); }
.journey .seg.blocked > i { background: rgba(248, 113, 113, 0.25); }
.journey .seg span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey .today {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--lavender); border-radius: 2px;
}
.journey .today::after {
  content: attr(data-label); position: absolute; top: -4px; left: 50%; transform: translate(-50%, -100%); white-space: nowrap;
  font-size: calc(11px * var(--fs)); font-weight: 700; color: var(--lavender); letter-spacing: 0.04em; text-transform: uppercase;
}
.journey-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: calc(12px * var(--fs)); color: var(--text-3); }
.journey-wrap { padding-top: 22px; }

/* ───────── Lists ───────── */
.list { display: grid; }
.list-row {
  display: grid; grid-template-columns: var(--cols, 1fr); gap: 14px; align-items: center; padding: 14px 16px; width: 100%;
  background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; transition: background 0.15s;
}
.list-row:first-child { border-top: 0; }
button.list-row:hover { background: var(--surface-2); }
.list-head { color: var(--text-3); font: 600 calc(11.5px * var(--fs)) var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 10px; padding-bottom: 10px; }
.list-title { font-weight: 600; font-size: calc(14.5px * var(--fs)); }
.list-sub { color: var(--text-3); font-size: calc(13px * var(--fs)); margin-top: 2px; }
.table-card { padding: 0; overflow: hidden; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; flex: 1 1 240px; max-width: 360px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text-3);
}
.search input { flex: 1; background: transparent; border: 0; color: var(--text); font: inherit; outline: none; min-width: 0; }
.search:focus-within { border-color: var(--lavender); }
.chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  font-size: calc(13px * var(--fs)); font-weight: 600; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--mute-bg); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--pill); border-color: rgba(166, 139, 250, 0.5); color: var(--lavender); }

/* ───────── Playbook ───────── */
.playbook { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.phase-btn {
  display: flex; gap: 12px; align-items: center; width: 100%; padding: 14px; text-align: left; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.15s, background 0.15s;
}
.phase-btn:hover { background: var(--surface-2); }
.phase-btn[aria-pressed="true"] { border-color: var(--violet); background: var(--pill); }
.phase-idx {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-3);
  font: 700 calc(14px * var(--fs)) var(--font-head); color: var(--text-2);
}
.phase-btn .t { font-weight: 600; font-size: calc(14.5px * var(--fs)); }
.phase-btn .s { font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.task { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); color: transparent; }
.task-ico.done { background: var(--ok); border-color: var(--ok); color: #05261a; }
.task-ico.active { border-color: var(--violet); box-shadow: inset 0 0 0 4px var(--pill); background: var(--violet); }
.task-ico.blocked { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.task-ico .ic { width: 14px; height: 14px; stroke-width: 3; }
.task.is-done .task-title { color: var(--text-2); }
.task-title { font-size: calc(14.5px * var(--fs)); }
.task-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ───────── Criteria ───────── */
.crit { display: grid; gap: 12px; }
.crit h3 { font-size: calc(15.5px * var(--fs)); }
.crit-vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.crit-vals div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.crit-vals span { display: block; font-size: calc(11px * var(--fs)); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.crit-vals b { font: 700 calc(16px * var(--fs)) var(--font-head); }

/* ───────── Timeline ───────── */
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -28px; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--violet); color: var(--lavender);
}
.tl-dot .ic { width: 11px; height: 11px; stroke-width: 2.6; }
.tl-dot.finding { border-color: var(--warn); color: var(--warn); }
.tl-dot.blocker { border-color: var(--bad); color: var(--bad); }
.tl-dot.meeting { border-color: var(--info); color: var(--info); }
.tl-dot.doc { border-color: var(--text-3); color: var(--text-2); }
.tl-date { font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.tl-title { font-weight: 600; font-size: calc(14.5px * var(--fs)); }
.tl-text { color: var(--text-2); font-size: calc(14px * var(--fs)); margin-top: 2px; }

/* ───────── Misc blocks ───────── */
.sev-bars { display: grid; gap: 10px; }
.sev-row { display: grid; grid-template-columns: 78px 1fr 28px; gap: 10px; align-items: center; font-size: calc(13px * var(--fs)); }
.sev-row .progress { height: 10px; }
.sev-row.critical .progress > i, .sev-row.high .progress > i { background: var(--bad); }
.sev-row.medium .progress > i { background: var(--warn); }
.sev-row.low .progress > i { background: var(--info); }
.sev-row.info .progress > i { background: var(--text-3); }
.kv { display: grid; gap: 4px; }
.kv dt { font: 600 calc(11.5px * var(--fs)) var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--lavender); margin-top: 14px; }
.kv dd { margin: 0; color: var(--text-2); font-size: calc(14.5px * var(--fs)); }
.checklist li { display: flex; gap: 10px; padding: 6px 0; font-size: calc(14px * var(--fs)); color: var(--text-2); }
.checklist .ic { color: var(--ok); margin-top: 3px; }
.checklist.next .ic { color: var(--lavender); }
.person { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.person .avatar { width: 38px; height: 38px; }
.person b { font-size: calc(14px * var(--fs)); display: block; }
.person span { font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.callout {
  border-left: 3px solid var(--violet); background: rgba(124, 92, 252, 0.08); padding: 12px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: calc(14.5px * var(--fs)); color: var(--text);
}
.callout.bad { border-color: var(--bad); background: var(--bad-bg); }
.callout.ok { border-color: var(--ok); background: var(--ok-bg); }
.blocker { display: grid; gap: 10px; border-left: 3px solid var(--bad); }
.blocker.medium { border-left-color: var(--warn); }
.blocker.resolved { border-left-color: var(--ok); }
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .ic-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--pill); color: var(--lavender); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--text); font-size: calc(16px * var(--fs)); margin-bottom: 4px; }

/* ───────── Drawer, toast ───────── */
.overlay { position: fixed; inset: 0; z-index: 80; background: var(--scrim); backdrop-filter: blur(3px); animation: fade 0.18s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(560px, 100%); overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line-2); padding: 24px; animation: slide 0.25s var(--ease);
}
.drawer h2 { font-size: calc(21px * var(--fs)); margin: 10px 0 4px; }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.comment { padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); margin-top: 10px; }
.comment .by { font-size: calc(13px * var(--fs)); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.comment .by span { color: var(--text-3); font-weight: 400; }
.comment p { margin-top: 4px; font-size: calc(14px * var(--fs)); color: var(--text-2); }
textarea, .field input[type="text"], .field input[type="email"], .field input[type="date"], .field select {
  width: 100%; min-height: 46px; padding: 11px 14px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--text); font: inherit; font-size: calc(15px * var(--fs));
}
textarea { min-height: 96px; resize: vertical; }
textarea:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(166, 139, 250, 0.2); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--text); }
.field .hint { font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.field .err { font-size: calc(13px * var(--fs)); color: var(--bad); }
.field input[aria-invalid="true"] { border-color: var(--bad); }

.toast-region { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--surface-3); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7); font-size: calc(14px * var(--fs)); animation: rise 0.25s var(--ease);
}
.toast .ic { color: var(--ok); }

/* wizard */
.wizard { max-width: 760px; }
.wiz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.wiz-steps i { height: 4px; border-radius: 4px; background: var(--surface-3); }
.wiz-steps i.on { background: var(--violet); }
.wiz-count { font-size: calc(13px * var(--fs)); color: var(--text-3); margin-bottom: 20px; }
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scope-opt {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; text-align: left;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); font-weight: 600; transition: border-color 0.15s, background 0.15s;
}
.scope-opt:hover { background: var(--surface-2); }
.scope-opt[aria-pressed="true"] { border-color: var(--violet); background: var(--pill); }
.scope-opt .ic { color: var(--lavender); }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 28px; }
.review dl { margin: 0; }

/* template viewer */
pre.tpl {
  white-space: pre-wrap; word-break: break-word; margin: 14px 0 0; padding: 16px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r); font: 13.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-2);
}

/* login */
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.login-art h1 { font-size: calc(40px * var(--fs)); font-weight: 800; max-width: 14ch; line-height: 1.1; }
.login-art li { display: flex; gap: 14px; margin-top: 14px; }
.login-art li .ic-wrap { width: 40px; height: 40px; border-radius: 11px; background: var(--pill); color: var(--lavender); display: grid; place-items: center; flex: none; }
.login-art li b { display: block; font-size: calc(15px * var(--fs)); }
.login-art li span { color: var(--text-2); font-size: calc(14px * var(--fs)); }
.login-card-wrap { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(440px, 100%); padding: 32px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 30px 80px -40px rgba(124, 92, 252, 0.5); }
.login-card h2 { font-size: calc(26px * var(--fs)); }
.login-card .btn { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: calc(12px * var(--fs)); letter-spacing: 0.08em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.view { animation: rise 0.28s var(--ease); }

/* ───────── Responsive ───────── */
@media (max-width: 1180px) {
  .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split { grid-template-columns: 1fr; }
  .playbook { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; }
  .sidebar {
    position: fixed; top: var(--topbar); left: 0; z-index: 70; width: 280px; background: var(--bg-2);
    transform: translateX(-100%); transition: transform 0.25s var(--ease); height: calc(100vh - var(--topbar));
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; z-index: 60; background: var(--scrim); }
  .main { padding: 24px 16px 48px; }
  .user-block .who, .partner-chip, .brand-sub, .brand-sep { display: none; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 32px 20px 8px; }
  .login-art h1 { font-size: calc(30px * var(--fs)); }
}
@media (max-width: 640px) {
  .page-head h1, .poc-head h1 { font-size: calc(24px * var(--fs)); }
  .poc-grid { grid-template-columns: 1fr; }
  .grid.kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: calc(26px * var(--fs)); }
  .scope-grid { grid-template-columns: 1fr; }
  .crit-vals { grid-template-columns: 1fr; }
  .list-row.responsive { --cols: minmax(0, 1fr) !important; gap: 6px; }
  .list-row.responsive > .badge, .list-row.responsive > .icon-btn, .list-row.responsive > .ic { justify-self: start; }
  .poc-head .ident { align-items: flex-start; }
  .meta { gap: 6px 12px; }
  .list-head.responsive { display: none; }
  .task { grid-template-columns: 28px 1fr; }
  .task-meta { grid-column: 2; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  :root { --bg: #fff; --bg-2: #f6f6f8; --surface: #fff; --surface-2: #f6f6f8; --surface-3: #ececf1; --text: #111; --text-2: #333; --text-3: #555; --line: #ddd; --line-2: #ccc; --lavender: #4a2fc0; --pill: #ece8ff; }
  body::before, .topbar, .sidebar, .tabs, .btn, .toolbar, .demo-bar, .scrim { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .card { break-inside: avoid; }
}

/* artifact hosting: safe-area aware gutters and sticky offsets */
.topbar { top: env(safe-area-inset-top, 0px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sidebar { top: calc(var(--topbar) + env(safe-area-inset-top, 0px)); }
.main { padding-left: max(36px, env(safe-area-inset-left, 0px)); padding-right: max(36px, env(safe-area-inset-right, 0px)); }
@media (max-width: 900px) {
  .sidebar { top: calc(var(--topbar) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--topbar)); }
  body.nav-open .scrim { inset: calc(var(--topbar) + env(safe-area-inset-top, 0px)) 0 0 0; }
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* ───────── v2: administração, relatório PDF, formulários ───────── */
.sub-h { font-size: calc(13px * var(--fs)); color: var(--lavender); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; font-weight: 600; }
.badge.hidden-flag { background: var(--warn-bg); color: var(--warn); }
.role-chip { border-color: rgba(166, 139, 250, 0.45); color: var(--lavender); background: var(--pill); font-weight: 600; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--text-2); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tab-head { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.shortcuts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dev-switch { margin-top: 22px; padding: 12px; border: 1px dashed rgba(251, 191, 36, 0.45); border-radius: var(--r); background: var(--warn-bg); }
.dev-switch label { display: block; font-size: calc(12px * var(--fs)); color: var(--warn); margin-bottom: 6px; font-weight: 600; }
.dev-switch select { width: 100%; min-height: 40px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; font: inherit; font-size: calc(13.5px * var(--fs)); }
.toast.error .ic { color: var(--bad); }
.btn.danger { color: var(--bad); }
.btn.danger.ghost:hover { background: var(--bad-bg); color: var(--bad); }

/* formulários */
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--text); font: inherit; font-size: calc(15px * var(--fs));
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(166, 139, 250, 0.2); }
.req { color: var(--bad); }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; padding: 8px 0; font-size: calc(14.5px * var(--fs)); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-all, .form-grid > .field:has(textarea), .form-grid > .check { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(to top, var(--surface) 70%, transparent); }
.adm-form.card .form-actions { background: linear-gradient(to top, var(--surface) 70%, transparent); }
.new-customer { border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 14px 0; margin: 0 0 18px; }
.new-customer legend { padding: 0 6px; color: var(--lavender); font-size: calc(12px * var(--fs)); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.drawer .form-grid { grid-template-columns: 1fr; }

/* playbook do admin */
.adm-task { display: grid; grid-template-columns: minmax(0, 1fr) auto 180px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-task:first-of-type { border-top: 0; }
.adm-task-title { background: transparent; border: 0; text-align: left; color: var(--text); font-size: calc(14.5px * var(--fs)); padding: 6px 8px; margin: 0 -8px; border-radius: 8px; min-height: 40px; }
.adm-task-title:hover { background: var(--mute-bg); }
.adm-task-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.status-select { min-height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.status-select.done { border-color: rgba(52, 211, 153, 0.5); color: var(--ok); }
.status-select.active { border-color: rgba(166, 139, 250, 0.6); color: var(--lavender); }
.status-select.blocked { border-color: rgba(248, 113, 113, 0.55); color: var(--bad); }
.sm-btn { width: 32px; height: 32px; margin-left: auto; }
.comment .by { display: flex; align-items: center; gap: 8px; }

/* relatório em PDF */
.report-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.report-opts { position: sticky; top: calc(var(--topbar) + 16px); }
.report-stage { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; overflow-x: auto; }
.report-paper {
  --ink: #17171c; --ink-2: #4a4a57; --rule: #dedee6; --accent: #6a47f0; --soft: #f4f2fe;
  background: #fff; color: var(--ink); width: 100%; max-width: 794px; margin: 0 auto; padding: 40px 44px; border-radius: 6px;
  font: 400 calc(13px * var(--fs))/1.55 var(--font-body); box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.7);
}
.report-paper h1, .report-paper h2, .report-paper h3 { font-family: var(--font-head); color: var(--ink); letter-spacing: -0.01em; }
.rp-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 2px solid var(--accent); }
.rp-brand { display: flex; gap: 10px; align-items: center; }
.rp-brand img { width: 34px; height: 34px; border-radius: 8px; }
.rp-brand b { display: block; font: 800 calc(16px * var(--fs)) var(--font-head); }
.rp-brand span { color: var(--ink-2); font-size: calc(12px * var(--fs)); }
.rp-date { color: var(--ink-2); font-size: calc(12.5px * var(--fs)); }
.rp-title { padding: 22px 0 6px; }
.rp-title h1 { font-size: calc(28px * var(--fs)); font-weight: 800; }
.rp-title p { color: var(--ink-2); margin-top: 4px; }
.rp-health { display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: calc(12px * var(--fs)); background: #eceaf5; color: #3b3b48; }
.rp-health.ok { background: #dcf7ec; color: #0c6b47; } .rp-health.warn { background: #fdf0cf; color: #855a05; }
.rp-health.bad { background: #fde1e1; color: #a02020; } .rp-health.violet { background: var(--soft); color: #4a2fc0; }
.rp-msg { margin: 16px 0; padding: 12px 14px; background: var(--soft); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.rp-msg p { margin-top: 4px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 6px; }
.rp-kpis div { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; }
.rp-kpis span { display: block; font-size: calc(11px * var(--fs)); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.rp-kpis b { font: 800 calc(22px * var(--fs)) var(--font-head); }
.rp-kpis b.sm { font-size: calc(14px * var(--fs)); line-height: 1.3; display: block; margin-top: 4px; }
.rp-sec { margin-top: 22px; break-inside: avoid-page; }
.rp-sec h2 { font-size: calc(15px * var(--fs)); padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.rp-sec h3 { font-size: calc(13px * var(--fs)); margin: 12px 0 4px; }
.rp-lead { font-size: calc(14px * var(--fs)); margin-bottom: 10px; }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-paper ul { margin: 0; padding-left: 18px; list-style: disc; }
.report-paper li { margin: 3px 0; }
.report-paper table { width: 100%; border-collapse: collapse; font-size: calc(12px * var(--fs)); }
.report-paper th { text-align: left; background: var(--soft); color: #3a2a8f; padding: 6px 8px; font-size: calc(11px * var(--fs)); text-transform: uppercase; letter-spacing: 0.05em; }
.report-paper td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.report-paper tr { break-inside: avoid; }
.report-paper small { color: var(--ink-2); font-size: calc(11.5px * var(--fs)); }
.report-paper .nw { white-space: nowrap; }
.rp-tasks { list-style: none !important; padding-left: 0 !important; }
.rp-tasks li { display: flex; gap: 8px; align-items: flex-start; }
.rp-tasks .chk { width: 14px; height: 14px; border: 1.5px solid #9a9aa8; border-radius: 3px; flex: none; margin-top: 3px; font-size: calc(10px * var(--fs)); line-height: 11px; text-align: center; font-weight: 800; }
.rp-tasks li.done .chk { background: #0c6b47; border-color: #0c6b47; color: #fff; }
.rp-tasks li.blocked .chk { border-color: #a02020; color: #a02020; }
.rp-tasks em { color: var(--ink-2); font-style: normal; font-size: calc(11.5px * var(--fs)); margin-left: auto; white-space: nowrap; }
.rp-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: calc(11.5px * var(--fs)); }

@media (max-width: 1180px) { .report-layout { grid-template-columns: 1fr; } .report-opts { position: static; } }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .adm-task { grid-template-columns: 1fr; gap: 6px; }
  .adm-task-meta { justify-content: flex-start; }
  .rp-kpis { grid-template-columns: repeat(2, 1fr); } .rp-cols { grid-template-columns: 1fr; }
  .report-paper { padding: 24px 18px; } .report-stage { padding: 12px; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff !important; }
  .topbar, .sidebar, .scrim, .crumb, .page-head, .report-opts, .toast-region, .demo-bar { display: none !important; }
  .layout, .report-layout { display: block !important; }
  .main { padding: 0 !important; max-width: none !important; }
  .report-stage { background: none; border: 0; padding: 0; overflow: visible; }
  .report-paper { box-shadow: none; max-width: none; padding: 0; border-radius: 0; }
}

/* ───────── logo do cliente e alternância de tema ───────── */
.logo-tile.has-logo { background: #fff; border-color: var(--line-2); padding: 5px; overflow: hidden; }
.logo-tile.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-field { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-field .logo-tile { width: 72px; height: 72px; border-radius: 16px; font-size: calc(22px * var(--fs)); }
.logo-field .logo-actions { display: grid; gap: 8px; }
.logo-field input[type="file"] { max-width: 240px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.theme-btn .ic { transition: transform 0.25s var(--ease); }
.theme-btn:hover .ic { transform: rotate(15deg); }
.rp-title { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.rp-title .rp-logo { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--rule); border-radius: 12px; padding: 5px; background: #fff; }
.demo-bar { background: var(--pill); }
.toast { background: var(--surface); color: var(--text); }
.drawer { box-shadow: -20px 0 60px -30px rgba(20, 18, 40, 0.35); }
.poc-card:hover { box-shadow: 0 16px 40px -24px rgba(106, 71, 240, 0.45); }
.logo-tile.xs { width: 36px; height: 36px; border-radius: 10px; font-size: calc(12px * var(--fs)); padding: 3px; }
.cell-logo { display: flex; gap: 12px; align-items: center; min-width: 0; }
.logo-field .logo-tile span { font-size: calc(12px * var(--fs)); color: var(--text-3); font-weight: 600; }

/* ───────── tela de acesso ───────── */
.gate { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-left, 0px)); }
.gate-theme { position: absolute; top: 16px; right: max(16px, env(safe-area-inset-right, 0px)); }
.gate-card { width: min(520px, 100%); padding: 36px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 30px 80px -40px rgba(106, 71, 240, 0.45); display: grid; gap: 14px; justify-items: start; }
.gate-card .brand { margin-bottom: 6px; }
.gate-card h1 { font-size: calc(26px * var(--fs)); font-weight: 800; text-wrap: balance; }
.gate-card p { color: var(--text-2); }
.gate-email { color: var(--text); word-break: break-all; }
.gate-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); font-size: calc(14.5px * var(--fs)); }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.gate-contact { width: 100%; margin-top: 8px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 2px; }
.gate-contact span { font-size: calc(13px * var(--fs)); color: var(--text-3); }
.gate-mail { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.gate-mail code { font: 500 calc(14px * var(--fs)) ui-monospace, "SF Mono", Menlo, monospace; user-select: all; word-break: break-all; }
@media (max-width: 640px) { .gate-card { padding: 24px; } }

/* ═════════ Skin v3: identidade visual Virtex ═════════ */
body { background: var(--bg); color: var(--text); }
body::before { height: 520px; background: radial-gradient(60% 100% at 50% 0%, var(--glow), transparent 72%); }
body::after {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 600px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(60% 90% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(60% 90% at 50% 0%, #000 0%, transparent 78%);
}
h1, h2, h3, .brand-name, .kpi-value, .ring text, .report-paper h1, .report-paper h2, .report-paper h3 { font-family: var(--font-head); }
h1 { font-weight: 700; letter-spacing: -0.025em; }
h2, h3 { font-weight: 700; letter-spacing: -0.015em; }
.page-head h1 { font-size: calc(32px * var(--fs)); font-weight: 700; color: var(--text-strong); }
.kpi-value { font-weight: 700; color: var(--text-strong); letter-spacing: -0.03em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { box-shadow: var(--ring); }
::selection { background: var(--accent-tint); }

/* cabeçalho compacto com trilha */
.topbar { height: var(--topbar); border-bottom: 1px solid var(--line); background: var(--topbar-bg); }
.brand img { border-radius: 9px; }
.brand-name { font-size: calc(18px * var(--fs)); font-weight: 700; color: var(--text-strong); }
.crumbline { display: grid; line-height: 1.25; min-width: 0; }
.crumb-top { font-size: calc(14px * var(--fs)); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-top i { font-style: normal; color: var(--text-3); margin: 0 7px; }
.crumb-top b { color: var(--text-strong); font-weight: 600; }
.tagline { font-size: calc(11.5px * var(--fs)); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-chip { background: var(--surface); border-color: var(--line-2); }
.role-chip { background: var(--accent-soft); border-color: var(--accent-line); color: var(--lavender); }
.avatar { background: var(--accent-soft); border-color: var(--accent-line); color: var(--lavender); font-family: var(--font-head); }

/* navegação */
.sidebar { background: transparent; }
.nav-label { color: var(--text-3); letter-spacing: 0.14em; font-size: calc(10.5px * var(--fs)); }
.nav-link { border-radius: var(--r); }
.nav-link[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-strong); font-weight: 600; }
.nav-link[aria-current="page"] .ic { color: var(--violet); }

/* cartões: linha de destaque no topo e sombra suave */
.card { position: relative; background: var(--surface); border-color: var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--accent-line) 50%, transparent); }
.kpi::before { height: 2px; background: linear-gradient(90deg, var(--kpi, var(--violet)), transparent 88%); }
.card-head h2 .ic, .card-head h3 .ic { color: var(--violet); }
.poc-card { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.poc-card .top { height: 2px; background: linear-gradient(90deg, var(--c, var(--violet)), transparent 90%); }
.poc-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.table-card { overflow: hidden; }

/* botões: acento chapado, sem brilho */
.btn { border-radius: var(--r); background: var(--surface); border-color: var(--line-2); color: var(--text-strong); box-shadow: none; }
.btn:hover { background: var(--surface-2); border-color: var(--accent-line); }
.btn.primary { background: var(--violet-btn); border-color: transparent; color: #fff; box-shadow: none; }
.btn.primary:hover { background: var(--violet-btn-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.chip { border-color: var(--line-2); background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--lavender); }

/* selos com contorno */
.badge { border: 1px solid var(--line); background: var(--surface-2); }
.badge.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.badge.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.badge.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.badge.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.badge.violet { background: var(--accent-soft); border-color: var(--accent-line); color: var(--lavender); }
.badge.hidden-flag { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.sev-critical { background: var(--crit-bg); border-color: var(--bad-line); color: var(--crit-fg); }
.sev-high { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.sev-medium { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.sev-low { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.eyebrow { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--lavender); letter-spacing: 0.14em; font-size: calc(11px * var(--fs)); }
.pill-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font: 600 calc(11.5px * var(--fs)) var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line-2); }
.pill-status.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.pill-status.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }

/* avisos */
.focus { border-radius: var(--r-lg); background: var(--bad-bg); border-color: var(--bad-line); }
.focus .ic-wrap { background: var(--surface); color: var(--bad); border: 1px solid var(--bad-line); }
.focus.calm { background: var(--ok-bg); border-color: var(--ok-line); }
.focus.calm .ic-wrap { color: var(--ok); border-color: var(--ok-line); }
.callout { background: var(--accent-wash); border-left-color: var(--violet); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.callout.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.callout.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.demo-bar { background: var(--accent-wash); border: 1px dashed var(--accent-line); border-radius: var(--r); }
.logo-tile { background: var(--surface-2); border-radius: 12px; font-family: var(--font-head); color: var(--lavender); }
.logo-tile.has-logo { background: #fff; }

/* barras e anéis */
.progress { background: var(--surface-3); height: 8px; }
.progress > i { background: linear-gradient(90deg, var(--violet), var(--lavender)); }

/* formulários */
.field input, .field select, .field textarea, .search, textarea { background: var(--surface); border-color: var(--line-2); border-radius: var(--r); color: var(--text-strong); }
.field input:focus, .field select:focus, .field textarea:focus, textarea:focus { border-color: var(--violet); box-shadow: var(--ring); }
.search:focus-within { border-color: var(--violet); box-shadow: var(--ring); }

/* listas */
.list-head { background: var(--surface-2); color: var(--text-3); letter-spacing: 0.12em; }
button.list-row:hover, a.list-row:hover { background: var(--accent-wash); }
.list-row { border-top-color: var(--line); }
.tab[aria-selected="true"] { border-bottom-color: var(--violet); color: var(--text-strong); }
.phase-btn[aria-pressed="true"] { border-color: var(--violet); background: var(--accent-soft); }
.drawer { background: var(--surface); border-left-color: var(--line-2); }
.toast { border-radius: var(--r); box-shadow: var(--shadow); }

/* corrente de nós (jornada da PoC e verificação de acesso) */
.chain { display: flex; align-items: flex-start; width: 100%; padding: 8px 0 4px; }
.chain-node { position: relative; flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; text-align: center; padding: 0 6px; }
.chain-node:not(:last-child)::after { content: ""; position: absolute; top: 27px; left: calc(50% + 36px); width: calc(100% - 72px); height: 2px; border-radius: 2px; background: var(--line-2); }
.chain-node.done:not(:last-child)::after { background: linear-gradient(90deg, var(--violet), var(--lavender)); }
.chain-node.active:not(:last-child)::after { background: linear-gradient(90deg, var(--lavender), var(--line-2) 75%); }
.chain-node.blocked:not(:last-child)::after { background: linear-gradient(90deg, var(--bad), var(--line-2) 75%); }
.node-box { position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-3); }
.node-box .ic { width: 22px; height: 22px; }
.chain-node.done .node-box, .chain-node.active .node-box { border-color: var(--violet); background: var(--accent-soft); color: var(--lavender); }
.chain-node.active .node-box { box-shadow: 0 0 0 5px var(--accent-soft); }
.chain-node.blocked .node-box { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.node-badge { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; border: 2px solid var(--surface); }
.node-badge .ic { width: 11px; height: 11px; stroke-width: 3; }
.chain-node.blocked .node-badge { background: var(--bad); }
.chain-node b { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--text-strong); margin-top: 6px; }
.chain-node small { font-size: calc(12.5px * var(--fs)); color: var(--text-2); line-height: 1.35; }
.timebar { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }

/* telas de acesso */
.gate { background: transparent; }
.gate-card { width: min(640px, 100%); padding: 40px 40px 32px; border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow); justify-items: center; text-align: center; position: relative; overflow: hidden; }
.gate-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--violet), var(--lavender), transparent); }
.gate-card h1 { font-size: calc(34px * var(--fs)); letter-spacing: -0.03em; color: var(--text-strong); }
.gate-card .gate-steps, .gate-card .gate-contact { text-align: left; }
.gate-card .chain { margin: 6px 0 2px; }
.gate-actions { justify-content: center; }
.gate-contact { justify-items: start; }

/* rodapé */
.site-foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: calc(12.5px * var(--fs)); color: var(--text-3); }

/* entrada suave, em sequência */
.view { animation: none; }
.view > * { animation: rise 0.5s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: 0.04s; } .view > *:nth-child(3) { animation-delay: 0.08s; }
.view > *:nth-child(4) { animation-delay: 0.12s; } .view > *:nth-child(5) { animation-delay: 0.16s; }
.gate.view { animation: rise 0.5s var(--ease) both; }
.gate.view > * { animation: none; }

@media (max-width: 900px) { .tagline { display: none; } .crumb-top { font-size: calc(13.5px * var(--fs)); } }
@media (max-width: 640px) {
  .gate-card { padding: 28px 20px 22px; } .gate-card h1 { font-size: calc(26px * var(--fs)); }
  .node-box { width: 44px; height: 44px; border-radius: 13px; } .node-box .ic { width: 18px; height: 18px; }
  .chain-node:not(:last-child)::after { top: 21px; left: calc(50% + 28px); width: calc(100% - 56px); }
  .chain-node b { font-size: calc(12px * var(--fs)); } .chain-node small { font-size: calc(11px * var(--fs)); }
}

/* ═════════ Preferências do usuário (Configurações) ═════════ */
:root { --fs: 1; }
html[data-text="large"] { --fs: 1.14; }
html[data-text="xlarge"] { --fs: 1.28; }
.report-paper { --fs: 1; }
@media print { :root { --fs: 1 !important; } }

/* alto contraste */
html[data-contrast="high"] { --text-2: #2b3345; --text-3: #3d4558; --line: rgba(12, 17, 30, 0.3); --line-2: rgba(12, 17, 30, 0.55); --accent-line: rgba(91, 63, 214, 0.7); }
html[data-theme="dark"][data-contrast="high"] { --text-2: #d6dbe3; --text-3: #c5ccd6; --line: rgba(255, 255, 255, 0.3); --line-2: rgba(255, 255, 255, 0.55); --accent-line: rgba(166, 139, 250, 0.75); }
html[data-contrast="high"] .card, html[data-contrast="high"] .btn, html[data-contrast="high"] .chip { border-width: 1.5px; }
/* movimento reduzido */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
/* links sublinhados */
html[data-underline] a:not(.btn):not(.brand):not(.nav-link):not(.tab):not(.poc-card):not(.icon-btn) { text-decoration: underline; text-underline-offset: 3px; }
/* espaçamento de texto ampliado */
html[data-spacing] body, html[data-spacing] body * { line-height: 1.75 !important; letter-spacing: 0.025em; word-spacing: 0.1em; }
html[data-spacing] svg, html[data-spacing] svg * { letter-spacing: normal; word-spacing: normal; }
/* foco sempre visível */
html[data-focus] :is(a, button, input, select, textarea, summary, [tabindex]):not([tabindex="-1"]) { outline: 2px solid var(--violet); outline-offset: 2px; }

/* janela de configurações */
.modal {
  position: fixed; z-index: 90; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 32px);
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 6px; padding: 26px 28px 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow);
  animation: pop 0.22s var(--ease) both;
}
.modal h2 { font-size: calc(22px * var(--fs)); }
.modal > p { font-size: calc(14px * var(--fs)); margin-bottom: 14px; }
.modal-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; min-height: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.modal-nav { display: grid; gap: 4px; align-content: start; }
.modal-nav button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--text-2); font-weight: 600; font-size: calc(14px * var(--fs)); text-align: left; }
.modal-nav button:hover { background: var(--mute-bg); color: var(--text-strong); }
.modal-nav button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--lavender); }
.modal-panel { overflow-y: auto; min-height: 0; padding: 0 4px 8px 2px; }
.modal-panel h3 { font-size: calc(16px * var(--fs)); margin-bottom: 4px; }
.modal-panel .lead { color: var(--text-2); font-size: calc(13.5px * var(--fs)); margin-bottom: 14px; }
.modal-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row b { display: block; font-size: calc(14.5px * var(--fs)); }
.set-row span.d { display: block; font-size: calc(13px * var(--fs)); color: var(--text-2); margin-top: 2px; max-width: 46ch; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); flex: none; }
.seg button { min-height: 40px; padding: 0 14px; border: 0; border-left: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-weight: 600; font-size: calc(13.5px * var(--fs)); }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--mute-bg); }
.seg button[aria-checked="true"] { background: var(--violet-btn); color: #fff; }
.switch { position: relative; width: 46px; height: 26px; flex: none; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-3); padding: 0; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch[aria-checked="true"] { background: var(--violet-btn); border-color: transparent; }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: #fff; }
.avatar-row { display: flex; gap: 18px; align-items: center; padding: 4px 0 16px; }
.avatar-row b { display: block; font-size: calc(14.5px * var(--fs)); }
.avatar-row .hint { display: block; font-size: calc(12.5px * var(--fs)); color: var(--text-3); margin: 2px 0 10px; }
.avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { box-shadow: var(--ring); }
.avatar.xl { width: 72px; height: 72px; font-size: calc(24px * var(--fs)); }
.avatar.lg { width: 56px; height: 56px; font-size: calc(18px * var(--fs)); }
.avatar.has-img { padding: 0; overflow: hidden; background: var(--surface-2); }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-form { border-top: 1px solid var(--line); padding-top: 16px; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } }
@media (max-width: 720px) {
  .modal { padding: 20px 16px 14px; top: 0; left: 0; transform: none; width: 100%; max-height: 100vh; border-radius: 0; height: 100%; }
  .modal-grid { grid-template-columns: 1fr; gap: 10px; }
  .modal-nav { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .modal-nav button { justify-content: center; padding: 0 6px; min-height: 42px; }
  .modal-nav button .ic { display: none; }
  .set-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  @keyframes pop { from { opacity: 0; } }
}
@media (max-width: 720px) { .modal-grid { grid-template-rows: auto minmax(0, 1fr); align-content: start; } }

.foot-person { display: flex; gap: 10px; align-items: center; margin-top: 8px; color: var(--text-2); }
.foot-person .avatar { width: 32px; height: 32px; font-size: calc(12px * var(--fs)); flex: none; }
.foot-person > span { display: grid; line-height: 1.3; min-width: 0; }
.foot-person b { color: var(--text-strong); font-weight: 600; font-size: calc(13px * var(--fs)); }
.foot-person > span > span { font-size: calc(12px * var(--fs)); word-break: break-all; }
.avatar.xs { width: 32px; height: 32px; font-size: calc(12px * var(--fs)); }

/* correções de usabilidade */
.icon-btn { flex: none; min-width: 40px; }
.focus .x { flex: none; }
.brand { min-height: 40px; }
.report-paper .rp-h1 { font: 700 28px var(--font-head); letter-spacing: -0.02em; color: var(--ink); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--r); background: var(--violet-btn); color: #fff; font-weight: 600; transition: top 0.15s; }
.skip-link:focus { top: 12px; box-shadow: var(--ring); }
@media (max-width: 640px) { .topbar { gap: 6px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); } .crumb-top { max-width: 34vw; } }

.chip-logo { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; background: #fff; border: 1px solid var(--line); }

.scope-set { border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 16px 14px; margin: 0 0 18px; }
.scope-set legend { padding: 0 8px; color: var(--lavender); font-size: calc(12px * var(--fs)); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 14px; }
.scope-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-scope { margin: 14px 0 0; font-size: 13px; }

.env-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 16px; margin: 0; }
.env-list dt { font-size: calc(11.5px * var(--fs)); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; }
.env-list dd { margin: 2px 0 0; font: 700 calc(20px * var(--fs)) var(--font-head); color: var(--text-strong); }

/* ───────── tela de login própria (e-mail + código) ───────── */
.signin { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.si-top { display: flex; align-items: center; gap: 14px; height: var(--topbar); padding: 0 max(20px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--topbar-bg); backdrop-filter: blur(14px); }
.si-main { flex: 1; width: min(560px, 100% - 32px); margin: 0 auto; padding: 44px 0 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.si-main h1 { font-size: clamp(32px, 6vw, 46px); font-weight: 700; letter-spacing: -0.03em; color: var(--text-strong); margin-top: 6px; text-wrap: balance; }
.si-sub { color: var(--text-2); font-size: calc(16px * var(--fs)); max-width: 44ch; }
.si-main .chain { max-width: 520px; margin-bottom: 4px; }
.si-card { position: relative; width: 100%; margin-top: 10px; padding: 26px 26px 22px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); display: grid; gap: 4px; overflow: hidden; }
.si-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--violet), var(--lavender), transparent); }
.si-card .field { margin-bottom: 10px; }
.si-card input[type="email"], .si-card input[type="text"] { min-height: 52px; font-size: calc(16px * var(--fs)); }
.si-otp { text-align: center; font: 700 calc(30px * var(--fs)) ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: 0.5em; padding-left: 0.5em; }
.si-btn { width: 100%; min-height: 50px; margin-top: 8px; font-size: calc(15px * var(--fs)); }
.si-error { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); font-size: calc(13.5px * var(--fs)); }
.si-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.si-link { background: none; border: 0; padding: 8px 4px; min-height: 40px; color: var(--lavender); font-weight: 600; font-size: calc(14px * var(--fs)); }
.si-link:hover:not(:disabled) { text-decoration: underline; }
.si-link:disabled { color: var(--text-3); cursor: default; }
.si-who { text-align: center; font-size: calc(15px * var(--fs)); color: var(--text-2); }
.si-who b { display: block; margin-top: 4px; color: var(--text-strong); font-size: calc(18px * var(--fs)); word-break: break-all; }
.si-dev { margin: 4px 0 8px; padding: 10px 12px; border: 1px dashed var(--warn-line); border-radius: var(--r); background: var(--warn-bg); color: var(--warn); font-size: calc(13px * var(--fs)); }
.si-help { color: var(--text-3); font-size: calc(13.5px * var(--fs)); margin-top: 4px; }
.si-foot { margin: 0; padding: 18px max(20px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
@media (max-width: 640px) { .si-main { padding-top: 28px; } .si-card { padding: 20px 16px; } .si-top .crumbline { display: none; } }

.si-card input[type="email"], .si-card input[type="text"] { background: var(--surface); }

/* login: brilho lavanda suave atrás da cadeia, como no portal de referência */
.signin::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: -1;
  background: radial-gradient(48% 70% at 50% 0%, rgba(124, 92, 252, 0.16), rgba(124, 92, 252, 0) 72%); }
.signin .si-card { border-color: var(--line); box-shadow: 0 1px 2px rgba(16, 22, 40, 0.04), 0 24px 48px -28px rgba(106, 71, 240, 0.28); }
.signin .si-card::before { background: linear-gradient(90deg, transparent, #b8a6ff 25%, var(--violet) 50%, #b8a6ff 75%, transparent); height: 2px; }
.signin .si-btn { box-shadow: 0 6px 16px -8px rgba(106, 71, 240, 0.65); }
.signin .si-main h1 { letter-spacing: -0.035em; }
.signin .si-main { justify-content: center; padding-top: 24px; padding-bottom: 48px; }

/* login: destaque em degradê roxo suave no nome da marca */
.grad-text { background: linear-gradient(100deg, #5b3df0 0%, #7c5cfc 45%, #9a7bff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #6a47f0; }
:root[data-theme="dark"] .grad-text { background-image: linear-gradient(100deg, #8f78ff 0%, #b49bff 55%, #d3c4ff 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad-text { background-image: linear-gradient(100deg, #8f78ff 0%, #b49bff 55%, #d3c4ff 100%); } }

/* menu: item "Projetos" ainda não disponível */
.nav-soon { background: none; font-family: inherit; text-align: left; cursor: default; color: var(--text-3); }
.nav-soon .ic { opacity: 0.7; }
.nav-soon:hover { background: var(--mute-bg); color: var(--text-2); }
.soon-badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-size: calc(10.5px * var(--fs)); font-weight: 600; letter-spacing: 0.02em;
  color: var(--lavender); background: var(--accent-soft); border: 1px solid var(--accent-line); }
