@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --navy:       #0d2158;
  --navy-mid:   #1a3a8c;
  --navy-light: #243a7a;
  --gold:       #e8a020;
  --gold-light: #f5b840;
  --white:      #ffffff;
  --red:        #c0392b;
  --red-dark:   #a93226;
  --green:      #1e8449;
  --glass:      rgba(255,255,255,0.14);
  --glass-dark: rgba(0,0,0,0.30);
  --glass-border: rgba(255,255,255,0.25);
  --input-bg:   rgba(255,255,255,0.18);
  --input-border: rgba(255,255,255,0.30);
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  22px;
}

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

body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  background: #0d2158;
  color: #fff;
}

/* ── Full page glass background ─────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(140deg, #0a1840 0%, #1a3a8c 45%, #0d2158 100%);
}


/* ── Glass card ──────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  position: relative;
  z-index: 1;
}
.glass-card-dark {
  background: var(--glass-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  position: relative;
  z-index: 1;
}

/* ── NEU Header ──────────────────────────────────────────── */
.neu-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  position: relative;
  z-index: 1;
}
.neu-header::after {
  content: '';
  display: block;
  height: 2px;
  background: rgba(232,160,32,0.45);
  max-width: 220px;
  margin: 1rem auto 0;
  border-radius: 2px;
}
.neu-logo {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: contain;
  background: rgba(255,255,255,0.96);
  display: block;
  margin: 0 auto 1rem;
  padding: 5px;
}
.neu-header h1 {
  font-family: 'Merriweather', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.neu-header .subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 5px;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  background: rgba(0,0,0,0.38);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.topbar-title { color: #fff; font-weight: 700; font-size: 0.92rem; }

/* ── Form labels & inputs ────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  color: #fff;
  background: var(--input-bg);
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.24);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.18);
}
.form-control::placeholder { color: rgba(255,255,255,0.38); }
.form-control:disabled { opacity: 0.45; cursor: not-allowed; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.65)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select.form-control option { background: #1a3a8c; color: #fff; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Source Sans 3', sans-serif;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.btn-gold { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
.btn-gold:hover:not(:disabled) { background: var(--gold-light); border-color: var(--gold-light); }

.btn-glass { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.32); }
.btn-glass:hover:not(:disabled) { background: rgba(255,255,255,0.25); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover:not(:disabled) { background: rgba(255,255,255,0.1); }

.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover:not(:disabled) { background: var(--red-dark); }

.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover:not(:disabled) { background: #166038; }

/* ── Role toggle ─────────────────────────────────────────── */
.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,0.07);
}
.role-btn {
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: none;
  font-family: 'Source Sans 3', sans-serif;
  transition: all 0.15s;
}
.role-btn.active { background: var(--gold); color: #1a1a1a; }
.role-btn:not(.active):hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 1rem; font-weight: 600; display: none; }
.alert.show { display: block; }
.alert-error   { background: rgba(192,57,43,0.28); color: #ffbbbb; border: 1px solid rgba(192,57,43,0.45); }
.alert-success { background: rgba(30,132,73,0.28); color: #aaffcc; border: 1px solid rgba(30,132,73,0.45); }

/* ── Divider ─────────────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 12px; margin: 1rem 0; color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.divider::before,.divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.18); }

/* ── Footer ──────────────────────────────────────────────── */
.page-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  background: rgba(0,0,0,0.22);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
  margin-top: auto;
}

/* ── Auth layout ─────────────────────────────────────────── */
.auth-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 1;
}
.auth-card { width: 100%; max-width: 430px; }
.auth-card h2 { font-family: 'Merriweather', serif; font-size: 1.2rem; color: #fff; text-align: center; margin-bottom: 1.25rem; }
.btn-row { display: flex; gap: 10px; margin-top: 1rem; }

/* ── Check-in layout ─────────────────────────────────────── */
.checkin-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 1;
}
.checkin-card { width: 100%; max-width: 500px; }
.checkin-logo-row { text-align: center; margin-bottom: 1.25rem; }
.checkin-logo-row .neu-logo { margin: 0 auto 0.75rem; width: 80px; height: 80px; }
.checkin-greeting { font-size: 1.15rem; font-weight: 700; color: #fff; }
.checkin-sub { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 3px; margin-bottom: 1.25rem; }

/* ── Success layout ──────────────────────────────────────── */
.success-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}
.success-card { width: 100%; max-width: 420px; text-align: center; }
.success-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(30,132,73,0.28);
  border: 2px solid rgba(46,204,113,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
}
.success-title { font-family: 'Merriweather', serif; font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.success-name  { font-size: 1rem; font-weight: 700; color: var(--gold); margin-bottom: 1.25rem; }
.success-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; text-align: left; }
.success-table td { padding: 7px 10px; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.success-table td:first-child { font-weight: 700; color: rgba(255,255,255,0.5); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; width: 38%; }
.success-table td:last-child { color: #fff; }

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

.sidebar {
  width: 235px;
  min-width: 235px;
  background: rgba(0,0,0,0.42);
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: center; }
.sidebar-logo { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); object-fit: contain; background: rgba(255,255,255,0.95); display: block; margin: 0 auto 8px; padding: 3px; }
.sidebar-title { color: #fff; font-size: 0.88rem; font-weight: 700; letter-spacing: 0.03em; }
.sidebar-sub   { color: var(--gold); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.sidebar-nav   { flex: 1; padding: 0.75rem; }
.sidebar-footer{ padding: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.58);
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 600;
  margin-bottom: 3px;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Source Sans 3', sans-serif;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: var(--gold); color: #1a1a1a; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 1; }
.admin-topbar {
  background: rgba(0,0,0,0.32);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar-title { font-size: 1rem; font-weight: 700; color: #fff; }
.admin-topbar-date  { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.admin-content { flex: 1; overflow-y: auto; padding: 1.5rem; }

/* ── Tab panels ──────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Filter tabs ─────────────────────────────────────────── */
.filter-tabs {
  display: inline-flex;
  background: rgba(0,0,0,0.28);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
}
.filter-tab {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: none;
  color: rgba(255,255,255,0.5);
  font-family: 'Source Sans 3', sans-serif;
  transition: all 0.15s;
}
.filter-tab.active { background: var(--gold); color: #1a1a1a; }
.filter-tab:not(.active):hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Stat cards ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  border-top: 3px solid rgba(255,255,255,0.2);
}
.stat-card.gold  { border-top-color: var(--gold); }
.stat-card.green { border-top-color: #2ecc71; }
.stat-card.red   { border-top-color: #e74c3c; }
.stat-label { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.stat-value { font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1; }
.stat-value.sm  { font-size: 1rem; }
.stat-value.xsm { font-size: 0.9rem; }
.stat-sub { font-size: 0.72rem; color: rgba(255,255,255,0.42); margin-top: 3px; }

/* ── Charts ──────────────────────────────────────────────── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.chart-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 1.25rem; }
.chart-title { font-size: 0.75rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1rem; }
.bar-row { margin-bottom: 10px; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.7); margin-bottom: 3px; }
.bar-track { height: 7px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.bar-fill       { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.5s; }
.bar-fill.white { background: rgba(255,255,255,0.55); }

/* ── Search ──────────────────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  max-width: 340px;
  transition: border-color 0.15s;
}
.search-wrap:focus-within { border-color: var(--gold); }
.search-wrap svg { color: rgba(255,255,255,0.45); width: 15px; height: 15px; flex-shrink: 0; }
.search-wrap input { border: none; outline: none; font-size: 0.87rem; color: #fff; background: none; flex: 1; font-family: 'Source Sans 3', sans-serif; }
.search-wrap input::placeholder { color: rgba(255,255,255,0.38); }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); overflow: hidden; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table thead tr { background: rgba(0,0,0,0.38); }
.data-table th { padding: 10px 13px; text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--gold); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 10px 13px; border-bottom: 1px solid rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.06); }
.td-name  { font-weight: 700; color: #fff; }
.td-muted { color: rgba(255,255,255,0.48); font-size: 0.78rem; }
.td-empty { text-align: center; color: rgba(255,255,255,0.32); padding: 2.5rem 1rem; font-style: italic; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.badge-active  { background: rgba(46,204,113,0.18); color: #aaffcc; border: 1px solid rgba(46,204,113,0.35); }
.badge-banned  { background: rgba(231,76,60,0.18);  color: #ffaaaa; border: 1px solid rgba(231,76,60,0.35); }
.badge-student { background: rgba(52,152,219,0.18); color: #aaddff; border: 1px solid rgba(52,152,219,0.32); }
.badge-faculty { background: rgba(232,160,32,0.18); color: #ffe0aa; border: 1px solid rgba(232,160,32,0.32); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 1rem; font-size: 0.82rem; color: rgba(255,255,255,0.48); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .sidebar    { display: none; }
  .neu-header h1 { font-size: 1.1rem; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .glass-card { padding: 1.5rem 1.1rem; }
}
