/* ── Poppins (self-hosted, no external requests) ── */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/poppins-800.woff2') format('woff2');
}

:root {
  --bg: #0f1216;
  --card: #161a20;
  --border: #23272e;
  --border-strong: #2a2f37;
  --border-hover: #333a45;
  --text: #eef0f3;
  --text-dim: #9aa1ab;
  --text-faint: #8a9099;
  --accent: #6f79ff;
  --accent-2: #6f45bb;
  --accent-soft: rgba(111, 121, 255, 0.12);
  --green: #3ddc97;
  --amber: #f7b538;
  --red: #ff5c5c;
  --header-bg: rgba(15, 18, 22, 0.88);
  --text-body: #cfd3da;
  --text-muted: #aeb4bd;
  --accent-text: #8b93ff;
  --surface-raised: #1c2027;
  --timer-bg: rgba(15, 18, 22, 0.65);
  --info: #56ccf2;
  --green-soft: rgba(61, 220, 151, 0.1);
  --green-border: rgba(61, 220, 151, 0.3);
  --amber-soft: rgba(247, 181, 56, 0.1);
  --amber-border: rgba(247, 181, 56, 0.3);
  --info-soft: rgba(86, 204, 242, 0.1);
  --info-border: rgba(86, 204, 242, 0.3);
  --red-soft: rgba(255, 92, 92, 0.12);
  --red-softer: rgba(255, 92, 92, 0.2);
  --red-border: rgba(255, 92, 92, 0.35);
}

[data-theme="bright"] {
  --bg: #f6f1e6;
  --card: #fffdf8;
  --border: #e8e1d1;
  --border-strong: #ddd3bf;
  --border-hover: #c9bda2;
  --text: #2b2519;
  --text-dim: #6d6455;
  --text-faint: #998e7c;
  --accent: #5a63ea;
  --accent-2: #7a4fd0;
  --accent-soft: rgba(90, 99, 234, 0.1);
  --green: #149066;
  --amber: #b07c12;
  --red: #df4f4f;
  --header-bg: rgba(246, 241, 230, 0.9);
  --text-body: #4a4437;
  --text-muted: #5f584b;
  --accent-text: #4550e8;
  --surface-raised: #fffdf8;
  --timer-bg: rgba(90, 99, 234, 0.08);
  --info: #1787b3;
  --green-soft: rgba(20, 144, 102, 0.12);
  --green-border: rgba(20, 144, 102, 0.32);
  --amber-soft: rgba(176, 124, 18, 0.13);
  --amber-border: rgba(176, 124, 18, 0.35);
  --info-soft: rgba(23, 135, 179, 0.11);
  --info-border: rgba(23, 135, 179, 0.32);
  --red-soft: rgba(223, 79, 79, 0.09);
  --red-softer: rgba(223, 79, 79, 0.16);
  --red-border: rgba(223, 79, 79, 0.32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
body.admin-page .wrap { max-width: 1080px; }

/* ═══════════════════════════════════════════
   SHARED HEADER (student + admin)
   ═══════════════════════════════════════════ */
.student-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body:not(.admin-page) .header-inner { max-width: 720px; }

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo-img {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand-title {
  font-size: 23px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}
.header-nav { display: flex; align-items: center; gap: 10px; }
.header-nav-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  padding: 7px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.header-nav-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ── Hamburger menu ── */
.menu-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.menu-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.menu-bar {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-btn.open .menu-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open .menu-bar:nth-child(2) { opacity: 0; }
.menu-btn.open .menu-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  min-width: 210px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  z-index: 200;
  animation: menu-in 0.18s ease;
}
[data-theme="bright"] .site-menu { box-shadow: 0 18px 44px rgba(43, 37, 25, 0.16); }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.site-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.site-menu-icon { flex-shrink: 0; display: block; }
.site-menu .icon-moon { display: none; }
[data-theme="bright"] .site-menu .icon-sun { display: none; }
[data-theme="bright"] .site-menu .icon-moon { display: block; }

/* ═══════════════════════════════════════════
   FOOTER (shared)
   ═══════════════════════════════════════════ */
.site-footer {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  padding: 30px 0 10px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   STUDENT PAGE — SEARCH / COUNTDOWN / RESULTS
   ═══════════════════════════════════════════ */

/* ── Search panel ── */
.search-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.search-field {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.search-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}
.search-field select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 42px 12px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa1ab' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 121, 255, 0.15);
}

/* ── Section combobox ── */
.combo { position: relative; }
.combo-input {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 42px 12px 40px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239aa1ab' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.combo-input::placeholder {
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
}
.combo-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 121, 255, 0.15);
}
.combo-input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 122, 104, 0.14);
}
.combo-error {
  margin: 0;
  font-size: 11.5px;
  color: var(--red);
}
.combo-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  padding: 5px;
  display: none;
}
.combo-list.open { display: block; }
.combo-item {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.combo-item:hover,
.combo-item.active {
  background: rgba(111, 121, 255, 0.16);
  color: var(--text);
}
.combo-empty {
  padding: 12px 13px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.search-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 26px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(111, 69, 187, 0.4);
}
.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.search-btn-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}
.search-btn:hover .search-btn-arrow { transform: translateX(3px); }

/* ── Countdown hero ── */
.countdown-hero {
  background: linear-gradient(145deg, rgba(111, 121, 255, 0.13), rgba(111, 69, 187, 0.13));
  border: 1px solid rgba(111, 121, 255, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 26px;
}
.countdown-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 600;
  margin: 0 0 7px;
}
.countdown-course {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.3;
}
.countdown-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.countdown-timer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.timer-block {
  width: 76px;
  padding: 11px 0 9px;
  text-align: center;
  background: var(--timer-bg);
  border: 1px solid rgba(111, 121, 255, 0.25);
  border-radius: 12px;
}
.timer-num {
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.timer-unit {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ── Exam live banner (countdown during exam window) ── */
.exam-live {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  border-radius: 14px;
  padding: 17px 22px;
}
.exam-live-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px rgba(92, 77, 190, 0.3);
  display: grid;
  place-items: center;
  font-size: 21px;
  flex-shrink: 0;
}
.exam-live-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.exam-live-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.exam-live-sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green);
}

/* ── Day picker ── */
.day-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}
.day-picker::-webkit-scrollbar { display: none; }
.day-card {
  width: 62px;
  height: 86px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--card);
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  transition: all 0.2s ease;
}
.day-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--card);
}
.day-card.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  border-color: var(--accent-text);
  box-shadow: 0 10px 28px rgba(92, 77, 190, 0.32);
  color: #fff;
}
.date-num {
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.date-week {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
}
.day-card.active .date-week { color: rgba(255, 255, 255, 0.85); }

/* ── Exam cards ── */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.exam-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.exam-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.exam-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.course-badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid rgba(111, 121, 255, 0.3);
  padding: 5px 13px;
  border-radius: 9px;
}
.slot-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 13px;
  border-radius: 20px;
  white-space: nowrap;
}
.slot-pill.slot-a {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.slot-pill.slot-b {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}
.slot-pill.slot-c {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid var(--info-border);
}
.exam-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin: 0 0 16px;
}
.exam-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}
.exam-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
}
.meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.meta-value {
  font-size: 15px;
  color: var(--text);
}
.meta-time {
  color: var(--accent-text);
  font-weight: 600;
}
.meta-teacher {
  font-weight: 700;
}
.meta-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.rooms-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 11px;
}
.room-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.room-chip {
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  padding: 7px 10px;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(92, 77, 190, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.chip-seats {
  opacity: 0.72;
  font-weight: 500;
  font-size: 0.88em;
}

/* ── Empty / loading states ── */
.empty-state {
  text-align: center;
  padding: 54px 20px;
  color: var(--text-faint);
}
.empty-state-icon { font-size: 38px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   ADMIN PAGE
   ═══════════════════════════════════════════ */
body.admin-page .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 24px;
}
body.admin-page .panel h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px;
}
body.admin-page .panel h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-body);
  margin: 0 0 12px;
}
body.admin-page .hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.6;
}
.login-error { color: var(--red) !important; }

/* ── Form elements ── */
body.admin-page label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 500;
}
body.admin-page input,
body.admin-page select,
body.admin-page textarea {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.admin-page input::placeholder { color: var(--text-faint); }
body.admin-page input:focus,
body.admin-page select:focus,
body.admin-page textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 121, 255, 0.15);
}
body.admin-page select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa1ab' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ── Buttons ── */
body.admin-page button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
body.admin-page button:hover {
  box-shadow: 0 6px 18px rgba(111, 69, 187, 0.35);
  filter: brightness(1.08);
}
body.admin-page button.secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
body.admin-page button.secondary:hover {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: none;
  filter: none;
}
body.admin-page button.danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}
body.admin-page button.danger:hover {
  background: var(--red-softer);
  box-shadow: none;
  filter: none;
}
body.admin-page button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Toolbar / fields ── */
body.admin-page .toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
body.admin-page .spacer { flex: 1; }
body.admin-page .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
}
body.admin-page .search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ── Sessions list ── */
body.admin-page .session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  background: var(--bg);
  transition: border-color 0.2s ease;
}
body.admin-page .session-item:hover { border-color: var(--border-hover); }
body.admin-page .session-item strong {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
body.admin-page .session-item .meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 3px;
}
body.admin-page .status-pill {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
body.admin-page .status-pill.draft {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}
body.admin-page .status-pill.published {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
}

/* ── Dropzone ── */
body.admin-page .dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  display: block;
  transition: border-color 0.2s ease, background 0.2s ease;
}
body.admin-page .dropzone:hover,
body.admin-page .dropzone.drag {
  border-color: var(--accent);
  background: rgba(111, 121, 255, 0.06);
  color: var(--text-body);
}

/* ── Review grid ── */
body.admin-page .grid-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}
body.admin-page .grid-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
body.admin-page .grid-scroll::-webkit-scrollbar-track { background: var(--bg); }
body.admin-page .grid-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 6px;
}
body.admin-page .grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
body.admin-page .grid-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 8px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
  white-space: nowrap;
}
body.admin-page .grid-table td {
  border-bottom: 1px solid var(--border);
  padding: 4px;
}
body.admin-page .grid-table input {
  width: 100%;
  padding: 7px 9px;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}
body.admin-page .grid-table input:hover { border-color: var(--border-strong); }
body.admin-page .grid-table input:focus {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: none;
}

/* ── Toast ── */
body.admin-page .toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card);
  color: var(--text);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 999;
  max-width: 340px;
}
body.admin-page .toast.error { border-left-color: var(--red); }

/* ── Login shell ── */
body.admin-page .login-shell {
  max-width: 380px;
  margin: 90px auto 0;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 520px) {
  .wrap { padding: 16px 14px 50px; }
  .header-inner { padding: 12px 14px; }
  .header-logo-img { height: 40px; }
  .brand-title { font-size: 18px; }
  .menu-btn { width: 36px; height: 36px; }
  .site-menu { right: 14px; }
  .search-panel { padding: 16px; }
  .search-form { flex-direction: column; }
  .search-btn { width: 100%; }
  .countdown-hero { padding: 18px 16px; }
  .countdown-course { font-size: 18px; }
  .timer-block { width: calc(25% - 8px); min-width: 64px; padding: 9px 0 7px; }
  .timer-num { font-size: 21px; }
  .exam-live { padding: 14px 16px; gap: 12px; }
  .exam-live-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }
  .exam-live-title { font-size: 14.5px; }
  .exam-live-sub { font-size: 12px; }
  .day-card { width: 58px; height: 80px; }
  .date-num { font-size: 21px; }
  .exam-card { padding: 18px; }
  .exam-title { font-size: 17px; }
  .room-chip { font-size: 13px; padding: 7px 14px; }
  body.admin-page .panel { padding: 18px; }
  body.admin-page .session-item { flex-direction: column; align-items: stretch; }
  body.admin-page .toolbar { gap: 8px; }
  body.admin-page .toolbar input { max-width: 100% !important; }
}
