/* ==========================================================================
   FACILITO B2B - CONSOLE & DASHBOARD DESIGN SYSTEM (DARK LUXURY / LINEAR)
   ========================================================================== */

:root {
  /* Surface & Base Tokens */
  --bg-main: #07080B;
  --bg-subtle: #0B0D13;
  --bg-surface: #10141E;
  --bg-surface-elevated: #151B28;
  --bg-surface-hover: #1C2335;
  --bg-surface-glass: rgba(16, 20, 30, 0.75);

  /* Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(56, 189, 248, 0.5);

  /* Typography Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dim: #475569;

  /* Controlled Accents (Anti-AI Cliché: No cheap purple gradients) */
  --accent-cyan: #38BDF8;
  --accent-cyan-hover: #7DD3FC;
  --accent-cyan-glow: rgba(56, 189, 248, 0.12);
  --accent-cyan-border: rgba(56, 189, 248, 0.28);
  
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.28);

  --accent-amber: #F59E0B;
  --accent-amber-glow: rgba(245, 158, 11, 0.12);
  --accent-amber-border: rgba(245, 158, 11, 0.3);

  --accent-rose: #F43F5E;
  --accent-rose-glow: rgba(244, 63, 94, 0.12);

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Motion & Layout */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 264px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ================= GATED ACCESS TOP BANNER ================= */
.gated-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, rgba(20, 16, 12, 0.95) 50%, rgba(245, 158, 11, 0.08) 100%);
  border-bottom: 1px solid var(--accent-amber-border);
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
}

.banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FDE68A;
  font-size: 12.5px;
  font-weight: 450;
}

.pulse-dot-amber {
  width: 8px;
  height: 8px;
  background-color: var(--accent-amber);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-amber);
  animation: pulse-glow 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10B981;
  color: #041E15;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-whatsapp-cta:hover {
  background: #34D399;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.icon-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ================= APP LAYOUT ================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0.04) 100%);
  border: 1px solid var(--accent-cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.1);
}

.brand-text h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.accent-text {
  color: var(--accent-cyan);
}

.brand-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan-border);
  display: inline-block;
  margin-top: 3px;
  font-family: var(--font-mono);
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s var(--ease-spring);
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-cyan);
  font-weight: 600;
  border-color: var(--accent-cyan-border);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.06);
}

.nav-icon-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.8px;
  stroke: currentColor;
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid var(--accent-emerald-border);
  padding: 8px 12px;
  border-radius: 7px;
}

.status-pulse-green {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite ease-in-out;
  flex-shrink: 0;
}

.status-meta {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.status-val {
  font-size: 11px;
  color: var(--accent-emerald);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ================= MAIN CONTAINER ================= */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-main);
}

.topbar {
  height: 60px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumbs {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs span {
  color: var(--text-primary);
  font-weight: 600;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px 5px 6px;
  border-radius: 24px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
  color: #04141E;
  font-weight: 750;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-badges {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.role-badge {
  font-size: 8.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 1px 5px;
  border-radius: 3px;
}

.status-badge {
  font-size: 8.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
}

.status-badge.ACTIVE {
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.status-badge.PENDING_APPROVAL {
  background: var(--accent-amber-glow);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.status-badge.REVOKED, .status-badge.SUSPENDED {
  background: var(--accent-rose-glow);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* ================= TAB PANELS ================= */
.tab-viewport {
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: panelFadeIn 0.25s var(--ease-spring);
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.panel-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
  max-width: 680px;
}

/* ================= STATS GRID ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.22s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8px;
}

.stat-icon-wrap.cyan {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan-border);
}

.stat-icon-wrap.emerald {
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.stat-icon-wrap.purple {
  background: rgba(56, 189, 248, 0.1);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.stat-icon-wrap.amber {
  background: var(--accent-amber-glow);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
  color: var(--text-primary);
}

.stat-trend {
  font-size: 11px;
  font-weight: 500;
}

.stat-trend.positive { color: var(--accent-emerald); }
.stat-trend.neutral { color: var(--text-secondary); }

/* ================= CARDS & ARCHITECTURE ================= */
.card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 24px;
  position: relative;
}

.card-glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.card-glass-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge-accent {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan-border);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.architecture-pills {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.arch-box {
  flex: 1;
  min-width: 220px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s var(--ease-spring);
}

.arch-box:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.arch-box.highlight {
  border-color: var(--accent-cyan-border);
  background: rgba(56, 189, 248, 0.03);
}

.arch-box-title {
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-box-title svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-cyan);
  stroke-width: 1.8px;
  flex-shrink: 0;
}

.arch-box p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.arch-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-dim);
}

/* ================= PLAYGROUND ================= */
.playground-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.playground-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  height: fit-content;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.input-control {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

select.input-control {
  cursor: pointer;
}

select.input-control option {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.segmented-control {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.16s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.segment-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

.segment-btn:hover {
  color: var(--text-primary);
}

.segment-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.form-row {
  display: flex;
  gap: 10px;
}

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-outline-sm svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

.btn-outline-sm:hover {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan-border);
}

.range-control {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ================= PLAYGROUND RESULTS PANE ================= */
.playground-results-pane {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

.tabs-subnav {
  display: flex;
  gap: 6px;
}

.subtab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.subtab-btn:hover {
  color: var(--text-primary);
}

.subtab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
}

.latency-badge {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  background: var(--accent-emerald-glow);
  border: 1px solid var(--accent-emerald-border);
  padding: 3px 8px;
  border-radius: 4px;
}

.subtab-content {
  display: none;
  padding: 20px;
  flex: 1;
}

.subtab-content.active {
  display: block;
}

/* ================= STATIONS GRID & CARDS ================= */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.station-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s var(--ease-spring);
  position: relative;
}

.station-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.station-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.station-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.35;
}

.brand-tag {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-tag.REPSOL { background: rgba(234, 88, 12, 0.18); color: #FB923C; border: 1px solid rgba(234, 88, 12, 0.4); }
.brand-tag.PRIMAX { background: rgba(234, 179, 8, 0.18); color: #FDE047; border: 1px solid rgba(234, 179, 8, 0.4); }
.brand-tag.PETROPERU { background: rgba(220, 38, 38, 0.18); color: #F87171; border: 1px solid rgba(220, 38, 38, 0.4); }
.brand-tag.INDEPENDIENTE { background: var(--accent-cyan-glow); color: var(--accent-cyan); border: 1px solid var(--accent-cyan-border); }

.station-addr {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.station-addr svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.station-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  gap: 8px;
}

.station-prod-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 55%;
  line-height: 1.3;
}

.station-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  text-align: right;
}

.station-price-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 750;
  color: var(--accent-emerald);
}

.station-unit-badge {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.station-dist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan-border);
  margin-bottom: 8px;
}

.station-actions {
  display: flex;
  gap: 8px;
}

.btn-nav-waze, .btn-nav-maps {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.16s ease;
}

.btn-nav-waze svg, .btn-nav-maps svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.btn-nav-waze {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan-border);
}

.btn-nav-waze:hover {
  background: var(--accent-cyan);
  color: #04141E;
}

.btn-nav-maps {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-nav-maps:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon-svg {
  width: 44px;
  height: 44px;
  stroke: var(--text-muted);
  margin-bottom: 14px;
  opacity: 0.7;
}

.empty-state p {
  font-size: 13px;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ================= JSON VIEWER & CODE ================= */
.json-viewer-header, .snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

pre {
  background: #040508;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38BDF8;
  max-height: 480px;
  line-height: 1.5;
}

.btn-copy {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-copy:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* ================= BUTTONS ================= */
.btn-primary {
  background: var(--accent-cyan);
  color: #04141E;
  font-weight: 650;
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s var(--ease-spring);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

.btn-primary svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2px;
}

.btn-primary:hover {
  background: var(--accent-cyan-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.16s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.btn-outline-glow {
  background: transparent;
  border: 1px solid var(--accent-cyan-border);
  color: var(--accent-cyan);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease-spring);
}

.btn-outline-glow:hover {
  background: var(--accent-cyan-glow);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* ================= TABLES ================= */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ================= WHATSAPP PHONE MOCKUP ================= */
.whatsapp-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.phone-mockup {
  background: #080A0E;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 1px rgba(56, 189, 248, 0.2);
  height: 560px;
}

.phone-screen {
  background: #0B141A;
  border-radius: 26px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.phone-header {
  background: #182229;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-avatar-svg {
  width: 36px;
  height: 36px;
  background: #00A884;
  color: #041E15;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-avatar-svg svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2px;
}

.phone-title h4 {
  font-size: 13px;
  font-weight: 600;
  color: #E9EDEF;
  line-height: 1.2;
}

.online-indicator {
  font-size: 11px;
  color: #00A884;
  font-weight: 500;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.chat-bubble.incoming {
  background: #182229;
  color: #E9EDEF;
  align-self: flex-start;
  border-top-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-bubble.outgoing {
  background: #005C4B;
  color: #E9EDEF;
  align-self: flex-end;
  border-top-right-radius: 2px;
}

.chat-input-bar {
  background: #182229;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-input-bar input {
  flex: 1;
  background: #222E35;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #FFF;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.chat-input-bar input:focus {
  border-color: #00A884;
}

.btn-send-wa {
  background: #00A884;
  border: none;
  color: #041E15;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-send-wa:hover {
  background: #25D366;
  transform: scale(1.05);
}

.btn-send-wa svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2px;
}

.chips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s var(--ease-spring);
  font-family: inherit;
}

.chip:hover {
  border-color: var(--accent-cyan-border);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.04);
  transform: translateX(3px);
}

/* ================= REPORTS (PDF) ================= */
.reports-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.badge-gemini {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan-border);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-gemini svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.gemini-text-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 20px;
  min-height: 200px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* ================= MCP TOOLS ================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s var(--ease-spring);
}

.tool-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.tool-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  border: 1px solid var(--accent-cyan-border);
}

.tool-card h4 {
  margin: 10px 0 6px;
  font-size: 13.5px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.tool-card p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ================= MODALS ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.2s var(--ease-spring);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.alert-warning {
  background: var(--accent-amber-glow);
  border: 1px solid var(--accent-amber-border);
  color: #FDE68A;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-warning svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-amber);
  flex-shrink: 0;
  margin-top: 1px;
}

.key-code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.key-display-box {
  display: flex;
  gap: 8px;
}

/* ================= UTILITY CLASSES ================= */
.hidden { display: none !important; }
.w-full { width: 100%; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

/* Responsive */
@media (max-width: 1024px) {
  .playground-layout, .whatsapp-layout, .reports-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .tab-viewport {
    padding: 20px;
  }
}
