/* VelixHost — Panel CSS (dark blue/violet) */

:root {
  --bg:         #06070d;
  --panel:      #0d0f1a;
  --panel-soft: #11142080;
  --line:       #1c2030;
  --text:       #e5e7eb;
  --muted:      #8a92a6;
  --blue:       #3b82f6;
  --indigo:     #6366f1;
  --violet:     #8b5cf6;
  --pink:       #a855f7;
  --emerald:    #10b981;
  --yellow:     #f59e0b;
  --red:        #ef4444;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.grad {
  background: linear-gradient(90deg, #60a5fa 0%, #8b5cf6 50%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ======= LAYOUT ======= */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #0a0c14;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.brand-icon svg { width: 18px; height: 18px; }
.brand-name { font-weight: 800; font-size: 15px; }
.brand-sub { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

.sidebar-nav {
  padding: 12px;
  display: flex; flex-direction: column; gap: 3px;
  flex: 1;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #9ca3af;
  font-size: 13px;
  transition: all .15s;
}
.sidebar-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(139,92,246,.10));
  border-color: rgba(139,92,246,.4);
  color: #fff;
}
.sidebar-nav a .nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(239,68,68,.45);
  animation: navbadge-pulse 2s ease-in-out infinite;
}
@keyframes navbadge-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(239,68,68,.45); }
  50%      { box-shadow: 0 2px 14px rgba(239,68,68,.85); }
}

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .name { font-weight: 600; font-size: 13px; }
.sidebar-user .role { font-size: 11px; color: var(--muted); }
.sidebar-user .logout { color: var(--muted); }
.sidebar-user .logout svg { width: 16px; height: 16px; }
.sidebar-user .logout:hover { color: white; }

/* ======= MAIN ======= */
.main { flex: 1; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
}
.topbar .subtitle {
  font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--muted); margin-bottom: 4px;
}
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; }
.topbar-actions { display: flex; gap: 10px; }

.content { padding: 32px; display: flex; flex-direction: column; gap: 32px; }

/* ======= KPIS / CARDS ======= */
.ring-grad {
  background: linear-gradient(135deg, rgba(99,102,241,.5), rgba(139,92,246,.4));
  padding: 1px; border-radius: 16px;
}
.ring-grad > .inner { background: var(--panel); border-radius: 15px; padding: 20px; }

.kpis { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 800; margin-top: 8px; }
.kpi-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.kpi-hint.green { color: var(--emerald); }
.kpi-hint.yellow { color: var(--yellow); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.card-hover { transition: all .25s; }
.card-hover:hover { border-color: var(--indigo); transform: translateY(-2px); }

.card-header {
  display: flex; align-items: start; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-weight: 700; font-size: 16px; margin: 0; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--line);
  color: var(--text);
  transition: all .15s;
  text-decoration: none;
}
.btn:hover { border-color: var(--violet); }
.btn svg { width: 14px; height: 14px; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.primary {
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  color: white; border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(139,92,246,.5);
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #fca5a5; border-color: rgba(239,68,68,.3); }
.btn.danger:hover { background: rgba(239,68,68,.15); }

/* ======= CHIPS ======= */
.chip {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: .02em;
}
.chip-on       { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.chip-pending  { background: rgba(234,179,8,.15);  color: #facc15; border: 1px solid rgba(234,179,8,.3); }
.chip-suspended{ background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.chip-provisioning { background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.chip-stopped  { background: rgba(107,114,128,.2); color: #9ca3af; border: 1px solid rgba(107,114,128,.4); }

/* ======= TABLE ======= */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--muted); font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
tbody tr:hover td { background: rgba(99,102,241,.05); }
.table-cell-main { display: flex; align-items: center; gap: 12px; }
.cell-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.cell-title { font-weight: 600; }
.cell-sub { font-size: 11px; color: var(--muted); }

/* ======= FORMS ======= */
.form-grid { display: grid; gap: 18px; max-width: 640px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
input, select, textarea {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--violet);
}
.error-box {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
}

/* ======= LOGIN PAGE ======= */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 60% at 50% 30%, rgba(139,92,246,.15), transparent 70%), var(--bg);
  padding: 20px;
}
.login-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  width: 100%; max-width: 400px;
}
.login-brand {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.login-brand .brand-icon { width: 56px; height: 56px; }
.login-brand .brand-icon svg { width: 28px; height: 28px; }
.login-brand .title { font-size: 22px; font-weight: 800; }
.login-brand .sub { font-size: 12px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }

/* ======= UTILITIES ======= */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; } .gap-md { gap: 16px; } .gap-lg { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; width: 100%; }
  .layout { flex-direction: column; }
}
.text-muted { color: var(--muted); }
.mt-sm { margin-top: 8px; } .mt-md { margin-top: 16px; } .mt-lg { margin-top: 24px; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--indigo), var(--violet)); }

/* Inline details panel */
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.detail-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.detail-item .k { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.detail-item .v { margin-top: 4px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #c4b5fd; word-break: break-all; }

/* Empty state */
.empty {
  padding: 40px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 12px;
}
