/* ============================================================
   University Event Management System - Student Frontend
   Global Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:       #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark:  #5B21B6;
  --accent:        #06B6D4;
  --accent-light:  #67E8F9;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --info:          #3B82F6;

  --bg-base:       #0F0E17;
  --bg-card:       rgba(255,255,255,0.05);
  --bg-card-hover: rgba(255,255,255,0.09);
  --bg-input:      rgba(255,255,255,0.07);

  --text-primary:  #F1F0FF;
  --text-secondary:#A8A4C8;
  --text-muted:    #6B6785;
  --border:        rgba(255,255,255,0.10);
  --border-focus:  rgba(124,58,237,0.6);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.55);
  --glow:      0 0 30px rgba(124,58,237,0.25);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full:9999px;

  --nav-h: 70px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

/* ── Animated Background ───────────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%,  rgba(124,58,237,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%,  rgba(6,182,212,0.12)  0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 60% 30%,  rgba(91,33,182,0.10)  0%, transparent 60%),
    var(--bg-base);
  animation: meshShift 12s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 5% 5%; }
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15,14,23,0.75);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.nav-brand .logo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 2.5rem;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(124,58,237,0.18);
}
.nav-links a.active { color: var(--primary-light); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.nav-avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.nav-avatar:hover { transform: scale(1.08); box-shadow: var(--glow); }

/* ── Page Wrapper ──────────────────────────────────────────── */
.page-wrapper {
  padding-top: calc(var(--nav-h) + 2rem);
  min-height: 100vh;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Glass Card ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}
.card:hover { background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-sm  { padding: 1.25rem; border-radius: var(--radius-md); }
.card-lg  { padding: 2.5rem;  border-radius: var(--radius-xl); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: var(--transition);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,0.5); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0E7490);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6,182,212,0.35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(6,182,212,0.45); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 9px 16px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #B91C1C);
  color: #fff;
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
}
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── Form Elements ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px var(--border-focus);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 110px; resize: vertical; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23A8A4C8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
  color-scheme: dark;
}
select.form-control option {
  background-color: #1A1829;
  color: #F1F0FF;
}
select.form-control option:hover,
select.form-control option:checked {
  background-color: #2D2A45;
  color: #A78BFA;
}
.form-hint { margin-top: 5px; font-size: 0.8rem; color: var(--text-muted); }
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }

/* ── Input with Icon ───────────────────────────────────────── */
.input-group { position: relative; }
.input-group .input-icon {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem;
  pointer-events: none;
}
.input-group .form-control { padding-left: 44px; }
.input-group .input-icon-right {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.input-group .input-icon-right:hover { color: var(--text-primary); }

/* ── Badge / Tags ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary  { background: rgba(124,58,237,0.2);  color: var(--primary-light); }
.badge-accent   { background: rgba(6,182,212,0.18);  color: var(--accent-light); }
.badge-success  { background: rgba(16,185,129,0.18); color: #34D399; }
.badge-warning  { background: rgba(245,158,11,0.18); color: #FCD34D; }
.badge-danger   { background: rgba(239,68,68,0.18);  color: #FCA5A5; }
.badge-muted    { background: rgba(255,255,255,0.07); color: var(--text-secondary); }

/* ── Event Card ────────────────────────────────────────────── */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124,58,237,0.35);
}
.event-card-banner {
  height: 130px;
  position: relative;
  overflow: hidden;
}
.event-card-banner-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
}
.event-card-body { padding: 1.25rem; }
.event-card-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.event-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.event-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}
.event-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-secondary);
}

/* ── Stats Widget ──────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-icon-purple { background: rgba(124,58,237,0.2); }
.stat-icon-cyan   { background: rgba(6,182,212,0.2); }
.stat-icon-green  { background: rgba(16,185,129,0.2); }
.stat-icon-amber  { background: rgba(245,158,11,0.2); }
.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.stat-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }

/* ── Section Heading ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}
.section-title span { color: var(--primary-light); }

/* ── Page Hero Heading ─────────────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.page-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* ── Grid Layouts ──────────────────────────────────────────── */
.grid-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  width: 100%;
  max-width: 520px;
  transition: var(--transition);
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}
.search-bar input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { color: var(--text-muted); font-size: 1rem; }

/* ── Sidebar Layout ────────────────────────────────────────── */
.sidebar-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.sidebar-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.sidebar-item.active {
  color: var(--primary-light);
  background: rgba(124,58,237,0.15);
}
.sidebar-item .s-icon { font-size: 1.1rem; }
.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 16px 4px;
}

/* ── Alert / Notification ──────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #34D399; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #FCD34D; }
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #FCA5A5; }
.alert-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #93C5FD; }

/* ── Table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--bg-card); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #1A1829;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  transform: scale(0.92) translateY(20px);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-title { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg-card); color: var(--text-primary); }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ── Steps / Stepper ───────────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 2rem; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
}
.step.active { color: var(--primary-light); }
.step.done   { color: var(--success); }
.step-num {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
}
.step.active .step-num { background: rgba(124,58,237,0.25); border-color: var(--primary); color: var(--primary-light); }
.step.done   .step-num { background: rgba(16,185,129,0.2);  border-color: var(--success); color: var(--success); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; }

/* ── Toast Notification ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #1F1D2E;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  pointer-events: all;
  animation: toastIn 0.35s ease forwards;
  min-width: 280px;
  max-width: 360px;
}
.toast.hide { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 1.2rem; }
.toast-success { border-left: 3px solid var(--success); }
.toast-info    { border-left: 3px solid var(--info); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-danger  { border-left: 3px solid var(--danger); }
@keyframes toastIn  { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0);    } to { opacity:0; transform: translateX(30px); } }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Utility Classes ───────────────────────────────────────── */
.text-primary  { color: var(--text-primary) !important; }
.text-secondary{ color: var(--text-secondary) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-accent   { color: var(--accent-light) !important; }
.text-purple   { color: var(--primary-light) !important; }
.text-success  { color: #34D399 !important; }
.text-danger   { color: #FCA5A5 !important; }
.text-warning  { color: #FCD34D !important; }
.text-center   { text-align: center; }
.text-sm       { font-size: 0.85rem; }
.text-xs       { font-size: 0.78rem; }
.font-bold     { font-weight: 700; }
.font-outfit   { font-family: 'Outfit', sans-serif; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }

/* ── Hamburger / Mobile Nav ─────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: auto;
}
.hamburger:hover { background: var(--bg-card-hover); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 99px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 98;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.open { opacity: 1; }

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100%;
  background: #13111F;
  border-left: 1px solid var(--border);
  z-index: 99;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 1.1rem;
}
.mobile-nav-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.mobile-nav-close:hover { color: var(--text-primary); }

.mobile-nav-section {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 8px 4px;
}
.mobile-nav a, .mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}
.mobile-nav a:hover, .mobile-nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.mobile-nav a.active { color: var(--primary-light); background: rgba(124,58,237,0.15); }
.mobile-nav-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  /* Dashboard main grid */
  #main-grid { grid-template-columns: 1fr !important; }

  /* Event detail layout */
  .detail-layout { grid-template-columns: 1fr !important; }
  .register-card { position: static !important; }

  /* Profile layout */
  .profile-layout { grid-template-columns: 1fr !important; }
  .profile-sidebar { flex-direction: row; flex-wrap: wrap; position: static; }
}

@media (max-width: 640px) {
  /* ── Nav ── */
  .navbar { padding: 0 1rem; gap: 10px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }        /* hide Sign Out on mobile */
  .nav-actions #nav-user-name { display: none; }
  .hamburger { display: flex; }

  /* ── Layout ── */
  .container { padding: 0 1rem; }
  .page-wrapper { padding-top: calc(var(--nav-h) + 1rem); }

  /* ── Typography ── */
  .page-hero { padding: 1.25rem 0 0.75rem; }
  .page-hero h1 { font-size: 1.65rem; }
  .page-hero p  { font-size: 0.9rem; }

  /* ── Grids ── */
  .grid-events  { grid-template-columns: 1fr; gap: 1rem; }
  .grid-stats   { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  /* ── Cards ── */
  .card    { padding: 1.25rem; }
  .card-lg { padding: 1.5rem; border-radius: var(--radius-lg); }

  /* ── Buttons – bigger touch targets ── */
  .btn    { padding: 12px 20px; min-height: 44px; }
  .btn-sm { padding: 10px 14px; min-height: 38px; font-size: 0.85rem; }
  .btn-lg { padding: 14px 26px; }

  /* ── Forms ── */
  .form-control { padding: 13px 16px; font-size: 1rem; min-height: 44px; }
  .input-group .form-control { padding-left: 46px; }
  .form-label { font-size: 0.9rem; }

  /* ── Search bar ── */
  .search-bar { max-width: 100%; padding: 10px 16px; }

  /* ── Filter chips – scroll horizontally ── */
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; }

  /* ── Stat cards ── */
  .stat-card { padding: 1rem; gap: 0.75rem; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.25rem; }
  .stat-value { font-size: 1.5rem; }

  /* ── Welcome banner ── */
  .welcome-banner { flex-direction: column; align-items: flex-start; padding: 1.5rem; gap: 1rem; }
  .welcome-banner::before { font-size: 5rem; right: 1rem; }
  .welcome-banner h1 { font-size: 1.3rem; }

  /* ── Event card ── */
  .event-card-banner { height: 110px; }
  .event-card-banner-inner { font-size: 2.2rem; }

  /* ── Tabs ── */
  .tab-row { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
  .tab-row::-webkit-scrollbar { display: none; }
  .tab-item { flex-shrink: 0; font-size: 0.85rem; padding: 10px 14px; white-space: nowrap; }

  /* ── Tables – horizontal scroll ── */
  .table-wrap { border-radius: var(--radius-md); }
  table { min-width: 560px; }

  /* ── Section header ── */
  .section-header { flex-wrap: wrap; gap: 0.75rem; }

  /* ── Event detail ── */
  .event-hero { height: 180px; font-size: 4.5rem; border-radius: var(--radius-lg); }
  .detail-meta-grid { grid-template-columns: 1fr !important; }

  /* ── Profile header ── */
  .profile-header { flex-direction: column; align-items: flex-start; padding: 1.5rem; gap: 1rem; }
  .profile-header > div:last-child { margin-left: 0; }

  /* ── Stepper on create_event ── */
  .stepper { gap: 0; overflow: hidden; }
  .stepper .step span { display: none; }   /* hide text, keep number circles */
  .step-line { min-width: 14px; }

  /* ── Modal ── */
  .modal { padding: 1.5rem; border-radius: var(--radius-lg); }

  /* ── Sidebar profile nav ── */
  .profile-sidebar { gap: 0.25rem; }
  .profile-nav-item { font-size: 0.85rem; padding: 9px 12px; }

  /* ── Notification items ── */
  .notification-item { padding: 10px; }

  /* ── Quick actions ── */
  .qa-icon { width: 46px; height: 46px; font-size: 1.4rem; }

  /* ── Bottom safe-area (Android chrome bar) ── */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
}

/* Extra-small (360px – common Android budget phones) */
@media (max-width: 400px) {
  .grid-stats   { grid-template-columns: 1fr 1fr; }
  .stat-value   { font-size: 1.3rem; }
  .nav-brand span { font-size: 1rem; }
  .card-lg { padding: 1.25rem; }
  .welcome-banner h1 { font-size: 1.15rem; }
}
