:root {
  --primary: #0B4F6C;
  --primary-light: #148296;
  --primary-dark: #073A52;
  --teal-light: #D4EDF4;
  --teal-muted: rgba(11, 79, 108, 0.08);
  --accent: #FFD166;
  --accent-hover: #E6BC5C;
  --accent-soft: rgba(255, 209, 102, 0.15);
  --hero-bg: #062F42;
  --bg: #F7FAFB;
  --surface: #ffffff;
  --input-bg: #FAFBF9;
  --border: rgba(11, 79, 108, 0.2);
  --border-soft: rgba(11, 79, 108, 0.08);
  --text: #1a2e38;
  --text-muted: #5a7380;
  --text-light: #8aa3ae;
  --text-on-teal: #F5F7FA;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 12px 30px rgba(15, 23, 42, 0.1);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --chrome-pad-x: clamp(0.85rem, 3vw, 1.5rem);
  --chrome-pad-y: 0.75rem;
  --nav-height: 90px;
  --sidebar-width: clamp(268px, 20vw, 304px);
}

@font-face {
  font-family: Jakarta;
  src: url(../fonts/PlusJakartaSans-VariableFont_wght.ttf);
}

@font-face {
  font-family: Optima;
  src: url(../fonts/optima-webfont/OPTIMA.woff);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { overflow-x: hidden; scrollbar-gutter: stable; }

body {
  font-family: 'Jakarta', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  font-size: 1.05rem;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, video, canvas, svg { max-width: 100%; height: auto; }

.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
}

/* Shared site chrome (fixed navbar + page topbars + footer) */
.navbar,
.site-topbar,
.landing-topbar,
.staff-topbar,
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem 1rem;
  min-height: var(--nav-height);
  padding: var(--chrome-pad-y) var(--chrome-pad-x);
  background: var(--primary);
  color: var(--text-on-teal);
  box-shadow: 0 4px 20px rgba(11, 79, 108, 0.25);
  border-bottom: 3px solid var(--accent);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  overflow: visible;
}

.site-topbar,
.landing-topbar,
.staff-topbar,
.admin-topbar {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

.logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  box-shadow: none;
  transition: var(--transition);
  border: 0;
  flex-shrink: 0;
  overflow: visible;
}

.logo-container:hover { transform: translateY(-1px); box-shadow: 0 0 18px rgba(255, 209, 102, 0.28); }

.logo-container .logo,
img.logo#systemLogo,
.nav-brand .logo-container img.logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
  margin: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
  transition: var(--transition);
}

.logo-upload {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  line-height: 0;
}

.logo-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: var(--primary-dark);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.logo-upload-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

.brand-title {
  font-size: clamp(0.95rem, 2.1vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: 'Optima', serif;
  color: var(--text-on-teal);
  line-height: 1.25;
  max-width: 42rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.nav-menu {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.nav-menu:not(:has(a)) {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-on-teal);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 40px;
  white-space: nowrap;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: var(--accent);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.35);
}

.nav-link i { font-size: 1.1rem; }

.nav-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 42px;
  height: 42px;
  color: var(--text-on-teal);
  text-decoration: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-profile i { font-size: 1.3rem; color: var(--accent); }

.nav-profile:hover {
  background: var(--accent);
  color: var(--primary-dark);
}
.nav-profile:hover i { color: var(--primary-dark); }

.nav-profile.nav-profile-icon-only { width: 42px; padding: 0; }
.nav-profile.nav-profile-icon-only #userText { display: none; }

.nav-profile:not(.nav-profile-icon-only) {
  width: auto;
  min-width: 42px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.staff-nav-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--primary-dark);
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.35);
}

.staff-nav-profile i {
  font-size: 1.05rem;
  color: var(--primary);
}

.staff-nav-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staff-nav-profile:hover,
.staff-nav-profile.is-active {
  box-shadow: 0 0 0 2px var(--accent);
}

.home-link { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.home-link:hover { background: var(--accent); color: var(--primary-dark); }

/* Main Content */
.main-content {
  padding: 1.5rem 1.5rem;
  max-width: none;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  flex: 1;
  animation: fadeIn 0.6s ease;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: auto;
  padding: var(--chrome-pad-y) var(--chrome-pad-x);
  min-height: 72px;
  color: rgba(245, 247, 250, 0.85);
  background: var(--primary);
  border-top: 3px solid var(--accent);
  width: 100%;
  flex-shrink: 0;
}

.site-footer div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.site-footer strong {
  color: var(--text-on-teal);
  font-family: 'Optima', serif;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer span,
.site-footer p {
  color: rgba(245, 247, 250, 0.75);
  font-size: 0.875rem;
  line-height: 1.35;
  margin: 0;
}

/* Keep portal footers aligned with the content column beside the sidebar. */
body.staff-portal-page .site-footer,
body.admin-portal-page .site-footer {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  box-sizing: border-box;
  padding: var(--chrome-pad-y) var(--chrome-pad-x);
}

body.staff-portal-page .sidebar-nav a[href="auth/logout.php"] {
  color: #dc2626;
}

body.staff-portal-page .sidebar-nav a[href="auth/logout.php"] i {
  color: #dc2626;
}

body.staff-portal-page .sidebar-nav a[href="auth/logout.php"]:hover {
  background: #fef2f2;
  color: #b91c1c;
}

body.staff-portal-page .sidebar-nav a[href="auth/logout.php"]:hover i {
  color: #b91c1c;
}

body.admin-portal-page #displayUser {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

body.admin-portal-page #displayUser i {
  color: #ffffff;
}

body.admin-portal-page #displayUser:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

body.admin-portal-page #displayUser:hover i {
  color: #ffffff;
}

body.admin-portal-page .admin-logout-item {
  color: #dc2626 !important;
}

body.admin-portal-page .admin-logout-item i,
body.admin-portal-page .admin-logout-item .nav-icon {
  color: #dc2626 !important;
}

body.admin-portal-page .admin-logout-item:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

body.admin-portal-page .admin-logout-item:hover i,
body.admin-portal-page .admin-logout-item:hover .nav-icon {
  color: #ffffff !important;
}

/* Keep the desktop staff navigation visible while the page content scrolls. */
@media (min-width: 993px) {
  body.staff-portal-page .page-container {
    position: relative;
  }

  body.staff-portal-page .sidebar {
    position: fixed !important;
    top: var(--top-nav-offset) !important;
    height: calc(100vh - var(--top-nav-offset)) !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 992px) {
  body.staff-portal-page .site-footer {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  body.staff-portal-page .site-footer,
  body.admin-portal-page .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding-top: 0.9rem;
    padding-bottom: 1rem;
    margin-bottom: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.welcome-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.welcome-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
  font-family: 'Optima', serif;
  line-height: 1.15;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
  font-weight: 700;
}

.welcome-title .title-gold {
  color: var(--accent);
}

.welcome-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.system-features {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  min-width: 180px;
  flex: 1 1 180px;
}

.feature:hover {
  transform: translateY(-5px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.feature i { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.75rem; }
.feature h4 { color: var(--primary-dark); margin-bottom: 0.3rem; font-size: 1.1rem; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }
.feature p { color: var(--text-muted); font-size: 0.9rem; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }

/* Login Options */
.login-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem;
  flex: 1 1 340px;
  width: min(100%, 520px);
  max-width: 520px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.login-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12); }

.login-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  font-size: 3rem;
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(11, 79, 108, 0.25);
}

.login-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: var(--primary-dark);
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--accent);
  color: var(--primary-dark);
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(255, 209, 102, 0.4);
  min-height: 44px;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 209, 102, 0.5);
}

/* Form Styles */
.form-container {
  max-width: 600px;
  width: min(100%, 600px);
  margin: 1.5rem auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.5s ease;
  border: 1px solid var(--border);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-header { text-align: center; margin-bottom: 1.5rem; }

.form-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.4rem;
  color: var(--accent);
  box-shadow: 0 6px 20px rgba(11, 79, 108, 0.2);
  background: var(--primary);
}

.form-title {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.form-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Auth Page Layout */
.staff-login-page .navbar { background: var(--primary) !important; border-bottom: 3px solid var(--accent) !important; }
.staff-login-page .logo-upload-btn { background: var(--accent) !important; color: var(--primary-dark) !important; }
.staff-login-page .logo-upload-btn:hover { color: var(--primary-dark) !important; background: var(--accent-hover) !important; }
.staff-login-page .nav-link:hover { background: var(--accent); color: var(--primary-dark); }

.staff-login-page .form-header {
  text-align: center;
  background: var(--primary);
  padding: 1.5rem 1.5rem;
  border-radius: var(--radius);
}

.staff-login-page .form-icon { background: var(--primary); color: var(--accent); }
.staff-login-page .form-title { color: #fff; }
.staff-login-page .form-title .title-gold { color: var(--accent); }
.staff-login-page .form-subtitle { color: rgba(245, 247, 250, 0.85); }
.staff-login-page .submit-btn { background: var(--accent); color: var(--primary-dark); }
.staff-login-page .submit-btn:hover { background: var(--accent-hover); }
.staff-login-page .form-container { max-width: 480px; }
.staff-login-page .form-header { margin-bottom: 1.25rem; }
.staff-login-page .form-footer { margin-top: 1rem; padding-top: 1rem; }
.staff-login-page .form-footer p { margin-bottom: 0.4rem; }

/* Form Elements */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.form-label i { color: var(--primary); }

.form-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--input-bg);
  font-family: 'Jakarta', sans-serif;
  color: var(--text);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.25);
}

.form-input::placeholder { color: var(--text-light); }
.form-input.is-invalid { border-color: var(--danger-text); background: var(--danger-bg); }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15); }

.error-message {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.password-container { position: relative; }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 0.4rem;
  border-radius: 50%;
}

.password-toggle:hover { color: var(--primary); background: var(--accent-soft); }

.submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.5px;
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.4);
}

.form-footer { text-align: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.form-footer p { color: var(--text-muted); margin-bottom: 0.5rem; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }

.form-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.form-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* ===== Beacon Alerts (unique system UI) ===== */
.alert,
.message,
.alert-message,
.success-message,
div.error-message {
  --alert-accent: var(--primary);
  --alert-accent-soft: rgba(11, 79, 108, 0.12);
  --alert-ink: var(--primary-dark);
  --alert-panel: linear-gradient(145deg, #ffffff 0%, #f3fafc 100%);
  --alert-ring: rgba(11, 79, 108, 0.18);
  --alert-glow: rgba(11, 79, 108, 0.12);
  --alert-badge-bg: rgba(11, 79, 108, 0.1);
  --alert-badge-ink: var(--primary-dark);
  --alert-label: 'Notice';

  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.15rem 1rem 1rem;
  margin-bottom: 1rem;
  border-radius: 18px;
  border: 1px solid var(--alert-ring);
  background: var(--alert-panel);
  color: var(--alert-ink);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
  overflow: hidden;
  isolation: isolate;
  animation: alertBeaconIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 14px 34px var(--alert-glow),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.alert::before,
.message::before,
.alert-message::before,
.success-message::before,
div.error-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--alert-accent), #FFD166 55%, var(--alert-accent));
  opacity: 0.95;
}

.alert::after,
.message::after,
.alert-message::after,
.success-message::after,
div.error-message::after {
  content: var(--alert-label);
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  z-index: 1;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--alert-badge-bg);
  color: var(--alert-badge-ink);
  font-family: 'Optima', Georgia, serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  pointer-events: none;
}

@keyframes alertBeaconIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert > i,
.message > i,
.alert-message > i,
.success-message > i,
div.error-message > i,
.alert-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
  font-size: 1.1rem !important;
  line-height: 1;
  color: #fff !important;
  background:
    linear-gradient(160deg, var(--alert-accent), color-mix(in srgb, var(--alert-accent) 70%, #041E2A));
  box-shadow:
    0 10px 18px var(--alert-glow),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.alert > i::after,
.message > i::after,
.alert-message > i::after,
.success-message > i::after,
div.error-message > i::after,
.alert-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--alert-accent) 35%, transparent);
  pointer-events: none;
}

.alert > span,
.message > span,
.alert-message > span,
.success-message > span,
div.error-message > span,
.alert-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding-right: 4.5rem;
  font-weight: 600;
}

/* Soft mesh texture */
.alert > *:last-child::before,
.message > *:last-child::before,
.alert-message > *:last-child::before {
  content: none;
}

.alert:not(:has(> i)):not(:has(.alert-icon)),
.message:not(:has(> i)),
.alert-message:not(:has(> i)),
.success-message:not(:has(> i)),
div.error-message:not(:has(> i)) {
  grid-template-columns: 1fr;
  padding-left: 1.15rem;
}

/* Default / info */
.alert:not(.alert-success):not(.alert-error):not(.alert-warning):not(.alert-info),
.alert-info,
.message.info {
  --alert-accent: #0B4F6C;
  --alert-accent-soft: rgba(11, 79, 108, 0.12);
  --alert-ink: #073A52;
  --alert-panel: linear-gradient(145deg, #f5fbfd 0%, #e7f4f8 100%);
  --alert-ring: rgba(11, 79, 108, 0.16);
  --alert-glow: rgba(11, 79, 108, 0.12);
  --alert-badge-bg: rgba(11, 79, 108, 0.1);
  --alert-badge-ink: #073A52;
  --alert-label: 'Notice';
}

/* Success */
.alert-success,
.message.success,
.success-message,
.alert-message.alert-success {
  --alert-accent: #059669;
  --alert-ink: #065f46;
  --alert-panel: linear-gradient(145deg, #f3fdf8 0%, #dff7ec 100%);
  --alert-ring: rgba(5, 150, 105, 0.18);
  --alert-glow: rgba(5, 150, 105, 0.14);
  --alert-badge-bg: rgba(5, 150, 105, 0.12);
  --alert-badge-ink: #065f46;
  --alert-label: 'Success';
}

/* Error */
.alert-error,
.message.error,
div.error-message,
.alert-message.alert-error {
  --alert-accent: #dc2626;
  --alert-ink: #991b1b;
  --alert-panel: linear-gradient(145deg, #fff7f7 0%, #fde8e8 100%);
  --alert-ring: rgba(220, 38, 38, 0.16);
  --alert-glow: rgba(220, 38, 38, 0.12);
  --alert-badge-bg: rgba(220, 38, 38, 0.1);
  --alert-badge-ink: #991b1b;
  --alert-label: 'Alert';
}

/* Warning */
.alert-warning,
.message.warning,
.alert-message.alert-warning {
  --alert-accent: #d97706;
  --alert-ink: #92400e;
  --alert-panel: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  --alert-ring: rgba(217, 119, 6, 0.18);
  --alert-glow: rgba(255, 209, 102, 0.22);
  --alert-badge-bg: rgba(255, 209, 102, 0.35);
  --alert-badge-ink: #92400e;
  --alert-label: 'Warning';
}

/* Toast notifications (JS) — same beacon language */
.notification {
  --alert-accent: var(--primary);
  --alert-ink: var(--primary-dark);
  --alert-panel: linear-gradient(145deg, #ffffff 0%, #f3fafc 100%);
  --alert-ring: rgba(11, 79, 108, 0.18);
  --alert-glow: rgba(11, 79, 108, 0.16);
  --alert-badge-bg: rgba(11, 79, 108, 0.1);
  --alert-badge-ink: var(--primary-dark);

  position: fixed;
  top: calc(var(--nav-height, 90px) + 0.75rem);
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 10050;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0.65rem;
  width: min(400px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  padding: 0.95rem 0.85rem 0.95rem 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--alert-ring);
  background: var(--alert-panel);
  color: var(--alert-ink);
  box-shadow:
    0 18px 40px var(--alert-glow),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  animation: alertBeaconIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
}

.notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--alert-accent), #FFD166 55%, var(--alert-accent));
}

.notification-success {
  --alert-accent: #059669;
  --alert-ink: #065f46;
  --alert-panel: linear-gradient(145deg, #f3fdf8 0%, #dff7ec 100%);
  --alert-ring: rgba(5, 150, 105, 0.18);
  --alert-glow: rgba(5, 150, 105, 0.16);
  --alert-badge-bg: rgba(5, 150, 105, 0.12);
  --alert-badge-ink: #065f46;
}

.notification-error {
  --alert-accent: #dc2626;
  --alert-ink: #991b1b;
  --alert-panel: linear-gradient(145deg, #fff7f7 0%, #fde8e8 100%);
  --alert-ring: rgba(220, 38, 38, 0.16);
  --alert-glow: rgba(220, 38, 38, 0.14);
  --alert-badge-bg: rgba(220, 38, 38, 0.1);
  --alert-badge-ink: #991b1b;
}

.notification-warning {
  --alert-accent: #d97706;
  --alert-ink: #92400e;
  --alert-panel: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  --alert-ring: rgba(217, 119, 6, 0.18);
  --alert-glow: rgba(255, 209, 102, 0.22);
  --alert-badge-bg: rgba(255, 209, 102, 0.35);
  --alert-badge-ink: #92400e;
}

.notification-info {
  --alert-accent: #0B4F6C;
  --alert-ink: #073A52;
  --alert-panel: linear-gradient(145deg, #f5fbfd 0%, #e7f4f8 100%);
  --alert-ring: rgba(11, 79, 108, 0.16);
  --alert-glow: rgba(11, 79, 108, 0.14);
  --alert-badge-bg: rgba(11, 79, 108, 0.1);
  --alert-badge-ink: #073A52;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.notification-content i {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(160deg, var(--alert-accent), color-mix(in srgb, var(--alert-accent) 70%, #041E2A));
  box-shadow: 0 10px 18px var(--alert-glow);
}

.notification-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.notification-label {
  font-family: 'Optima', Georgia, serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--alert-badge-ink);
  opacity: 0.85;
}

.notification-copy span:last-child {
  color: var(--alert-ink);
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.45;
}

.notification-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--alert-ink);
}

.notification-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.notification-close:hover,
.notification-close:focus-visible {
  opacity: 1;
  background: rgba(15, 23, 42, 0.08);
  outline: none;
}

/* Keep field-level validation compact (not beacon banners) */
span.error-message,
.form-group > .error-message,
.form-group .error-message {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  margin-top: 0.4rem;
  margin-bottom: 0;
  padding: 0.5rem 0.75rem !important;
  border-radius: 10px !important;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  box-shadow: none !important;
  font-size: 0.85rem;
  animation: none !important;
  overflow: visible;
}

span.error-message::before,
.form-group > .error-message::before,
.form-group .error-message::before {
  content: '!' !important;
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #991b1b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 1;
  height: auto;
}

span.error-message::after,
.form-group > .error-message::after,
.form-group .error-message::after {
  content: none !important;
  display: none !important;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.menu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--primary); }
.menu-card:hover::before { transform: scaleX(1); }

.menu-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; display: inline-block; transition: var(--transition); }
.menu-card:hover .menu-icon { transform: scale(1.15) rotate(10deg); }

.menu-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--primary-dark);
  transition: var(--transition);
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.menu-card:hover h3 { color: var(--primary-light); }

.menu-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

.data-table thead { background: var(--primary); color: var(--text-on-teal); }

.data-table th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.data-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-soft);
  transition: var(--transition);
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background-color: var(--accent-soft); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  gap: 0.4rem;
  white-space: nowrap;
}

.status-confirmed { background: var(--success-bg); color: var(--success-text); border: 1px solid #a7f3d0; }
.status-pending { background: var(--warning-bg); color: var(--warning-text); border: 1px solid #fde68a; }
.status-rejected { background: var(--danger-bg); color: var(--danger-text); border: 1px solid #fecaca; }

/* Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--primary);
  transition: var(--transition);
}

.summary-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }

.summary-card h4 {
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.summary-card .number { font-size: 2.5rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 0.3rem; }
.summary-card p { color: var(--text-muted); font-size: 0.85rem; opacity: 0.8; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }

/* Action Buttons */
.action-buttons { display: flex; gap: 1rem; margin-top: 1.5rem; justify-content: center; flex-wrap: wrap; }

.btn {
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.5px;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(255, 209, 102, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(255, 209, 102, 0.45);
}

.btn-secondary {
  background: var(--teal-light);
  color: var(--primary-dark);
  border: 2px solid var(--primary);
  box-shadow: 0 3px 12px rgba(11, 79, 108, 0.08);
}

.btn-secondary:hover {
  background: rgba(212, 237, 244, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 79, 108, 0.15);
}
.btn-icon { font-size: 1.2rem; }

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  font-size: 0.95rem;
}

.back-button:hover { background: var(--accent-soft); transform: translateX(-5px); border-color: var(--primary); }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: min(90%, 480px);
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
}

.modal-title {
  margin-bottom: 1rem;
  color: var(--primary-dark);
  text-align: center;
  font-size: 1.5rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(11, 79, 108, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Page loader */
body.is-loading { overflow: hidden; }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 130, 150, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 15%, rgba(255, 209, 102, 0.1), transparent 22rem),
    linear-gradient(135deg, #062F42 0%, #073A52 52%, #041E2A 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.logo-loader-orbit {
  position: relative;
  width: 148px;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-loader-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(20, 130, 150, 0.75);
  animation: spin 1.4s linear infinite;
}

.logo-loader-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 209, 102, 0.35);
  animation: spin 4s linear infinite reverse;
}

.logo-loader-img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  animation: logoPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.28));
}

.logo-loader-text {
  margin: 0;
  color: rgba(245, 247, 250, 0.88);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.logo-loader-dots span {
  display: inline-block;
  width: 0.35em;
  animation: logoDotBlink 1.2s ease-in-out infinite;
}

.logo-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.logo-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.92; }
}

@keyframes logoDotBlink {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes logoRingSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .logo-loader-ring,
  .logo-loader-ring::before,
  .logo-loader-img,
  .logo-loader-dots span,
  .landing-page .hero-logo,
  .landing-page .hero-logo-frame::before,
  .landing-page .hero-logo-frame::after,
  .admin-login-page .admin-logo {
    animation: none !important;
  }
}

/* Live notification center */
.nav-menu:has(.notifications-widget),
.nav-menu:has(.staff-nav-profile) { display: flex !important; }
.notifications-widget { position: relative; margin-left: 0.75rem; }
.notifications-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(11, 79, 108, 0.18);
  border-radius: 50%;
  background: #fff;
  color: #0b4f6c;
  cursor: pointer;
  line-height: 0;
}
.notifications-toggle i {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
  width: 1em;
  height: 1em;
  margin: 0;
  transform: translateY(0.5px);
}
.notifications-toggle:hover { background: #eef8fb; }
.notifications-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  line-height: 1.1rem;
  text-align: center;
}
.notifications-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 2000;
  width: min(360px, calc(100vw - 2rem));
  max-height: 430px;
  overflow: hidden;
  border: 1px solid #dbe5ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.notifications-panel.is-open { display: block; }
.notifications-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf2f7;
  color: #18324a;
}
.notifications-panel-header button {
  border: 0;
  background: transparent;
  color: #0b6e91;
  font-size: 0.75rem;
  cursor: pointer;
}
.notifications-list { max-height: 365px; overflow-y: auto; }
.notifications-empty { padding: 1.5rem 1rem; color: #718096; text-align: center; font-size: 0.85rem; }
.notification-entry {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f0f4f7;
  color: #30475e;
  text-decoration: none;
}
.notification-entry:hover { background: #f7fbfd; }
.notification-entry.is-unread { background: #eef8fb; }
.notification-entry-icon { color: #0b6e91; padding-top: 0.15rem; }
.notification-entry-copy { display: grid; gap: 0.2rem; min-width: 0; }
.notification-entry-copy strong { color: #18324a; font-size: 0.82rem; }
.notification-entry-copy span { font-size: 0.78rem; line-height: 1.35; }
.notification-entry-copy small { color: #8798a8; font-size: 0.68rem; }
@media (max-width: 600px) {
  .notifications-widget { margin-left: 0.2rem; }
  .notifications-panel { position: fixed; top: 4.3rem; right: 0.75rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, var(--primary-dark), var(--primary-light)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(to bottom, var(--primary-light), var(--primary)); }

/* Dashboard Header */
.dashboard-header {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(11, 79, 108, 0.2);
  background: var(--primary);
  flex-shrink: 0;
}

.stat-info h3 { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 0.1rem; line-height: 1; }
.stat-info p { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  height: 100%;
}

.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: rgba(11, 79, 108, 0.2); }
.feature-card:hover .action-icon { transform: translateX(6px); }

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
  z-index: 2;
  border: 1px solid var(--border);
}

.badge-count { font-weight: 800; font-size: 1.1rem; color: var(--primary-dark); }
.badge-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; word-break: keep-all; overflow-wrap: break-word; hyphens: none; }

.card-icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.icon-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: white;
  box-shadow: 0 8px 24px rgba(11, 79, 108, 0.2);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
}

.feature-card:hover .icon-circle { transform: scale(1.1) rotate(10deg); }

.icon-rings { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid;
  opacity: 0;
}

.ring-1 { width: 100px; height: 100px; border-color: rgba(11, 79, 108, 0.1); animation: pulse 3s infinite; }
.ring-2 { width: 120px; height: 120px; border-color: rgba(11, 79, 108, 0.08); animation: pulse 3s infinite 0.5s; }
.ring-3 { width: 140px; height: 140px; border-color: rgba(11, 79, 108, 0.05); animation: pulse 3s infinite 1s; }

@keyframes pulse {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.card-content { text-align: center; margin-bottom: 1.5rem; }

.card-title {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.card-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.card-stats { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primary-dark);
  font-weight: 600;
  white-space: nowrap;
}

.stat-item i { font-size: 0.9rem; }

/* Card Action */
.card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin-top: 1.5rem;
  transition: var(--transition);
}

.feature-card:hover .card-action { background: rgba(11, 79, 108, 0.12); }
.action-text { font-weight: 600; color: var(--primary-dark); font-size: 1rem; letter-spacing: 0.5px; white-space: nowrap; }
.action-icon { color: var(--primary); font-size: 1.1rem; transition: transform 0.3s ease; }

/* Card Wave Effect */
.card-wave {
  position: absolute;
  bottom: -10px; left: 0; right: 0;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230B4F6C" fill-opacity="0.1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,218.7C672,235,768,245,864,224C960,203,1056,149,1152,138.7C1248,128,1344,160,1392,176L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover .card-wave { opacity: 1; }

/* Individual Card Colors */
.borrow-slip-card .icon-circle { background: linear-gradient(135deg, #667eea, #764ba2) !important; }
.borrow-slip-card:hover { box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2); }
.borrow-log-card .icon-circle { background: linear-gradient(135deg, #f093fb, #f5576c) !important; }
.borrow-log-card:hover { box-shadow: 0 20px 40px rgba(240, 147, 251, 0.2); }
.inventory-card .icon-circle { background: linear-gradient(135deg, #4facfe, #00f2fe) !important; }
.inventory-card:hover { box-shadow: 0 20px 40px rgba(79, 172, 254, 0.2); }
.returned-card .icon-circle { background: linear-gradient(135deg, #43e97b, #38f9d7) !important; }
.returned-card:hover { box-shadow: 0 20px 40px rgba(67, 233, 123, 0.2); }

/* Card Entrance Animation */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(25px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.feature-card { animation: cardEntrance 0.5s ease forwards; opacity: 0; }
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }

.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, rgba(11, 79, 108, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.feature-card:hover::after { opacity: 1; }

.feature-card::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, rgba(11, 79, 108, 0.2), rgba(11, 79, 108, 0.1), rgba(11, 79, 108, 0.05), transparent);
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before { opacity: 1; }

.card-description { position: relative; padding-bottom: 0.8rem; }

.card-description::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
  border-radius: 2px;
  opacity: 0.5;
}

.stat-item { position: relative; overflow: hidden; }

.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.stat-item:hover::before { transform: translateX(100%); }

/* Landing page */
.landing-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(20, 130, 150, 0.12), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(255, 209, 102, 0.08), transparent 20rem),
    linear-gradient(135deg, var(--hero-bg) 0%, var(--primary-dark) 52%, #041E2A 100%) !important;
}
.landing-page .navbar {
  background: var(--primary) !important;
  border-bottom: 3px solid var(--accent) !important;
}
.landing-page .brand-title { color: var(--text-on-teal); }
.landing-page .nav-menu { display: none !important; }
.landing-page .site-footer,
body.staff-login-page .site-footer { display: none !important; }
.landing-page .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 90px);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.landing-page .welcome-section {
  display: grid !important;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr) !important;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: left;
  background: linear-gradient(135deg, var(--hero-bg) 0%, var(--primary-dark) 100%);
  border: 1px solid rgba(11, 79, 108, 0.5);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(11, 79, 108, 0.15);
  color: var(--text-on-teal);
}

.landing-page .welcome-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 52%, var(--accent) 100%);
}

.landing-page .welcome-section::after { display: none; }

.landing-page .hero-logo-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 220px;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px solid rgba(255, 209, 102, 0.2);
}

.landing-page .hero-logo-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
}

.landing-page .hero-logo-frame::before,
.landing-page .hero-logo-frame::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.landing-page .hero-logo-frame::before {
  inset: 0;
  border: 2px dashed rgba(255, 209, 102, 0.28);
  animation: logoRingSpin 10s linear infinite;
}

.landing-page .hero-logo-frame::after {
  inset: 12px;
  border: 2px solid transparent;
  border-top-color: rgba(20, 130, 150, 0.65);
  border-right-color: rgba(255, 209, 102, 0.45);
  animation: spin 3s linear infinite;
}

.landing-page .hero-logo {
  position: relative;
  z-index: 1;
  width: min(78%, 220px);
  object-fit: contain;
  animation: logoFloat 3.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.22));
}

.landing-page .hero-institution {
  font-family: "Times New Roman", Times, serif;
  color: var(--text-on-teal);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.landing-page .ilink-brand {
  font-family: "Times New Roman", Times, serif;
}

.landing-page .ilink-i {
  font-style: italic;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.admin-login-page .admin-logo {
  animation: logoFloat 3.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.22));
}
.landing-page .hero-copy {
  max-width: 660px;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}

.landing-page .welcome-title .title-line {
  display: inline;
}

.landing-page .welcome-title {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4.2vw, 2.85rem);
  line-height: 1.18;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  color: var(--text-on-teal);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  animation: none !important;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  letter-spacing: -0.01em;
}

.landing-page .title-gold {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
}

.landing-page .title-cyan {
  color: var(--text-on-teal) !important;
  -webkit-text-fill-color: var(--text-on-teal) !important;
}

.landing-page .welcome-title .ilink-brand {
  color: var(--text-on-teal);
  font-weight: 700;
}

.landing-page .welcome-subtitle {
  max-width: 700px;
  width: 100%;
  margin: 0 0 2rem;
  color: rgba(245, 247, 250, 0.82);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.75;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.landing-page .login-options {
  justify-content: flex-start;
  margin-top: 1.5rem;
  width: 100%;
}

.landing-page .system-features {
  justify-content: flex-start;
  gap: 1rem;
  margin: 2rem 0 0;
  width: 100%;
}

.landing-page .feature {
  min-width: 0;
  flex: 1 1 160px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(11, 79, 108, 0.4);
  border-radius: var(--radius);
  text-align: left;
}

.landing-page .feature:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 209, 102, 0.3);
}

.landing-page .login-card {
  width: auto;
  max-width: 100%;
  flex: 0 1 580px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  background: rgba(6, 47, 66, 0.85);
  border: 1px solid rgba(11, 79, 108, 0.5);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-width: 0;
}

.landing-page .login-card::before {
  display: block;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.landing-page .login-card h3 {
  color: var(--text-on-teal);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.landing-page .login-icon {
  width: 52px; height: 52px;
  margin: 0;
  font-size: 1.5rem;
  background: var(--primary);
  color: var(--accent);
}

.landing-page .login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.6rem;
  white-space: nowrap;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--accent);
  border: none;
  box-shadow: 0 12px 24px rgba(255, 209, 102, 0.35);
  text-decoration: none;
}

.landing-page .login-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 28px rgba(255, 209, 102, 0.45);
}

.landing-page .feature h4 {
  color: var(--text-on-teal);
  font-size: 1rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

.landing-page .feature p,
.landing-page .login-card p {
  color: rgba(245, 247, 250, 0.76);
  margin-bottom: 0;
  font-size: 0.875rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}
.landing-page .feature i { color: var(--accent) !important; font-size: 2rem; margin-bottom: 0.5rem; }

@media (max-width: 1100px) and (min-width: 901px) {
  .landing-page .login-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .landing-page .login-icon {
    grid-row: 1 / 3;
    align-self: center;
  }

  .landing-page .login-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .landing-page .welcome-section {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 1.25rem;
  }

  .landing-page .hero-logo-panel {
    min-height: 0;
    padding: 1rem;
    width: 100%;
  }

  .landing-page .hero-copy,
  .landing-page .welcome-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-page .system-features,
  .landing-page .login-options {
    justify-content: stretch;
    align-items: stretch;
  }

  .landing-page .login-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-items: stretch;
    text-align: left;
    width: 100%;
  }

  .landing-page .login-icon {
    grid-row: 1 / 3;
    align-self: center;
  }

  .landing-page .login-btn {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .landing-page .feature {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .landing-page .container {
    padding-top: 68px;
  }

  .landing-page .navbar {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap;
    padding: 0.65rem max(0.85rem, env(safe-area-inset-right)) 0.65rem max(0.85rem, env(safe-area-inset-left));
    gap: 0.5rem;
  }

  .landing-page .nav-brand {
    flex: 1 1 auto;
    gap: 0.65rem;
    width: auto;
    flex-direction: row;
    min-width: 0;
  }

  .landing-page .brand-title {
    font-size: clamp(0.72rem, 3.1vw, 0.95rem);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .landing-page .main-content {
    align-items: flex-start;
    min-height: calc(100dvh - 68px);
    padding:
      0.85rem max(0.75rem, env(safe-area-inset-right))
      max(1.25rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .landing-page .welcome-section {
    padding: 1.15rem 0.95rem !important;
    border-radius: 14px;
    gap: 1rem;
    margin-bottom: 0 !important;
    overflow-x: clip;
  }

  .landing-page .welcome-title {
    font-size: clamp(1.35rem, 5.8vw, 1.85rem);
    line-height: 1.28;
  }

  .landing-page .welcome-title .title-line {
    display: block;
  }

  .landing-page .welcome-subtitle {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
  }

  .landing-page .hero-logo-frame {
    width: min(100%, 210px);
  }

  .landing-page .hero-logo {
    width: min(72%, 170px);
  }

  .landing-page .hero-institution {
    font-size: 0.95rem;
    text-align: center;
    padding-inline: 0.25rem;
  }

  .landing-page .login-card {
    padding: 1rem !important;
    gap: 0.85rem;
    max-width: 100% !important;
    width: 100% !important;
  }

  .landing-page .login-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.35rem !important;
    margin: 0 !important;
  }

  .landing-page .login-btn {
    width: 100%;
    max-width: none;
    min-height: 44px;
    justify-content: center;
  }

  .landing-page .system-features {
    flex-direction: column !important;
    margin-top: 1.25rem;
    gap: 0.75rem;
  }

  .landing-page .feature {
    flex: 1 1 100%;
    padding: 1rem 0.9rem;
    width: 100%;
    min-width: 0;
  }

  .landing-page .feature i {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
  }
}

@media (max-width: 520px) {
  .landing-page .main-content {
    padding:
      0.65rem max(0.55rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(0.55rem, env(safe-area-inset-left));
  }

  .landing-page .welcome-section {
    padding: 0.95rem 0.75rem !important;
  }

  .landing-page .hero-logo-panel {
    padding: 0.85rem 0.65rem;
  }

  .landing-page .hero-logo-frame {
    width: min(100%, 180px);
  }

  .landing-page .hero-logo {
    width: min(70%, 150px);
  }

  .landing-page .welcome-title {
    font-size: clamp(1.2rem, 6.2vw, 1.55rem);
  }

  .landing-page .welcome-subtitle {
    font-size: 0.88rem;
  }

  .landing-page .login-card {
    grid-template-columns: 44px 1fr;
    gap: 0.65rem 0.75rem;
  }

  .landing-page .login-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
  }

  .landing-page .login-card h3 {
    font-size: 0.98rem;
  }

  .landing-page .login-card p,
  .landing-page .feature p {
    font-size: 0.82rem;
  }

  .landing-page .feature h4 {
    font-size: 0.92rem;
  }

  .landing-page .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .landing-page .container {
    padding-top: 62px;
  }

  .landing-page .logo-container {
    width: 40px;
    height: 40px;
  }

  .landing-page .brand-title {
    -webkit-line-clamp: 3;
    font-size: 0.68rem;
  }

  .landing-page .welcome-title {
    font-size: 1.15rem;
  }

  .landing-page .login-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .landing-page .login-icon {
    grid-row: auto;
  }

  .landing-page .login-card > div:not(.login-icon) {
    text-align: center;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 1024px) {
  .welcome-title { font-size: 2.4rem; }
  .login-card { flex-basis: 300px; width: min(100%, 440px); max-width: 440px; }
}

@media (max-width: 992px) {
  .nav-brand { flex: 1 1 auto; }
  .brand-title { font-size: clamp(0.9rem, 2.4vw, 1.2rem); }

  .notification {
    top: auto !important;
    bottom: calc(var(--staff-mobile-nav-clearance, 6.25rem) + env(safe-area-inset-bottom, 0px)) !important;
    left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
    right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 76px; }
  :root { --nav-height: 76px; }
  .container { padding-top: var(--nav-height); }

  .navbar,
  .site-topbar,
  .landing-topbar,
  .staff-topbar,
  .admin-topbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
    min-height: var(--nav-height);
    padding: 0.65rem var(--chrome-pad-x);
  }

  .nav-brand {
    width: auto;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
  }

  .logo-container {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .logo-upload-btn {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }
  .brand-title { font-size: clamp(0.82rem, 3.2vw, 1.05rem); line-height: 1.25; }

  .nav-menu {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
    align-self: center;
    gap: 0.45rem;
  }

  .notifications-toggle {
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
  }

  .staff-nav-profile {
    width: 36px;
    height: 36px;
  }

  .nav-link,
  .nav-profile,
  .nav-link.home-link {
    width: auto;
    justify-content: center;
    min-height: 40px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .nav-profile:not(.nav-profile-icon-only) { padding: 0.45rem 0.7rem; }
  .main-content { padding: 0.8rem 0.6rem; }

  .welcome-title { font-size: 1.8rem; }
  .welcome-subtitle { font-size: 1rem; }
  .login-options { flex-direction: column; align-items: center; gap: 1.5rem; }
  .login-card { width: 100%; max-width: 400px; }
  .menu-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .system-features { gap: 1rem; }
  .feature { min-width: 140px; padding: 1rem; }
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dashboard-header { padding: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .stat-card { padding: 1rem; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.3rem; }
  .stat-info h3 { font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .feature-card { padding: 1.5rem; }
  .card-icon { width: 70px; height: 70px; margin-bottom: 1rem; }
  .icon-circle { width: 70px; height: 70px; font-size: 2rem; }
  .ring-1 { width: 88px; height: 88px; }
  .ring-2 { width: 106px; height: 106px; }
  .ring-3 { width: 124px; height: 124px; }
  .card-title { font-size: 1.4rem; }

  .welcome-section, .login-card, .menu-card, .summary-card, .form-container,
  .dashboard-header, .feature-card, .stat-card, .modal-content { padding: 1rem; border-radius: 14px; }

  .welcome-section { margin-bottom: 1rem; padding: 1.2rem 0.8rem; }

  .login-options, .system-features, .menu-grid, .summary-grid, .stats-grid, .features-grid, .content-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  .login-options, .system-features { gap: 0.8rem; }
  .login-card { width: 100%; max-width: 100%; padding: 1.2rem 1rem; }
  .menu-card { min-height: auto; }
  .feature { min-width: 0; width: 100%; padding: 1rem; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.85rem var(--chrome-pad-x) 1rem;
    margin-bottom: 0;
    min-height: auto;
    text-align: left;
  }

  .alert,
  .message,
  .alert-message,
  .success-message,
  div.error-message {
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    border-radius: 16px;
  }

  .alert > i,
  .message > i,
  .alert-message > i,
  .success-message > i,
  div.error-message > i,
  .alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1rem !important;
  }

  .alert::after,
  .message::after,
  .alert-message::after,
  .success-message::after,
  div.error-message::after {
    top: 0.6rem;
    right: 0.7rem;
    font-size: 0.58rem;
  }

  .alert > span,
  .message > span,
  .alert-message > span,
  .success-message > span,
  div.error-message > span,
  .alert-body {
    padding-right: 4.25rem;
  }

  .notification {
    top: auto !important;
    bottom: calc(var(--staff-mobile-nav-clearance, 5.75rem) + 0.35rem) !important;
    right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  .data-table-wrapper,
  .table-container,
  .table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table,
  table {
    display: table;
    width: 100%;
    min-width: 560px;
    max-width: none;
    table-layout: auto;
  }

  .data-table thead,
  table thead { display: table-header-group; }

  .data-table th,
  .data-table td,
  table th,
  table td {
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
  }

  .modal-content { width: min(94vw, 480px); padding: 1rem; max-height: min(88vh, 720px); overflow-y: auto; }

  .toolbar,
  .batch-actions,
  .table-actions,
  .filter-group,
  .action-buttons,
  .filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .btn,
  .login-btn,
  .submit-btn,
  .btn-primary,
  .btn-secondary {
    white-space: normal;
    text-align: center;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .staff-login-page .main-content { padding: 1rem 0.5rem; }
  .staff-login-page .form-container { margin: 0.5rem auto; padding: 1.2rem 1rem; border-radius: 14px; }
  .staff-login-page .form-header { padding: 1.2rem 1rem !important; }
  .staff-login-page .form-icon { width: 64px; height: 64px; font-size: 1.8rem; margin-bottom: 0.8rem; }
  .staff-login-page .form-title { font-size: 1.4rem; }
  .staff-login-page .form-subtitle { font-size: 0.9rem; line-height: 1.4; }
  .staff-login-page .form-group { margin-bottom: 1rem; }
  .staff-login-page .form-label { font-size: 0.9rem; gap: 0.4rem; }
  .staff-login-page .form-input { padding: 0.8rem 0.9rem; font-size: 0.95rem; }
  .staff-login-page .submit-btn { padding: 0.8rem; font-size: 0.95rem; margin-top: 0.8rem; }
  .staff-login-page .password-toggle { right: 8px; padding: 0.3rem; font-size: 0.95rem; }
  .staff-login-page .alert {
    margin-bottom: 0.8rem;
  }
  .summary-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  :root { --nav-height: 72px; }
  .container { padding-top: var(--nav-height); }
  .navbar,
  .site-topbar,
  .landing-topbar,
  .staff-topbar,
  .admin-topbar {
    padding: 0.55rem var(--chrome-pad-x);
    min-height: var(--nav-height);
  }
  .nav-brand { gap: 0.5rem; }
  .brand-title { font-size: 0.82rem; }
  .notifications-toggle {
    width: 2rem;
    height: 2rem;
  }
  .staff-nav-profile {
    width: 32px;
    height: 32px;
  }
  .logo-container {
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .logo-upload-btn {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .main-content { padding: 0.6rem 0.5rem; }
  .welcome-title { font-size: 1.5rem; }
  .welcome-subtitle { font-size: 0.9rem; }

  .btn, .login-btn, .nav-link, .submit-btn, .btn-primary, .btn-secondary { width: 100%; }

  .welcome-section, .login-card, .menu-card, .summary-card, .form-container,
  .dashboard-header, .feature-card, .stat-card, .modal-content { padding: 0.8rem; border-radius: 12px; }

  .form-container { padding: 1rem; }

  .form-input, .search-input, .select-input, .data-table input, .data-table select,
  input[type="text"], input[type="number"], input[type="email"], input[type="password"],
  input[type="date"], input[type="datetime-local"], select, textarea { font-size: 16px; }

  .data-table,
  table { min-width: 480px; }

  .data-table th, .data-table td { padding: 0.5rem 0.4rem; font-size: 0.8rem; }
  .summary-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 1rem; }
  .feature-card { padding: 1.2rem; }
  .card-badge { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  .login-icon { width: 72px; height: 72px; font-size: 2.2rem; }
  .login-card h3 { font-size: 1.3rem; }
  .login-card p { font-size: 0.9rem; }

  .alert,
  .message,
  .alert-message,
  .success-message,
  div.error-message {
    padding: 0.7rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .notification {
    bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
    padding: 0.8rem 0.85rem;
    font-size: 0.85rem;
  }

  .toolbar .btn,
  .action-buttons .btn,
  .table-actions .btn,
  .batch-actions .btn {
    width: 100%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .nav-link:hover, .login-card:hover, .menu-card:hover, .summary-card:hover,
  .btn-primary:hover, .btn-secondary:hover, .back-button:hover, .login-btn:hover {
    transform: none; box-shadow: inherit; letter-spacing: inherit;
  }
  .feature:hover, .stat-card:hover, .feature-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  body { background-attachment: scroll; }
}
