/* ==========================================
   DESIGN SYSTEM - GRAVITY MOBILE-FIRST WORKSPACE
   ========================================== */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'Fira Code', monospace;

  /* Premium HSL Color Palette (OneDrip Corporate Branding) */
  --hsl-bg: 0 0% 7%;          /* Deep Charcoal #121212 */
  --hsl-card: 0 0% 9%;        /* Slightly lighter card #171717 */
  --hsl-gold: 43 98% 59%;     /* OneDrip Primary Gold #fec832 */
  --hsl-amber: 35 100% 50%;   /* OneDrip Primary Orange #ff9500 */
  --hsl-green: 150 80% 45%;   /* Emerald green #10b981 */
  --hsl-rose: 345 90% 60%;    /* Rose red #f43f5e */

  /* Hex mappings for legacy utility classes */
  --bg-deep: hsl(var(--hsl-bg));
  --bg-card: rgba(23, 23, 23, 0.75);
  --bg-card-hover: rgba(32, 32, 32, 0.9);
  
  --border-light: rgba(255, 255, 255, 0.06);
  --border-glow: hsla(var(--hsl-gold) / 0.25);
  
  /* Brand Accent Colors */
  --color-primary: hsl(var(--hsl-gold));
  --color-amber: hsl(var(--hsl-amber));
  --color-emerald: hsl(var(--hsl-green));
  --color-rose: hsl(var(--hsl-rose));
  --color-indigo: hsl(var(--hsl-amber));
  --color-purple: #e08500;
  --color-cyan: hsl(var(--hsl-gold));
  
  /* Premium Slate Grays for Typography */
  --text-main: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
}

/* ==========================================
   RESET & MOBILE-FIRST BASE STYLING
   ========================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lights */
.space-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: float 22s infinite ease-in-out;
}

.orb-1 {
  top: -10dvh;
  right: -5vw;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, hsla(var(--hsl-gold) / 0.2) 0%, transparent 70%);
}

.orb-2 {
  bottom: -10dvh;
  left: -5vw;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, hsla(var(--hsl-amber) / 0.15) 0%, transparent 70%);
  animation-delay: -6s;
}

.orb-3 {
  top: 30dvh;
  right: 25vw;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, hsla(var(--hsl-gold) / 0.1) 0%, transparent 70%);
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

/* Glassmorphism premium panels */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px hsla(var(--hsl-gold) / 0.05);
  transform: translateY(-2px);
}

/* ==========================================
   SECTION 1: CONNECTION OVERLAY (MOBILE-FIRST)
   ========================================== */
.connection-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: radial-gradient(circle at center, rgba(10, 10, 10, 0.9) 0%, rgba(5, 5, 5, 0.99) 100%);
  padding: 12px;
  transition: var(--transition-smooth);
}

.connection-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-15px);
}

.auth-card {
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px hsla(var(--hsl-gold) / 0.08);
  border-color: rgba(254, 200, 50, 0.15);
  border-radius: var(--border-radius-md);
}

.terminal-header {
  background: rgba(15, 15, 15, 0.95);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.terminal-buttons {
  display: flex;
  gap: 6px;
  margin-right: 15px;
}

.terminal-buttons .btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-buttons .red { background-color: #ef4444; }
.terminal-buttons .yellow { background-color: #eab308; }
.terminal-buttons .green { background-color: #22c55e; }

.terminal-title {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.console-text {
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.5;
}

.console-text.text-dim { color: var(--text-dim); }

.console-prompt {
  display: block;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-weight: 500;
  word-break: break-all;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  position: relative;
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(254, 200, 50, 0.2);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.input-wrapper input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px hsla(var(--hsl-gold) / 0.15);
}

.neon-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-amber));
  color: #000;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px hsla(var(--hsl-gold) / 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.neon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px hsla(var(--hsl-gold) / 0.35);
}

.neon-btn:active {
  transform: translateY(1px);
}

.auth-status-log {
  margin-top: 20px;
  max-height: 100px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
  font-size: 11px;
}

.log-entry {
  margin-bottom: 5px;
  color: var(--text-muted);
}
.log-entry.success { color: var(--color-emerald); font-weight: 500; }
.log-entry.error { color: var(--color-rose); font-weight: 500; }

/* ==========================================
   SECTION 2: DASHBOARD LAYOUT & RESPONSIVENESS
   ========================================== */
.app-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 12px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.dashboard-content {
  opacity: 1;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-content.hidden {
  display: none;
  opacity: 0;
}

/* Header (Stacked on Mobile) */
.dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glow-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-divider {
  display: none; /* Hidden on mobile */
}

.subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.domain-badge {
  background: hsla(var(--hsl-gold) / 0.08);
  color: var(--color-primary);
  border: 1px solid hsla(var(--hsl-gold) / 0.15);
  padding: 1px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  justify-content: center;
  width: 100%;
}

.status-connection-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: hsla(var(--hsl-green) / 0.08);
  border: 1px solid hsla(var(--hsl-green) / 0.15);
  padding: 6px 14px;
  border-radius: 30px;
}

.pulse-indicator-green {
  width: 6px;
  height: 6px;
  background-color: var(--color-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 hsla(var(--hsl-green) / 0.7); }
  70% { box-shadow: 0 0 0 6px hsla(var(--hsl-green) / 0); }
  100% { box-shadow: 0 0 0 0 hsla(var(--hsl-green) / 0); }
}

.badge-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  color: var(--color-emerald);
  letter-spacing: 1px;
}

/* ==========================================
   METRICS SUMMARY CARDS (MOBILE-FIRST)
   ========================================== */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border-radius: var(--border-radius-md);
}

.stats-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  flex-shrink: 0;
}

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

.stats-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin: 2px 0;
  line-height: 1.1;
}

.stats-subtext {
  font-size: 11px;
  color: var(--text-dim);
}

.highlight-card {
  border-color: hsla(var(--hsl-rose) / 0.2);
  background: radial-gradient(circle at top right, hsla(var(--hsl-rose) / 0.04), transparent), var(--bg-card);
}

/* Inline text glows */
.text-cyan { color: var(--color-primary); }
.text-rose { color: var(--color-rose); }
.text-green { color: var(--color-emerald); }

.text-gradient-cyan {
  background: linear-gradient(135deg, var(--color-primary), var(--color-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ==========================================
   MAIN DASHBOARD SECTION (MOBILE-FIRST)
   ========================================== */
.main-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.section-badge {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

/* AI Models Cards Grid */
.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.model-card {
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border-radius: var(--border-radius-md);
}

.model-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--model-color, var(--color-primary));
}

.model-card.high-usage {
  border-color: hsla(var(--hsl-rose) / 0.25);
  box-shadow: 0 4px 15px hsla(var(--hsl-rose) / 0.05);
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.model-title-block h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.model-provider {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-active-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.model-active-badge.active {
  background: hsla(var(--hsl-amber) / 0.15);
  color: var(--color-primary);
  border: 1px solid hsla(var(--hsl-amber) / 0.2);
}

.model-active-badge.inactive {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.small-pulse-blue {
  width: 5px;
  height: 5px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-green 1.5s infinite;
}

/* Quotas Progress Bars */
.quota-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.progress-label-left {
  color: var(--text-muted);
}

.progress-label-right {
  font-weight: 600;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--model-color), var(--model-color-bright, var(--model-color)));
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.25, 1);
  box-shadow: 0 0 8px var(--model-color);
}

.usage-warning-text {
  font-size: 10px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.text-red { color: var(--color-rose); }
.text-amber { color: var(--color-amber); }
.text-muted { color: var(--text-muted); }

/* Skeleton templates */
.skeleton-card {
  height: 140px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  animation: pulse-skeleton 1.5s infinite ease-in-out;
}

@keyframes pulse-skeleton {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.2; }
}

/* ==========================================
   SIDEBAR & ACTIONS (MOBILE-FIRST)
   ========================================== */
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.action-card {
  padding: 16px;
  border-radius: var(--border-radius-md);
}

.action-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.action-desc {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 15px;
}

.action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-list li {
  display: flex;
  gap: 10px;
}

.action-step-num {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

.action-step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-step-content strong {
  font-size: 12px;
  color: #fff;
}

.action-step-content span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.upgrade-btn-sidebar {
  margin-top: 8px;
  background: hsla(var(--hsl-gold) / 0.08);
  border: 1px solid hsla(var(--hsl-gold) / 0.15);
  color: var(--color-primary);
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.upgrade-btn-sidebar:hover {
  background: var(--color-primary);
  color: #000;
  box-shadow: 0 0 12px hsla(var(--hsl-gold) / 0.25);
}

.sidebar-info-card {
  padding: 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  border-radius: var(--border-radius-md);
}

.sidebar-info-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  font-size: 12px;
}

/* ==========================================
   TELEMETRY LOG TERMINAL (MOBILE-FIRST)
   ========================================== */
.telemetry-terminal-section {
  border: 1px solid var(--border-light);
  background: rgba(8, 8, 10, 0.9);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.telemetry-terminal-section .terminal-header {
  background: rgba(12, 12, 15, 0.98);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
}

.telemetry-terminal-section h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-main);
  font-weight: 500;
}

.terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-amber {
  background-color: var(--color-amber);
  box-shadow: 0 0 6px var(--color-amber);
  animation: pulse-amber 1.5s infinite;
}

@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.terminal-console-body {
  padding: 12px 16px;
  height: 160px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.log-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}

.log-time { color: var(--text-dim); font-size: 10px; }
.log-model-name { color: var(--color-primary); font-weight: 700; }
.log-action { color: #fff; }
.log-tokens { color: var(--color-amber); }
.log-status { color: var(--color-emerald); font-weight: 700; }

/* ==========================================
   MODAL - PRICING PLANS (MOBILE-FIRST)
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px;
  overflow-y: auto;
  transition: var(--transition-smooth);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  max-width: 900px;
  padding: 24px 16px;
  position: relative;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: var(--border-radius-md);
}

.modal-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.modal-card .subtitle {
  text-align: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 12px;
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.price-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
}

.price-card:hover {
  border-color: rgba(254, 200, 50, 0.2);
  transform: translateY(-2px);
}

.price-card.popular {
  border-color: hsla(var(--hsl-gold) / 0.35);
  background: radial-gradient(circle at top, hsla(var(--hsl-gold) / 0.03), transparent), rgba(15, 15, 15, 0.9);
  box-shadow: 0 8px 25px hsla(var(--hsl-gold) / 0.08);
}

.popular-badge {
  position: absolute;
  top: -10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-amber));
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.8px;
}

.price-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-card .price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.price-card .price span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
}

.features li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 8px;
}

.modal-btn {
  width: 100%;
  padding: 12px 0;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-btn.outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.modal-btn.outline:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-btn.glowing-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-amber));
  color: #000;
  border: none;
  box-shadow: 0 4px 12px hsla(var(--hsl-gold) / 0.15);
}

.modal-btn.glowing-btn:hover {
  box-shadow: 0 6px 18px hsla(var(--hsl-gold) / 0.3);
}

/* Animation triggers */
.animate-scale {
  animation: animateScale 0.25s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes animateScale {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Helper Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.text-xs { font-size: 11px; }


/* ==========================================
   SCALING UP: TABLETS (min-width: 768px)
   ========================================== */
@media (min-width: 768px) {
  .app-container {
    padding: 24px 20px;
  }

  .dashboard-content {
    gap: 24px;
  }

  /* Header Shifts to Horizontal Row */
  .dashboard-header {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-bottom: 24px;
  }

  .header-left {
    align-items: flex-start;
  }

  .glow-title {
    font-size: 26px;
  }

  .header-divider {
    display: inline;
    color: var(--text-dim);
    font-weight: 300;
    margin: 0 6px;
  }

  .subtitle {
    font-size: 14px;
    justify-content: flex-start;
  }

  .header-right {
    width: auto;
  }

  .status-connection-badge {
    padding: 8px 16px;
  }

  .badge-text {
    font-size: 11px;
  }

  /* Stats Grid: Two Columns */
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Model Grid: Two Columns */
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Telemetry Console Header & Content Horizontal Flow */
  .telemetry-terminal-section .terminal-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .terminal-console-body {
    height: 180px;
  }

  .log-line {
    flex-direction: row;
    gap: 10px;
    padding-bottom: 0;
  }

  .log-time {
    font-size: 11px;
  }

  /* Modal Content Scaling */
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal-card {
    padding: 36px 30px;
    border-radius: var(--border-radius-lg);
  }

  .modal-card h2 {
    font-size: 24px;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .price-card {
    padding: 28px 20px;
  }
}

/* ==========================================
   SCALING UP: DESKTOPS (min-width: 1024px)
   ========================================== */
@media (min-width: 1024px) {
  .glow-title {
    font-size: 32px;
  }

  /* Stats Grid: Three Columns */
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Main Grid: Multi-Column layout */
  .main-dashboard-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 24px;
    align-items: start;
  }

  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-sidebar {
    position: sticky;
    top: 24px;
  }
  
  .action-card {
    padding: 24px;
  }
}

/* ==========================================
   SCALING UP: WIDE VIEWPORTS (min-width: 1200px)
   ========================================== */
@media (min-width: 1200px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
