/* ===========================================================
   AsBed design system
   =========================================================== */

:root {
  --navy-950: #0d1526;
  --navy-900: #121d34;
  --navy-800: #1a2947;
  --navy-700: #24365c;
  --navy-600: #33497a;
  --navy-500: #445d99;

  --gold-500: #e0a94e;
  --gold-600: #cf9636;
  --gold-100: #fbecd2;

  --ink-900: #14161f;
  --ink-700: #40444f;
  --ink-500: #6b7080;
  --ink-300: #a2a7b5;
  --ink-100: #e4e7ee;

  --bg-canvas: #f5f6fa;
  --bg-card: #ffffff;
  --bg-muted: #eef0f6;

  --success-600: #1f8a4c;
  --success-100: #e2f6e9;
  --warning-600: #b57a12;
  --warning-100: #fbf0d9;
  --danger-600: #c53434;
  --danger-100: #fbe6e6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(13, 21, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 21, 38, 0.08);
  --shadow-lg: 0 20px 48px rgba(13, 21, 38, 0.14);

  --sidebar-w: 260px;
  --topbar-h: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-canvas);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  color: var(--navy-900);
  margin: 0 0 0.4em;
  line-height: 1.25;
}

p { line-height: 1.6; color: var(--ink-700); margin: 0 0 1em; }
a { color: var(--navy-700); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }

.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-600); }

.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--ink-100); }
.btn-outline:hover { border-color: var(--navy-600); background: var(--bg-muted); }

.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--bg-muted); }

.btn-danger { background: #fff; color: var(--danger-600); border-color: var(--danger-100); }
.btn-danger:hover { background: var(--danger-100); }

.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* -----------------------------------------------------------
   Cards / surfaces
   ----------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ink-100);
}
.card-header h2, .card-header h3 { margin: 0; }
.card-body { padding: 24px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-900);
}
.stat-card .stat-sub { font-size: 0.82rem; color: var(--ink-500); margin-top: 4px; }

/* -----------------------------------------------------------
   Badges / status pills
   ----------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-pending { background: var(--warning-100); color: var(--warning-600); }
.badge-resolved { background: var(--success-100); color: var(--success-600); }
.badge-neutral { background: var(--bg-muted); color: var(--ink-500); }
.badge-role { background: var(--navy-800); color: #fff; }

/* -----------------------------------------------------------
   Forms
   ----------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.78rem; color: var(--ink-500); margin-top: 6px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink-100);
  background: #fff;
  color: var(--ink-900);
  transition: border-color 0.15s ease;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-600);
}

.password-field { position: relative; }
.password-field .toggle-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--ink-500);
}

.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink-700); font-size: 0.9rem; }
.radio-row input { width: auto; }

.image-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.image-picker-option {
  display: block;
  width: 76px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--ink-100);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.image-picker-option:hover { border-color: var(--ink-300); }
.image-picker-option.selected { border-color: var(--navy-700); box-shadow: 0 0 0 2px rgba(36, 54, 92, 0.15); }
.image-picker-option input { display: none; }
.image-picker-option img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -----------------------------------------------------------
   Alerts / flash messages
   ----------------------------------------------------------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-100); color: var(--danger-600); border-color: #f3c8c8; }
.alert-success { background: var(--success-100); color: var(--success-600); border-color: #bfe8cd; }
.alert-info { background: var(--gold-100); color: var(--gold-600); border-color: #f0dcae; }

/* -----------------------------------------------------------
   Tables
   ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--ink-100);
  white-space: nowrap;
}
table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-900);
  vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--bg-muted); }

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--ink-500);
}
.empty-state .empty-icon { font-size: 2.4rem; margin-bottom: 10px; }

/* -----------------------------------------------------------
   Public site: navbar / hero / footer
   ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-100);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy-900);
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--navy-800);
  color: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: var(--ink-700); font-weight: 600; font-size: 0.94rem; }
.site-nav a:hover { color: var(--navy-800); }
.site-actions { display: flex; align-items: center; gap: 12px; }

.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, #eef1fb 0%, var(--bg-canvas) 100%);
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-600);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}
.hero-kicker::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--gold-500);
  border-radius: 2px;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 18px; }
.hero p.lead { font-size: 1.08rem; color: var(--ink-700); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-media img { width: 100%; height: 420px; object-fit: cover; }

.section { padding: 72px 0; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-heading h2 { font-size: 2rem; }

.hall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.hall-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hall-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.hall-card img { width: 100%; height: 150px; object-fit: cover; }
.hall-card .hall-card-body { padding: 16px 18px; }
.hall-card h4 { font-size: 1.02rem; margin-bottom: 4px; }
.hall-card .hall-meta { font-size: 0.82rem; color: var(--ink-500); }

.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--ink-100); padding: 18px 0; }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-900);
}
.faq-q .chev { transition: transform 0.2s ease; color: var(--ink-500); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--ink-700); font-size: 0.92rem; }
.faq-item.open .faq-a { max-height: 200px; padding-top: 10px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; text-align: center; }
.contact-grid .card-pad { text-align: left; }

.site-footer { background: var(--navy-950); color: var(--ink-300); padding: 40px 0; margin-top: 40px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-footer .brand { color: #fff; }
.site-footer small { color: var(--ink-300); }

/* -----------------------------------------------------------
   Auth pages
   ----------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
}
.auth-topbar { padding: 24px 0; }
.auth-topbar .container { display: flex; }
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ink-100);
  padding: 40px 36px;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 26px; }
.auth-divider { border: none; border-top: 1px solid var(--ink-100); margin: 22px 0; }
.auth-foot { text-align: center; font-size: 0.9rem; color: var(--ink-700); }
.demo-hint {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--ink-700);
  margin-bottom: 20px;
}
.demo-hint strong { color: var(--navy-900); }

/* -----------------------------------------------------------
   App shell: topbar + sidebar (student + staff areas)
   ----------------------------------------------------------- */
.app-shell { min-height: 100vh; }

.app-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 30;
}
.app-topbar .brand { font-size: 1.1rem; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--navy-800);
  cursor: pointer;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.user-chip:hover { background: var(--bg-muted); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-chip .user-name { font-size: 0.88rem; font-weight: 600; color: var(--ink-900); }
.user-chip .user-role { font-size: 0.74rem; color: var(--ink-500); }

.user-menu {
  position: absolute;
  top: 46px;
  right: 0;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 170px;
  padding: 8px;
  display: none;
  z-index: 50;
}
.user-menu.show { display: block; }
.user-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--ink-700);
}
.user-menu a:hover { background: var(--bg-muted); }

.app-sidebar {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: var(--navy-950);
  padding: 24px 14px;
  overflow-y: auto;
  z-index: 20;
}
.app-sidebar .nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7ba0;
  padding: 14px 12px 8px;
}
.app-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: #c3cbe0;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 2px;
}
.app-sidebar a .icon { width: 18px; text-align: center; }
.app-sidebar a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.app-sidebar a.active { background: var(--navy-700); color: #fff; }

.app-main {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.app-main-inner { padding: 32px; max-width: 1240px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.page-heading h1 { font-size: 1.55rem; margin-bottom: 2px; }
.page-heading .page-sub { color: var(--ink-500); font-size: 0.92rem; }

@media (max-width: 900px) {
  .app-sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-media img { height: 280px; }
}

/* -----------------------------------------------------------
   Modals
   ----------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 38, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-box .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ink-100);
}
.modal-box .modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.3rem; color: var(--ink-500); cursor: pointer; line-height: 1; }
.modal-box .modal-body { padding: 22px 24px; }
.modal-box .modal-foot { padding: 16px 24px; border-top: 1px solid var(--ink-100); display: flex; justify-content: flex-end; gap: 10px; }

/* -----------------------------------------------------------
   Utilities
   ----------------------------------------------------------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-muted { color: var(--ink-500); }
.text-center { text-align: center; }
.w-100 { width: 100%; }
