/* ── ALIS Admin CSS — Caleb University ─────────────────────────────────────── */
:root {
  --cu-blue:    #003087;
  --cu-blue2:   #0052cc;
  --cu-gold:    #C8960C;
  --cu-gold-lt: #f5e6a3;
  --sidebar-w:  260px;
  --topbar-h:   60px;
  --bg:         #f0f4ff;
  --card-bg:    #ffffff;
  --text:       #1a2035;
  --text-muted: #6b7498;
  --border:     #dde4f5;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,48,135,0.09);
}

*, *::before, *::after { box-sizing: border-box; }

body.alis-body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.alis-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #001d5e 0%, #003087 60%, #004ab3 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .3s ease;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sidebar-logo { width: 42px; height: 42px; object-fit: contain; }
.brand-name  { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.2; }
.brand-sub   { color: #C8960C; font-size: 11px; font-weight: 600; letter-spacing: .5px; }

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.sidebar-section {
  color: rgba(200,150,12,.8);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 16px 18px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13.5px;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: rgba(200,150,12,.5);
}
.sidebar-link.active {
  background: rgba(200,150,12,.18);
  color: #fff;
  border-left-color: var(--cu-gold);
  font-weight: 600;
}
.sidebar-link i { font-size: 16px; width: 20px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 36px; height: 36px;
  background: var(--cu-gold);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.user-name  { color: #fff; font-size: 13px; font-weight: 600; }
.user-role  { color: rgba(200,150,12,.85); font-size: 11px; }

/* ── MAIN ────────────────────────────────────────────────────────────────── */
.alis-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s ease;
}

.alis-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 12px rgba(0,48,135,.06);
}
.topbar-title { font-weight: 700; font-size: 16px; color: var(--cu-blue); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { border: none; background: none; font-size: 20px; cursor: pointer; color: var(--cu-blue); }

.alis-content { padding: 28px 28px 40px; flex: 1; }

/* ── CARDS ────────────────────────────────────────────────────────────────── */
.alis-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.alis-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(0,48,135,.03), transparent);
}
.alis-card-header h5 { margin: 0; font-weight: 700; color: var(--cu-blue); font-size: 15px; }
.alis-card-body { padding: 24px; }

/* ── STAT CARDS ──────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,48,135,.13); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(0,48,135,.1);  color: var(--cu-blue); }
.stat-icon.gold   { background: rgba(200,150,12,.1); color: var(--cu-gold); }
.stat-icon.green  { background: rgba(25,135,84,.1);  color: #198754; }
.stat-icon.orange { background: rgba(255,140,0,.1);  color: #ff8c00; }
.stat-icon.red    { background: rgba(220,53,69,.1);  color: #dc3545; }
.stat-icon.teal   { background: rgba(32,178,170,.1); color: #20b2aa; }

.stat-num    { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label  { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-change { font-size: 11px; margin-top: 3px; }

/* ── TABLES ──────────────────────────────────────────────────────────────── */
.alis-table { width: 100%; border-collapse: collapse; }
.alis-table thead th {
  background: rgba(0,48,135,.04);
  color: var(--cu-blue);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.alis-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}
.alis-table tbody tr:hover { background: rgba(0,48,135,.025); }
.alis-table tbody tr:last-child td { border-bottom: none; }

/* ── BADGES ──────────────────────────────────────────────────────────────── */
.badge-pending    { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.badge-approved   { background: #d1e7dd; color: #0a3622; border: 1px solid #198754; }
.badge-rejected   { background: #f8d7da; color: #58151c; border: 1px solid #dc3545; }
.badge-sent       { background: #cfe2ff; color: #084298; border: 1px solid #0d6efd; }
.badge-opened     { background: #d3f9d8; color: #1a4731; border: 1px solid #198754; }
.badge-downloaded { background: #e2d9f3; color: #432874; border: 1px solid #6f42c1; }

/* ── FORMS ───────────────────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cu-blue);
  box-shadow: 0 0 0 3px rgba(0,48,135,.12);
  outline: none;
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-cu {
  background: linear-gradient(135deg, var(--cu-blue), var(--cu-blue2));
  color: #fff; border: none; border-radius: 8px;
  padding: 9px 20px; font-weight: 600; font-size: 14px;
  transition: opacity .2s, transform .15s;
}
.btn-cu:hover { opacity: .9; color: #fff; transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--cu-gold), #e0a80d);
  color: #fff; border: none; border-radius: 8px;
  padding: 9px 20px; font-weight: 600; font-size: 14px;
}
.btn-gold:hover { opacity: .9; color: #fff; }

/* ── SERIAL NUMBER PREVIEW ───────────────────────────────────────────────── */
.serial-preview {
  background: linear-gradient(135deg, #003087, #0052cc);
  color: #fff;
  border-radius: 10px;
  padding: 18px 24px;
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}
.serial-label { font-size: 10px; letter-spacing: 2px; opacity: .7; text-transform: uppercase; margin-bottom: 6px; }

/* ── WORKFLOW STEPPER ────────────────────────────────────────────────────── */
.workflow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
}
.workflow-step.done   { border-color: #198754; background: #f0fff4; }
.workflow-step.active { border-color: var(--cu-blue); background: #f0f4ff; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
  background: var(--border);
  color: var(--text-muted);
}
.workflow-step.done   .step-num { background: #198754; color: #fff; }
.workflow-step.active .step-num { background: var(--cu-blue); color: #fff; }

/* ── IMPORT MAPPER ───────────────────────────────────────────────────────── */
.map-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.map-arrow { text-align: center; color: var(--cu-gold); font-size: 18px; }

/* ── VERIFY PAGE ─────────────────────────────────────────────────────────── */
.verify-body { background: linear-gradient(135deg, #001d5e, #003087); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.verify-card { background: #fff; border-radius: 20px; max-width: 600px; width: 94%; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.verify-header { background: linear-gradient(135deg, #003087, #0052cc); padding: 28px 36px; text-align: center; }
.verify-result { padding: 36px; }
.result-valid   { background: #f0fff4; border: 2px solid #198754; border-radius: 14px; padding: 24px; }
.result-invalid { background: #fff5f5; border: 2px solid #dc3545; border-radius: 14px; padding: 24px; }
.result-warn    { background: #fffbf0; border: 2px solid #ffc107; border-radius: 14px; padding: 24px; }
.result-field   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
.result-field:last-child { border-bottom: none; }
.result-key     { color: #6b7498; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.result-val     { color: #1a2035; font-weight: 600; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .alis-sidebar { transform: translateX(-100%); }
  .alis-sidebar.open { transform: translateX(0); }
  .alis-main { margin-left: 0; }
}

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.alis-content > * { animation: fadeIn .3s ease; }

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