:root {
  --bg: #0b0f1a;
  --surface: #121829;
  --surface2: #1a2238;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e8edf7;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent2: #6366f1;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 12px;
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.18), transparent),
    radial-gradient(900px 500px at 90% 0%, rgba(99,102,241,.12), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }

.vlm-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.vlm-sidebar {
  background: rgba(18, 24, 41, 0.95);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.vlm-brand { display: flex; gap: .75rem; align-items: center; }
.vlm-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(59,130,246,.35);
}
.vlm-brand h1 { font-size: 1rem; margin: 0; font-weight: 700; }
.vlm-brand p { margin: 0; font-size: .75rem; color: var(--muted); }

.vlm-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.vlm-nav a {
  padding: .55rem .75rem; border-radius: 8px; color: var(--text);
  text-decoration: none; font-size: .9rem;
}
.vlm-nav a:hover, .vlm-nav a.active { background: var(--surface2); text-decoration: none; }
.vlm-nav a.active { border-left: 3px solid var(--accent); }

.vlm-main { padding: 1.5rem 2rem 5rem; max-width: 1200px; }
.vlm-pagehead { margin-bottom: 1.5rem; }
.vlm-pagehead h2 { margin: 0 0 .35rem; font-size: 1.5rem; }
.vlm-muted { color: var(--muted); font-size: .9rem; }

.vlm-card {
  background: rgba(18, 24, 41, .88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.vlm-grid { display: grid; gap: 1rem; }
.vlm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vlm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .vlm-shell { grid-template-columns: 1fr; }
  .vlm-grid-2, .vlm-grid-4 { grid-template-columns: 1fr; }
}

.vlm-stat strong { display: block; font-size: 1.6rem; }
.vlm-stat span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.vlm-field { margin-bottom: 1rem; }
.vlm-field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
.vlm-input, .vlm-select, .vlm-textarea {
  width: 100%; padding: .6rem .75rem; border-radius: 8px;
  border: 1px solid var(--border); background: #0d1324; color: var(--text);
  font: inherit;
}
.vlm-textarea { min-height: 100px; font-family: ui-monospace, monospace; font-size: .85rem; }
.vlm-checks { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.vlm-checks label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }

.vlm-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1rem; border-radius: 8px; border: none;
  font: inherit; font-weight: 600; cursor: pointer;
}
.vlm-btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.vlm-btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.vlm-btn-danger { background: rgba(239,68,68,.15); color: #fecaca; border: 1px solid rgba(239,68,68,.35); }

.vlm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.vlm-table th, .vlm-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.vlm-table th { color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase; }
.mono { font-family: ui-monospace, monospace; font-size: .82rem; }

.vlm-badge {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
}
.vlm-badge-ok { background: rgba(34,197,94,.15); color: #86efac; }
.vlm-badge-warn { background: rgba(245,158,11,.15); color: #fcd34d; }
.vlm-badge-err { background: rgba(239,68,68,.15); color: #fca5a5; }

.vlm-flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.vlm-flash-ok { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); }
.vlm-flash-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); }

.vlm-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem;
}
.vlm-auth-card { width: min(420px, 100%); }

.vlm-ip-primary { color: #93c5fd; font-weight: 600; }
.vlm-ip-hero {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(99,102,241,.08));
}
.vlm-ip-hero-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.vlm-ip-hero-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.vlm-dl { margin: 0; }
.vlm-dl dt { color: var(--muted); font-size: 0.78rem; margin-top: 0.65rem; }
.vlm-dl dd { margin: 0.15rem 0 0; }

.vlm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.vlm-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0d1324;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}
.vlm-chip:hover { border-color: var(--accent); }
.vlm-chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}

.vlm-table-installs { font-size: 0.85rem; }
.vlm-table-installs th { white-space: nowrap; }

.vlm-footer {
  position: fixed; left: 260px; right: 0; bottom: 0;
  padding: .85rem 2rem;
  background: rgba(11, 15, 26, .92);
  border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between;
}
@media (max-width: 900px) { .vlm-footer { left: 0; } }
.vlm-footer-links a { margin-right: 1rem; color: var(--muted); }
.vlm-footer-links a:hover { color: var(--text); }

.vlm-legal { max-width: 780px; margin: 0 auto; padding: 2rem 1.5rem 6rem; }
.vlm-legal h1 { font-size: 1.4rem; }
.vlm-legal h2 { font-size: 1.05rem; margin-top: 1.5rem; }
.vlm-legal p, .vlm-legal li { color: #cbd5e1; }
