/* ── Dashboard layout ── */
.dash-wrap { display: flex; min-height: 100vh; }

/* ── Sidebar: sharp, bordered, terminal feel ── */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: #040407;
  border-right: 1px solid rgba(124,58,237,.25);
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0; overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 18px; border-bottom: 1px solid rgba(124,58,237,.2);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 30px; height: 30px; border: 2px solid var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-family: var(--mono); color: var(--purple); font-weight: 700;
}
.sidebar-logo .logo-name { font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #fff; }
.sidebar-nav { flex: 1; padding: 16px 10px; }
.nav-group { margin-bottom: 24px; }
.nav-group-label {
  font-size: 9px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(124,58,237,.6); padding: 0 10px 10px; font-family: var(--mono);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.4); transition: all .14s; text-decoration: none;
  border-left: 2px solid transparent; font-family: var(--font);
}
.nav-item:hover { color: rgba(255,255,255,.85); background: rgba(124,58,237,.06); border-left-color: rgba(124,58,237,.3); }
.nav-item.active { color: #a78bfa; border-left-color: var(--purple); background: rgba(124,58,237,.1); }
.nav-icon { width: 16px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge { font-size: 10px; background: rgba(124,58,237,.2); color: #a78bfa; padding: 1px 6px; font-family: var(--mono); }
.sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(124,58,237,.15); }

/* ── Main area ── */
.dash-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.dash-topbar {
  position: sticky; top: 0; z-index: 50;
  background: #040407; border-bottom: 1px solid rgba(124,58,237,.2);
  height: 60px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.page-breadcrumb { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.5); font-family: var(--mono); }
.page-breadcrumb span { color: #fff; }
.dash-content { flex: 1; padding: 24px 28px; overflow-y: auto; }
.animate-in { animation: fadeIn .25s ease; }

/* ── Cards: sharp corners, subtle border ── */
.card {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(124,58,237,.15);
  border-radius: 0;
  overflow: hidden;
}
.card:hover { border-color: rgba(124,58,237,.25); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(124,58,237,.12);
  background: rgba(124,58,237,.04);
}
.card-title { font-weight: 700; font-size: 14px; font-family: var(--font); }
.card-body { padding: 18px; }

/* ── Stat cards ── */
.stat-card { padding: 20px 18px; text-align: center; border: 1px solid rgba(124,58,237,.15); }
.stat-value { font-size: 28px; font-weight: 800; font-family: var(--mono); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 11px; color: rgba(255,255,255,.3); letter-spacing: 2px; text-transform: uppercase; font-family: var(--mono); }

/* ── Server cards ── */
.server-card {
  border: 1px solid rgba(124,58,237,.2);
  background: rgba(255,255,255,.02);
  padding: 20px; cursor: pointer; transition: all .15s;
  text-decoration: none; display: block; color: var(--text);
  position: relative; overflow: hidden;
}
.server-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--purple); opacity: 0; transition: opacity .15s;
}
.server-card:hover { border-color: rgba(124,58,237,.5); background: rgba(124,58,237,.05); }
.server-card:hover::before { opacity: 1; }
.server-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.server-emoji { font-size: 22px; }
.server-name { font-weight: 700; font-size: 15px; flex: 1; }
.server-plan { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: 1px; text-transform: uppercase; }
.server-gauges { display: flex; flex-direction: column; gap: 8px; }
.gauge-row { display: flex; align-items: center; gap: 8px; }
.gauge-label { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.3); width: 32px; letter-spacing: 1px; }
.gauge-val { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.6); width: 70px; text-align: right; }
.progress { flex: 1; height: 3px; background: rgba(255,255,255,.06); }
.progress-fill { height: 100%; transition: width .4s; }
.progress-purple { background: var(--purple); }
.progress-cyan   { background: var(--cyan); }
.progress-green  { background: var(--green); }
.progress-orange { background: var(--orange); }
.progress-red    { background: var(--red); }

/* ── Tabs ── */
.tab-bar { display: flex; border-bottom: 1px solid rgba(124,58,237,.2); background: rgba(124,58,237,.04); overflow-x: auto; }
.tab-item {
  padding: 12px 20px; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,.35); cursor: pointer;
  transition: all .14s; white-space: nowrap; border-bottom: 2px solid transparent;
  font-family: var(--mono);
}
.tab-item:hover { color: rgba(255,255,255,.7); background: rgba(124,58,237,.06); }
.tab-item.active { color: #a78bfa; border-bottom-color: var(--purple); background: rgba(124,58,237,.08); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 7px; font-family: var(--mono); }
.form-hint  { font-size: 11px; color: rgba(255,255,255,.25); margin-top: 5px; }
.input {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(124,58,237,.2);
  color: #fff; padding: 10px 14px; font-size: 14px; font-family: var(--font);
  border-radius: 0; transition: border-color .14s; outline: none;
}
.input:focus { border-color: var(--purple); background: rgba(124,58,237,.04); }
.input:read-only { opacity: .5; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 9px 18px; border: none; cursor: pointer; transition: all .14s; text-decoration: none; border-radius: 0; font-family: var(--font); }
.btn-cyan   { background: var(--cyan);   color: #000; }
.btn-cyan:hover { background: #00bfe8; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #6d28d9; }
.btn-green  { background: var(--green);  color: #000; }
.btn-green:hover { filter: brightness(1.1); }
.btn-ghost  { background: transparent; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.1); }
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.btn-sm  { padding: 6px 14px; font-size: 12px; }
.btn-xs  { padding: 3px 10px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Power buttons ── */
.power-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; padding: 3px 8px; text-transform: uppercase; font-family: var(--mono); }
.badge-green  { background: rgba(0,255,136,.1);  color: var(--green);  border: 1px solid rgba(0,255,136,.2); }
.badge-cyan   { background: rgba(0,212,255,.1);  color: var(--cyan);   border: 1px solid rgba(0,212,255,.2); }
.badge-purple { background: rgba(124,58,237,.15);color: #a78bfa;       border: 1px solid rgba(124,58,237,.3); }
.badge-yellow { background: rgba(251,191,36,.1); color: var(--yellow); border: 1px solid rgba(251,191,36,.2); }
.badge-orange { background: rgba(249,115,22,.1); color: var(--orange); border: 1px solid rgba(249,115,22,.2); }
.badge-red    { background: rgba(239,68,68,.1);  color: var(--red);    border: 1px solid rgba(239,68,68,.2); }
.badge-gray   { background: rgba(255,255,255,.06);color: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.1); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead tr { border-bottom: 1px solid rgba(124,58,237,.2); }
.data-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.3); font-family: var(--mono); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); color: rgba(255,255,255,.75); }
.data-table tbody tr:hover { background: rgba(124,58,237,.04); }
.td-bold { font-weight: 700; color: #fff; }
.td-mono { font-family: var(--mono); }
.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-muted{ color: rgba(255,255,255,.35); }
.text-cyan  { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-mono  { font-family: var(--mono); }

/* ── Console ── */
.console-out {
  background: #020204; border: 1px solid rgba(124,58,237,.2);
  font-family: var(--mono); font-size: 12px; line-height: 1.8;
  padding: 14px; height: 380px; overflow-y: auto;
  color: rgba(255,255,255,.7);
}
.console-in { display: flex; gap: 8px; margin-top: 10px; }
.cl-info { color: #a78bfa; }
.cl-warn { color: var(--yellow); }
.cl-error{ color: var(--red); }

/* ── File manager ── */
.fm-row { display: grid; grid-template-columns: 24px 24px 1fr 80px 90px 130px; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; font-size: 13px; }
.fm-row:hover { background: rgba(124,58,237,.05); }
.fm-row.fm-selected { background: rgba(124,58,237,.08); }
.fm-icon { font-size: 14px; text-align: center; }
.fm-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-sz   { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.3); text-align: right; }
.fm-dt   { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.3); }
.fm-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .1s; }
.fm-row:hover .fm-actions { opacity: 1; }

/* ── Section heads ── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 14px; font-weight: 800; letter-spacing: .5px; font-family: var(--font); }
.section-sub   { font-size: 12px; color: rgba(255,255,255,.3); margin-top: 3px; font-family: var(--mono); }

/* ── Var rows (startup) ── */
.var-row { padding: 14px 18px; border-bottom: 1px solid rgba(124,58,237,.1); }
.var-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.var-env  { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: 1px; margin-left: 8px; }
.var-desc { font-size: 12px; color: rgba(255,255,255,.35); margin-bottom: 6px; }

/* ── Billing ── */
.order-summary { background: rgba(124,58,237,.04); border: 1px solid rgba(124,58,237,.2); padding: 18px; margin-bottom: 22px; }
.order-row { display: flex; justify-content: space-between; align-items: center; }
.checkout-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

/* ── Resource helper (used by JS) ── */
.server-gauges { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.gauge-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:700px){ .grid-2{grid-template-columns:1fr;} }

/* ── Plan cards in checkout ── */
.plan-card {
  background: rgba(255,255,255,.02); border: 1px solid rgba(124,58,237,.2);
  border-radius: 0; padding: 24px; cursor: pointer; transition: all .15s; position: relative;
}
.plan-card:hover { border-color: var(--purple); background: rgba(124,58,237,.06); }
.plan-price { font-family: var(--mono); font-size: 32px; font-weight: 700; line-height: 1; margin: 10px 0 18px; }
.plan-price span { font-size: 13px; font-weight: 400; color: rgba(255,255,255,.3); }
.plan-feature { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.45); padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); display: flex; align-items: center; gap: 8px; }
.plan-feature::before { content: '+'; color: var(--purple); }
.plan-feature:last-child { border-bottom: none; }
.plan-badge { position: absolute; top: 12px; right: 12px; }

/* ── Game cards in checkout ── */
.game-card {
  background: rgba(255,255,255,.02); border: 1px solid rgba(124,58,237,.15);
  padding: 20px 16px; text-align: center; cursor: pointer; transition: all .15s; border-radius: 0;
}
.game-card:hover { border-color: var(--purple); background: rgba(124,58,237,.06); transform: translateY(-2px); }
.game-emoji { font-size: 36px; margin-bottom: 10px; }
.game-name  { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.game-req   { font-size: 11px; color: rgba(255,255,255,.3); font-family: var(--mono); }

/* ── Step indicator ── */
.step-dot { width: 28px; height: 28px; border: 2px solid rgba(124,58,237,.3); background: transparent; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.3); flex-shrink: 0; font-family: var(--mono); }
.step-dot.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.step-dot.done { border-color: var(--purple); color: var(--purple); }
.step-line { flex: 1; height: 1px; background: rgba(124,58,237,.2); }

/* ── Settings ── */
.settings-section { margin-bottom: 20px; }

/* ── Topbar-specific ── */
.topbar-actions { display: flex; gap: 8px; }

/* ── Responsive ── */
@media(max-width: 900px) {
  .sidebar { width: 200px; }
  .dash-content { padding: 16px; }
}
@media(max-width: 700px) {
  .sidebar { display: none; }
  .dash-content { padding: 12px; }
  .fm-row { grid-template-columns: 24px 1fr 90px; }
  .fm-sz, .fm-dt { display: none; }
}
