:root {
  --bg: #07111f;
  --panel: rgba(11, 20, 35, 0.94);
  --panel-2: rgba(16, 29, 49, 0.96);
  --line: rgba(255, 255, 255, 0.09);
  --text: #edf3ff;
  --muted: #95a9c9;
  --primary: #ff375f;
  --accent: #46d4c5;
  --success: #4ade80;
  --warning: #facc15;
  --danger: #fb7185;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  color-scheme: dark;
  background:
    radial-gradient(circle at top left, rgba(255, 55, 95, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(70, 212, 197, 0.12), transparent 28%),
    linear-gradient(180deg, #08111e 0%, #0c1525 48%, #121d30 100%);
}

.hidden { display: none !important; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  z-index: 80;
}

.modal {
  position: fixed;
  inset: 36px;
  max-width: 1100px;
  margin: auto;
  z-index: 90;
  overflow: auto;
  padding: 0;
}

@media (max-width: 900px) {
  .modal { inset: 16px; max-width: none; }
}
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--accent); margin: 0 0 10px; }
.muted { color: var(--muted); line-height: 1.6; }
.message { min-height: 1.4em; color: var(--danger); }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  padding: 32px;
}

.hero, .card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 90px rgba(0,0,0,.35);
}

.hero { padding: 36px; display: grid; gap: 24px; align-content: center; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; max-width: 11ch; }
.hero-logo, .sidebar-logo { width: 100%; border-radius: 16px; background: white; }

.form-card { padding: 32px; display: grid; align-content: center; gap: 16px; }
.form-card h2 { margin: 0 0 8px; }

label { display: grid; gap: 8px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  color-scheme: dark;
}
select option { background: #0a1424; color: var(--text); }
select option:checked, select option:hover { background: #173458; color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(70, 212, 197, .65);
  box-shadow: 0 0 0 4px rgba(70, 212, 197, .12);
}

.button, .nav-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.button.primary { background: linear-gradient(135deg, var(--primary), #ff6c88); color: white; font-weight: 700; }
.button.secondary { background: linear-gradient(135deg, var(--accent), #7ef4e7); color: #07111f; font-weight: 700; }
.button.ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--line); }

.app-screen { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; align-items: start; }
.sidebar {
  height: 100vh;
  position: sticky; top: 0;
  background: rgba(7, 16, 29, .92);
  border-right: 1px solid var(--line);
  padding: 18px 16px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  overflow: hidden;
}
.sidebar-logo { max-height: 58px; object-fit: contain; padding: 8px; }
.brand-block { display: grid; gap: 4px; }
.nav { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.nav-section { color: var(--accent); font-size: .66rem; letter-spacing: .14em; margin: 9px 6px 1px; text-transform: uppercase; }
.nav-link { background: transparent; color: var(--muted); text-align: left; border: 1px solid transparent; justify-content: flex-start; padding: 8px 11px; min-height: 34px; }
.nav-link.active, .nav-link:hover { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line); }
.sidebar-footer { display: grid; gap: 12px; }
.sidebar-footer strong { display: block; color: var(--text); }

.main { padding: 28px; display: grid; gap: 20px; min-height: 100vh; align-content: start; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.topbar h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.9rem); }
.topbar-actions, .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.content { display: grid; gap: 18px; }
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 24px; }
.stat strong { display: block; margin-top: 12px; font-size: 2rem; }
.tag { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow: auto; }

.status { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.online { background: var(--success); }
.warning { background: var(--warning); }
.error { background: var(--danger); }
.offline { background: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill-check {
  align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  padding: 8px 12px;
}
.pill-check input { width: auto; }
.pill-check:has(input:checked) { border-color: rgba(64,224,208,.55); color: var(--text); }
.filter-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; margin: 16px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.035); }
.settings-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-align: left; }
.link-button { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-align: left; }
.kebab { position: relative; display: inline-block; }
.kebab summary { list-style: none; width: 38px; height: 38px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); font-size: 1.4rem; line-height: 1; }
.kebab summary::-webkit-details-marker { display: none; }
.kebab div { position: absolute; right: 0; top: 44px; z-index: 20; min-width: 230px; border: 1px solid var(--line); border-radius: 18px; background: #0a1424; box-shadow: 0 20px 60px rgba(0,0,0,.42); padding: 8px; display: grid; gap: 4px; }
.kebab button, .kebab span { width: 100%; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; padding: 10px 12px; font: inherit; }
.kebab button:hover { background: rgba(255,255,255,.07); color: var(--accent); cursor: pointer; }
.kebab .disabled { color: var(--muted); opacity: .55; cursor: not-allowed; }
.incident-strip { border-color: rgba(250,204,21,.35); background: linear-gradient(135deg, rgba(250,204,21,.08), rgba(255,255,255,.03)); }
.incident-links { display: flex; gap: 10px; flex-wrap: wrap; }
.health-summary strong { color: var(--success); }
.timeframe-control { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; margin-top: 18px; }
.entity-detail { display: grid; gap: 18px; }
.detail-hero { display: flex; justify-content: space-between; gap: 22px; align-items: stretch; overflow: hidden; position: relative; }
.detail-hero::after { content: ""; position: absolute; inset: auto -10% -45% 45%; height: 180px; background: radial-gradient(circle, rgba(70,212,197,.22), transparent 62%); pointer-events: none; }
.detail-hero-main { position: relative; z-index: 1; display: grid; gap: 10px; }
.detail-hero h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.04em; }
.detail-health { position: relative; z-index: 1; min-width: 240px; border: 1px solid var(--line); border-radius: 26px; padding: 18px; display: grid; gap: 14px; background: rgba(255,255,255,.04); }
.detail-health small { color: var(--muted); line-height: 1.5; }
.detail-health strong { color: var(--text); }
.health-pill { display: flex; align-items: center; gap: 12px; border-radius: 22px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); }
.health-pill > span { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,.05); }
.health-pill strong { font-size: 1.35rem; letter-spacing: .04em; }
.health-pill small { margin-left: auto; text-align: right; }
.health-pill.online > span { background: var(--success); box-shadow: 0 0 0 8px rgba(74,222,128,.13), 0 0 28px rgba(74,222,128,.5); }
.health-pill.warning > span { background: var(--warning); box-shadow: 0 0 0 8px rgba(250,204,21,.13), 0 0 28px rgba(250,204,21,.4); }
.health-pill.offline > span { background: var(--danger); box-shadow: 0 0 0 8px rgba(251,113,133,.13), 0 0 28px rgba(251,113,133,.4); }
.health-pill.online { border-color: rgba(74,222,128,.5); }
.health-pill.warning { border-color: rgba(250,204,21,.5); }
.health-pill.offline { border-color: rgba(251,113,133,.55); }
.detail-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.metric-tile { border: 1px solid var(--line); border-radius: 22px; padding: 18px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); display: grid; gap: 8px; min-height: 118px; }
.metric-tile span, .metric-tile small { color: var(--muted); }
.metric-tile strong { font-size: 1.35rem; overflow-wrap: anywhere; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.feature-tile { border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.04); }
.feature-tile > span { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.feature-tile.enabled { border-color: rgba(74,222,128,.35); }
.feature-tile.enabled > span { background: var(--success); box-shadow: 0 0 20px rgba(74,222,128,.45); }
.feature-tile.disabled { opacity: .72; }
.feature-tile strong { display: block; }
.feature-tile small { color: var(--muted); }
.soft-card { background: rgba(255,255,255,.035); box-shadow: none; border-radius: 22px; }
.check-row { display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 10px; padding: 10px 0; color: var(--text); border-bottom: 1px solid rgba(255,255,255,.06); }
.check-row input { width: auto; }
.section-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 12px; }
.section-header h3 { margin: 0; }
.resource-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.percent-bar { border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: rgba(255,255,255,.04); display: grid; gap: 12px; }
.percent-bar div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.percent-bar strong { color: var(--text); }
.percent-bar b { display: block; height: 10px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.percent-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.charts-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.detail-grid span { border: 1px solid var(--line); border-radius: 18px; padding: 14px; color: var(--muted); background: rgba(255,255,255,.04); }
.detail-grid strong { color: var(--text); }
.metric-chart { display: grid; gap: 10px; margin-top: 14px; }
.metric-chart svg { width: 100%; min-height: 180px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.chart-title { color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.chart-title small { font-weight: 500; color: var(--muted); }
.chart-grid-line { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
.chart-empty { border: 1px dashed var(--line); border-radius: 20px; padding: 28px; color: var(--muted); }
.topology-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.topology-card { overflow: hidden; }
.topology-canvas {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(70,212,197,.14), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(244,43,87,.11), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
}
.topology-node {
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  background: rgba(6,14,26,.72);
  position: relative;
  overflow: hidden;
}
.topology-node::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--muted);
}
.topology-node.online::before { background: var(--success); box-shadow: 0 0 22px rgba(74,222,128,.55); }
.topology-node.warning::before { background: var(--warning); box-shadow: 0 0 22px rgba(250,204,21,.45); }
.topology-node.offline::before { background: var(--danger); box-shadow: 0 0 22px rgba(251,113,133,.45); }
.topology-node.application { background: linear-gradient(135deg, rgba(70,212,197,.12), rgba(255,255,255,.025)); }
.topology-node.service { background: linear-gradient(135deg, rgba(244,43,87,.10), rgba(255,255,255,.025)); }
.topology-node.network_asset { background: linear-gradient(135deg, rgba(250,204,21,.10), rgba(255,255,255,.025)); }
.topology-node small { color: var(--accent); text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.topology-node strong { display: block; margin-top: 8px; font-size: 1.1rem; overflow-wrap: anywhere; }
.topology-node span { color: var(--muted); overflow-wrap: anywhere; }
.topology-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.topology-metrics span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.05); color: var(--muted); font-size: .84rem; }
.topology-metrics strong { color: var(--text); font-size: inherit; display: inline; margin: 0; }
.topology-edge-list { display: grid; gap: 10px; }
.topology-edge-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(130px, .8fr) minmax(120px, 1fr) minmax(180px, 1.2fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.035);
}
.topology-edge-row b {
  color: var(--accent);
  text-align: center;
  font-size: .9rem;
  position: relative;
}
.topology-edge-row b::before, .topology-edge-row b::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: rgba(70,212,197,.65);
  vertical-align: middle;
  margin: 0 8px;
}
.topology-map {
  width: 100%;
  min-height: min(var(--map-height), 760px);
  max-height: 760px;
  overflow: auto;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 15% 20%, rgba(70,212,197,.16), transparent 28%),
    radial-gradient(circle at 80% 75%, rgba(244,43,87,.12), transparent 32%),
    #07111f;
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}
.topology-svg {
  width: var(--map-width);
  height: var(--map-height);
  display: block;
}
.topology-link {
  fill: none;
  stroke: rgba(70,212,197,.62);
  stroke-width: 2.5;
  marker-end: url(#arrow);
  filter: drop-shadow(0 0 8px rgba(70,212,197,.18));
}
.topology-link.warning { stroke: rgba(250,204,21,.75); }
.topology-link.offline { stroke: rgba(251,113,133,.75); }
.topology-arrow { fill: rgba(70,212,197,.8); }
.topology-link-label {
  fill: var(--muted);
  font-size: 12px;
  paint-order: stroke;
  stroke: #07111f;
  stroke-width: 5px;
  stroke-linejoin: round;
}
.topology-lane-label {
  position: absolute;
  top: 16px;
  transform: translateX(20px);
  color: var(--accent);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
  pointer-events: none;
}
.topology-map-node {
  position: absolute;
  width: 168px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 12px 12px 52px;
  background: rgba(10,20,36,.94);
  color: var(--text);
  text-align: left;
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}
.topology-map-node > span:first-child {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(70,212,197,.13);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
}
.topology-map-node strong { display: block; font-size: .92rem; overflow-wrap: anywhere; }
.topology-map-node small { color: var(--muted); display: block; margin-top: 3px; overflow-wrap: anywhere; }
.topology-map-node.online { border-color: rgba(74,222,128,.48); }
.topology-map-node.warning { border-color: rgba(250,204,21,.55); }
.topology-map-node.offline { border-color: rgba(251,113,133,.58); }
.topology-map-node.network_asset > span:first-child { background: rgba(250,204,21,.14); color: var(--warning); }
.topology-map-node.application > span:first-child { background: rgba(244,43,87,.14); color: var(--primary); }
.topology-map-node.external_service > span:first-child { background: rgba(255,255,255,.10); color: var(--muted); }

@media (max-width: 1120px) {
  .login-screen, .settings-grid, .grid.two, .app-screen, .timeframe-control, .charts-grid, .charts-grid.three, .resource-snapshot, .topology-edge-row { grid-template-columns: 1fr; }
  .detail-hero { flex-direction: column; }
  .sidebar { height: auto; min-height: auto; position: static; overflow: visible; }
  .nav { max-height: none; overflow: visible; }
}

@media (max-width: 720px) {
  .login-screen, .main { padding: 18px; }
  .hero, .card, .form-card { padding: 22px; border-radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UI v2 (tema alternativo) + Inspector (painel lateral)
   Ativado por: body[data-ui="v2"]
   ============================================================ */

.app-screen {
  transition: grid-template-columns .22s ease;
}
body.has-inspector .app-screen {
  grid-template-columns: 300px minmax(0, 1fr) 380px;
}

.inspector {
  min-height: 100vh;
  position: sticky;
  top: 0;
  background: rgba(7, 16, 29, .94);
  border-left: 1px solid var(--line);
  padding: 18px 16px 22px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  overflow: hidden;
}
.inspector-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.inspector-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.inspector-body {
  overflow: auto;
  padding-right: 4px;
}

body[data-ui="v2"] {
  --bg: #050b14;
  --panel: rgba(10, 16, 27, 0.92);
  --panel-2: rgba(14, 24, 40, 0.94);
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef4ff;
  --muted: rgba(221, 231, 255, .62);
  --primary: #ff4a6e;
  --accent: #36e3d2;
}

body[data-ui="v2"] .sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(54,227,210,.10), transparent 36%),
    radial-gradient(circle at 70% 40%, rgba(255,74,110,.09), transparent 42%),
    rgba(6, 12, 22, .92);
}
body[data-ui="v2"] .sidebar-logo {
  border-radius: 14px;
  padding: 10px;
}
body[data-ui="v2"] .nav {
  gap: 4px;
}
body[data-ui="v2"] .nav-link {
  justify-content: flex-start;
  padding: 9px 13px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(221, 231, 255, .78);
}
body[data-ui="v2"] .nav-link:hover {
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
body[data-ui="v2"] .nav-link.active {
  border-color: rgba(54,227,210,.42);
  background: linear-gradient(135deg, rgba(54,227,210,.12), rgba(255,255,255,.04));
  color: var(--text);
}

body[data-ui="v2"] .topbar {
  background: linear-gradient(180deg, rgba(6,12,22,.65), rgba(6,12,22,0));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body[data-ui="v2"] .card {
  background:
    radial-gradient(circle at 20% 0%, rgba(54,227,210,.07), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255,74,110,.06), transparent 46%),
    var(--panel);
  box-shadow: 0 32px 120px rgba(0,0,0,.38);
}
body[data-ui="v2"] .metric-tile {
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.02));
}

body[data-ui="v2"] .table-wrap {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
}
body[data-ui="v2"] table {
  border-collapse: separate;
  border-spacing: 0;
}
body[data-ui="v2"] th, body[data-ui="v2"] td {
  border-bottom-color: rgba(255,255,255,.06);
  padding: 14px 12px;
}
body[data-ui="v2"] thead th {
  position: sticky;
  top: 0;
  background: rgba(6, 12, 22, .92);
  backdrop-filter: blur(12px);
  z-index: 2;
}
body[data-ui="v2"] tbody tr:hover td {
  background: rgba(255,255,255,.035);
}

body[data-ui="v2"] select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(221,231,255,.7) 50%),
    linear-gradient(135deg, rgba(221,231,255,.7) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

body[data-ui="v2"] .v2-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: start;
  gap: 18px;
}
body[data-ui="v2"] .v2-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
body[data-ui="v2"] .v2-title-row h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  letter-spacing: -.04em;
}
body[data-ui="v2"] .v2-actions {
  margin-top: 8px;
  flex-wrap: wrap;
}
body[data-ui="v2"] .v2-hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body[data-ui="v2"] .v2-hero-kpis .metric-tile {
  min-height: 106px;
  border-radius: 20px;
  padding: 16px;
}

@media (max-width: 1120px) {
  body[data-ui="v2"] .v2-hero { grid-template-columns: 1fr; }
}

@media (max-width: 1120px) {
  body.has-inspector .app-screen { grid-template-columns: 1fr; }
  .inspector {
    position: fixed;
    inset: 10px;
    z-index: 120;
    border-radius: 22px;
    box-shadow: 0 28px 90px rgba(0,0,0,.55);
  }
}
