/* Carbon Capital / Carbon Data — light (default, paleta anterior) + dark brandbook */

:root,
[data-theme="light"] {
  --cc-turquesa: #00d2c7;
  --cc-chumbo: #161616;
  --cc-preto: #000000;
  --cc-branco: #ffffff;

  --cc-teal: #00d2c7;
  --cc-teal-2: #00b8ae;
  --cc-teal-deep: #0d9488;
  --cc-teal-ink: #0f766e;

  /* paleta light anterior — mais clara e com contraste melhor */
  --cc-bg-0: #f3f6fb;
  --cc-bg-1: #eef3fa;
  --cc-surface: #ffffff;
  --cc-surface-2: #f8fafc;
  --cc-surface-3: #eef2f7;
  --cc-border: rgba(15, 23, 42, 0.08);
  --cc-border-strong: rgba(0, 183, 174, 0.35);
  --cc-text: #0f172a;
  --cc-muted: rgba(15, 23, 42, 0.62);
  --cc-faint: rgba(15, 23, 42, 0.42);
  --cc-ok: #059669;
  --cc-warn: #d97706;
  --cc-danger: #e11d48;
  --cc-shadow: 0 18px 50px -28px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --cc-glow: 0 12px 40px -16px rgba(0, 183, 174, 0.45);
  --cc-nav-bg: rgba(255, 255, 255, 0.82);
  --cc-mesh-1: rgba(0, 210, 199, 0.16);
  --cc-mesh-2: rgba(56, 189, 248, 0.10);
  --cc-mesh-3: rgba(13, 148, 136, 0.08);
  --cc-h1-grad: linear-gradient(135deg, #0f172a 10%, #334155 100%);
  --cc-code-bg: rgba(0, 183, 174, 0.1);
  --cc-tile-glow: rgba(0, 210, 199, 0.12);
  --cc-table-hover: rgba(0, 210, 199, 0.06);
  --cc-bypass-bg: linear-gradient(90deg, #0f172a, #134e4a, #0f172a);
  --cc-bypass-fg: #ecfeff;
  --cc-nav-pill: rgba(15, 23, 42, 0.04);
  --cc-nav-active-bg: linear-gradient(135deg, #5aefe6, #00d2c7);
  --cc-nav-active-fg: #042f2e;
  --cc-brand-mark: #00b8ae;
  --cc-brand-company: rgba(15, 23, 42, 0.55);
  --cc-btn-fg: #042f2e;
  --cc-input-bg: #ffffff;
  --cc-login-vesica: rgba(0, 210, 199, 0.18);
  --radius: 20px;
  --radius-sm: 12px;
  --space-1: 0.5rem;
  --space-2: 0.85rem;
  --space-3: 1.25rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --space-6: 3.25rem;
  --cc-sans: "Montserrat", system-ui, sans-serif;
  --cc-display: "Montserrat", system-ui, sans-serif;
  --cc-mono: "IBM Plex Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --cc-teal: #00d2c7;
  --cc-teal-2: #33dcd2;
  --cc-teal-deep: #00a89f;
  --cc-teal-ink: #00d2c7;
  --cc-bg-0: #0c0c0c;
  --cc-bg-1: #050505;
  --cc-surface: #161616;
  --cc-surface-2: #1e1e1e;
  --cc-surface-3: #262626;
  --cc-border: rgba(255, 255, 255, 0.09);
  --cc-border-strong: rgba(255, 255, 255, 0.18);
  --cc-text: #f2f4f4;
  --cc-muted: #a9b0b0;
  --cc-faint: #71797a;
  --cc-ok: #34d399;
  --cc-warn: #fbbf24;
  --cc-danger: #ff5a6a;
  --cc-shadow: 0 18px 48px -28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --cc-glow: 0 0 28px rgba(0, 210, 199, 0.28);
  --cc-nav-bg: rgba(12, 12, 12, 0.72);
  --cc-mesh-1: rgba(0, 210, 199, 0.28);
  --cc-mesh-2: rgba(0, 210, 199, 0.14);
  --cc-mesh-3: rgba(0, 210, 199, 0.08);
  --cc-h1-grad: linear-gradient(176deg, #ffffff, #8ea3a3);
  --cc-code-bg: rgba(0, 210, 199, 0.10);
  --cc-tile-glow: rgba(0, 210, 199, 0.10);
  --cc-table-hover: rgba(0, 210, 199, 0.07);
  --cc-bypass-bg: linear-gradient(90deg, #041a19, #0a4b47, #041a19);
  --cc-bypass-fg: #e8fffd;
  --cc-nav-pill: rgba(255, 255, 255, 0.04);
  --cc-nav-active-bg: rgba(0, 210, 199, 0.10);
  --cc-nav-active-fg: #00d2c7;
  --cc-brand-mark: #00d2c7;
  --cc-brand-company: #a9b0b0;
  --cc-btn-fg: #161616;
  --cc-input-bg: #161616;
  --cc-login-vesica: rgba(0, 210, 199, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--cc-sans);
  color: var(--cc-text);
  background-color: var(--cc-bg-0);
  background-image:
    radial-gradient(46% 60% at 26% 12%, var(--cc-mesh-1), transparent 68%),
    radial-gradient(50% 55% at 88% 8%, var(--cc-mesh-2), transparent 72%),
    linear-gradient(180deg, var(--cc-bg-1), var(--cc-bg-0) 65%);
  background-attachment: fixed;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 220ms ease, color 220ms ease;
}

::selection {
  background: var(--cc-turquesa);
  color: var(--cc-chumbo);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

code {
  font-family: var(--cc-mono);
  font-size: 0.86em;
  color: var(--cc-teal);
  background: var(--cc-code-bg);
  padding: 0.18em 0.5em;
  border-radius: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 var(--space-3);
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cc-teal);
  line-height: 1.4;
}

.eyebrow::before {
  content: "◇";
  color: var(--cc-teal);
  font-size: 0.7rem;
}

.lede, .page-header > p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--cc-muted);
  max-width: 40rem;
  margin: var(--space-3) 0 0;
}

h1, h2, h3 {
  font-family: var(--cc-display);
  margin: 0;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  background: var(--cc-h1-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="dark"] h1 {
  font-weight: 900;
}

h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--cc-text);
}

h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cc-text);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2ee6db 0%, #00d2c7 45%, #0d9488 100%);
  color: var(--cc-btn-fg);
  font-family: var(--cc-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: var(--cc-glow);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}
.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 0 24px rgba(0, 210, 199, 0.35);
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-primary {
  background: var(--cc-teal);
  box-shadow: none;
  filter: none;
}
[data-theme="dark"] .btn-primary:hover {
  background: #33dcd2;
  box-shadow: 0 0 24px rgba(0, 210, 199, 0.28);
  filter: none;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cc-teal);
  background: transparent;
  color: var(--cc-teal);
  font-family: var(--cc-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-ghost:hover {
  background: rgba(0, 210, 199, 0.10);
  color: var(--cc-teal);
  border-color: var(--cc-teal);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cc-border-strong);
  background: var(--cc-surface-2);
  color: var(--cc-muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.theme-toggle:hover {
  color: var(--cc-teal);
  border-color: var(--cc-teal);
  background: rgba(0, 210, 199, 0.10);
}

/* Brand lockup */
.cc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.cc-brand-mark,
.cc-brand-mark-img {
  width: 40px;
  height: auto;
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  filter: drop-shadow(0 0 14px rgba(0, 210, 199, 0.22));
}
.cc-brand-mark {
  color: var(--cc-brand-mark);
  display: grid;
  place-items: center;
}
.cc-brand-mark svg {
  width: 40px;
  height: auto;
  display: block;
  overflow: visible;
}
.cc-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.cc-brand-lockup {
  font-family: var(--cc-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cc-text);
  line-height: 1.15;
  text-transform: uppercase;
}
.cc-brand-lockup b {
  color: var(--cc-teal);
  font-weight: 800;
}
.cc-brand-company {
  font-family: var(--cc-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-brand-company);
  line-height: 1.2;
}
.cc-brand-product {
  font-family: var(--cc-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-text);
  line-height: 1.15;
}
.cc-brand-product em {
  font-style: normal;
  color: var(--cc-teal);
}

/* Login */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 42% 60% at 72% 42%, var(--cc-login-vesica), transparent 62%),
    radial-gradient(ellipse 42% 60% at 88% 58%, rgba(0, 210, 199, 0.12), transparent 62%),
    linear-gradient(180deg, var(--cc-bg-1), var(--cc-bg-0) 70%);
}
[data-theme="dark"] .login-body {
  background:
    radial-gradient(ellipse 42% 60% at 72% 42%, var(--cc-login-vesica), transparent 62%),
    radial-gradient(ellipse 42% 60% at 88% 58%, rgba(0, 210, 199, 0.12), transparent 62%),
    linear-gradient(180deg, #050505, var(--cc-bg-0) 65%);
}
.login-hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(2.5rem, 8vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
  overflow: hidden;
  gap: var(--space-2);
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 18% auto auto 58%;
  width: min(48vw, 380px);
  aspect-ratio: 1 / 1.35;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 60% at 32% 50%, var(--cc-login-vesica), transparent 62%),
    radial-gradient(ellipse 42% 60% at 68% 50%, var(--cc-login-vesica), transparent 62%);
  filter: blur(2px);
  opacity: 0.9;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-5);
  position: relative;
  z-index: 1;
}
.login-brand .cc-brand-mark-img,
.login-brand .cc-brand-mark {
  width: 56px;
  filter: drop-shadow(0 0 28px rgba(0, 210, 199, 0.35));
}
.login-brand .cc-brand-lockup {
  font-size: 1.05rem;
}
.login-brand .cc-brand-product {
  font-size: 1.05rem;
}
.login-actions {
  position: relative;
  z-index: 1;
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.login-note {
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--cc-faint);
}

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }

.bypass-banner {
  background: var(--cc-bypass-bg);
  color: var(--cc-bypass-fg);
  text-align: center;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid rgba(0, 210, 199, 0.3);
}
.bypass-banner code { color: var(--cc-teal-2); }

.app-nav {
  position: sticky;
  top: 0.85rem;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.2fr);
  align-items: center;
  gap: var(--space-3);
  margin: 0.85rem clamp(1rem, 3.5vw, 1.75rem) 0;
  padding: 0.85rem 1.15rem;
  border-radius: 18px;
  background: var(--cc-nav-bg);
  border: 1px solid var(--cc-border);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: var(--cc-shadow);
}

[data-theme="dark"] .app-nav {
  top: 0;
  margin: 0;
  padding: 0.9rem clamp(1rem, 3.5vw, 1.75rem);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--cc-border);
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.app-nav-links {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--cc-nav-pill);
  flex-wrap: wrap;
}
.app-nav-links a {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cc-faint);
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}
.app-nav-links a:hover {
  color: var(--cc-text);
  background: rgba(127, 127, 127, 0.08);
}
.app-nav-links a.active {
  color: var(--cc-nav-active-fg);
  background: var(--cc-nav-active-bg);
  box-shadow: 0 8px 20px -10px rgba(0, 210, 199, 0.75);
}
[data-theme="dark"] .app-nav-links {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
[data-theme="dark"] .app-nav-links a {
  border-radius: 8px;
}
[data-theme="dark"] .app-nav-links a:hover {
  color: var(--cc-teal);
  background: rgba(0, 210, 199, 0.10);
}
[data-theme="dark"] .app-nav-links a.active {
  box-shadow: none;
}

.app-nav-user {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  color: var(--cc-muted);
}

.app-nav-signout {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cc-muted);
  transition: color 180ms ease, background 180ms ease;
}
.app-nav-signout:hover {
  color: var(--cc-teal);
  background: rgba(0, 210, 199, 0.10);
}

.app-main {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: var(--space-5) 0 var(--space-6);
}

.page-header {
  margin-bottom: var(--space-5);
  animation: rise 520ms cubic-bezier(.22,1,.36,1) both;
}
.page-header h1 { margin-top: 0.15rem; }

.section {
  margin-top: var(--space-5);
  animation: rise 640ms cubic-bezier(.22,1,.36,1) both;
}
.section + .section { animation-delay: 60ms; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.section-head .sub {
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  color: var(--cc-faint);
  padding-bottom: 0.15rem;
  letter-spacing: 0.02em;
}

.panel {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--cc-shadow);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .panel {
  box-shadow: none;
  backdrop-filter: none;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (max-width: 960px) {
  .status-grid { grid-template-columns: 1fr; }
  .app-nav {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: var(--space-2);
  }
  .app-nav-links { justify-content: start; flex-wrap: wrap; width: 100%; }
  .app-nav-user { justify-self: start; width: 100%; }
}

.status-tile {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2);
  background:
    radial-gradient(480px 180px at 100% 0%, var(--cc-tile-glow), transparent 55%),
    var(--cc-surface);
  border: 1px solid var(--cc-border);
  box-shadow: var(--cc-shadow);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
[data-theme="dark"] .status-tile {
  background:
    radial-gradient(60% 60% at 100% 0%, var(--cc-tile-glow), transparent 68%),
    var(--cc-chumbo);
  box-shadow: none;
  border-radius: 14px;
  min-height: 148px;
}
.status-tile:hover {
  transform: translateY(-3px);
  border-color: var(--cc-border-strong);
  box-shadow: var(--cc-glow), var(--cc-shadow);
}

.status-tile .label {
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-teal);
}
.status-tile .value {
  font-family: var(--cc-display);
  font-size: 2rem;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--cc-text);
  margin-top: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok {
  background: rgba(0, 210, 199, 0.10);
  color: var(--cc-teal);
  border-color: rgba(0, 210, 199, 0.30);
}
.badge-bad {
  background: rgba(255, 90, 106, 0.10);
  color: var(--cc-danger);
  border-color: rgba(255, 90, 106, 0.28);
}
.badge-warn {
  background: rgba(240, 180, 41, 0.12);
  color: var(--cc-warn);
  border-color: rgba(240, 180, 41, 0.28);
}
.badge-muted {
  background: var(--cc-surface-2);
  color: var(--cc-faint);
  border-color: var(--cc-border);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-faint);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--cc-border);
  font-weight: 500;
}
.data-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--cc-border);
  vertical-align: middle;
  color: var(--cc-muted);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cc-table-hover); }
.data-table strong {
  color: var(--cc-text);
  font-weight: 700;
}

.airflow-tree .tree-toggle {
  min-width: 2rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.95rem;
  line-height: 1;
}

.airflow-tree tr.tree-child > td {
  padding: 0.5rem 0.75rem 1rem;
  background: var(--cc-surface-2, rgba(0, 0, 0, 0.12));
}

.airflow-tree .tree-panel {
  margin: 0.25rem 0 0.5rem 0.5rem;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--cc-teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.airflow-tree .tree-panel-tasks {
  margin-left: 0.25rem;
}

.airflow-tree .tree-panel-head {
  margin-bottom: 0.65rem;
}

.query-chip {
  display: inline-block;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
}

.query-col {
  width: 100%;
  vertical-align: top !important;
}

.query-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.query-block {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cc-border-strong);
  background: var(--cc-input-bg);
  color: var(--cc-teal);
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 10rem;
  overflow: auto;
  user-select: text;
  cursor: text;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="dark"] .query-block {
  background: #080808;
}

.query-copy {
  align-self: flex-start;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
}

.proc-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.proc-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: none;
  min-width: 0;
}

.proc-card-slow {
  border-color: rgba(0, 210, 199, 0.35);
  box-shadow: inset 3px 0 0 var(--cc-teal);
}

.proc-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.proc-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  min-width: 0;
  font-size: 0.84rem;
}

.proc-card-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
}

.proc-duration {
  font-family: var(--cc-mono);
  font-weight: 600;
  color: var(--cc-text);
  font-variant-numeric: tabular-nums;
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-2);
}

.trace-grid > div { min-width: 0; }
.trace-grid dt {
  margin: 0;
  font-family: var(--cc-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-faint);
}
.trace-grid dd {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cc-text);
  word-break: break-word;
}

@media (max-width: 900px) {
  .trace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chart-box {
  width: 100%;
  height: 320px;
  border-radius: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-4);
  align-items: center;
  font-family: var(--cc-mono);
  font-size: 0.75rem;
  color: var(--cc-muted);
  letter-spacing: 0.02em;
}

.featured { background: linear-gradient(90deg, var(--cc-tile-glow), transparent 70%) !important; }
.featured td:first-child { box-shadow: inset 3px 0 0 var(--cc-teal); }

.muted { color: var(--cc-muted); }
.error-inline {
  color: var(--cc-danger);
  background: rgba(255, 90, 106, 0.08);
  border: 1px solid rgba(255, 90, 106, 0.22);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: var(--space-3);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(113, 121, 122, 0.45);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 199, 0.45);
}

/* —— OCI FinOps —— */
.currency-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-2);
  gap: 2px;
}
.currency-toggle button {
  border: none;
  background: transparent;
  color: var(--cc-muted);
  font-family: var(--cc-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}
.currency-toggle button.active {
  background: var(--cc-teal);
  color: var(--cc-btn-fg);
}
.oci-project-tile { cursor: pointer; }
.oci-kpi .value { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.oci-project-table .oci-project-row { cursor: pointer; }
.oci-project-table .oci-project-row.is-active td {
  background: rgba(0, 210, 199, 0.08);
}
.oci-project-table td .muted {
  margin-top: 0.15rem;
  font-size: 0.72rem;
}
.oci-note {
  margin: 0.85rem 1rem 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 52rem;
}
.oci-sync-foot {
  margin: 0.5rem 0 1.5rem;
  font-size: 0.78rem;
}
.oci-daily-fallback {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 220px;
  padding: 0.5rem 0.75rem 0.25rem;
}
.oci-daily-bar {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
}
.oci-daily-fill {
  width: 100%;
  max-width: 18px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #00d2c7, rgba(0, 210, 199, 0.35));
}
.oci-daily-label {
  font-family: var(--cc-mono);
  font-size: 0.58rem;
  color: var(--cc-faint);
}

.access-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.access-chip {
  font-family: var(--cc-mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 199, 0.28);
  background: rgba(0, 210, 199, 0.08);
  color: var(--cc-teal);
}

/* —— OCI Topologia (arquitetura dual) —— */
.topo-only { margin-top: var(--space-3); }
.arch-map {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(60% 50% at 50% 0%, var(--cc-tile-glow), transparent 70%),
    var(--cc-surface);
}
.arch-map-head h2 {
  margin: 0;
  font-family: var(--cc-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.arch-map-head .muted { margin: 0.35rem 0 0; }
.arch-zones {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(200px, 1.1fr) minmax(280px, 2fr);
  gap: 0.85rem;
  align-items: stretch;
}
.arch-zones:has(.arch-zone-wide:last-child:nth-child(2)) {
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 2.2fr);
}
.arch-zone {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  padding: 0.85rem;
  border: 1px dashed var(--cc-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .arch-zone {
  background: rgba(22, 22, 22, 0.03);
}
.arch-zone-accent {
  border-style: solid;
  border-color: rgba(0, 210, 199, 0.28);
  background: rgba(0, 210, 199, 0.05);
}
.arch-zone-wide { min-width: 0; }
.arch-zone-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-teal);
}
.arch-zone-vcn {
  color: var(--cc-faint);
  letter-spacing: 0.04em;
  text-transform: none;
}
.arch-zone-status {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--cc-border);
  color: var(--cc-faint);
}
.arch-zone-status.status-ok {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.08);
}
.arch-zone-status.status-down {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
}
.arch-zone-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-content: flex-start;
}
.arch-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.75rem;
  width: 100%;
}
.topo-box.topo-context {
  border-style: dashed;
  opacity: 0.92;
  padding-left: 1rem;
}
.topo-box.topo-context .topo-status { display: none; }

.topo-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 0.85rem 1rem 0.85rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.topo-box.hub {
  border-color: rgba(0, 210, 199, 0.35);
  background:
    radial-gradient(80% 80% at 20% 0%, var(--cc-tile-glow), transparent 60%),
    var(--cc-surface-2);
}
.topo-box.status-ok { border-color: rgba(5, 150, 105, 0.35); }
.topo-box.status-down { border-color: rgba(225, 29, 72, 0.4); }
.topo-status {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cc-faint);
}
.topo-box.status-ok .topo-status {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22), 0 0 12px rgba(22, 163, 74, 0.55);
}
.topo-box.status-down .topo-status {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22), 0 0 12px rgba(220, 38, 38, 0.45);
}
.topo-box.status-unknown .topo-status {
  background: #94a3b8;
}
.topo-name {
  font-family: var(--cc-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  color: var(--cc-text);
  line-height: 1.2;
  word-break: break-word;
}
.topo-meta {
  font-family: var(--cc-mono);
  font-size: 0.65rem;
  color: var(--cc-faint);
}
@media (max-width: 1100px) {
  .arch-zones,
  .arch-zones:has(.arch-zone-wide:last-child:nth-child(2)) {
    grid-template-columns: 1fr;
  }
}
