/* =========================================================
   Voltage SSM — Design System
   Theme: Neon Blue / Matte Black
   ========================================================= */

:root {
  --bg:          #080808;
  --bg-2:        #0d0d0d;
  --surface:     #111111;
  --surface-2:   #181818;
  --surface-3:   #202020;

  --line:        rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.13);

  --text:        #EAEAEA;
  --text-dim:    #888;
  --text-muted:  #4a4a4a;

  --blue:        #00C8FF;
  --blue-bright: #40DFFF;
  --blue-deep:   #0090CC;
  --blue-soft:   rgba(0,200,255,.1);
  --blue-glow:   0 0 28px rgba(0,200,255,.45);
  --blue-border: rgba(0,200,255,.3);

  --green:  #00E87A;
  --red:    #FF3E5E;
  --yellow: #FFB800;
  --purple: #A855F7;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --ease:      cubic-bezier(.2,.7,.2,1);

  --sidebar-w: 240px;
  --header-h:  64px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a  { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; }
p  { margin: 0; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 700; line-height: 1.15; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* ── Layout skeleton ────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  overflow-y: auto;
  transition: transform .3s var(--ease);
}
.sidebar__logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--line);
}
.sidebar__logo-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  overflow: hidden;
  filter: drop-shadow(0 0 12px rgba(0, 200, 255, .55));
}
.sidebar__logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sidebar__logo-name {
  font-size: 17px; font-weight: 800;
  letter-spacing: .02em;
  color: var(--text);
}
.sidebar__logo-name span { color: var(--blue); }

.sidebar__section {
  padding: 16px 12px 8px;
}
.sidebar__label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
  cursor: pointer;
  margin-bottom: 2px;
  border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-border);
}
.nav-item svg { flex-shrink: 0; }

.sidebar__bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.sidebar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.sidebar__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  display: grid; place-items: center;
  font: 700 13px/1 'Inter', sans-serif;
  color: #000;
  flex-shrink: 0;
}
.sidebar__user-name  { font-weight: 600; font-size: 13px; }
.sidebar__user-bal   { font-size: 12px; color: var(--blue); font-weight: 600; }

/* ── Main area ──────────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-size: 16px; font-weight: 700; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.content { padding: 28px; flex: 1; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px;
  letter-spacing: .01em;
  transition: transform .18s var(--ease), opacity .18s, box-shadow .18s;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .85; }

.btn-primary {
  background: var(--blue); color: #000;
  box-shadow: 0 6px 24px -8px rgba(0,200,255,.55);
}
.btn-primary:hover { background: var(--blue-bright); box-shadow: 0 10px 30px -8px rgba(0,200,255,.7); }

.btn-outline {
  background: transparent; color: var(--blue);
  border-color: var(--blue-border);
}
.btn-outline:hover { background: var(--blue-soft); }

.btn-ghost {
  background: var(--surface-2); color: var(--text-dim);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-danger {
  background: rgba(255,62,94,.12); color: var(--red);
  border-color: rgba(255,62,94,.25);
}
.btn-danger:hover { background: rgba(255,62,94,.2); }

.btn-sm  { padding: 7px 12px; font-size: 12px; }
.btn-lg  { padding: 13px 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card:hover { border-color: var(--line-strong); }

.card-sm { padding: 16px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-weight: 700; font-size: 15px; }

/* Stat cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.stat-card:hover { border-color: var(--blue-border); transform: translateY(-2px); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-value.blue   { color: var(--blue); text-shadow: 0 0 20px rgba(0,200,255,.4); }
.stat-value.green  { color: var(--green); }
.stat-value.yellow { color: var(--yellow); }
.stat-sub   { font-size: 12px; color: var(--text-dim); }

/* ── Grid ───────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase; }
.form-input, .form-select, .form-textarea {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,200,255,.15);
}
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-select option { background: var(--surface-2); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-weight: 600; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
.td-id   { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.td-link { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 12px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-pending    { background: rgba(255,184,0,.12);  color: var(--yellow); }
.badge-progress   { background: rgba(0,200,255,.12);  color: var(--blue); }
.badge-completed  { background: rgba(0,232,122,.12);  color: var(--green); }
.badge-partial    { background: rgba(168,85,247,.12); color: var(--purple); }
.badge-cancelled  { background: rgba(255,62,94,.12);  color: var(--red); }
.badge-default    { background: var(--surface-2); color: var(--text-dim); }
.badge-admin      { background: rgba(0,200,255,.15);  color: var(--blue); }

/* ── Alerts / Toasts ────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(255,62,94,.1);  border-color: rgba(255,62,94,.25);  color: var(--red); }
.alert-success { background: rgba(0,232,122,.1);  border-color: rgba(0,232,122,.25);  color: var(--green); }
.alert-info    { background: rgba(0,200,255,.1);  border-color: rgba(0,200,255,.25);  color: var(--blue); }
.alert-warn    { background: rgba(255,184,0,.1);  border-color: rgba(255,184,0,.25);  color: var(--yellow); }

#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast-item {
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(12px);
  border: 1px solid transparent;
  animation: toast-in .3s var(--ease) forwards;
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
}
.toast-success { background: rgba(0,232,122,.15); border-color: rgba(0,232,122,.35); color: var(--green); }
.toast-error   { background: rgba(255,62,94,.15);  border-color: rgba(255,62,94,.35);  color: var(--red); }
.toast-info    { background: rgba(0,200,255,.15);  border-color: rgba(0,200,255,.35);  color: var(--blue); }
@keyframes toast-in { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

/* ── Loader ─────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  position: fixed; inset: 0; background: var(--bg);
  display: grid; place-items: center; z-index: 9999;
}
.loading-screen .spinner { width: 36px; height: 36px; border-width: 3px; }

/* ── Misc utils ─────────────────────────────────────────── */
.flex        { display: flex; align-items: center; }
.flex-1      { flex: 1; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.gap-4       { gap: 16px; }
.mt-2        { margin-top: 8px; }
.mt-4        { margin-top: 16px; }
.mt-6        { margin-top: 24px; }
.mb-4        { margin-bottom: 16px; }
.mb-6        { margin-bottom: 24px; }
.text-blue   { color: var(--blue); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-muted  { color: var(--text-muted); }
.text-dim    { color: var(--text-dim); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-sm     { font-size: 12px; }
.text-lg     { font-size: 16px; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: monospace; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider     { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.page-title  { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.page-sub    { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

/* ── Range slider (markup) ──────────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  width: 100%; height: 6px;
  background: var(--surface-3); border-radius: 3px; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue);
  box-shadow: var(--blue-glow);
  cursor: pointer;
  transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ── Auth pages ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(0,200,255,.09), transparent 65%),
    radial-gradient(40% 40% at 10% 80%, rgba(0,150,204,.07), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 28px;
}
.auth-logo-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  overflow: hidden;
  filter: drop-shadow(0 0 14px rgba(0, 200, 255, .6));
}
.auth-logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-logo-name { font-size: 22px; font-weight: 800; }
.auth-logo-name span { color: var(--blue); }
.auth-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; text-align: center; }
.auth-sub   { font-size: 13px; color: var(--text-dim); text-align: center; margin-bottom: 24px; }
.auth-switch { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 20px; }
.auth-switch a { color: var(--blue); font-weight: 600; }

/* ── Landing page ───────────────────────────────────────── */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,8,.9);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.landing-hero {
  text-align: center;
  padding: 96px 24px 80px;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,255,.15) 0%, transparent 70%);
  pointer-events: none;
}
.landing-hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  letter-spacing: -.02em;
  margin-bottom: 18px;
  position: relative;
}
.landing-hero h1 .hi { color: var(--blue); text-shadow: 0 0 40px rgba(0,200,255,.5); }
.landing-hero p { font-size: 17px; color: var(--text-dim); max-width: 540px; margin: 0 auto 32px; }
.landing-hero .cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding: 60px 40px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--blue-border); transform: translateY(-3px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 14px;
}
.feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.feature-card p  { font-size: 13px; color: var(--text-dim); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 24px;
}
.modal {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 16px; font-weight: 700; }
.modal-close  { color: var(--text-dim); padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: var(--surface-2); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2,1fr); }
  .features { grid-template-columns: 1fr; padding: 40px 20px; }
}
@media (max-width: 600px) {
  .content { padding: 20px 16px; }
  .topbar  { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .landing-nav { padding: 16px 20px; }
}
