/* public/css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg-void:      #06080c;
  --bg-deep:      #0a0d14;
  --bg-card:      #0e1219;
  --bg-raised:    #131820;
  --bg-sidebar:   #09111a;
  --border:       #1a2535;
  --border-glow:  #1e3050;

  --cyan:         #00d4ff;
  --cyan-dim:     #0090bb;
  --gold:         #ffb700;
  --emerald:      #00e87a;
  --red:          #ff4444;
  --orange:       #ff8c00;

  --text-primary:   #dceeff;
  --text-secondary: #6a8aaa;
  --text-muted:     #3a5070;

  --sidebar-w: 260px;
  --header-h:  60px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Rajdhani', sans-serif; background: var(--bg-void); color: var(--text-primary); min-height: 100vh; }

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

.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  height: var(--header-h);
  background: rgba(6,8,12,0.9);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0; z-index: 40;
}

.admin-content { padding: 2rem; flex: 1; }

/* ─── SIDEBAR ─── */
.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section {
  padding: 1rem;
}

.sidebar-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: rgba(0,212,255,0.06);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(0,212,255,0.12);
  color: var(--cyan);
}

.sidebar-icon { width: 18px; text-align: center; }

/* ─── STAT CARDS ─── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--border-glow); }

.stat-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.stat-cyan  { border-top: 2px solid var(--cyan); }
.stat-gold  { border-top: 2px solid var(--gold); }
.stat-green { border-top: 2px solid var(--emerald); }
.stat-red   { border-top: 2px solid var(--red); }

/* ─── FORMS ─── */
.form-group  { margin-bottom: 1.25rem; }
.form-label  {
  display: block;
  font-size: 0.8rem;
  font-family: 'Orbitron', monospace;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select option { background: var(--bg-deep); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--cyan); color: #000; }
.btn-primary:hover { background: #33ddff; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #000; }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-glow); }
.btn-danger { background: rgba(255,68,68,0.15); color: var(--red); border: 1px solid rgba(255,68,68,0.3); }
.btn-danger:hover { background: rgba(255,68,68,0.25); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.65rem; }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(26,37,53,0.5);
  font-size: 0.92rem;
}
.data-table tr:hover td { background: rgba(0,212,255,0.02); }

/* ─── CARD ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.card-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ─── ALERTS ─── */
.alert { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.9rem; margin-bottom: 1rem; }
.alert-error   { background: rgba(255,68,68,0.1);   border: 1px solid rgba(255,68,68,0.3);   color: #ff8888; }
.alert-success { background: rgba(0,232,122,0.1);   border: 1px solid rgba(0,232,122,0.3);   color: var(--emerald); }
.alert-info    { background: rgba(0,212,255,0.1);   border: 1px solid rgba(0,212,255,0.3);   color: var(--cyan); }
.alert-warning { background: rgba(255,140,0,0.1);   border: 1px solid rgba(255,140,0,0.3);   color: var(--orange); }

/* ─── PILLS ─── */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.pill-completed { background: rgba(0,232,122,0.15); color: var(--emerald); }
.pill-pending   { background: rgba(255,183,0,0.15);  color: var(--gold); }
.pill-failed    { background: rgba(255,68,68,0.15);  color: var(--red); }
.pill-active    { background: rgba(0,212,255,0.15);  color: var(--cyan); }
.pill-inactive  { background: rgba(100,100,100,0.2); color: #888; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,8,12,0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 2rem;
  max-width: 540px; width: 90%;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; }
.modal-close:hover { color: var(--text-primary); }

/* ─── 2FA QR ─── */
.qr-wrap { text-align: center; padding: 1rem; }
.qr-wrap img { border-radius: 8px; background: #fff; padding: 10px; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-glow); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}