/* ============================================
   ROI SHOP - Premium Dark Mode UI
   Black + Gray + Subtle Blue Accents
   Minimalist • Rounded • Clean
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Heebo:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Backgrounds - black + gray scale */
  --bg-0: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #181818;
  --bg-3: #1f1f1f;
  --bg-4: #2a2a2a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1c1c1c;

  /* Borders */
  --border: #262626;
  --border-strong: #333333;
  --border-focus: #404040;

  /* Text */
  --text-0: #fafafa;
  --text-1: #d4d4d4;
  --text-2: #a3a3a3;
  --text-3: #737373;
  --text-4: #525252;

  /* Blue accent - used sparingly */
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --blue-border: rgba(59, 130, 246, 0.3);

  /* Status colors - muted/dark */
  --green: #1f6c4d;
  --green-soft: rgba(31, 108, 77, 0.18);
  --green-dark: #0f3d2b;
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);

  /* Radii - prominent rounded */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --font-display: 'Inter', 'Heebo', sans-serif;
  --font-body: 'Inter', 'Heebo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  /* Legacy aliases used by old templates - keep them aligned with the palette */
  --neon-cyan:  #cfe1ff;
  --neon-blue:  var(--blue);
  --neon-green: #5a8a72;
  --neon-amber: #f0b67f;
  --neon-purple: #a3b6ff;
}

[lang="he"] {
  --font-display: 'Heebo', 'Inter', sans-serif;
  --font-body: 'Heebo', 'Inter', sans-serif;
}

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

html, body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { overflow-x: hidden; }

/* ============================================
   3D ambient scene — blue & black depth lighting
   ============================================ */

/* Layer 0 — base radial vignette behind everything */
html {
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, #0d1426 0%, var(--bg-0) 55%),
    var(--bg-0);
}

/* Floating glowing orbs that drift slowly to fake depth */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 580px;
  height: 580px;
  top: -160px;
  left: -160px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.55) 40%, transparent 70%);
  animation: orb-drift-1 38s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.orb-2 {
  width: 660px;
  height: 660px;
  top: 25%;
  right: -220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.85) 0%, rgba(59, 130, 246, 0.45) 45%, transparent 75%);
  animation: orb-drift-2 46s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.orb-3 {
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: 32%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.75) 0%, rgba(37, 99, 235, 0.40) 50%, transparent 80%);
  animation: orb-drift-3 52s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Long, smooth orbital paths — feels alive without ever jolting */
@keyframes orb-drift-1 {
  0%   { transform: translate3d(0, 0, 0)         scale(1); }
  25%  { transform: translate3d(160px, 120px, 0) scale(1.12); }
  50%  { transform: translate3d(220px, -40px, 0) scale(1.05); }
  75%  { transform: translate3d(60px, -120px, 0) scale(0.92); }
  100% { transform: translate3d(0, 0, 0)         scale(1); }
}
@keyframes orb-drift-2 {
  0%   { transform: translate3d(0, 0, 0)            scale(1); }
  20%  { transform: translate3d(-120px, 90px, 0)    scale(1.08); }
  45%  { transform: translate3d(-220px, 180px, 0)   scale(1.18); }
  70%  { transform: translate3d(-100px, 240px, 0)   scale(1.05); }
  100% { transform: translate3d(0, 0, 0)            scale(1); }
}
@keyframes orb-drift-3 {
  0%   { transform: translate3d(0, 0, 0)           scale(1); }
  30%  { transform: translate3d(-160px, -100px, 0) scale(1.18); }
  55%  { transform: translate3d(-260px, -40px, 0)  scale(1.05); }
  80%  { transform: translate3d(120px, 60px, 0)    scale(0.9); }
  100% { transform: translate3d(0, 0, 0)           scale(1); }
}

/* ===== Aurora ribbons — slow translating soft-light gradients ===== */
.aurora {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.5;
  mix-blend-mode: screen;
  border-radius: 50%;
  will-change: transform;
}
.aurora-1 {
  top: 5%;
  left: -25%;
  width: 90vw;
  height: 36vh;
  background: linear-gradient(120deg, transparent 10%, rgba(99, 102, 241, 0.45) 40%, rgba(59, 130, 246, 0.35) 60%, transparent 90%);
  transform: rotate(-8deg);
  animation: aurora-sweep-1 40s ease-in-out infinite;
}
.aurora-2 {
  bottom: 0;
  right: -25%;
  width: 95vw;
  height: 30vh;
  background: linear-gradient(80deg, transparent 10%, rgba(14, 165, 233, 0.32) 40%, rgba(99, 102, 241, 0.40) 70%, transparent 95%);
  transform: rotate(6deg);
  animation: aurora-sweep-2 56s ease-in-out infinite;
}
@keyframes aurora-sweep-1 {
  0%, 100% { transform: rotate(-8deg) translateX(0)    scaleX(1); opacity: 0.45; }
  50%      { transform: rotate(-6deg) translateX(80px) scaleX(1.1); opacity: 0.6; }
}
@keyframes aurora-sweep-2 {
  0%, 100% { transform: rotate(6deg) translateX(0)     scaleX(1); opacity: 0.40; }
  50%      { transform: rotate(8deg) translateX(-100px) scaleX(1.08); opacity: 0.55; }
}

/* ===== Star field — pure CSS, three depth layers, slow twinkle ===== */
.bg-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    /* tiny far stars */
    radial-gradient(1px 1px at 7% 12%,  rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 18% 84%, rgba(207,225,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 32% 28%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 47% 64%, rgba(207,225,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 61% 9%,  rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 73% 47%, rgba(207,225,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 84% 78%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 92% 24%, rgba(207,225,255,0.6), transparent 60%),
    /* medium stars */
    radial-gradient(1.5px 1.5px at 12% 56%, rgba(255,255,255,0.85), transparent 65%),
    radial-gradient(1.5px 1.5px at 38% 88%, rgba(180,210,255,0.7),  transparent 65%),
    radial-gradient(1.5px 1.5px at 56% 32%, rgba(255,255,255,0.85), transparent 65%),
    radial-gradient(1.5px 1.5px at 78% 72%, rgba(180,210,255,0.7),  transparent 65%),
    radial-gradient(1.5px 1.5px at 88% 14%, rgba(255,255,255,0.85), transparent 65%),
    /* a few brighter near stars */
    radial-gradient(2.5px 2.5px at 22% 22%, rgba(255,255,255,0.95), transparent 70%),
    radial-gradient(2.5px 2.5px at 64% 78%, rgba(207,225,255,0.85), transparent 70%);
  background-size: 100% 100%;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 0%, transparent 80%);
  animation: star-twinkle 6s ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}

/* Slow, almost-imperceptible breathing of the whole ambient scene */
.orb,
.bg-vignette { animation-fill-mode: both; }

@keyframes scene-breathe {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 1.05; }
}
body::before { animation: grid-drift 30s linear infinite, scene-breathe 14s ease-in-out infinite; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
}

h1 { font-size: clamp(2.0rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem;     font-weight: 700; }

p { color: var(--text-1); }
small, .text-sm { color: var(--text-2); }
.text-muted { color: var(--text-3); }

[lang="he"] h1, [lang="he"] h2, [lang="he"] h3, [lang="he"] h4 {
  font-weight: 900;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }

/* ===== Layout ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-0);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo span { color: var(--text-0); }

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-0);
}

[lang="he"] .brand-name { font-weight: 900; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-0);
  background: var(--bg-2);
}

.nav-link.active {
  color: var(--text-0);
  background: var(--bg-3);
  border-color: var(--border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-3);
  color: var(--text-0);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-4);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

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

.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-1);
}

.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.btn-danger {
  background: var(--bg-3);
  border-color: var(--border-strong);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn-success {
  background: var(--bg-3);
  border-color: var(--border-strong);
  color: var(--green);
}

.btn-success:hover {
  background: var(--green-soft);
  border-color: var(--green);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s ease;
}

.card-3d { transition: all 0.25s ease; }

.card-3d:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-0);
}

[lang="he"] .hero-title { font-weight: 900; }

.gradient-text { color: var(--blue); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ===== Hero visual cards ===== */
.hero-visual {
  position: relative;
  height: 440px;
}

.hero-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  width: 240px;
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.hero-card-1 { top: 5%; left: 5%; }
.hero-card-2 { top: 35%; right: 0; }
.hero-card-3 { bottom: 5%; left: 22%; }

.hero-card-title {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero-card-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.hero-card-bar {
  height: 4px;
  background: var(--bg-3);
  border-radius: var(--radius-full);
  margin-top: 14px;
  overflow: hidden;
  position: relative;
}

.hero-card-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 65%;
  background: var(--blue);
  border-radius: var(--radius-full);
}

.hero-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  margin-top: 12px;
  font-weight: 500;
}

.hero-card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

/* ===== Sections ===== */
.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  color: #cfe1ff;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 14px;
}

.section-header { text-align: center; margin-bottom: 36px; }
.section-header .text-muted { max-width: 560px; margin: 12px auto 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card { padding: 28px; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 22px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-0);
}

.feature-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Forms ===== */
.input, .textarea, .select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-2);
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-4);
}

.textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-0);
}

.modal-close {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

/* ===== Status badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-running {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-stopped {
  background: var(--bg-3);
  color: var(--text-3);
  border-color: var(--border);
}

.badge-error {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-admin {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-border);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px;
  overflow-x: auto;
  width: fit-content;
  max-width: 100%;
}

.tab {
  padding: 9px 20px;
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab:hover { color: var(--text-0); }

.tab.active {
  background: var(--bg-3);
  color: var(--text-0);
}

/* ===== Lists ===== */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-3);
  flex-shrink: 0;
  object-fit: cover;
}

.user-avatar-lg {
  width: 72px;
  height: 72px;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
}

/* ===== Console ===== */
.console {
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  height: 360px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d4d4d4;
  line-height: 1.6;
}

.console::-webkit-scrollbar { width: 8px; }
.console::-webkit-scrollbar-track { background: transparent; }
.console::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.console::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }

/* ===== Code editor ===== */
.code-editor {
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-1);
  width: 100%;
  min-height: 360px;
  resize: vertical;
  line-height: 1.6;
}

.code-editor:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ===== Product cards ===== */
.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.04);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--text-4);
  background: var(--bg-2);
}

.product-category {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 6px;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-0);
}

.product-desc {
  color: var(--text-2);
  font-size: 14px;
  flex-grow: 1;
  line-height: 1.55;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue);
  margin-top: 12px;
}

/* ===== Stat cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card { padding: 20px; }

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

/* ===== Toast Stack — top center, slide-down, glassy ===== */
.toast-stack {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px 14px 16px;
  border-radius: 14px;
  background: rgba(20, 22, 28, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
          backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-0);
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  /* enter from above with a soft bounce */
  opacity: 0;
  transform: translateY(-32px) scale(0.96);
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease,
    box-shadow 0.3s ease;
}
.toast.toast-entering { opacity: 1; transform: translateY(0) scale(1); }
.toast.toast-leaving  {
  opacity: 0;
  transform: translateY(-12px) scale(0.95);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast:hover {
  box-shadow:
    0 28px 70px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px) scale(1);
}

.toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-top: 1px;
  position: relative;
  animation: toast-icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.06s both;
}
.toast-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.18;
}

.toast-body { flex: 1; min-width: 0; padding-top: 2px; }
.toast-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 2px;
}
.toast-msg {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  margin-top: -2px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toast-close:hover { background: rgba(255,255,255,0.08); color: #fff; transform: rotate(90deg); }

.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), #8b5cf6);
  border-radius: 0 0 14px 14px;
  transform-origin: left;
  animation: toast-countdown linear forwards;
  opacity: 0.85;
}
[lang="he"] .toast-progress { transform-origin: right; }

@keyframes toast-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-icon-pop  { 0% { transform: scale(0.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.12) rotate(0); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* Type-specific colors */
.toast-success {
  border-color: rgba(31, 108, 77, 0.45);
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.55),
    0 0 30px -8px rgba(31, 108, 77, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.toast-success .toast-icon { background: linear-gradient(135deg, #1f6c4d, #34a474); color: #fff; box-shadow: 0 0 0 4px rgba(31, 108, 77, 0.15); }
.toast-success .toast-progress { background: linear-gradient(90deg, #1f6c4d, #34a474, #5cd49f); }

.toast-error {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.55),
    0 0 30px -8px rgba(239, 68, 68, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.toast-error .toast-icon { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.toast-error .toast-progress { background: linear-gradient(90deg, #b91c1c, #ef4444, #fca5a5); }

.toast-info .toast-icon { background: linear-gradient(135deg, var(--blue), #6366f1); color: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }

[lang="he"] .toast { direction: rtl; }
[lang="he"] .toast-stack { direction: rtl; }

/* Honour reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s; transform: none !important; }
  .toast.toast-entering { transform: none !important; }
  .toast-progress, .toast-icon { animation: none !important; }
}

/* ===== Loading ===== */
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 12px;
}

/* ===== Empty state ===== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ===== Lang switcher ===== */
.lang-switch {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  border-radius: var(--radius-full);
}

.lang-btn:hover { color: var(--text-1); }

.lang-btn.active {
  background: var(--bg-3);
  color: var(--text-0);
}

.welcome-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

[dir="rtl"] .nav-inner { direction: rtl; }
[dir="rtl"] .hero-grid { direction: rtl; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: var(--text-1);
}

.checkbox-row:hover {
  background: var(--bg-3);
  border-color: var(--border-strong);
}

.checkbox-row label {
  margin: 0;
  cursor: pointer;
  color: var(--text-1);
  font-weight: 500;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

input[type="file"] { cursor: pointer; }

input[type="file"]::file-selector-button {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  margin-inline-end: 12px;
}

input[type="file"]::file-selector-button:hover { background: var(--bg-4); }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 6px 12px; font-size: 13px; }
  .brand-name { font-size: 16px; }
  .hero { padding: 50px 0; min-height: auto; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-visual { height: 360px; }
  .hero-card { width: 220px; }
  .hero-card-1 { left: 0; }
  .hero-card-2 { right: 0; }
  .features-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-3); }
.font-mono { font-family: var(--font-mono); }
.w-full { width: 100%; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   Install Progress Modal
   ============================================ */
.install-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 4px;
}

.install-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.install-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), #8b5cf6, #ec4899, var(--blue));
  position: relative;
  animation: install-spin 1.4s linear infinite;
  flex-shrink: 0;
}
.install-spinner::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--bg-card);
  border-radius: 50%;
}
.install-spinner.done {
  animation: none;
  background: var(--green);
}
.install-spinner.done::after {
  content: '✓';
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  font-weight: 800;
  background: transparent;
}
.install-spinner.failed {
  animation: none;
  background: var(--red);
}
.install-spinner.failed::after {
  content: '✕';
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  font-weight: 800;
  background: transparent;
}
@keyframes install-spin { to { transform: rotate(360deg); } }

.install-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 0%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.install-sub {
  color: var(--text-3);
  font-size: 14px;
}

.install-progress {
  height: 8px;
  background: var(--bg-3);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.install-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, #8b5cf6 50%, #ec4899 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: 200% 100%;
  animation: install-shimmer 2s linear infinite;
}
@keyframes install-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.install-percent {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  margin-top: -8px;
  text-align: right;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 14px;
  transition: all 0.3s;
  position: relative;
}

.install-step.active {
  color: var(--text-0);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  font-weight: 600;
}

.install-step.active .install-step-icon {
  animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.install-step.done {
  color: var(--green);
}

.install-step.done .install-step-icon {
  filter: grayscale(0.3);
  opacity: 0.85;
}

.install-step-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.install-log {
  background: #060606;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #5a8a72;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 180px;
  line-height: 1.5;
}

.install-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ===== Sound-effects toggle ===== */
.sfx-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.sfx-toggle:hover { border-color: var(--blue); transform: scale(1.06); }
.sfx-toggle.off { color: var(--text-3); opacity: 0.6; }

/* ===== Receipts admin tab ===== */
.receipts-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .receipts-grid { grid-template-columns: 1fr; }
}

.receipts-form-card,
.receipts-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.receipts-form-card {
  background: linear-gradient(180deg, rgba(31,108,77,0.06), transparent), var(--bg-card);
  border-color: rgba(31,108,77,0.2);
}

.rc-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.rc-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-item .input { padding: 8px 10px; font-size: 13px; }
.rc-item .rc-del {
  width: 32px; height: 32px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-3);
}
.rc-item .rc-del:hover { color: var(--red); border-color: var(--red); }

.rc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(31,108,77,0.10);
  border: 1px solid rgba(31,108,77,0.25);
  border-radius: var(--radius);
}
.rc-total-amount {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: #a7e8c8;
  font-variant-numeric: tabular-nums;
}

.rc-row {
  align-items: center;
  gap: 14px;
}
.rc-row-num {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  flex-shrink: 0;
}
.rc-row-total {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  color: #a7e8c8;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: end;
}

.rc-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.rc-history-head,
.rc-history-row {
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) 100px 100px 130px 170px 160px;
  gap: 12px;
  align-items: center;
  min-width: 900px;
}
.rc-history-head {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.22);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rc-history-row {
  padding: 12px 12px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
.rc-history-row:hover {
  border-color: rgba(59,130,246,0.35);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.rc-customer { min-width: 0; }
.rc-customer-name { font-weight: 800; color: var(--text-0); }
.rc-customer-items { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-money {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #a7e8c8;
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.rc-paymethod { color: var(--text-1); font-weight: 700; }
.rc-actions { display:flex; gap: 10px; justify-content: flex-end; }

/* Better RTL layout for Hebrew admin */
[lang="he"] .rc-history { direction: rtl; }
[lang="he"] .rc-history-head,
[lang="he"] .rc-history-row { direction: rtl; }
[lang="he"] .rc-actions { justify-content: flex-start; }
.rc-row-num,
.rc-money {
  direction: ltr;
  unicode-bidi: plaintext;
}

@media (max-width: 1100px) {
  .rc-history-head { display:none; }
  .rc-history-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "num actions"
      "cust cust"
      "total paid"
      "method sent";
    align-items: start;
    row-gap: 10px;
  }
  .rc-history-row .rc-row-num { grid-area: num; width: fit-content; }
  .rc-actions { grid-area: actions; }
  .rc-customer { grid-area: cust; }
  .rc-total-money { grid-area: total; }
  .rc-paid-money { grid-area: paid; }
  .rc-paymethod { grid-area: method; }
  .rc-sent { grid-area: sent; }
}

/* ===== Banner (info / error / warning) ===== */
.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.banner-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.banner-error {
  background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(239,68,68,0.04));
  border-color: rgba(239,68,68,0.35);
  color: #fff;
}

/* List item dim when disabled */
.list-item.is-disabled { opacity: 0.62; filter: saturate(0.6); }
.list-item.is-disabled:hover { opacity: 0.78; }

/* ===== ON/OFF Power Toggle ===== */
.power-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.power-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.power-toggle:focus-visible .power-toggle-track { box-shadow: 0 0 0 3px var(--blue-soft); }

.power-toggle-track {
  position: relative;
  width: 130px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  transition: background 0.45s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.3s;
  overflow: hidden;
}

.power-toggle-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 1;
}
.power-toggle-on  { left: 14px;  color: #fff;          opacity: 0; transform: translateY(-50%) translateX(-6px); }
.power-toggle-off { right: 14px; color: var(--text-2); opacity: 1; }

.power-toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2a2a, #181818);
  border: 1px solid #3a3a3a;
  box-shadow: 0 4px 14px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), background 0.3s, border-color 0.3s;
  z-index: 2;
}
.power-toggle-icon {
  font-size: 16px;
  color: var(--text-2);
  transition: color 0.3s, transform 0.6s ease;
}

.power-toggle-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #8b5cf6, #ec4899);
  background-size: 200% 100%;
  animation: install-shimmer 2s linear infinite;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  z-index: 3;
}

/* States */
.power-toggle[data-state="on"] .power-toggle-track {
  background: linear-gradient(135deg, var(--green-dark, #0f3d2b), var(--green));
  border-color: var(--green);
}
.power-toggle[data-state="on"] .power-toggle-knob {
  transform: translateX(86px);
  background: linear-gradient(160deg, #fff, #d6f5e4);
  border-color: #fff;
}
.power-toggle[data-state="on"] .power-toggle-icon { color: var(--green); transform: rotate(360deg); }
.power-toggle[data-state="on"] .power-toggle-on  { opacity: 1; transform: translateY(-50%) translateX(0); }
.power-toggle[data-state="on"] .power-toggle-off { opacity: 0; transform: translateY(-50%) translateX(6px); }

.power-toggle[data-state="installing"] .power-toggle-track {
  background: var(--bg-3);
  border-color: var(--blue);
}
.power-toggle[data-state="installing"] .power-toggle-knob {
  transform: translateX(43px);
  animation: knob-pulse 1.8s ease-in-out infinite;
}
.power-toggle[data-state="installing"] .power-toggle-icon {
  color: var(--blue);
  animation: knob-spin 1.4s linear infinite;
}
.power-toggle[data-state="installing"] .power-toggle-progress { opacity: 1; }
.power-toggle[data-state="installing"] .power-toggle-off,
.power-toggle[data-state="installing"] .power-toggle-on { opacity: 0; }

.power-toggle[data-state="stopping"] .power-toggle-track { background: var(--bg-3); }
.power-toggle[data-state="stopping"] .power-toggle-knob {
  transform: translateX(43px);
  animation: knob-pulse 1s ease-in-out infinite;
}

.power-toggle[data-state="error"] .power-toggle-track {
  background: var(--red-soft);
  border-color: var(--red);
}
.power-toggle[data-state="error"] .power-toggle-icon { color: var(--red); }

.power-toggle[data-state="locked"] {
  cursor: not-allowed;
  opacity: 0.85;
}
.power-toggle[data-state="locked"] .power-toggle-track {
  background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 8px, #222 8px, #222 16px);
  border-color: rgba(239, 68, 68, 0.4);
}
.power-toggle[data-state="locked"] .power-toggle-knob {
  background: linear-gradient(160deg, #2a2a2a, #181818);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}
.power-toggle[data-state="locked"] .power-toggle-icon { color: #fca5a5; transform: none; }
.power-toggle[data-state="locked"] .power-toggle-status { color: #fca5a5; }

@keyframes knob-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); } 50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); } }
@keyframes knob-spin  { to { transform: rotate(360deg); } }

.power-toggle-status {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 14px;
  transition: color 0.3s;
}
.power-toggle[data-state="on"]    .power-toggle-status { color: var(--green); }
.power-toggle[data-state="error"] .power-toggle-status { color: var(--red); }
.power-toggle[data-state="installing"] .power-toggle-status { color: var(--blue); }

/* ===== Generic icon button (round, ghosted) ===== */
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s, background 0.2s;
}
.icon-btn:hover { border-color: var(--blue); color: var(--text-0); transform: rotate(-12deg); }
.icon-btn:active { transform: rotate(-12deg) scale(0.92); }

/* ===== IDE-style shell used by Console + Config tabs ===== */
.ide-shell {
  background: #1a1d23;
  border: 1px solid #2a2f37;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}
.ide-tabbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #14161b;
  border-bottom: 1px solid #2a2f37;
  padding: 0 12px 0 0;
  flex-wrap: wrap;
}
.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-2);
  font-family: var(--font-mono);
  background: transparent;
  border-right: 1px solid #2a2f37;
  cursor: default;
}
.ide-tab.active {
  background: #1a1d23;
  color: var(--text-0);
  border-bottom: 2px solid var(--blue);
  margin-bottom: -1px;
}
.ide-tab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #8b5cf6);
  box-shadow: 0 0 8px rgba(59,130,246,0.5);
}
.ide-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f7df1e, #c4af00);
  color: #1a1d23;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.ide-tab-dirty {
  color: var(--blue);
  font-size: 14px;
  transition: opacity 0.2s;
}
.ide-tabbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  padding: 8px 0;
  flex-wrap: wrap;
}
.ide-segmented {
  display: inline-flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 2px;
}
.ide-segmented button {
  background: transparent;
  border: 0;
  color: var(--text-2);
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.02em;
}
.ide-segmented button:hover { color: var(--text-0); }
.ide-segmented button.active {
  background: var(--blue-soft);
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px var(--blue-border);
}
.ide-search input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  width: 180px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ide-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ide-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--font-mono);
  cursor: pointer;
}
.ide-check input { accent-color: var(--blue); }

.ide-body {
  background: #1a1d23;
  padding: 0;
  position: relative;
  min-height: 360px;
}
.ide-statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0d6efd1a;
  background: linear-gradient(90deg, #1e3a8a 0%, #312e81 50%, #1e3a8a 100%);
  color: #cbd5ff;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-top: 1px solid #2a2f37;
  letter-spacing: 0.04em;
}
.ide-statusbar .ml-auto { margin-inline-start: auto; }
.ide-stat-pill {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
}
.ide-stat-pill-on { background: rgba(31, 108, 77, 0.5); color: #a7e8c8; }
.ide-stat-pill-info { background: rgba(59,130,246,0.25); color: #d1e6ff; }

.ide-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), #6366f1);
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(59,130,246,0.3);
  transition: transform 0.15s, box-shadow 0.2s;
}
.ide-save-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59,130,246,0.45); }
.ide-save-btn:active { transform: translateY(0); }

/* ===== Console (inside IDE shell) ===== */
.ide-console {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: #0e1014;
  color: #c9d1d9;
  padding: 0;
  height: 480px;
  overflow: auto;
  border-radius: 0;
}
.ide-console::-webkit-scrollbar { width: 12px; }
.ide-console::-webkit-scrollbar-track { background: #0e1014; }
.ide-console::-webkit-scrollbar-thumb { background: #2a2f37; border-radius: 6px; border: 3px solid #0e1014; }
.ide-console::-webkit-scrollbar-thumb:hover { background: #3a4148; }

.con-line {
  display: flex;
  align-items: baseline;
  padding: 1px 12px 1px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.con-line:hover { background: rgba(255,255,255,0.025); }
.con-ln {
  display: inline-block;
  width: 56px;
  flex-shrink: 0;
  text-align: right;
  padding-inline-end: 14px;
  color: #4a5260;
  user-select: none;
  font-variant-numeric: tabular-nums;
  border-inline-end: 1px solid #1a1d23;
  margin-inline-end: 10px;
}
.con-body { flex: 1; }
.con-empty,
.con-empty-line { color: #4a5260; padding: 8px 12px; }
.con-info   { color: #79c0ff; }
.con-info   .con-ln { color: #2c5b8a; }
.con-warn   { color: #f0b67f; background: rgba(245, 158, 11, 0.04); }
.con-warn   .con-ln { color: #765837; }
.con-err    { color: #ff7b72; background: rgba(239, 68, 68, 0.06); }
.con-err    .con-ln { color: #893f3a; }
.con-deploy { color: #d2a8ff; }
.con-deploy .con-ln { color: #5e4787; }
.con-log    { color: #c9d1d9; }
.con-line mark {
  background: rgba(245, 158, 11, 0.35);
  color: #ffe7b3;
  border-radius: 2px;
  padding: 0 2px;
}

/* ===== CodeMirror VS-Code-like polish ===== */
.ide-shell .CodeMirror {
  height: 520px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  background: #1a1d23 !important;
}
.ide-shell .CodeMirror-gutters {
  background: #14161b !important;
  border-right: 1px solid #2a2f37 !important;
}
.ide-shell .CodeMirror-linenumber {
  color: #4a5260 !important;
  padding: 0 10px;
}
.ide-shell .CodeMirror-activeline-gutter,
.ide-shell .CodeMirror-activeline-background { background: rgba(59,130,246,0.07) !important; }
.ide-shell .CodeMirror-cursor { border-left: 2px solid #79c0ff !important; }
.ide-shell .CodeMirror-selected { background: rgba(59,130,246,0.18) !important; }
.ide-shell .CodeMirror-focused .CodeMirror-selected { background: rgba(59,130,246,0.28) !important; }
.ide-shell .CodeMirror-matchingbracket { color: #f0b67f !important; background: rgba(245,158,11,0.18); border-radius: 2px; }
.ide-shell .CodeMirror-simplescroll-vertical,
.ide-shell .CodeMirror-simplescroll-horizontal { background: transparent; }
.ide-shell .CodeMirror-simplescroll-vertical div,
.ide-shell .CodeMirror-simplescroll-horizontal div { background: #2a2f37; border-radius: 6px; border: 0; }

/* ===== Inline mini progress (admin/dashboard service rows) ===== */
.mini-progress {
  height: 4px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
  max-width: 320px;
}
.mini-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #8b5cf6);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: 200% 100%;
  animation: install-shimmer 2s linear infinite;
}
.mini-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

/* ============================================
   3D depth: grid floor + cursor halo + vignette
   ============================================ */

/* Layer 1 — blueprint grid (depth perspective, fades toward edges) */
body::before {
  content: '';
  position: fixed;
  inset: -50px;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 0%, transparent 75%);
  animation: grid-drift 30s linear infinite, scene-breathe 14s ease-in-out infinite;
}

@keyframes grid-drift {
  to { background-position: 48px 48px, 48px 48px; }
}

/* Layer 2 — cursor-following spotlight, big and soft.
   JS sets --cursor-x / --cursor-y on body. Falls back to centered. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    600px circle at var(--cursor-x, 50%) var(--cursor-y, 30%),
    rgba(59, 130, 246, 0.10),
    rgba(59, 130, 246, 0.04) 30%,
    transparent 60%
  );
  transition: background 0.2s ease;
}

/* Vignette that darkens corners for extra depth */
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%);
}

/* Make sure all real content sits above the depth layers */
.nav, .container, section, main, .modal-backdrop, .toast {
  position: relative;
  z-index: 1;
}
.nav { z-index: 100; }
.modal-backdrop { z-index: 1500; }
.toast { z-index: 2000; }

.card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s,
              box-shadow 0.25s;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.list-item {
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #6366f1 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.gradient-text {
  /* clean white headline with a faint blue sheen — keeps the page feeling cohesive */
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #cfe1ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(120, 170, 255, 0.18);
}

/* Hero animation */
.hero-card {
  animation: hero-float 4s ease-in-out infinite;
}
.hero-card-2 { animation-delay: -1.3s; }
.hero-card-3 { animation-delay: -2.6s; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}