* { box-sizing: border-box; scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar { display: none !important; }
body { font-family: 'Inter', system-ui, sans-serif; background: #0c0f19; min-height: 100vh; display: flex; align-items: center; justify-content: center; margin: 0; padding: 16px; overflow: hidden; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ── Sidebar ── */
.sidebar { background: #111827; width: 220px; flex-shrink: 0; }
.nav-link { color: #6b7280; font-size: 15px; font-weight: 500; padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: color 0.15s; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; }
.nav-link:hover { color: #e5e7eb; }
.nav-link.active { color: #ffffff; font-weight: 700; }

/* ── Main canvas ── */
.canvas { background: #f3f4f6; flex: 1; overflow-y: auto; height: 100%; }

/* ── White card ── */
.card { background: #ffffff; border-radius: 16px; }

/* ── Right panel ── */
.panel { background: #ffffff; width: 260px; flex-shrink: 0; }

/* ── Status badges ── */
.badge-running      { background: #d1fae5; color: #065f46; }
.badge-provisioning { background: #fef3c7; color: #92400e; }
.badge-terminated   { background: #f3f4f6; color: #6b7280; }
.badge-failed       { background: #fee2e2; color: #991b1b; }

/* ── Distro icon circles ── */
.icon-ubuntu  { background: rgba(249, 115, 22, 0.12); border: 1px solid rgba(249, 115, 22, 0.25); }
.icon-debian  { background: rgba(219, 39, 119, 0.12); border: 1px solid rgba(219, 39, 119, 0.25); }
.icon-alpine  { background: rgba(14, 165, 233, 0.12); border: 1px solid rgba(14, 165, 233, 0.25); }
.icon-arch    { background: rgba(124, 58, 237, 0.12); border: 1px solid rgba(124, 58, 237, 0.25); }
.icon-centos  { background: rgba(38, 37, 119, 0.12); border: 1px solid rgba(38, 37, 119, 0.25); }
.icon-kali    { background: rgba(32, 165, 222, 0.12); border: 1px solid rgba(32, 165, 222, 0.25); }
.icon-rocky   { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.25); }
.icon-default { background: rgba(107, 114, 128, 0.12); border: 1px solid rgba(107, 114, 128, 0.25); }

/* ── Bar chart ── */
.bar-wrap { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.bar { background: #dbeafe; border-radius: 3px 3px 0 0; flex: 1; transition: background 0.15s; cursor: pointer; }
.bar:hover { background: #93c5fd; }
.bar.today { background: #2563eb; }

/* ── Spend progress bars ── */
.spend-bar-track { background: #e5e7eb; border-radius: 99px; height: 4px; }
.spend-bar-fill  { background: #10b981; border-radius: 99px; height: 4px; transition: width 0.6s ease; }

/* ── Buttons ── */
.btn-primary { background: #111827; color: #fff; font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: #1f2937; }
.btn-ghost { background: transparent; border: 1px solid #e5e7eb; color: #374151; font-weight: 500; font-size: 12px; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.btn-ghost:hover { border-color: #9ca3af; }
.btn-danger { background: transparent; border: 1px solid #fca5a5; color: #ef4444; font-weight: 500; font-size: 11px; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.btn-danger:hover { background: #fee2e2; }

/* ── Input ── */
.inp { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #111827; outline: none; font-family: inherit; transition: border-color 0.15s; background: #fff; }
.inp:focus { border-color: #10b981; }

/* ── Topup pill ── */
.topup-pill { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: #374151; background: #fff; cursor: pointer; transition: all 0.15s; text-align: center; }
.topup-pill:hover { border-color: #10b981; color: #065f46; background: #f0fdf4; }

/* ── Toast ── */
#toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; max-width: 300px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); animation: toastIn 0.2s ease; }
.logo-icon::before { content: '>'; color: #ffffff; }
.logo-icon::after  { content: '_'; color: #10b981; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.blink { animation: blink 1.4s step-start infinite; color: #10b981; }
.toast-ok  { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.toast-err { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.toast-inf { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

/* ── Modal backdrop ── */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: toastIn 0.2s ease; }

/* ── App Box Container ── */
.app-box {
  display: flex;
  overflow: hidden;
  transition: opacity 1s ease-in-out;
  background: #ffffff;
  position: fixed;
  inset: 0;
}

.app-box.dash-state {
  background: #f3f4f6;
}

/* Auth login: centered bubble card */
.app-box.auth-state {
  inset: auto;
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 570px;
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 60px;
}

/* Full-screen auth on small viewports */
@media (max-width: 480px), (max-height: 640px) {
  .app-box.auth-state {
    position: fixed;
    inset: 0;
    max-width: none;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
}

/* ── Auth Content & Dashboard Content Transition ── */
.auth-content {
  width: 100%;
  height: 100%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 1s ease;
  background: #ffffff;
}
.auth-content.fade-out {
  opacity: 0;
  pointer-events: none;
}

.dash-content {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.dash-content.fade-in {
  opacity: 1;
}

/* ── Responsive Sidebar ── */
@media (max-width: 767px) {
  .sidebar { width: 72px !important; padding: 24px 8px !important; }
  .sidebar span, .sidebar p, .sidebar #sb-name, .sidebar #sb-email { display: none !important; }
  .sidebar-logo { justify-content: center !important; padding: 0 !important; }
  .nav-link { justify-content: center !important; padding: 12px 0 !important; gap: 0 !important; }
  .nav-link svg { width: 20px; height: 20px; }
  .logout-btn { justify-content: center !important; padding: 12px 0 !important; gap: 0 !important; width: 100% !important; text-align: center !important; }
  .logout-btn svg { width: 20px !important; height: 20px !important; }
  #sb-avatar { font-size: 13px !important; }
  .canvas { padding: 20px 16px !important; }
}

/* ── Tab ── */
.tab { font-size: 14px; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; color: #9ca3af; cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; transition: all 0.15s; margin-right: 20px; }
.tab.active { color: #111827; border-bottom-color: #10b981; }

/* ── Distro picker ── */
.dp-opt {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: #fff;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dp-opt:hover {
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.dp-opt:hover img {
  transform: scale(1.1);
}
.dp-opt.selected {
  border-color: #10b981;
  background: #f0fdf4;
}
.dp-opt.selected img {
  transform: scale(1.1);
}

/* ── Section fade ── */
.section { animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* Code block */
.code-line { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #374151; display: flex; align-items: center; justify-content: space-between; }

/* Step number */
.step-num { width: 24px; height: 24px; border-radius: 50%; background: #f0fdf4; border: 1px solid #86efac; color: #065f46; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Terms of Service & Privacy Policy Links */
.auth-terms-link {
  color: #111827;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.15s ease;
}
.auth-terms-link:hover {
  color: #4b5563;
}

/* ── Dark Mode Theme Overrides ── */
.app-box {
  background: #1f2438 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Canvas & App background in Dashboard state */
.app-box.dash-state {
  background: #0f1322 !important;
}
.canvas {
  background: #0f1322 !important;
}

/* Card overrides */
.card {
  background: #1f2438 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Global Text Colors overrides */
h1 {
  color: #f9fafb !important;
}
span[style*="color:#111827"], span[style*="color: #111827"], 
p[style*="color:#111827"], p[style*="color: #111827"], 
div[style*="color:#111827"], div[style*="color: #111827"], 
h1[style*="color:#111827"], h1[style*="color: #111827"],
a[style*="color:#111827"], a[style*="color: #111827"],
p[style*="font-weight:700"] {
  color: #f9fafb !important;
}
span[style*="color:#374151"], span[style*="color: #374151"], 
p[style*="color:#374151"], p[style*="color: #374151"], 
label[style*="color:#374151"], label[style*="color: #374151"] {
  color: #e5e7eb !important;
}

/* Auth views overrides */
.auth-content {
  background: #1f2438 !important;
}

/* Google OAuth button */
button[onclick="mockGoogle()"] {
  background: #131722 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #f9fafb !important;
}

/* Microsoft OAuth button */
button[onclick="mockMicrosoft()"] {
  background: #131722 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #f9fafb !important;
}

/* GitHub OAuth button */
button[onclick="mockGitHub()"] {
  background: #131722 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #f9fafb !important;
}

/* Terms and conditions link overrides in Dark Mode */
.auth-terms-link {
  color: #f9fafb !important;
}
.auth-terms-link:hover {
  color: #10b981 !important;
}

/* Input and input fields */
.inp {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f9fafb !important;
}
.inp:focus {
  border-color: #10b981 !important;
}

/* Tabs */
.tab.active {
  color: #ffffff !important;
  border-bottom-color: #10b981 !important;
}

/* Buttons */
.btn-primary {
  background: #10b981 !important;
  color: #0c0f19 !important;
}
.btn-primary:hover {
  background: #34d399 !important;
}
.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #6b7280 !important;
  border-color: transparent !important;
}

.btn-ghost {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}
.btn-ghost:hover {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  background: transparent !important;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Distro Picker buttons */
.dp-opt {
  background: #1f2438 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f9fafb !important;
}
.dp-opt:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
}
.dp-opt.selected {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15) !important;
}

/* Distro detail border cards in Step 3 */
div[style*="border:1px solid #e5e7eb"], div[style*="border: 1px solid #e5e7eb"] {
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: #131722 !important;
}

/* Top-up Credits Pill options */
.topup-pill {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}
.topup-pill:hover {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

/* Modals */
.modal-box {
  background: #1f2438 !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Step Number Badge */
.step-num {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #10b981 !important;
}

/* Codeblock overrides */
.code-line {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}

/* List Row Borders in sessions/billing/overview */
div[style*="border-bottom:1px solid #f9fafb"], div[style*="border-bottom: 1px solid #f9fafb"] {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}
div[style*="border-bottom:1px solid #f3f4f6"], div[style*="border-bottom: 1px solid #f3f4f6"],
div[style*="border-top:1px solid #f3f4f6"], div[style*="border-top: 1px solid #f3f4f6"] {
  border-color: rgba(255, 255, 255, 0.05) !important;
}
div[style*="background:#f3f4f6"], div[style*="background: #f3f4f6"] {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Chart */
.bar {
  background: rgba(59, 130, 246, 0.15) !important;
}
.bar:hover {
  background: rgba(59, 130, 246, 0.4) !important;
}
.bar.today {
  background: #10b981 !important;
}

/* Sidebar and user profile bottom line */
div[style*="border-top:1px solid #1f2937"] {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Logo styling wrapper on login */
div[style*="background:#111827"] {
  background: #131722 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Toasts */
.toast {
  background: #1f2438 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f9fafb !important;
}
.toast-ok {
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #10b981 !important;
}
.toast-err {
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
}
.toast-inf {
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #3b82f6 !important;
}

/* ── Split Login Page (Desktop layout) ── */
.auth-demo-column {
  display: none;
}
.auth-form-column {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 1024px) {
  .app-box.auth-state {
    max-width: 1000px !important;
    height: 590px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    transition: max-width 0.3s ease, height 0.3s ease;
    margin-bottom: 60px;
  }
  .auth-content {
    flex-direction: row !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .auth-demo-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important; /* Align to top row */
    width: 55%;
    height: 100%;
    padding: 28px 48px 48px;
    background: #111521 !important; /* Dark slate for contrast */
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    text-align: left;
    overflow: hidden !important; /* Avoid scroll on most views */
  }
  .auth-form-column {
    width: 45%;
    height: 100%;
    padding: 38px 56px 48px;
    background: #1f2438 !important; /* Standard dark background */
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important; /* Align to top row */
    overflow: hidden !important; /* Avoid scroll on most views */
  }
  .mobile-only-brand {
    display: none !important;
  }
}

/* ── Speed particles & text effect ── */
.speed-wrapper {
  position: relative;
  display: inline-block;
  font-style: italic;
  font-weight: 800;
  overflow: visible;
}

.gradient-text {
  background: linear-gradient(90deg, #00f5ff, #00ff87) !important; /* Electric cyan to neon green */
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  padding-right: 6px !important; /* Prevents italic slant clipping of 's' */
}

.spark {
  position: absolute;
  width: 5px;
  height: 2px;
  border-radius: 99px; /* horizontally stretched spark */
  background: #00ff87;
  pointer-events: none;
  box-shadow: 0 0 6px #00ff87, 0 0 10px #00f5ff;
}

@keyframes speed-spark {
  0% {
    left: -15%;
    opacity: 0;
    transform: scaleX(1.5) scaleY(0.8);
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: 115%;
    opacity: 0;
    transform: scaleX(0.5) scaleY(0.5);
  }
}

.spark-1 { animation: speed-spark 0.9s infinite linear; top: 20%; animation-delay: 0s; }
.spark-2 { animation: speed-spark 0.7s infinite linear; top: 45%; animation-delay: 0.15s; }
.spark-3 { animation: speed-spark 1.0s infinite linear; top: 75%; animation-delay: 0.3s; }
.spark-4 { animation: speed-spark 0.8s infinite linear; top: 30%; animation-delay: 0.08s; }
.spark-5 { animation: speed-spark 0.95s infinite linear; top: 60%; animation-delay: 0.22s; }

/* ── Auth Social Footer ── */
.auth-social-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  z-index: 60;
  pointer-events: auto;
  white-space: nowrap;
}

.auth-social-footer > a {
  color: #4b5563;
  transition: color 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-social-footer > a:hover {
  color: #ffffff;
  transform: scale(1.15);
}

.product-by a {
  display: inline;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.product-by {
  font-size: 11px;
  color: #4b5563;
  letter-spacing: 0.03em;
  font-weight: 500;
  white-space: nowrap;
}

/* Hide social footer when logged in / dashboard state */
body:not(:has(.app-box.auth-state)) .auth-social-footer {
  display: none !important;
}

/* Development Mode Logo Styling overrides */
body.dev-mode .blink {
  color: #eab308 !important;
}
body.dev-mode .logo-icon::after {
  color: #eab308 !important;
}

