@import "https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap";

/* ==============================================================================
   🪐 SPACEX ADMIN PANEL — FLUID KINETIC DARK THEME
   Spring Physics, Dynamic Micro-Interactions, Staggered Entrances & Living Ambient Depth
   Palette: #0A0A0B | #111214 | #191A1D | #292A2D | #85868B | #E8E8E8 | #C6F36B
   ============================================================================== */

:root {
  /* Requested Color Palette with Crisp High-Contrast Depth */
  --bg: #0A0A0B;
  --surface: #131417;
  --surface-elevated: #1b1c21;
  --border: #32353d;
  --border-hover: #4c505c;
  --text-muted: #8e9098;
  --text-primary: #f2f3f5;
  --accent: #C6F36B;
  --accent-hover: #d6fa87;
  --accent-muted: rgba(198, 243, 107, 0.12);
  --accent-border: rgba(198, 243, 107, 0.35);
  --accent-glow: rgba(198, 243, 107, 0.25);
  --accent-text: #0A0A0B;

  /* Semantic Alerts */
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.32);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.32);

  /* Geometry & Curves */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  /* Organic Physical Springs */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body, #root {
  min-height: 100%;
}

html {
  background-color: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text-primary);
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Cairo", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  line-height: 1.5;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ──────────────────────────────────────────────────────────────────────────────
   🪐 GLOBAL SLEEK CUSTOM SCROLLBARS (Eliminates ugly Windows OS scrollbars)
   ────────────────────────────────────────────────────────────────────────────── */
* {
  scrollbar-width: thin !important;
  scrollbar-color: var(--border) transparent !important;
}

::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 9999px !important;
}

::-webkit-scrollbar-thumb {
  background: var(--border) !important;
  border-radius: 9999px !important;
  transition: background 0.2s ease !important;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent) !important;
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}


/* ──────────────────────────────────────────────────────────
   🌌 LIVING AMBIENT BACKDROP (.night & .glow)
   Deep dark grid with gentle breathing neon-lime & obsidian aura
   ────────────────────────────────────────────────────────── */
.night {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  background: 
    radial-gradient(circle at 50% -20%, rgba(198, 243, 107, 0.06) 0%, transparent 55%),
    linear-gradient(rgba(41, 42, 45, 0.08) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgba(41, 42, 45, 0.08) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--bg);
  background-attachment: fixed;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
  pointer-events: none;
}

.glow-a {
  top: -10vw;
  left: -5vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(198, 243, 107, 0.10) 0%, rgba(198, 243, 107, 0.02) 45%, transparent 70%);
  animation: auraFloatA 22s ease-in-out infinite alternate;
}

.glow-b {
  top: 30vh;
  right: -10vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(25, 26, 29, 0.9) 0%, rgba(17, 18, 20, 0.4) 50%, transparent 75%);
  animation: auraFloatB 26s ease-in-out infinite alternate;
}

.glow-c {
  bottom: -15vw;
  left: 25vw;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(198, 243, 107, 0.06) 0%, transparent 65%);
  animation: auraFloatC 20s ease-in-out infinite alternate;
}

/* ──────────────────────────────────────────────────────────
   📱 SHELL & LAYOUT
   ────────────────────────────────────────────────────────── */
.shell, .login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.shell {
  display: flex;
  flex-direction: column;
}

/* ──────────────────────────────────────────────────────────
   🏝️ HEADER ISLAND (.island)
   ────────────────────────────────────────────────────────── */
.island {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, calc(100% - 24px));
  min-height: 62px;
  margin: 10px auto 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(17, 18, 20, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: slideDown 0.5s var(--spring) both;
  transition: transform 0.3s var(--spring), border-color 0.25s ease, box-shadow 0.3s ease;
}

.brand-lockup, .island-meta, .who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  box-shadow: 0 0 16px rgba(198, 243, 107, 0.15);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
  cursor: pointer;
}

.mark:hover {
  transform: rotate(6deg) scale(1.08);
  box-shadow: 0 0 22px rgba(198, 243, 107, 0.35);
  border-color: var(--accent);
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.logo-sub {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.who {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.2;
}

.who strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.who span {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────
   🚀 DOCK NAVIGATION & HIGH-FPS ANIMATED TABS (.dock & .dock-link)
   Physical Spring Bounces, Expanding Glow Runner, & Tactile Response
   ────────────────────────────────────────────────────────── */
.dock {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
  gap: 5px;
  width: min(840px, calc(100% - 24px));
  margin: 14px auto 0;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(17, 18, 20, 0.88);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideDown 0.55s var(--spring) 0.05s both;
  transition: all 0.3s var(--spring);
}

.dock-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  transition: color 0.25s var(--spring), transform 0.25s var(--spring);
  z-index: 1;
}

/* Background animated pill that pops and expands */
.dock-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(198, 243, 107, 0.35);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.3s var(--spring), transform 0.35s var(--bounce), background 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

/* Neon lime glowing bottom indicator bar */
.dock-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
  transition: transform 0.35s var(--spring), opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

/* Inactive Hover */
.dock-link:not(.active):hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.dock-link:not(.active):hover::before {
  opacity: 0.65;
  background: var(--surface-elevated);
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(0.96);
}

/* Active State with Spring Pop */
.dock-link.active {
  color: var(--accent);
  font-weight: 800;
  text-shadow: 0 0 14px rgba(198, 243, 107, 0.45);
  animation: tabActivate 0.38s var(--bounce) both;
}

.dock-link.active::before {
  opacity: 1;
  transform: scale(1);
}

.dock-link.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* Physical Spring Click / Tap */
.dock-link:active {
  transform: scale(0.92) translateY(1px) !important;
  transition: transform 0.1s ease !important;
}

/* More lives in the mobile bar only. Desktop keeps every link in the row. */
.dock-more {
  display: none;
}

button.dock-link {
  border: none;
  background: transparent;
  width: 100%;
  font: inherit;
  color: var(--text-muted);
}

@keyframes tabActivate {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.06) translateY(-1.5px);
  }
  100% {
    transform: scale(1) translateY(-1px);
  }
}

/* ──────────────────────────────────────────────────────────
   🎪 MAIN STAGE & DYNAMIC PAGE SWITCH TRANSITIONS
   Every tab switch smoothly glides in with physical ease
   ────────────────────────────────────────────────────────── */
.stage {
  position: relative !important;
  z-index: 1 !important;
  width: min(1120px, calc(100% - 24px));
  margin: 22px auto 48px;
}

.stage > * {
  animation: pageFadeIn 0.25s var(--ease);
}

@keyframes pageFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.page {
  width: 100%;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  animation: fadeInUp 0.45s var(--spring) 0.1s both;
}

.eyebrow {
  margin-bottom: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

h2.section-title {
  margin: 28px 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
}

/* ──────────────────────────────────────────────────────────
   📊 BENTO STATS GRID (.stats-grid & .stat-card)
   Fluid card lifts with subtle lime edge reflection
   ────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stats-grid > div:nth-child(1) { animation: fadeInUp 0.45s var(--spring) 0.12s both; }
.stats-grid > div:nth-child(2) { animation: fadeInUp 0.45s var(--spring) 0.18s both; }
.stats-grid > div:nth-child(3) { animation: fadeInUp 0.45s var(--spring) 0.24s both; }
.stats-grid > div:nth-child(4) { animation: fadeInUp 0.45s var(--spring) 0.30s both; }

.stat-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s var(--spring), border-color 0.25s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 24px -6px var(--accent-glow);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-feature-settings: "tnum" on, "lnum" on;
}

/* ──────────────────────────────────────────────────────────
   📦 CARDS, FORMS & INPUTS
   ────────────────────────────────────────────────────────── */
.card {
  position: relative !important;
  z-index: 1 !important;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #14151a !important;
  border: 1px solid #2e323c !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition: transform 0.3s var(--spring), border-color 0.25s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: #424654 !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
}

.form-card, .apps-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.apps-page .form-card {
  max-width: none;
}

label {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

input, select {
  display: block !important;
  width: 100% !important;
  padding: 13px 16px !important;
  border-radius: var(--radius-md) !important;
  background: #1c1e25 !important;
  border: 1.5px solid #3d4250 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.22s var(--ease) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

input::placeholder {
  color: #7b8090 !important;
  opacity: 1 !important;
}

input:focus, select:focus {
  background: #21242d !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-muted), 0 0 18px var(--accent-glow) !important;
}

input:focus::placeholder {
  opacity: 0.5;
}

option {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

/* Search Box with animated icon */
.search-box {
  position: relative;
  margin-bottom: 18px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease, transform 0.25s var(--bounce);
}

.search-box:focus-within .search-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.15);
}

.search-input {
  padding-left: 46px;
}

/* ──────────────────────────────────────────────────────────
   🔘 BUTTONS (.btn)
   Tactile Spring Responses with Radiant Hover Sheens
   ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.22s var(--bounce);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #25272d;
  border-color: var(--border-hover);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.btn:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 16px rgba(198, 243, 107, 0.3) !important;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 8px 28px rgba(198, 243, 107, 0.5) !important;
  transform: translateY(-2.5px) scale(1.02);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-elevated);
}

.btn-danger-outline, .btn-danger-text {
  color: #f87171 !important;
  border-color: var(--danger-border) !important;
  background: var(--danger-muted) !important;
}

.btn-danger-outline:hover:not(:disabled), .btn-danger-text:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: var(--danger) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35) !important;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12.5px;
}

/* ──────────────────────────────────────────────────────────
   🔑 KEYS, CARDS & RECESSED WELLS
   Staggered entrance and responsive hover
   ────────────────────────────────────────────────────────── */
.key-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.key-list > div:nth-child(1) { animation: fadeInUp 0.45s var(--spring) 0.12s both; }
.key-list > div:nth-child(2) { animation: fadeInUp 0.45s var(--spring) 0.18s both; }
.key-list > div:nth-child(3) { animation: fadeInUp 0.45s var(--spring) 0.24s both; }
.key-list > div:nth-child(4) { animation: fadeInUp 0.45s var(--spring) 0.30s both; }

.key-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.28s var(--spring), border-color 0.22s ease, box-shadow 0.28s ease;
}

.key-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.key-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.key-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  word-break: break-all;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.key-card:hover .key-value {
  color: #ffffff;
}

.key-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* App Identity Fields */
.app-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 10px;
}

.id-field {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  min-width: 0;
  transition: border-color 0.2s ease;
}

.id-field:hover {
  border-color: var(--border-hover);
}

.id-field span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.id-field code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-both {
  height: 44px;
}

.app-card {
  cursor: pointer;
  transition: transform 0.28s var(--spring), border-color 0.22s ease, box-shadow 0.28s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.card-selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgba(198, 243, 107, 0.22) !important;
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────
   🏷️ BADGES (.badge)
   Live pulsating status dots for real-time vitality
   ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.badge-active {
  background: var(--accent-muted) !important;
  color: var(--accent) !important;
  border-color: var(--accent-border) !important;
}

.badge-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 2s infinite ease-in-out;
}

.badge-blocked {
  background: var(--danger-muted) !important;
  color: #f87171 !important;
  border-color: var(--danger-border) !important;
}

.badge-new {
  background: var(--warning-muted) !important;
  color: #fbbf24 !important;
  border-color: var(--warning-border) !important;
}

/* ──────────────────────────────────────────────────────────
   💬 MODALS, DIALOGS & TOASTS
   Spring bounce dialogs with backdrop blur
   ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  overflow-y: auto !important;
  background: rgba(10, 10, 11, 0.85) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  animation: fadeIn 0.2s var(--ease) !important;
}

.modal {
  position: relative;
  width: min(480px, calc(100% - 24px));
  max-height: none;
  overflow: visible !important;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: popUp 0.35s var(--bounce);
  margin: auto;
}

.dialog-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dialog-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: rgba(25, 26, 29, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 20px var(--accent-glow);
  animation: slideDownToast 0.32s var(--bounce);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────
   🔽 APP PICKER DROPDOWN (.picker)
   Smooth pop-down menu
   ────────────────────────────────────────────────────────── */
.picker {
  position: relative;
}

.picker-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.picker-btn:hover {
  background: #25272d;
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
  animation: popUp 0.22s var(--bounce);
}

.picker-menu button {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.picker-menu button:hover, .picker-menu button.on {
  background: var(--surface-elevated);
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────
   💫 ENHANCED KEYFRAME ANIMATIONS
   ────────────────────────────────────────────────────────── */
@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes dockFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideDownToast {
  0% { opacity: 0; transform: translate(-50%, -20px) scale(0.95); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes popUp {
  0% { opacity: 0; transform: translateY(12px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

@keyframes auraFloatA {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, 3vh) scale(1.15); }
  100% { transform: translate(-2vw, 5vh) scale(1.05); }
}

@keyframes auraFloatB {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3vw, -2vh) scale(1.12); }
  100% { transform: translate(2vw, 4vh) scale(0.95); }
}

@keyframes auraFloatC {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3vw, -4vh) scale(1.2); }
  100% { transform: translate(-4vw, 2vh) scale(1); }
}

@keyframes glassLevitate {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-6px); }
}

/* ──────────────────────────────────────────────────────────
   📱 ULTRA-OPTIMIZED MOBILE RESPONSIVE DESIGN (<= 768px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .island {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    gap: 8px;
  }

  .mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
  }

  .logo {
    font-size: 1.05rem;
  }

  .logo-sub {
    font-size: 10px;
  }

  .who {
    display: none;
  }

  .picker-btn {
    min-width: 90px;
    padding: 6px 12px;
    font-size: 12px;
  }

  /* 🚀 MOBILE DOCK — one row: Apps, Keys, Generate, Staff, More */
  .dock {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    right: 10px;
    transform: none;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(var(--bar, 5), minmax(0, 1fr));
    width: auto;
    max-width: none;
    margin: 0;
    padding: 4px;
    gap: 2px;
    overflow: visible;
    border-radius: var(--radius-pill);
    background: rgba(17, 18, 20, 0.94);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: dockFade 0.35s ease 0.05s both;
  }

  .dock-extra {
    display: none !important;
  }

  .dock-more {
    display: block;
    position: relative;
    min-width: 0;
  }

  .dock-link {
    min-width: 0;
    max-width: 100%;
    padding: 10px 2px;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    border-radius: var(--radius-pill);
  }

  .dock-more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 196px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(17, 18, 20, 0.97);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  }

  .dock-more-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  .dock-more-link.active {
    color: var(--accent);
    background: var(--accent-muted);
  }
  .dock-link::after {
    bottom: 1px;
    width: 16px;
    height: 2.5px;
  }

  /* Safe Stage Padding so dock never overlaps content */
  .stage {
    width: calc(100% - 18px);
    max-width: 100%;
    margin: 14px auto 0;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 16px)) !important;
  }

  .stage, .card, form, label {
    min-width: 0;
    max-width: 100%;
  }

  /* Updates console: the core form is an inline 2-column grid
     with span 2, which blows past the phone width. */
  .card[style*="minmax(280px"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  form[style*="span 2"] {
    grid-column: auto !important;
    width: 100% !important;
  }

  form[style*="span 2"] > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  form[style*="span 2"] .btn {
    width: 100%;
    height: auto !important;
  }

  /* Editor file tabs + Format / Load / Copy were one unwrapped row. */
  .card > div[style*="space-between"][style*="border-bottom"] {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .card > div[style*="space-between"][style*="border-bottom"] > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    max-width: 100%;
  }

  .card[style*="space-between"] {
    align-items: flex-start !important;
  }

  .card[style*="space-between"] > div {
    min-width: 0;
    max-width: 100%;
  }

  /* 2x2 Bento Box */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .stat-value {
    font-size: 1.55rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .page-header .btn {
    width: 100%;
  }

  .key-card {
    padding: 18px;
    border-radius: var(--radius-md);
  }

  .key-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .key-value {
    font-size: 1rem;
  }

  .key-meta-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .key-actions {
    gap: 6px;
  }

  .key-actions .btn {
    flex: 1 1 auto;
    padding: 9px 12px;
    font-size: 12.5px;
  }

  .app-identity {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .id-field {
    grid-template-columns: 75px minmax(0, 1fr) auto;
    padding: 8px 10px;
  }

  .copy-both {
    width: 100%;
    height: 40px;
  }
}


/* ──────────────────────────────────────────────────────────
   ✨ DAN ALEKO GLASSMORPHIC LOGIN FORM (Animated & Tactile)
   (https://github.com/danaleko/Login-Form-By-Dan-Aleko)
   ────────────────────────────────────────────────────────── */
.login-page {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 100vh !important;
  padding: 20px !important;
  background: 
    linear-gradient(rgba(10, 10, 11, 0.82), rgba(10, 10, 11, 0.88)),
    url('./bg.jpg') no-repeat center center / cover fixed !important;
  position: relative !important;
}

.wrapper.login-card {
  width: 420px !important;
  max-width: calc(100% - 24px) !important;
  background: rgba(17, 18, 20, 0.84) !important;
  border: 1px solid var(--border) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  color: var(--text-primary) !important;
  border-radius: 22px !important;
  padding: 38px 40px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 auto !important;
  animation: popUp 0.6s var(--spring) both, glassLevitate 6s ease-in-out infinite alternate !important;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.wrapper.login-card:hover {
  border-color: var(--accent-border) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px var(--accent-glow) !important;
}

.wrapper.login-card h1 {
  font-size: 32px !important;
  text-align: center !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  margin: 0 0 6px 0 !important;
}

.wrapper .input-box {
  position: relative !important;
  width: 100% !important;
  height: 52px !important;
  margin: 22px 0 !important;
}

.wrapper .input-box input {
  width: 100% !important;
  height: 100% !important;
  background: var(--surface-elevated) !important;
  border: 1px solid var(--border) !important;
  outline: none !important;
  border-radius: 40px !important;
  font-size: 14.5px !important;
  color: var(--text-primary) !important;
  padding: 0 50px 0 22px !important;
  transition: all 0.25s var(--ease) !important;
  box-shadow: none !important;
}

.wrapper .input-box input::placeholder {
  color: var(--text-muted) !important;
  transition: opacity 0.2s ease !important;
}

.wrapper .input-box input:focus {
  background: #1d1e23 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-muted), 0 0 20px var(--accent-glow) !important;
}

.wrapper .input-box svg,
.wrapper .input-box i {
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 19px !important;
  color: var(--text-muted) !important;
  pointer-events: none !important;
  transition: color 0.25s ease, transform 0.25s var(--bounce) !important;
}

.wrapper .input-box:focus-within svg,
.wrapper .input-box:focus-within i {
  color: var(--accent) !important;
  transform: translateY(-50%) scale(1.15) !important;
}

.wrapper .remember-forgot {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 13.5px !important;
  margin: -6px 0 24px !important;
  color: var(--text-muted) !important;
}

.wrapper .remember-forgot label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

.wrapper .remember-forgot label:hover {
  color: var(--text-primary) !important;
}

.wrapper .remember-forgot label input {
  accent-color: var(--accent) !important;
  width: 15px !important;
  height: 15px !important;
  cursor: pointer !important;
  margin: 0 !important;
}

.wrapper .remember-forgot a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
}

.wrapper .remember-forgot a:hover {
  text-decoration: underline !important;
  color: var(--accent) !important;
}

.wrapper .btn {
  width: 100% !important;
  height: 48px !important;
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border: none !important;
  outline: none !important;
  border-radius: 40px !important;
  box-shadow: 0 4px 18px rgba(198, 243, 107, 0.32) !important;
  cursor: pointer !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s var(--bounce) !important;
  text-shadow: none !important;
}

.wrapper .btn:hover:not(:disabled) {
  background: var(--accent-hover) !important;
  box-shadow: 0 8px 30px rgba(198, 243, 107, 0.55) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.wrapper .btn:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.98) !important;
}

@media (max-width: 480px) {
  .wrapper.login-card {
    padding: 30px 20px !important;
    border-radius: 18px !important;
  }
  .wrapper.login-card h1 {
    font-size: 26px !important;
  }
  .wrapper .input-box {
    margin: 16px 0 !important;
  }
  .wrapper .remember-forgot {
    font-size: 12.5px !important;
  }
}

/* ──────────────────────────────────────────────────────────
   ⚡ REALTIME UPDATES & GAME OFFSETS CONSOLE
   Bespoke Dark Architecture & Electric Lime Accents
   ────────────────────────────────────────────────────────── */
.page .card textarea {
  display: block !important;
  width: 100% !important;
  font-family: "JetBrains Mono", Consolas, monospace !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  background: #101115 !important;
  color: #f3f4f6 !important;
  border: 1.5px solid #363b47 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6) !important;
  opacity: 1 !important;
  visibility: visible !important;
  min-height: 380px !important;
}

.page .card textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--accent-muted) !important;
}

/* ──────────────────────────────────────────────────────────
   🔽 CUSTOM DROPDOWN (Replaces ugly native browser selects)
   Zero OS Blue, Pure Theme Colors & Smooth Pop Animation
   ────────────────────────────────────────────────────────── */
.custom-dropdown {
  position: relative;
  width: 100%;
  direction: ltr !important;
  text-align: left !important;
}

.custom-dropdown-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.2s var(--ease) !important;
  text-align: left !important;
  direction: ltr !important;
}

.custom-dropdown-btn:hover {
  background: #23252a !important;
  border-color: var(--border-hover) !important;
}

.custom-dropdown-btn:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-muted) !important;
}

.custom-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 6px !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  animation: popUp 0.22s var(--bounce) !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  direction: ltr !important;
}

.modal .custom-dropdown-menu,
.custom-dropdown-menu.drop-up {
  top: auto !important;
  bottom: calc(100% + 6px) !important;
}

.custom-dropdown-menu button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-align: left !important;
  direction: ltr !important;
}

.custom-dropdown-menu button:hover {
  background: var(--surface-elevated) !important;
  color: var(--accent) !important;
}

.custom-dropdown-menu button.active-option,
.custom-dropdown-menu button.on {
  background: var(--accent-muted) !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
}

/* Enforce LTR and Dark Theme on all form controls & selects */
form, input, select, textarea, label {
  direction: ltr !important;
  text-align: left !important;
}

select {
  direction: ltr !important;
  text-align: left !important;
  color-scheme: dark !important;
  background-color: var(--surface-elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px 16px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2385868B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
}

option {
  direction: ltr !important;
  text-align: left !important;
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
}
