:root {
  --bg: #040814;
  --surface: rgba(9, 18, 36, 0.86);
  --surface-2: rgba(13, 26, 51, 0.92);
  --border: rgba(56, 189, 248, 0.22);
  --border-gold: rgba(245, 184, 46, 0.45);
  --text: #eef6ff;
  --muted: #8ea8c9;
  --blue: #1d9bf0;
  --sky: #38bdf8;
  --gold: #f5b82e;
  --gold-light: #ffe08a;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* ================= LIVE ANIMATED BACKGROUND (60FPS GPU) ================= */
.bg-live { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #040814; }
.bg-stripes {
  position: absolute; inset: -60%;
  background: repeating-linear-gradient(
    -35deg,
    rgba(29, 155, 240, 0.04) 0px,
    rgba(29, 155, 240, 0.04) 2px,
    transparent 2px,
    transparent 34px
  );
  animation: driftStripes 18s linear infinite;
}
.bg-sweep {
  position: absolute; inset: -40%;
  background: linear-gradient(120deg, transparent 35%, rgba(56, 189, 248, 0.07) 48%, rgba(245, 184, 46, 0.05) 52%, transparent 65%);
  animation: lightSweep 11s ease-in-out infinite alternate;
}
.bg-orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.28; pointer-events: none;
}
.orb-blue {
  width: 360px; height: 360px; top: -100px; left: -90px; background: #1d9bf0;
  animation: floatOrb1 14s ease-in-out infinite alternate;
}
.orb-gold {
  width: 340px; height: 340px; bottom: -110px; right: -80px; background: #f5b82e;
  animation: floatOrb2 16s ease-in-out infinite alternate;
}

@keyframes driftStripes {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(68px, 48px, 0); }
}
@keyframes lightSweep {
  from { transform: translate3d(-18%, -10%, 0); }
  to { transform: translate3d(18%, 10%, 0); }
}
@keyframes floatOrb1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(50px, 60px, 0) scale(1.15); }
}
@keyframes floatOrb2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-55px, -45px, 0) scale(1.18); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spinRing {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px #22c55e; opacity: 1; }
  50% { box-shadow: 0 0 16px #22c55e; opacity: 0.65; }
}

/* PAGE TRANSITION LOADER */
.page-loader {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: rgba(4, 8, 20, 0.78); backdrop-filter: blur(8px);
}
.loader-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(56, 189, 248, 0.18);
  border-top-color: var(--sky);
  border-right-color: var(--gold);
  animation: spinRing 0.65s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }

/* BRAND & LOGOS */
.brand { display: flex; align-items: center; gap: 11px; }
.nav-logo-img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); box-shadow: 0 0 16px rgba(245, 184, 46, 0.35);
}
.brand-title { font-size: 1.14rem; font-weight: 900; letter-spacing: 0.05em; }
.brand-title span { color: var(--gold); }
.brand-sub { font-size: 0.65rem; color: var(--sky); letter-spacing: 0.18em; font-weight: 700; }

.hero-banner-wrap {
  border-radius: 18px; overflow: hidden; border: 1.5px solid var(--border-gold);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 28px rgba(29, 155, 240, 0.18);
  margin-bottom: 18px; animation: fadeUp 0.5s ease;
}
.hero-banner-img { width: 100%; display: block; object-fit: cover; }

/* BUTTONS */
.btn-primary, .btn-gold, .btn-outline, .btn-ghost, .btn-danger, .btn-cyber {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; font-weight: 800; font-size: 0.86rem;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.2s ease;
  max-width: 100%;
}
.btn-primary { background: linear-gradient(135deg, #1d9bf0, #0284c7); color: #fff; }
.btn-cyber {
  padding: 13px 18px; border-radius: 13px; letter-spacing: 0.08em; font-size: 0.9rem;
  background: linear-gradient(120deg, rgba(29,155,240,0.38), rgba(245,184,46,0.28), rgba(29,155,240,0.42));
  background-size: 200% 100%;
  border: 1.5px solid rgba(56, 189, 248, 0.65); color: #fff;
  box-shadow: 0 0 24px rgba(29, 155, 240, 0.28);
  animation: shimmer 5s linear infinite;
}
.btn-cyber:hover { transform: translateY(-2px); filter: brightness(1.12); }
.btn-gold {
  background: linear-gradient(135deg, #ffd166, #f5b82e 55%, #d97706);
  color: #050a14; font-weight: 900; box-shadow: 0 6px 22px rgba(245, 184, 46, 0.32);
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-outline { background: rgba(13, 26, 51, 0.6); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--muted); }
.btn-danger { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.45); color: #fca5a5; }
.sm { padding: 7px 11px; font-size: 0.78rem; border-radius: 9px; }
.full-width { width: 100%; }

.pill-gold {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(245,184,46,0.16); border: 1px solid var(--border-gold);
  color: var(--gold-light); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
}
.btn-contact {
  padding: 8px 13px; border-radius: 10px; background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.4); color: #86efac; font-size: 0.83rem;
}

/* AUTH VIEW */
.auth-shell { max-width: 1180px; margin: 0 auto; padding: 18px 16px 44px; }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.auth-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 26px; margin-top: 22px; align-items: start; }
.runtime-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; font-size: 0.78rem; font-weight: 700; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.rt-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.rt-live .dot { background: var(--green); }
.rt-live em { font-style: normal; font-size: 0.64rem; color: #86efac; background: rgba(34,197,94,0.16); padding: 2px 5px; border-radius: 5px; }
.rt-pro .dot { background: var(--gold); }
.rt-pro em { font-style: normal; font-size: 0.64rem; color: var(--gold-light); background: rgba(245,184,46,0.16); padding: 2px 5px; border-radius: 5px; }

.premium-highlight-card {
  background: linear-gradient(155deg, rgba(245,184,46,0.14), rgba(9,18,36,0.92) 55%);
  border: 1.5px solid var(--border-gold); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(12px);
}
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ph-tag { font-size: 0.68rem; font-weight: 800; color: var(--gold); letter-spacing: 0.1em; }
.ph-price { font-size: 1.45rem; font-weight: 900; color: var(--gold-light); }
.ph-price small { display: block; font-size: 0.72rem; color: var(--muted); }
.ph-list { list-style: none; display: grid; gap: 6px; margin-bottom: 14px; color: #d8e6f8; font-size: 0.85rem; }
.ph-list li::before { content: "✓ "; color: var(--gold); font-weight: 900; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; backdrop-filter: blur(14px); animation: fadeUp 0.55s ease; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: rgba(4,8,20,0.8); padding: 5px; border-radius: 12px; margin-bottom: 14px; }
.auth-tab { background: transparent; border: none; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.auth-tab.active { background: linear-gradient(135deg, rgba(29,155,240,0.3), rgba(245,184,46,0.2)); color: #fff; }
.auth-form { display: grid; gap: 11px; }
.form-note { font-size: 0.8rem; color: var(--muted); }
label { display: grid; gap: 6px; font-size: 0.8rem; font-weight: 700; color: #c7d9ee; }
input, select, textarea { width: 100%; max-width: 100%; background: rgba(4, 10, 22, 0.88); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 11px; font-size: 0.9rem; font-family: inherit; transition: border-color 0.2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.8rem; }
.approval-banner { background: rgba(29,155,240,0.1); border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; font-size: 0.78rem; color: #bae6fd; }
.alert { padding: 12px 14px; border-radius: 11px; font-size: 0.84rem; margin-bottom: 12px; }
.alert-error { background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.45); color: #fecaca; }
.alert-success { background: rgba(34,197,94,0.16); border: 1px solid rgba(34,197,94,0.45); color: #bbf7d0; }
.alert-warn { background: rgba(245,184,46,0.14); border: 1px solid var(--border-gold); color: var(--gold-light); }

/* ================= TOPBAR & SLIDE-OUT MENU (EXACT VIDEO STYLE) ================= */
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; background: rgba(6, 13, 28, 0.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40;
}
.menu-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border);
  background: rgba(13, 26, 51, 0.85); color: var(--sky); font-size: 1.2rem; cursor: pointer; transition: 0.2s;
}
.menu-btn:hover { border-color: var(--gold); color: var(--gold); }
.topbar-brand {
  font-weight: 900; letter-spacing: 0.14em; font-size: 1rem; cursor: pointer;
  background: linear-gradient(90deg, #ffe08a, #f5b82e, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.topbar-logo {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; cursor: pointer;
  border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(245, 184, 46, 0.45); transition: transform 0.2s;
}
.topbar-logo:hover { transform: scale(1.08); }

.sidebar {
  position: fixed; top: 0; left: -290px; bottom: 0; width: 272px; z-index: 60;
  background: rgba(6, 13, 28, 0.96); backdrop-filter: blur(18px);
  border-right: 1px solid var(--border); padding: 18px 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.65);
}
.sidebar.open { left: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.drawer-title { font-weight: 900; letter-spacing: 0.16em; font-size: 0.95rem; color: var(--sky); }
.drawer-close { background: none; border: none; color: var(--muted); font-size: 1.25rem; cursor: pointer; padding: 4px 8px; }
.side-nav { display: grid; gap: 6px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 12px; background: transparent; border: 1px solid transparent;
  color: #cbd5e1; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-align: left; transition: 0.18s;
}
.nav-item:hover { background: rgba(56, 189, 248, 0.08); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.22), rgba(245, 184, 46, 0.12));
  border-color: rgba(56, 189, 248, 0.45); color: var(--gold-light);
}
.ni-ico { width: 20px; text-align: center; font-size: 1rem; color: var(--sky); }
.admin-nav .ni-ico { color: var(--gold); }
.badge-count { margin-left: auto; background: var(--gold); color: #050a14; font-size: 0.7rem; font-weight: 900; padding: 2px 7px; border-radius: 999px; }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 10px; }
.support-mini { font-size: 0.78rem; color: var(--muted); text-align: center; }
.support-mini strong { color: var(--gold-light); }
.logout-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px;
  border-radius: 11px; border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1); color: #f87171; font-weight: 800; font-size: 0.9rem; cursor: pointer;
}
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); z-index: 55; }

.main-content { max-width: 980px; margin: 0 auto; padding: 16px 14px 40px; }
.dash-section { animation: fadeUp 0.32s cubic-bezier(0.22, 1, 0.36, 1); }

/* ================= LIVE PLAN COUNTDOWN + FILTERS ================= */
.plan-timer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-radius: 14px; margin-bottom: 14px; cursor: pointer;
  background: linear-gradient(135deg, rgba(13, 26, 51, 0.92), rgba(245, 184, 46, 0.12));
  border: 1.5px solid var(--border-gold); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
.ptb-left { display: flex; align-items: center; gap: 9px; }
.ptb-ico { font-size: 1.1rem; }
.ptb-name { font-weight: 900; font-size: 0.88rem; letter-spacing: 0.08em; color: var(--gold-light); }
.ptb-timer { font-family: "JetBrains Mono", monospace; font-size: 0.84rem; font-weight: 800; color: var(--sky); }

.dash-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.view-switch { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); padding: 4px; border-radius: 11px; }
.vs-btn { width: 34px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer; transition: 0.18s; }
.vs-btn.active { background: rgba(29, 155, 240, 0.28); color: #fff; }
.toolbar-right { display: flex; gap: 8px; }
.tool-ico-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; transition: 0.18s;
}
.tool-ico-btn.gold { border-color: var(--border-gold); color: var(--gold-light); }

.search-wrap { margin-bottom: 12px; animation: fadeUp 0.2s ease; }

.filter-pills { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.fpill {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.18s;
}
.fpill.active {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.28), rgba(245, 184, 46, 0.16));
  border-color: var(--sky); color: #fff;
}
.fcnt { background: rgba(255,255,255,0.1); padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; }
.fpill-add {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border-gold); color: var(--gold-light); font-size: 1.1rem; cursor: pointer;
}

/* PROJECT CARDS (GRID & LIST MODES) */
.proj-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.proj-grid-2.list-mode { grid-template-columns: 1fr; }
.proj-card {
  background: linear-gradient(160deg, rgba(13, 27, 52, 0.9), rgba(7, 14, 29, 0.94));
  border: 1.5px solid var(--border); border-radius: 16px; padding: 16px 14px;
  cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 122px;
  backdrop-filter: blur(10px); animation: fadeUp 0.35s ease backwards;
}
.proj-card:hover { border-color: var(--gold); box-shadow: 0 0 24px rgba(245, 184, 46, 0.16); transform: translateY(-3px); }
.pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pc-ico {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(29, 155, 240, 0.16); border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--sky); font-weight: 900; font-size: 0.74rem; font-family: monospace;
}
.pc-dots { color: var(--muted); font-size: 1.1rem; }
.pc-name { font-weight: 800; font-size: 0.96rem; letter-spacing: 0.03em; margin-bottom: 6px; word-break: break-word; }
.pc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; }
.sdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.st-c-running .sdot, .online .sdot { background: #22c55e; animation: pulseGlow 2s infinite; }
.st-c-running, .online { color: #86efac; }
.st-c-building .sdot, .building .sdot, .st-c-completed .sdot { background: var(--gold); }
.st-c-building, .building, .st-c-completed { color: var(--gold-light); }
.st-c-stopped .sdot, .st-c-error .sdot, .offline .sdot { background: #ef4444; }
.st-c-stopped, .st-c-error, .offline { color: #fca5a5; }
.empty-state { color: var(--muted); padding: 36px 14px; text-align: center; grid-column: 1 / -1; }

/* SUBPAGES & WORKSPACE */
.subpage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.subpage-head h2 { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.06em; }
.back-btn { background: transparent; border: none; color: #e2e8f0; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

.proj-topbar { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.proj-head-info { flex: 1; min-width: 0; }
.proj-head-info h2 { font-size: 1.18rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-status { font-size: 0.78rem; display: inline-flex; align-items: center; gap: 6px; }

.pw-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 5px; margin-bottom: 16px; }
.pw-tab { background: transparent; border: none; color: var(--muted); border-radius: 10px; padding: 9px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.66rem; font-weight: 800; transition: 0.18s; }
.pt-ico { font-size: 1rem; }
.pw-tab.active { background: linear-gradient(135deg, rgba(29,155,240,0.32), rgba(245,184,46,0.18)); color: var(--gold-light); border: 1px solid var(--border-gold); }

.console-card { background: rgba(4, 8, 18, 0.94); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.console-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(9, 18, 36, 0.95); border-bottom: 1px solid var(--border); }
.console-title { font-family: monospace; font-weight: 800; font-size: 0.82rem; color: var(--sky); }
.console-btns { display: flex; gap: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: #cbd5e1; cursor: pointer; display: grid; place-items: center; }
.icon-btn.green { color: #4ade80; border-color: rgba(34,197,94,0.4); }
.icon-btn.red { color: #f87171; border-color: rgba(239,68,68,0.4); }
.icon-btn.blue { color: var(--sky); border-color: rgba(56,189,248,0.4); }
.console-output { padding: 14px; min-height: 300px; max-height: 56vh; overflow-y: auto; font-family: monospace; font-size: 0.78rem; color: #d8e6f8; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.stdin-row { display: flex; gap: 8px; padding: 10px; background: rgba(9, 18, 36, 0.95); border-top: 1px solid var(--border); }
.stdin-row input { flex: 1; padding: 9px 12px; font-size: 0.84rem; }

.db-list { display: grid; gap: 12px; }
.db-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.db-name { font-weight: 800; font-size: 1rem; }
.db-sub { font-size: 0.78rem; color: var(--muted); }
.db-sub code { color: var(--sky); font-weight: 700; }
.btn-db { padding: 9px 15px; border-radius: 10px; font-weight: 800; font-size: 0.76rem; cursor: pointer; background: transparent; }
.btn-db.green { border: 1.5px solid #22c55e; color: #4ade80; }
.btn-db.red { border: 1.5px solid #ef4444; color: #f87171; }
.btn-db.blue { border: 1.5px solid #3b82f6; color: #60a5fa; }
.btn-db.gold { border: 1.5px solid var(--gold); color: var(--gold-light); }

.env-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.env-rows { display: grid; gap: 10px; }
.env-row { display: grid; grid-template-columns: 1fr auto 1.2fr auto; gap: 8px; align-items: center; }
.env-eq { color: var(--muted); font-weight: 800; }

.files-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.files-path { display: flex; align-items: center; gap: 8px; font-family: monospace; font-size: 0.82rem; color: var(--sky); }
.files-list { display: grid; gap: 8px; padding-bottom: 70px; }
.file-row { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.file-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.file-name { font-weight: 700; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 0.72rem; color: var(--muted); }
.file-acts { display: flex; gap: 6px; }
.fab-upload { position: fixed; right: 20px; bottom: 22px; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--gold), #d97706); color: #040814; font-size: 1.7rem; font-weight: 900; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px rgba(245, 184, 46, 0.45); z-index: 30; }
.fab-upload input { display: none; }

.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 16px; margin-bottom: 14px; display: grid; gap: 11px; backdrop-filter: blur(12px); }
.danger-card { border-color: rgba(239,68,68,0.45); background: rgba(239,68,68,0.06); }
.meter-row { display: grid; gap: 6px; }
.meter-head { display: flex; justify-content: space-between; font-size: 0.76rem; font-weight: 700; color: var(--muted); }
.meter-track { height: 7px; border-radius: 999px; background: rgba(4,8,20,0.9); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.meter-fill.blue { background: linear-gradient(90deg, #1d9bf0, #38bdf8); }
.meter-fill.gold { background: linear-gradient(90deg, #f5b82e, #ffe08a); }
.dom-box { background: rgba(4,8,20,0.85); border: 1px solid var(--border); border-radius: 12px; padding: 13px; display: grid; gap: 8px; }
.dom-lbl { font-size: 0.68rem; color: var(--muted); font-weight: 800; letter-spacing: 0.08em; }
.dom-val { font-family: monospace; font-size: 0.86rem; color: var(--sky); font-weight: 700; word-break: break-all; }
.dom-btns { display: flex; gap: 8px; justify-content: flex-end; }

/* INITIALIZE PROJECT */
.init-shell { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; backdrop-filter: blur(14px); }
.init-topbar { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.init-heading { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; }
.init-form { display: grid; gap: 16px; }
.field-group { display: grid; gap: 7px; }
.upper-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; color: #8cb2d9; text-transform: uppercase; }
.input-icon-wrap { position: relative; display: flex; align-items: center; }
.input-ico { position: absolute; left: 13px; opacity: 0.75; }
.input-icon-wrap input { padding-left: 38px; }
.rt-grid-6 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rt-tile { background: rgba(7, 16, 33, 0.88); border: 1.5px solid var(--border); border-radius: 13px; padding: 15px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #cbd5e1; min-height: 88px; transition: 0.2s; }
.rt-badge-icon { font-size: 0.82rem; font-weight: 800; padding: 4px 9px; border-radius: 7px; background: rgba(255,255,255,0.06); color: #94a3b8; font-family: monospace; }
.rt-tile-name { font-size: 0.84rem; font-weight: 700; }
.rt-tile[data-rt="nodejs"].active { border-color: #22c55e; background: rgba(34,197,94,0.14); color: #bbf7d0; }
.rt-tile[data-rt="python"].active { border-color: #eab308; background: rgba(234,179,8,0.14); color: #fef08a; }
.rt-tile[data-rt="go"].active { border-color: #38bdf8; background: rgba(56,189,248,0.16); color: #bae6fd; }
.rt-tile[data-rt="html"].active { border-color: #f5b82e; background: rgba(245,184,46,0.16); color: #ffe08a; }
.rt-tile[data-rt="php"].active { border-color: #6366f1; background: rgba(99,102,241,0.16); color: #c7d2fe; }
.rt-tile[data-rt="rust"].active { border-color: #ef4444; background: rgba(239,68,68,0.16); color: #fecaca; }

.dropzone { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 14px; border: 1.5px dashed rgba(56, 189, 248, 0.45); border-radius: 14px; background: rgba(4, 10, 22, 0.85); cursor: pointer; }
.dropzone input[type="file"] { display: none; }
.dz-icon { font-size: 1.9rem; margin-bottom: 5px; }
.dz-title { font-weight: 700; font-size: 0.92rem; }
.dz-sub { font-size: 0.76rem; color: var(--muted); }
.file-pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.file-pill { background: rgba(29,155,240,0.18); border: 1px solid rgba(56,189,248,0.4); color: #bae6fd; font-size: 0.7rem; padding: 3px 8px; border-radius: 999px; font-family: monospace; }
.paste-toggle-row { text-align: right; }
.link-btn { background: none; border: none; color: var(--gold-light); font-size: 0.78rem; cursor: pointer; font-weight: 700; }
.code-paste-box { display: grid; gap: 8px; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.adv-box { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 10px; }
.adv-toggle { display: flex; justify-content: space-between; width: 100%; background: transparent; border: none; color: var(--gold); font-weight: 800; font-size: 0.8rem; cursor: pointer; }
.adv-body { display: grid; gap: 10px; }

/* AI CHAT, BILLING, HELP, ADMIN */
.ai-chat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; min-height: 68vh; overflow: hidden; }
.ai-messages { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 58vh; }
.ai-msg { padding: 12px 14px; border-radius: 13px; font-size: 0.86rem; max-width: 90%; white-space: pre-wrap; line-height: 1.55; animation: fadeUp 0.25s ease; }
.ai-msg.bot { align-self: flex-start; background: rgba(13, 27, 52, 0.9); border: 1px solid var(--border); }
.ai-msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(29,155,240,0.32), rgba(245,184,46,0.2)); border: 1px solid var(--border-gold); }
.ai-input-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: rgba(4, 10, 22, 0.9); }
.ai-input-bar input { flex: 1; }

.bill-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface); border: 1px solid var(--border); padding: 5px; border-radius: 13px; margin-bottom: 16px; }
.bseg-btn { padding: 10px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 800; font-size: 0.82rem; cursor: pointer; }
.bseg-btn.active { background: linear-gradient(135deg, rgba(29,155,240,0.32), rgba(245,184,46,0.22)); color: var(--gold-light); }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.plan-card.popular { border: 1.5px solid var(--gold); box-shadow: 0 0 28px rgba(245, 184, 46, 0.16); }
.plan-price { font-size: 1.55rem; font-weight: 900; color: var(--gold-light); margin: 6px 0; }
.plan-features { list-style: none; display: grid; gap: 6px; font-size: 0.82rem; color: #d8e6f8; }
.plan-features li::before { content: "✓ "; color: var(--gold); font-weight: 900; }
.billing-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; margin-bottom: 14px; }

.tech-list { display: grid; gap: 10px; }
.tech-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border-radius: 11px; background: rgba(4, 10, 22, 0.85); border: 1px solid var(--border); font-size: 0.82rem; }
.tech-item strong { color: var(--gold-light); }
.tech-item code { color: var(--sky); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 14px; }
.kpi-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.kpi-value { font-size: 1.35rem; font-weight: 900; margin-top: 4px; }
.kpi-value.gold { color: var(--gold-light); }
.kpi-value.cyan { color: var(--sky); }
.keys-list { display: grid; gap: 8px; margin-top: 8px; }
.key-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: rgba(4,10,22,0.88); border: 1px solid var(--border-gold); font-family: monospace; font-size: 0.78rem; }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 480px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.status-pill { padding: 3px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; }
.st-running, .st-active, .st-paid { background: rgba(34,197,94,0.16); color: #86efac; }
.st-pending, .st-pending_verification, .st-completed, .st-building { background: rgba(245,184,46,0.16); color: var(--gold-light); }
.st-stopped, .st-suspended, .st-error { background: rgba(239,68,68,0.16); color: #fca5a5; }
.muted { color: var(--muted); text-align: center; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.82); display: flex; align-items: center; justify-content: center; padding: 14px; z-index: 120; }
.modal-card { width: 100%; max-width: 680px; background: #081226; border: 1px solid var(--border); border-radius: 16px; padding: 18px; animation: fadeUp 0.25s ease; }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toast { position: fixed; bottom: 18px; left: 16px; right: 16px; margin: 0 auto; z-index: 250; background: rgba(9,18,36,0.96); border: 1.5px solid var(--gold); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 0.84rem; max-width: 440px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .billing-form { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
