/* ==========================================================================
   PMJ SMART LIBRARY — FUTURISTIC REDESIGN
   Palette:  Navy #0A2647 · Blue #1B5FAE · Gold #D9A441 · Teal #12877F
             Glass backgrounds, subtle gradients, smooth animations
   ========================================================================== */

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

:root {
  --navy: #0A2647;
  --navy-2: #123A6B;
  --blue: #1B5FAE;
  --blue-light: #E8F0FB;
  --gold: #D9A441;
  --gold-light: #FBEFD9;
  --teal: #12877F;
  --teal-light: #E4F5F3;
  --red: #C6473A;
  --red-light: #FBEAE8;
  --paper: #F5F7FA;
  --paper-2: #EEF2F7;
  --ink: #17233D;
  --ink-soft: #55647F;
  --line: #E2E8F1;
  --white: #FFFFFF;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 8px rgba(10,38,71,0.06);
  --shadow: 0 12px 32px rgba(10,38,71,0.10);
  --shadow-lg: 0 24px 64px rgba(10,38,71,0.18);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--font-mono); }
img { max-width: 100%; display: block; }
::selection { background: var(--gold-light); color: var(--navy); }

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

/* ---- Focus states (accessible) ---- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 28px;
  border-radius: 60px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  box-shadow: 0 6px 20px rgba(27,95,174,0.35);
}
.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(27,95,174,0.50);
  transform: translateY(-3px);
}

.btn-gold {
  background: linear-gradient(135deg, #E7B75B, var(--gold));
  color: var(--navy);
  box-shadow: 0 6px 20px rgba(217,164,65,0.35);
}
.btn-gold:hover {
  box-shadow: 0 12px 30px rgba(217,164,65,0.50);
  transform: translateY(-3px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: #a83a2f;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--teal);
  color: #fff;
}
.btn-success:hover {
  background: #0d6c65;
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

/* ==========================================================================
   APP HEADER (glass effect)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,38,71,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.app-header.is-scrolled {
  box-shadow: var(--shadow-lg);
}

.app-header__bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
}
.brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.02em;
}
.brand__text em {
  font-style: normal;
  color: var(--gold);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav__link {
  position: relative;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 30px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.main-nav__link:hover {
  color: #fff;
  background: rgba(255,255,255,0.10);
}
.main-nav__link.is-active {
  color: #fff;
  background: rgba(217,164,65,0.20);
}
.main-nav__link.is-active::after {
  display: none;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  position: relative;
}
.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 6px 14px 6px 6px;
  border-radius: 40px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
}
.user-menu__trigger:hover { background: rgba(255,255,255,0.15); }
.user-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.user-menu__name {
  font-size: 13.5px;
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu__trigger i {
  font-size: 11px;
  opacity: 0.6;
  transition: transform 0.2s;
}
.user-menu.is-open .user-menu__trigger i {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 200px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s var(--ease);
}
.user-menu.is-open .user-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-menu__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
}
.user-menu__dropdown a:hover { background: var(--paper-2); }
.user-menu__dropdown a.danger { color: var(--red); }
.user-menu__dropdown a.danger:hover { background: var(--red-light); }
.user-menu__dropdown hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 6px 4px;
}

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-2);
    padding: 10px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease);
  }
  .app-header.nav-open .main-nav {
    max-height: 500px;
    opacity: 1;
  }
  .main-nav__link {
    padding: 14px 20px;
    border-radius: 12px;
  }
  .nav-toggle { display: flex; }
  .user-menu__name { display: none; }
}

/* ==========================================================================
   ACHIEVEMENT TICKER
   ========================================================================== */
.ticker {
  background: linear-gradient(90deg, var(--gold-light), #f7e8c8);
  border-bottom: 1px solid #f0dcb0;
  overflow: hidden;
  position: relative;
}
.ticker::before, .ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--gold-light), transparent);
}
.ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--gold-light), transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  width: max-content;
  padding: 12px 0;
  animation: ticker-scroll 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #7a5a17;
}
.ticker__item i { color: var(--gold); font-size: 15px; }
.ticker__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8bd7f;
  display: inline-block;
  margin: 0 6px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > * {
  animation: fade-up 0.7s var(--ease) both;
}
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: 0.19s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(5) { animation-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(6) { animation-delay: 0.40s; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO (index.php)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 70% 20%, #1a4a7a, var(--navy) 70%, #071a33);
  padding: 80px 0 100px;
  isolation: isolate;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217,164,65,0.18);
  border: 1px solid rgba(217,164,65,0.35);
  color: var(--gold);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 40px;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(34px, 4.8vw, 54px);
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero__title span { color: var(--gold); }
.hero__lead {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin-bottom: 34px;
}
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero__stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: #fff;
}
.hero__stat span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__panel {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 30px;
  animation: float-panel 6s ease-in-out infinite;
}
.hero__panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.7;
}
@keyframes float-panel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__panel { order: -1; }
}

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--navy-2);
  color: #fff;
  padding: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.announce-bar .container {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-align: center;
}
.announce-bar i {
  color: var(--gold);
  animation: bell-ring 2.4s ease-in-out infinite;
}
@keyframes bell-ring {
  0%, 85%, 100% { transform: rotate(0); }
  88% { transform: rotate(-12deg); }
  91% { transform: rotate(10deg); }
  94% { transform: rotate(-6deg); }
  97% { transform: rotate(0); }
}

/* ==========================================================================
   SECTIONS / CARDS
   ========================================================================== */
.section { padding: 80px 0; }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.section-head .eyebrow {
  display: block;
  color: var(--teal);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Cards (glass) ---- */
.card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,255,255,0.9);
}

/* Stat Cards */
.stat-card { padding: 32px 24px; text-align: center; }
.stat-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 26px;
  color: #fff;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card__meta { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

.bg-blue { background: linear-gradient(135deg, var(--blue), var(--navy)); }
.bg-teal { background: linear-gradient(135deg, #1aa89e, var(--teal)); }
.bg-gold { background: linear-gradient(135deg, #E7B75B, var(--gold)); }
.bg-soft-blue { background: var(--blue-light); color: var(--blue); }

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  animation: live-ping 1.8s var(--ease) infinite;
}
@keyframes live-ping {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.achieve-card {
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.achieve-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-light);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}
.achieve-card h4 { font-size: 16px; margin-bottom: 6px; }
.achieve-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

.cta-panel {
  background: linear-gradient(120deg, var(--navy), #123a6b 60%, #0d2d54);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-panel .status-grid {
  position: absolute;
  inset: 0;
  grid-template-columns: repeat(14, 1fr);
  opacity: 0.06;
  padding: 20px;
  gap: 14px;
}
.cta-panel h3 {
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 14px;
}
.cta-panel p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 30px;
  font-size: 16px;
}

/* ==========================================================================
   ROOM GALLERY / IMAGE PLACEHOLDERS
   ========================================================================== */
.room-image-placeholder {
  width: 100%;
  height: 160px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s var(--ease);
  margin-bottom: 12px;
  border: 1px dashed var(--line);
  position: relative;
  overflow: hidden;
}
.room-image-placeholder i {
  font-size: 32px;
  opacity: 0.4;
}
.room-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.room-tile:hover .room-image-placeholder {
  transform: scale(1.02);
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side {
  flex: 1 1 46%;
  background: linear-gradient(160deg, var(--navy), #0d2d54 70%, #081c37);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side .status-grid {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 280px;
  opacity: 0.4;
  grid-template-columns: repeat(5, 1fr);
}
.auth-side__quote p {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 14px;
}
.auth-side__quote span { color: rgba(255,255,255,0.5); font-size: 13.5px; }
.auth-main {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--paper);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
}
.auth-card__head { margin-bottom: 28px; }
.auth-card__head h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card__head p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.field-hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  font-family: var(--font-body);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(27,95,174,0.15);
}
.input-group { position: relative; }
.input-group .input { padding-left: 46px; }
.input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 16px;
}
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.role-toggle input { display: none; }
.role-toggle label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  text-align: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all 0.2s var(--ease);
}
.role-toggle label i { font-size: 22px; }
.role-toggle input:checked + label {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--navy);
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
  animation: fade-up 0.4s var(--ease) both;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border: 1px solid transparent;
}
.alert i { margin-top: 2px; }
.alert-danger {
  background: var(--red-light);
  color: #8c3226;
  border-color: rgba(198,71,58,0.2);
}
.alert-success {
  background: var(--teal-light);
  color: #0b5a54;
  border-color: rgba(18,135,127,0.2);
}
.alert-warning {
  background: var(--gold-light);
  color: #8a5f10;
  border-color: rgba(217,164,65,0.2);
}
.alert-info {
  background: var(--blue-light);
  color: #12447f;
  border-color: rgba(27,95,174,0.2);
}
.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 16px;
  color: inherit;
  transition: opacity 0.2s;
}
.alert-close:hover { opacity: 1; }

.auth-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.auth-foot a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

@media (max-width: 900px) { .auth-side { display: none; } }

/* ==========================================================================
   PAGE HERO (dashboards)
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--navy), #123a6b);
  color: #fff;
  padding: 40px 0 80px;
  margin-bottom: -56px;
  position: relative;
  overflow: hidden;
}
.page-hero .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.page-hero h1 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 6px;
}
.page-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  margin: 0;
  max-width: 520px;
}
.page-hero__badge {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-panel { background: transparent; padding-bottom: 70px; }

/* ==========================================================================
   TABLES (dashboard)
   ========================================================================== */
.table-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.5);
}
.table-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.table-card__head h3 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 14px 20px;
  background: var(--paper-2);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background 0.2s;
}
.data-table tbody tr:hover {
  background: var(--blue-light);
}
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-strong { font-weight: 700; color: var(--navy); }
.cell-muted { color: var(--ink-soft); font-size: 13px; }

.empty-state {
  text-align: center;
  padding: 70px 24px;
  color: var(--ink-soft);
}
.empty-state i {
  font-size: 40px;
  color: var(--line);
  display: block;
  margin-bottom: 16px;
}

/* ---- Status badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-pending {
  background: var(--gold-light);
  color: #8a5f10;
}
.badge-pending .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: live-ping-soft 1.6s infinite;
}
.badge-approved {
  background: var(--teal-light);
  color: #0b5a54;
}
.badge-rejected {
  background: var(--red-light);
  color: #8c3226;
}
.badge-neutral {
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
@keyframes live-ping-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- Room availability list ---- */
.room-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.room-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}

.booking-form-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 28px;
}
.booking-form-card__head {
  background: linear-gradient(120deg, var(--blue), var(--navy));
  color: #fff;
  padding: 18px 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.booking-form-card__body { padding: 28px; }

/* ---- Floor plan with image placeholders ---- */
.floor-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.floor-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  display: inline-block;
}

.floor-plan {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(rgba(10,38,71,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,38,71,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}
.room-tile { text-decoration: none; display: block; }
.room-block {
  min-height: 160px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  padding: 20px;
  background-size: cover;
  background-position: center;
}
.room-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
  z-index: 1;
}
.room-block > * { position: relative; z-index: 2; }
.room-block i { font-size: 28px; }
.room-block b { font-size: 15px; }
.room-block small { opacity: 0.8; font-size: 12px; }

.room-discussion {
  background-image: url('../images/discussion-room.jpg'); /* <-- replace with your image */
}
.room-media {
  background-image: url('../images/multimedia-lab.jpg'); /* <-- replace */
}
.room-tile:hover .room-block {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(10,38,71,0.30);
}
.hallway-block {
  background: var(--paper-2);
  border: 1.5px dashed var(--line);
  min-height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  font-size: 12px;
}
.facility-block {
  background: repeating-linear-gradient(135deg, #4a5568, #4a5568 10px, #414b5b 10px, #414b5b 20px);
  min-height: 160px;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ---- Avatar / profile ---- */
.avatar-upload { text-align: center; margin-bottom: 28px; }
.avatar-upload__img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--blue-light);
  box-shadow: var(--shadow);
}
.avatar-upload label.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 40px;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.avatar-upload label.file-btn:hover { background: #d9e7f8; }
.avatar-upload input[type=file] { display: none; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 24px;
  margin-top: 70px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer strong { color: #fff; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}
.footer-social a:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-4px);
}
.footer-bottom {
  text-align: center;
  font-size: 12.5px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.w-100 { width: 100%; }
.me-1 { margin-right: 0.25rem; } .me-2 { margin-right: 0.5rem; }
.ms-1 { margin-left: 0.25rem; } .ms-2 { margin-left: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; }
.fw-bold { font-weight: 700; }
.text-muted { color: var(--ink-soft); }
.small { font-size: 13px; }