/* ═══════════════════════════════════════════
   Alumni Data Manager — Styles
   ═══════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --transition: .2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ── */
.app { max-width: 1280px; margin: 0 auto; padding: 1rem; }

header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.25rem;
}
header h1 {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
header .subtitle { font-size: .8rem; color: var(--text-muted); }

/* ── Tabs ── */
.tabs {
  display: flex; gap: .25rem; margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}
.tab {
  padding: .55rem 1rem; border: none; background: none;
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap;
  font-family: var(--font); transition: all var(--transition);
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Panels ── */
.panel { display: none; }
.panel.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Cards ── */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem;
}
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.card h3 { font-size: .9rem; font-weight: 600; margin-bottom: .5rem; color: var(--text-muted); }

/* ── Form ── */
.form-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .75rem; }
.form-group { flex: 1 1 200px; }
.form-group label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: .25rem;
  text-transform: uppercase; letter-spacing: .04em;
}
input[type="text"], input[type="number"], input[type="url"], input[type="date"],
textarea, select {
  width: 100%; padding: .55rem .75rem;
  border: 2px solid var(--border); border-radius: 8px;
  font-size: .9rem; font-family: var(--font);
  background: var(--bg); transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary-light);
}
textarea { resize: vertical; min-height: 60px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem 1rem; border: none; border-radius: 8px;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
  background: none; border: 2px solid var(--border); color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: .3rem .6rem; font-size: .75rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td {
  padding: .6rem .75rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: #f8fafc; font-weight: 700; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
  position: sticky; top: 0; z-index: 2;
}
tr:hover { background: #f8fafc; }
td.actions { white-space: nowrap; }
.badge {
  display: inline-block; padding: .15rem .45rem;
  background: #ede9fe; color: var(--primary);
  border-radius: 6px; font-size: .72rem; font-weight: 600;
}

/* ── Inline edit ── */
td input, td textarea {
  border: 1px solid var(--primary-light);
  background: #fff; padding: .25rem .4rem;
  font-size: .82rem; border-radius: 4px; width: 100%;
}

/* ── Drop zone ── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center; color: var(--text-muted);
  transition: all var(--transition); cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary); background: #f0f0ff;
  color: var(--primary);
}
.drop-zone .icon { font-size: 2rem; margin-bottom: .5rem; }

/* ── Toast ── */
.toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  padding: .6rem 1rem; border-radius: 8px; color: #fff;
  font-size: .82rem; font-weight: 500; box-shadow: var(--shadow-md);
  animation: slideIn .3s ease; min-width: 200px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* ── Stats ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem; margin-bottom: 1rem;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow); text-align: center;
}
.stat-card .num { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: .7rem; text-transform: uppercase; color: var(--text-muted); }

/* ── Wizard Steps ── */
.wizard-step {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; margin-bottom: .75rem;
  background: #f8fafc; border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: opacity .3s ease, filter .3s ease;
}
.step-num {
  flex: 0 0 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  border-radius: 50%; font-weight: 700; font-size: .85rem;
}
.wizard-step h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }

/* ── Counts editor grid ── */
#cfgCountsEditor {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .4rem;
}
.count-cell {
  display: flex; align-items: center; gap: .25rem;
  font-size: .82rem;
}
.count-cell label { font-weight: 600; color: var(--text-muted); min-width: 36px; font-size: .78rem; }
.count-cell input {
  width: 50px; padding: .25rem .35rem;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: .82rem; text-align: center;
  font-family: var(--font);
}

/* ── Supervisor list ── */
#cfgSupervisors::-webkit-scrollbar { width: 6px; }
#cfgSupervisors::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Footer ── */
footer {
  text-align: center; padding: 1.5rem 1rem; margin-top: 2rem;
  font-size: .72rem; color: var(--text-muted); border-top: 1px solid var(--border);
}
.footer-inner {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1.2rem; border-radius: 999px;
  background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(168,85,247,.06));
  border: 1px solid rgba(79,70,229,.15);
}
.footer-crown {
  animation: crownBob 2s ease-in-out infinite; font-size: .9rem;
}
.footer-text {
  font-weight: 700; font-size: .8rem;
  background: linear-gradient(90deg, var(--primary), #a855f7, var(--primary));
  background-size: 200% auto; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 3s linear infinite;
}
@keyframes crownBob {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-2px) rotate(5deg); }
}
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; }
  .form-row { flex-direction: column; }
  .form-group { flex: 1 1 100%; }
  .btn-group { width: 100%; }
  .btn-group .btn { flex: 1; justify-content: center; }
  .wizard-step { flex-direction: column; }
}
