:root {
  color-scheme: light;
  --font-sans: "Aptos", "Inter", "Segoe UI Variable", "Segoe UI", "Roboto", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Aptos Display", "Inter", "Segoe UI Variable Display", "Segoe UI", var(--font-sans);
  --bg: #e8f0ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.52);
  --surface-3: rgba(255, 255, 255, 0.36);
  --text: #0d1f3c;
  --muted: #4a6585;
  --line: rgba(100, 160, 230, 0.28);
  --line-strong: rgba(100, 160, 230, 0.5);
  --primary: #1a6fe8;
  --primary-2: #0a4fae;
  --accent: #60b8ff;
  --danger: #c2413d;
  --success: #1a8a5a;
  --warn: #d97706;

  /* Glass & depth system */
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-subtle: rgba(255, 255, 255, 0.32);
  --glass-blur: blur(24px) saturate(160%);
  --glass-blur-heavy: blur(40px) saturate(180%);

  /* Layered shadow system for 3D depth */
  --shadow-sm:
    0 1px 2px rgba(10, 40, 90, 0.06),
    0 4px 12px rgba(10, 40, 90, 0.08);
  --shadow:
    0 2px 4px rgba(10, 40, 90, 0.06),
    0 8px 24px rgba(10, 40, 90, 0.10),
    0 24px 64px rgba(10, 40, 90, 0.12);
  --shadow-lg:
    0 4px 8px rgba(10, 40, 90, 0.08),
    0 16px 40px rgba(10, 40, 90, 0.14),
    0 40px 100px rgba(10, 40, 90, 0.16);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.04);
  --shadow-colored: 0 8px 32px rgba(26, 111, 232, 0.22), 0 2px 8px rgba(26, 111, 232, 0.14);

  --radius: 10px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  opacity: 0.92;
  text-shadow: 0 0 1px rgba(255,255,255,0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060f1e;
  --surface: rgba(14, 30, 60, 0.72);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.05);
  --text: #e8f4ff;
  --muted: #7aaac8;
  --line: rgba(100, 160, 230, 0.16);
  --line-strong: rgba(100, 160, 230, 0.28);
  --primary: #5aadff;
  --primary-2: #3a8fe0;
  --accent: #c8e8ff;
  --danger: #f07070;
  --success: #4ecf8a;
  --warn: #fbbf24;

  --glass: rgba(14, 30, 60, 0.68);
  --glass-strong: rgba(18, 38, 76, 0.88);
  --glass-border: rgba(100, 160, 230, 0.22);
  --glass-border-subtle: rgba(100, 160, 230, 0.12);

  --shadow-sm:
    0 1px 2px rgba(0, 5, 20, 0.3),
    0 4px 12px rgba(0, 5, 20, 0.25);
  --shadow:
    0 2px 4px rgba(0, 5, 20, 0.3),
    0 8px 24px rgba(0, 5, 20, 0.35),
    0 24px 64px rgba(0, 5, 20, 0.4);
  --shadow-lg:
    0 4px 8px rgba(0, 5, 20, 0.35),
    0 16px 40px rgba(0, 5, 20, 0.45),
    0 40px 100px rgba(0, 5, 20, 0.5);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2);
  --shadow-colored: 0 8px 32px rgba(90, 173, 255, 0.18), 0 2px 8px rgba(90, 173, 255, 0.10);

  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  opacity: 0.88;
  text-shadow: 0 0 1px rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse at 12% 10%, rgba(100, 160, 255, 0.55) 0%, transparent 38%),
    radial-gradient(ellipse at 88% 8%, rgba(120, 80, 255, 0.38) 0%, transparent 32%),
    radial-gradient(ellipse at 55% 90%, rgba(60, 200, 220, 0.28) 0%, transparent 36%),
    radial-gradient(ellipse at 20% 70%, rgba(80, 120, 255, 0.22) 0%, transparent 30%),
    linear-gradient(145deg, #0a1628 0%, #0d2050 35%, #1a3a7a 65%, #c8deff 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.5px);
  background-position: 0 0, 42px 58px;
  background-size: 130px 130px, 180px 180px;
  opacity: 0.28;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.visitor-shell,
.admin-shell,
.qr-page {
  min-height: 100vh;
}

.visitor-shell {
  display: grid;
  place-items: center;
  padding: 28px;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background:
    linear-gradient(160deg, rgba(17, 107, 103, 0.92), rgba(35, 46, 64, 0.96)),
    url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: #fff;
}

.brand-panel h1,
.dashboard-header h1,
.login-card h1,
.qr-card h1 {
  margin: 16px 0 10px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-panel h1 {
  max-width: 440px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.brand-panel p {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #172033;
  font-weight: 900;
}

.logo-box {
  display: grid;
  place-items: center;
  width: var(--logo-size, 76px);
  height: var(--logo-size, 76px);
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--logo-padding, 3px);
}

.theme-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 560px);
  padding: 0;
}

form,
.camera-panel,
.success-panel,
.login-card,
.qr-card {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transform: translateZ(0);
  transition: box-shadow 280ms ease, transform 280ms ease;
}

form:hover,
.camera-panel:hover,
.login-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-inset), 0 0 0 1px rgba(255,255,255,0.6);
  transform: translateY(-2px) translateZ(0);
}

.form-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 750;
}

.form-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

h2 {
  margin: 0 0 14px;
  letter-spacing: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.single-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.wide-field {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-inset), 0 2px 6px rgba(10,40,90,0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow:
    var(--shadow-inset),
    0 0 0 3px rgba(26, 111, 232, 0.18),
    0 4px 12px rgba(26, 111, 232, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.form-actions,
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 0 18px;
  font-weight: 650;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  background: linear-gradient(145deg, #2a7ff5, #1058c8);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 6px 20px rgba(18, 104, 216, 0.35),
    0 2px 6px rgba(18, 104, 216, 0.25);
}

.primary-button:hover {
  background: linear-gradient(145deg, #3a8fff, #1a68d8);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 10px 28px rgba(18, 104, 216, 0.42),
    0 4px 10px rgba(18, 104, 216, 0.28);
}

.primary-button:active {
  transform: translateY(0px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.15) inset,
    0 2px 8px rgba(18, 104, 216, 0.2);
}

.secondary-button,
.icon-button {
  background: var(--glass-strong);
  color: var(--text);
  border-color: var(--glass-border);
  box-shadow:
    var(--shadow-inset),
    var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-inset),
    var(--shadow),
    0 0 0 1px rgba(26, 111, 232, 0.2);
}

.icon-button {
  width: 40px;
  padding: 0;
}

.full-button {
  width: 100%;
}

.auth-switch {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.form-error {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 650;
}

.camera-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: #101820;
}

.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.success-panel {
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(33, 133, 91, 0.13);
  color: var(--success);
  font-size: 1.6rem;
  font-weight: 900;
}

.login-card {
  margin-top: min(16vh, 110px);
}

.admin-page .auth-card {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 14%, rgba(128, 199, 255, 0.45), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(52, 119, 220, 0.35), transparent 28%),
    radial-gradient(circle at 60% 84%, rgba(134, 211, 255, 0.34), transparent 32%),
    linear-gradient(135deg, #041126 0%, #092e5e 46%, #dcefff 100%);
}

.admin-page .auth-heading,
.admin-page .auth-card form {
  width: min(100%, 560px);
}

.admin-page .auth-heading {
  padding: 22px 22px 0;
  text-align: center;
}

.admin-page .auth-heading h1 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 750;
}

.admin-page .auth-heading .eyebrow {
  color: #7bd4ff;
}

.admin-page .auth-card form {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.dashboard {
  width: min(100% - 32px, 1220px);
  margin: 0 auto;
  padding: 28px 0 48px;
  position: relative;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(58, 72, 218, 0.92), rgba(89, 63, 221, 0.88));
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 20px 60px rgba(14, 35, 80, 0.32),
    0 8px 24px rgba(58, 72, 218, 0.28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.admin-topbar .eyebrow,
.admin-topbar h1 {
  color: #fff;
}

.admin-topbar h1 {
  margin: 4px 0 0;
}

.hamburger-button {
  display: grid;
  gap: 5px;
  width: 44px;
  height: 44px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.hamburger-button span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.clock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 800;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(86vw, 292px);
  max-height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  box-shadow:
    20px 0 60px rgba(6, 22, 50, 0.18),
    4px 0 16px rgba(6, 22, 50, 0.1);
  overflow-y: auto;
  transform: translateX(-108%);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

[data-theme="dark"] .admin-sidebar {
  background: rgba(10, 24, 52, 0.92);
}

.sidebar-open .admin-sidebar {
  transform: translateX(0);
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  background: rgba(2, 12, 30, 0.46);
}

.sidebar-open .admin-backdrop {
  display: block;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.sidebar-close {
  width: 34px;
  min-height: 34px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.sidebar-link {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 14px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  border-color: rgba(79, 97, 233, 0.22);
  background: rgba(79, 97, 233, 0.1);
  color: var(--primary);
  transform: translateX(3px);
  box-shadow: 2px 0 12px rgba(79, 97, 233, 0.12);
}

.sidebar-meta {
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.sidebar-meta span {
  display: block;
  color: var(--primary);
  font-weight: 850;
}

.sidebar-meta p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  box-shadow: var(--shadow), var(--shadow-inset);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.admin-page-title h2,
.table-heading h2 {
  margin: 0;
}

.admin-page-title p,
.table-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.admin-stats article {
  min-height: 128px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), var(--shadow-inset);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.admin-stats article:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
}

[data-theme="dark"] .admin-stats article {
  background: rgba(18, 40, 78, 0.68);
}

.admin-stats small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 650;
}

.admin-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-insights article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.admin-insights span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-insights strong {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

.admin-toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-table-wrap {
  box-shadow: 0 18px 54px rgba(16, 42, 79, 0.12);
}

.table-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#studentAuthTitle{
  color: white;
}

.dashboard-header h1 {
  margin: 4px 0 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stats-grid article {
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--shadow-inset);
  transition: transform 220ms ease, box-shadow 220ms ease;
  transform: translateZ(0);
}

.stats-grid article:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
}

.stats-grid span {
  color: var(--muted);
  font-weight: 750;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(3, minmax(135px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.status-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.tab-button {
  min-height: 38px;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  color: var(--text);
  padding: 0 16px;
  font-weight: 750;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-inset), var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tab-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-inset), var(--shadow);
}

.tab-button.active {
  border-color: var(--primary);
  background: rgba(26, 111, 232, 0.14);
  color: var(--primary);
  box-shadow: var(--shadow-inset), var(--shadow-colored);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--shadow-inset);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.12);
}

tr {
  animation: fadeIn 160ms ease;
  transition: background 160ms ease;
}

tr:hover td {
  background: rgba(26, 111, 232, 0.04);
}

.visitor-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
}

.status-PENDING {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.22);
}

[data-theme="dark"] .status-PENDING {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.22);
}

.status-ACCEPTED,
.status-CHECKOUT {
  background: rgba(26, 138, 90, 0.14);
  color: #15803d;
  border: 1px solid rgba(26, 138, 90, 0.22);
}

[data-theme="dark"] .status-ACCEPTED,
[data-theme="dark"] .status-CHECKOUT {
  color: var(--success);
  background: rgba(78, 207, 138, 0.14);
  border-color: rgba(78, 207, 138, 0.22);
}

.status-REJECTED {
  background: rgba(194, 65, 61, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(194, 65, 61, 0.22);
}

[data-theme="dark"] .status-REJECTED {
  color: var(--danger);
  background: rgba(240, 112, 112, 0.14);
  border-color: rgba(240, 112, 112, 0.22);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#visitorRows .row-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.mini-button {
  min-height: 32px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
  font-size: 0.8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-inset), var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.mini-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-inset), var(--shadow);
}

.mini-button:active {
  transform: translateY(0);
}

.mini-button.accept {
  background: rgba(26, 138, 90, 0.15);
  border-color: rgba(26, 138, 90, 0.3);
  color: var(--success);
}

.mini-button.accept:hover {
  background: rgba(26, 138, 90, 0.22);
}

.mini-button.reject {
  background: rgba(194, 65, 61, 0.12);
  border-color: rgba(194, 65, 61, 0.28);
  color: var(--danger);
}

.mini-button.reject:hover {
  background: rgba(194, 65, 61, 0.2);
}

.empty-state {
  margin: 0;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.visitor-dialog {
  width: min(92vw, 760px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  color: var(--text);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
}

.visitor-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dialog-header h2 {
  margin: 0;
}

.dialog-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
}

.dialog-body img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 12px 14px;
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-inset), var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.detail-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-inset), var(--shadow);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.qr-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.qr-image {
  width: min(72vw, 300px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .visitor-shell {
    padding: 18px;
  }

  .brand-panel {
    min-height: 34vh;
    padding: 34px 24px;
  }

  .form-panel {
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-insights {
    grid-template-columns: 1fr;
  }

  .admin-page-title,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .admin-topbar .header-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .brand-panel h1 {
    font-size: 2.2rem;
  }

  form,
  .camera-panel,
  .success-panel,
  .login-card,
  .qr-card {
    padding: 20px;
  }

  .form-header {
    grid-template-columns: 1fr auto;
  }

  .form-header .brand-mark,
  .form-header .logo-box {
    display: none;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .form-actions {
    width: 100%;
  }

  .header-actions > *,
  .form-actions > * {
    flex: 1;
  }

  .toolbar,
  .stats-grid,
  .dialog-body,
  .detail-grid,
  .single-form-grid {
    grid-template-columns: 1fr;
  }

  .dialog-body img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

/* OTP Verification Panel Styles */
.otp-verification-panel {
  margin: 24px 0;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), var(--shadow-inset);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all 200ms ease;
}

.otp-verification-panel:hover {
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  transform: translateY(-2px);
}

.otp-verification-panel h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.otp-verification-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  opacity: 0.88;
}

.otp-input-group {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.otp-input-group input {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  font-size: 20px;
  text-align: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  color: var(--text);
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-inset), 0 2px 6px rgba(10,40,90,0.06);
  transition: all 180ms ease;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.otp-input-group input:focus {
  border-color: var(--primary);
  box-shadow:
    var(--shadow-inset),
    0 0 0 4px rgba(26, 111, 232, 0.22),
    0 6px 16px rgba(26, 111, 232, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

.otp-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.countdown-text {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0.92;
  letter-spacing: 0.04em;
}

.success-message {
  color: var(--success) !important;
  font-weight: 700;
  opacity: 0.96;
}

/* Admin dashboard reference-style layout */
.admin-page {
  --admin-purple: #5d45e9;
  --admin-purple-dark: #4d38cf;
  --admin-lavender: #f0edff;
  --admin-bg: #f7f7fb;
  --admin-card: #ffffff;
  --admin-line: #ececf3;
  --admin-text: #242331;
  --admin-muted: #7d8090;
  --admin-red: #ff5353;
  --admin-blue: #5c6cf3;
  --admin-orange: #ffa62b;
  --admin-green: #18bf67;
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-page::before {
  display: none;
}

.admin-page .admin-shell {
  background: var(--admin-bg);
}

.admin-page .dashboard {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 32px 42px 32px;
}

.admin-page .admin-sidebar {
  width: 210px;
  max-height: 100vh;
  padding: 0;
  background: #fff;
  border-right: 1px solid var(--admin-line);
  box-shadow: 8px 0 26px rgba(29, 28, 45, 0.06);
  overflow-y: auto;
  transform: translateX(-108%);
  transition: transform 220ms ease;
}

.admin-page.sidebar-open .admin-sidebar {
  transform: translateX(0);
}

.admin-page.sidebar-open .admin-backdrop {
  display: block;
}

.admin-page .sidebar-close {
  display: inline-grid;
}

.admin-page .sidebar-brand {
  min-height: 90px;
  grid-template-columns: auto 1fr;
  padding: 22px 18px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .sidebar-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 2px solid var(--admin-purple);
  border-radius: 50%;
  background: #fff;
}

.admin-page .sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.admin-page .sidebar-brand strong {
  color: var(--admin-text);
  font-size: 1.2rem;
}

.admin-page .sidebar-brand span {
  color: var(--admin-muted);
}

.admin-page .sidebar-nav {
  gap: 2px;
  margin: 0;
  padding: 10px 0;
}

.admin-page .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  color: #676a78;
  padding: 0 18px;
  font-weight: 750;
}

.admin-page .sidebar-link:hover,
.admin-page .sidebar-link.active {
  background: var(--admin-lavender);
  color: var(--admin-purple);
}


.admin-page .admin-topbar {
  min-height: 90px;
  margin: 0 -32px;
  padding: 16px 32px;
  border: 0;
  border-radius: 0;
  background: var(--admin-purple);
  box-shadow: none;
}

.admin-page .hamburger-button {
  border: 0;
  background: transparent;
}

.admin-page .hamburger-button span {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.78);
}

.admin-page .admin-topbar .eyebrow,
.admin-page .admin-topbar h1 {
  display: none;
}

.admin-page .header-actions {
  margin-left: auto;
}

.admin-page .admin-topbar .secondary-button,
.admin-page .admin-topbar .icon-button {
  background: #fff;
  color: var(--admin-text);
  border: 0;
  box-shadow: 0 8px 22px rgba(21, 20, 35, 0.1);
}

.admin-page .admin-topbar .primary-button {
  background: var(--admin-green);
  box-shadow: 0 10px 24px rgba(24, 191, 103, 0.26);
}

.admin-page .clock-pill {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
}

.admin-page .admin-page-title {
  min-height: 72px;
  margin: -20px 0 28px;
  padding: 18px 28px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: var(--admin-text);
  box-shadow: 0 5px 18px rgba(29, 28, 45, 0.11);
}

.admin-page .admin-page-title h2 {
  font-size: 1.65rem;
}

.admin-page .admin-page-title p {
  display: none;
}

.admin-page .admin-page-title span {
  color: var(--admin-muted);
  font-weight: 800;
}

.admin-page .admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.admin-page .admin-stats article {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon label"
    "icon value";
  align-items: center;
  min-height: 90px;
  padding: 16px 20px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(29, 28, 45, 0.09);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.admin-page .admin-stats article:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(29, 28, 45, 0.14);
}

.admin-page .admin-stats article.metric-red {
  background: linear-gradient(135deg, #ff5353, #ff8a5b);
}

.admin-page .admin-stats article.metric-blue {
  background: linear-gradient(135deg, #5268f2, #43a5ff);
}

.admin-page .admin-stats article.metric-purple {
  background: linear-gradient(135deg, #6844e8, #9b5cff);
}

.admin-page .admin-stats article.metric-orange {
  background: linear-gradient(135deg, #ff9b22, #ffc04f);
}

.admin-page .admin-stats article.metric-green {
  background: linear-gradient(135deg, #12b866, #45df96);
}

.admin-page .admin-stats i {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-right: 16px;
  border-radius: 6px;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.admin-page .metric-red i {
  background: rgba(255, 255, 255, 0.18);
}

.admin-page .metric-blue i {
  background: rgba(255, 255, 255, 0.18);
}

.admin-page .metric-purple i {
  background: rgba(255, 255, 255, 0.18);
}

.admin-page .metric-orange i {
  background: rgba(255, 255, 255, 0.18);
}

.admin-page .metric-green i {
  background: rgba(255, 255, 255, 0.18);
}

.admin-page .admin-stats span {
  grid-area: label;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
}

.admin-page .admin-stats strong {
  grid-area: value;
  margin: 2px 0 0;
  color: #fff;
  font-size: 1rem;
}

.admin-page .admin-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: start;
}

.admin-page .admin-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-page .table-heading {
  padding: 0 0 14px;
  border: 0;
}

.admin-page .table-heading h2 {
  color: var(--admin-purple);
  font-size: 1rem;
}

.admin-page .table-heading p {
  display: none;
}

.admin-page table {
  min-width: 760px;
  background: #fff;
}

.admin-page th {
  background: #eeeeef;
  color: #333544;
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-page td {
  background: #f8f8fa;
  border-bottom: 8px solid #fff;
  color: #565968;
  font-size: 0.82rem;
}

.admin-page .visitor-cell strong {
  color: var(--admin-text);
}

.admin-page .avatar {
  border-radius: 50%;
}

.admin-page .status-pill {
  min-width: 0;
  min-height: 22px;
  margin-top: 5px;
  padding: 0 8px;
  font-size: 0.66rem;
}

.admin-page .mini-button {
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: var(--admin-purple);
  color: #fff;
  font-size: 0.76rem;
}

.admin-page .mini-button.accept {
  background: var(--admin-green);
  color: #fff;
}

.admin-page .mini-button.reject {
  background: var(--admin-red);
  color: #fff;
}

.admin-page .admin-profile-card {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(29, 28, 45, 0.11);
}

.admin-page .profile-cover {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px 24px;
  background: var(--admin-purple);
  color: #fff;
  text-align: center;
}

.admin-page .profile-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 4px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='96' y1='42' x2='430' y2='470' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2339a7e8'/%3E%3Cstop offset='.55' stop-color='%234b5fe0'/%3E%3Cstop offset='1' stop-color='%236009d8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='256' cy='148' rx='110' ry='126' fill='url(%23g)'/%3E%3Cpath d='M40 454c0-88 54-142 143-155 12-2 19 3 23 15l31 92c5 15 30 15 35 0l31-92c4-12 11-17 23-15 89 13 146 67 146 155 0 20-16 36-36 36H76c-20 0-36-16-36-36Z' fill='url(%23g)'/%3E%3Cpath d='M230 340h52l-17 31 8 76h-34l8-76-17-31Z' fill='%23fff' fill-opacity='.96'/%3E%3C/svg%3E") center/70% no-repeat;
  color: transparent;
  font-size: 0;
  font-weight: 900;
}

.admin-page .profile-cover strong {
  font-size: 1.12rem;
}

.admin-page .profile-cover span {
  color: rgba(255, 255, 255, 0.78);
}

.admin-page .profile-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .profile-row span {
  display: block;
  color: var(--admin-muted);
  font-size: 0.76rem;
  font-weight: 800;
}


.admin-page .profile-row strong {
  display: block;
  margin-top: 4px;
  color: var(--admin-text);
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .admin-page .admin-sidebar {
    width: min(86vw, 280px);
  }
}

@media (max-width: 920px) {
  .admin-page .admin-stats,
  .admin-page .admin-lower-grid {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-profile-card {
    order: -1;
  }
}

/* 2026 visual refresh */
:root {
  --glass-white: rgba(255, 255, 255, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(255, 255, 255, 0.42);
  --glass-shadow:
    0 2px 4px rgba(23, 40, 95, 0.06),
    0 10px 32px rgba(23, 40, 95, 0.12),
    0 28px 80px rgba(23, 40, 95, 0.14);
}

/* Remove duplicate body override — main body styles are set above */

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.8px);
  opacity: 0.28;
}

form,
.camera-panel,
.success-panel,
.login-card,
.qr-card,
.table-wrap,
.visitor-dialog,
.admin-page-title,
.admin-toolbar,
.admin-profile-card,
.user-create-card,
.student-live-card {
  background: var(--glass-white);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow), var(--shadow-inset);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.visitor-shell,
.student-enquiry-shell,
.qr-page {
  padding: 36px 24px;
}

.form-panel,
.student-form-panel {
  width: min(100%, 720px);
}

.single-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.single-form-grid label {
  margin-bottom: 0;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-header {
  margin-bottom: 22px;
}

.form-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.primary-button,
.secondary-button,
.icon-button,
.mini-button,
.sidebar-link,
.status-pill,
input,
select,
textarea,
table,
.student-reminder-item,
.auth-showcase,
.auth-form-shell {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    opacity 220ms ease;
}

form,
.camera-panel,
.success-panel,
.table-wrap,
.admin-page-title,
.admin-toolbar,
.admin-profile-card,
.student-live-card,
.user-create-card {
  animation: rise 420ms ease both;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.mini-button:hover,
.student-reminder-item:hover,
.sidebar-link:hover {
  transform: translateY(-2px);
}

.auth-card {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.admin-page .auth-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 520px);
  place-items: stretch;
  align-content: center;
  align-items: stretch;
  padding: 36px;
  gap: 0;
  background: transparent;
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 620px;
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 32px 0 0 32px;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.16), transparent 18%),
    radial-gradient(circle at 24% 84%, rgba(131, 221, 255, 0.18), transparent 22%),
    linear-gradient(145deg, rgba(75, 80, 242, 0.98), rgba(90, 58, 233, 0.94));
  color: #fff;
}

.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-showcase::before {
  inset: auto -60px 56px auto;
  width: 220px;
  height: 220px;
}

.auth-showcase::after {
  inset: 34px auto auto -40px;
  width: 160px;
  height: 160px;
}

.auth-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-showcase h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  color: #fff;
}

.auth-showcase > p:last-of-type {
  margin: 0;
  max-width: 500px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-showcase-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 1;
}

.auth-showcase-metrics article {
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-showcase-metrics strong,
.auth-showcase-metrics span {
  display: block;
}

.auth-showcase-metrics strong {
  font-size: 1rem;
  font-weight: 800;
}

.auth-showcase-metrics span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-form-shell {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 44px 40px;
  border: 1px solid var(--glass-line);
  border-left: 0;
  border-radius: 0 32px 32px 0;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--glass-shadow);
}

.admin-page .auth-heading,
.admin-page .auth-form-shell form {
  width: 100%;
  padding: 0;
}

.admin-page .auth-form-shell form {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.admin-page .auth-heading {
  text-align: left;
}

.admin-page .auth-heading .eyebrow {
  color: #6176ff;
}

.admin-page .auth-heading h1 {
  color: #1c2140;
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.auth-form-shell #studentAuthTitle {
  color: #1c2140;
}

.admin-page {
  --admin-purple: #4c57f5;
  --admin-purple-dark: #5d43ea;
  --admin-lavender: rgba(91, 104, 255, 0.12);
  --admin-bg: transparent;
  --admin-card: rgba(255, 255, 255, 0.78);
  --admin-line: rgba(128, 151, 255, 0.16);
  --admin-text: #1a1f3a;
  --admin-muted: #5c6480;
  --admin-red: #ff6f61;
  --admin-blue: #4c88ff;
  --admin-orange: #ffb23f;
  --admin-green: #34d399;
}

.admin-page .admin-shell {
  padding: 0 8px 18px;
}

.admin-page .dashboard {
  padding: 24px 28px 44px;
}

.admin-page .admin-sidebar {
  width: 252px;
  padding: 14px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    20px 0 60px rgba(53, 71, 138, 0.14),
    inset -1px 0 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.admin-page .sidebar-brand {
  padding: 24px 22px;
  border-bottom: 1px solid rgba(113, 130, 215, 0.14);
}

.admin-page .sidebar-link {
  margin: 3px 10px;
  min-height: 46px;
  border-radius: var(--radius-lg);
  padding: 0 16px;
}

.admin-page .admin-topbar {
  min-height: 92px;
  margin: 0 0 26px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12), transparent 30%),
    linear-gradient(135deg, rgba(77, 87, 245, 0.92), rgba(115, 72, 236, 0.86));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 24px 70px rgba(72, 76, 185, 0.28),
    0 8px 24px rgba(72, 76, 185, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.admin-page .admin-topbar .eyebrow,
.admin-page .admin-topbar h1 {
  display: block;
}

.admin-page .admin-topbar .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.admin-page .admin-topbar h1 {
  color: #fff;
  font-size: 1.7rem;
}

.admin-page .header-actions {
  gap: 12px;
}

.admin-page .admin-topbar .secondary-button,
.admin-page .admin-topbar .icon-button,
.admin-page .clock-pill {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  color: #1e2751;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 8px 20px rgba(32, 34, 76, 0.14);
}

.admin-page .clock-pill {
  min-width: 108px;
  font-size: 0.96rem;
}

.admin-page .admin-page-title,
.admin-page .admin-toolbar,
.admin-page .admin-profile-card,
.admin-page .table-wrap,
.admin-page .user-create-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--glass-shadow), var(--shadow-inset);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.admin-page .admin-page-title {
  min-height: auto;
  margin: 0 0 22px;
  padding: 24px 28px;
}

.admin-page .admin-page-title p,
.admin-page .table-heading p {
  display: block;
}

.admin-page .admin-page-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.admin-page .admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.admin-page .admin-stats article {
  min-height: 118px;
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.28);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 8px 28px rgba(0,0,0,0.12),
    0 2px 8px rgba(0,0,0,0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.admin-page .admin-stats article:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 16px 44px rgba(0,0,0,0.18),
    0 4px 12px rgba(0,0,0,0.1);
}

.admin-page .admin-toolbar {
  padding: 18px;
}

.admin-page .table-wrap {
  overflow: hidden;
}

.admin-page .table-heading {
  padding: 20px 22px 14px;
}

.admin-page table {
  background: transparent;
}

.admin-page th {
  background: rgba(111, 124, 255, 0.08);
  color: #50577d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-page td {
  background: rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid rgba(133, 147, 212, 0.1);
  font-size: 0.86rem;
}

.admin-page tr:last-child td {
  border-bottom: 0;
}

.admin-page tr:hover td {
  background: rgba(76, 87, 245, 0.05);
}

.admin-page .mini-button,
.admin-page .student-status-select {
  border-radius: var(--radius-lg);
}

.admin-page .admin-profile-card,
.admin-page .profile-cover {
  border-radius: var(--radius-xl);
}

.admin-page .profile-cover {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(135deg, rgba(77, 87, 245, 0.94), rgba(111, 74, 243, 0.9));
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

.admin-page .profile-row:last-child {
  border-bottom: 0;
}

.student-detail-dialog,
.follow-up-dialog {
  border-radius: var(--radius-xl);
}

@media (max-width: 960px) {
  .auth-card,
  .admin-page .auth-card {
    width: min(100%, 760px);
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .auth-showcase,
  .auth-form-shell {
    border-radius: 28px;
    border-left: 1px solid var(--glass-line);
  }

  .auth-showcase {
    min-height: auto;
    padding: 32px;
  }

  .auth-showcase-metrics {
    grid-template-columns: 1fr;
  }

  .single-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-page .dashboard {
    padding: 18px 12px 32px;
  }

  .admin-page .admin-topbar {
    padding: 16px;
  }

  .admin-page .header-actions {
    width: 100%;
  }

  .admin-page .header-actions > * {
    flex: 1 1 calc(50% - 12px);
  }

  .admin-page .admin-page-title,
  .admin-page .admin-toolbar,
  .admin-page .table-wrap,
  .admin-page .admin-profile-card,
  .admin-page .user-create-card {
    border-radius: 20px;
  }
}

/* ── Custom UI Alerts & Prompts ─────────────────────────────────────────── */

/* Toast container */
#uiToastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.ui-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 0.875rem;
  max-width: 360px;
  min-width: 220px;
  animation: toastIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ui-toast.toast-hiding {
  opacity: 0;
  transform: translateX(30px);
}

.ui-toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ui-toast-body {
  flex: 1;
  line-height: 1.45;
}

.ui-toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
}
.ui-toast-close:hover { opacity: 1; }

.ui-toast.toast-error   { border-left: 3px solid var(--danger); }
.ui-toast.toast-success { border-left: 3px solid var(--success); }
.ui-toast.toast-info    { border-left: 3px solid var(--primary); }
.ui-toast.toast-warn    { border-left: 3px solid #e8a020; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Custom prompt / confirm dialog */
#uiModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

#uiModalOverlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ui-modal-box {
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  padding: 1.65rem;
  width: 100%;
  max-width: 520px;
  animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ui-modal-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: 0;
  margin: 0 0 0.7rem;
}

.ui-modal-message {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 1.1rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ui-modal-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
  outline: none;
  transition: border-color 0.15s;
}
.ui-modal-input:focus { border-color: var(--primary); }

/* Counselor select list */
.ui-modal-select-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1.1rem;
  background: var(--surface-2);
}

.ui-modal-select-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  min-height: 64px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}
.ui-modal-select-item:last-child { border-bottom: none; }
.ui-modal-select-item:hover,
.ui-modal-select-item.selected { background: rgba(18, 104, 216, 0.12); }
.ui-modal-select-item input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  accent-color: var(--primary);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ui-modal-select-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.ui-modal-select-copy strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-modal-select-copy > span {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.ui-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.ui-modal-btn {
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-lg);
  border: none;
  font-size: 0.875rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.ui-modal-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.ui-modal-btn:active { transform: translateY(0); }
.ui-modal-btn.btn-primary {
  background: linear-gradient(145deg, #2a7ff5, #1058c8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 111, 232, 0.35), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.ui-modal-btn.btn-cancel {
  background: var(--glass-strong);
  color: var(--muted);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-inset);
}
.ui-modal-btn.btn-danger {
  background: linear-gradient(145deg, #e05252, #b83030);
  color: #fff;
  box-shadow: 0 4px 14px rgba(194, 65, 61, 0.35), 0 1px 0 rgba(255,255,255,0.2) inset;
}

/* Shared typography for buttons and headings */
button,
.primary-button,
.secondary-button,
.icon-button,
.mini-button,
.tab-button,
.sidebar-link,
.auth-switch,
.ui-modal-btn,
.clock-pill,
h1, h2, h3, h4, h5, h6,
.eyebrow,
th {
  font-family: var(--font-display);
  letter-spacing: 0;
}

/* More breathing room on buttons */
.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 22px;
  letter-spacing: 0;
}

.mini-button {
  min-height: 34px;
  padding: 0 14px;
  letter-spacing: 0;
}

.tab-button {
  min-height: 42px;
  padding: 0 20px;
}

.sidebar-link {
  min-height: 48px;
  padding: 0 18px;
}

/* More space between form fields */
label {
  margin-bottom: 16px;
}

.user-create-form input,
.user-create-form select {
  margin-bottom: 14px;
}

/* Table headers more spaced */
th {
  padding: 16px 16px;
}

/* Heading letter spacing */
h1 { letter-spacing: 0; }
h2 { letter-spacing: 0; }
h3 { letter-spacing: 0; }
