
:root {
  --navy-900: #0b1f36;
  --navy-800: #122d49;
  --navy-700: #173f62;
  --navy-600: #1d4d74;
  --navy-500: #2b5f8a;
  --sky-100: #eef6ff;
  --sky-200: #dfeeff;
  --sky-300: #c8dfff;
  --blue-700: #2d6cdf;
  --blue-600: #1d72d9;
  --ink-900: #1a2432;
  --ink-800: #243447;
  --ink-700: #394d60;
  --muted: #627385;
  --line: #e5edf5;
  --line-strong: #d8e3ee;
  --bg: #f3f7fb;
  --panel: #ffffff;
  --panel-alt: #f8fbff;
  --success: #0f9a6d;
  --success-bg: #eafaf4;
  --warning: #c7871c;
  --warning-bg: #fff6e3;
  --danger: #d05a5a;
  --danger-bg: #fff0f0;
  --purple: #6f60d8;
  --purple-bg: rgba(111, 96, 216, 0.09);
  --shadow-soft: 0 18px 38px rgba(14, 34, 52, 0.08);
  --shadow-card: 0 10px 26px rgba(23, 42, 62, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  overflow-x: hidden;
  background: linear-gradient(180deg, #edf5ff 0%, #f7f9fc 34%, #eef3f7 100%);
  color: var(--ink-900);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 800 17px/1 "Manrope", sans-serif;
  letter-spacing: -0.7px;
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: transparent;
  color: var(--navy-900);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.9px;
  overflow: visible;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.auth-shell {
  display: grid;
  grid-template-columns: 48% 52%;
  min-height: 100vh;
  background: linear-gradient(135deg, #f7fbff 0%, #edf5ff 100%);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 7% 30px;
  background: linear-gradient(145deg, #0b1d34 0%, #173c5a 42%, #1d4f7b 100%);
  color: #fff;
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -200px;
  bottom: -200px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 0 54px rgba(255,255,255,0.028), 0 0 0 110px rgba(255,255,255,0.015);
}
.auth-pitch {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin-top: -18px;
}
.eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 800;
  color: #9ebbd9;
}
.eyebrow.light { color: #b2caea; }
.auth-pitch h1 {
  margin: 18px 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.09em;
}
.auth-pitch h1 em {
  font-style: normal;
  color: #9ec6ff;
}
.auth-pitch p {
  max-width: 420px;
  color: rgba(226, 235, 246, 0.9);
  font-size: 1.05rem;
  line-height: 1.8;
}
.auth-points {
  display: grid;
  gap: 14px;
  margin-top: 30px;
  color: #edf5ff;
  font-weight: 600;
}
.point-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  color: #a8d1ff;
  font-size: 11px;
}
.auth-foot {
  position: relative;
  z-index: 1;
  color: rgba(166, 186, 209, 0.9);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
}
.auth-card {
  width: min(100%, 420px);
  padding: 30px 30px 26px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.auth-card h2 {
  margin: 14px 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: -0.06em;
}
.muted {
  color: var(--muted);
  line-height: 1.65;
}
.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
label {
  display: block;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
input, select, textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfdff;
  color: var(--ink-900);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(45, 108, 223, 0.75);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.09);
}
textarea {
  resize: vertical;
  min-height: 110px;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #102b46 0%, #1a4c75 100%);
  color: white;
  box-shadow: 0 12px 18px rgba(16, 43, 70, 0.16);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #163a59 0%, #1f5b85 100%);
}
.btn-secondary {
  background: linear-gradient(135deg, #edf5ff 0%, #e7f0ff 100%);
  color: var(--blue-700);
}
.btn-small {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
}
.btn-quiet {
  background: #eef3f8;
  color: var(--ink-700);
}
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn-full { width: 100%; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: #8ea4b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.avatar-blue { background: rgba(45, 108, 223, 0.12); color: var(--blue-700); }
.avatar-green { background: rgba(15, 154, 109, 0.12); color: var(--success); }
.avatar-purple { background: rgba(111, 96, 216, 0.14); color: var(--purple); }
.auth-note {
  margin-top: 14px;
  color: #8da0b5;
  font-size: 11px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 26px 16px 16px;
  background: linear-gradient(180deg, #0d233d 0%, #102f4d 100%);
  color: #dfeaf7;
  box-shadow: 10px 0 28px rgba(15, 31, 48, 0.14);
  z-index: 20;
}
.sidebar-brand { padding: 0 8px 18px; }
.school-tag,
.faculty-tag,
.workspace-label {
  padding: 0 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.school-tag {
  font-size: 10px;
  color: #d2e4ff;
}
.faculty-tag {
  padding-top: 6px;
  padding-bottom: 18px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #9ec2ef;
  text-transform: none;
}
.workspace-label {
  padding-top: 18px;
  padding-bottom: 10px;
  color: #7695af;
  font-size: 9px;
}
.side-nav {
  display: grid;
  gap: 6px;
  margin-right: -2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #bfd0e3;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.nav-item.active {
  background: linear-gradient(90deg, #1d4a70 0%, #2b5c84 100%);
  color: white;
  box-shadow: inset 3px 0 0 #a9d4ff;
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
}
.nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  color: white;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
}
.help-card {
  width: 100%;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: linear-gradient(135deg, #173b5a 0%, #123451 100%);
  box-shadow: 0 18px 24px rgba(7, 19, 31, 0.16);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.help-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 28px rgba(7, 19, 31, 0.2);
}
.help-icon {
  color: #a3caff;
  font-size: 18px;
  margin-bottom: 8px;
}
.help-card b { display: block; color: white; }
.help-card p {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: #a8bed6;
}
.profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 14px 6px 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: white;
  text-align: left;
}
.profile-meta {
  display: grid;
  gap: 4px;
  flex: 1;
}
.profile-meta b {
  font-size: 11px;
  line-height: 1.4;
}
.profile-meta small {
  color: #9db6ce;
  font-size: 10px;
}
.profile-more {
  color: #9cb0c5;
  letter-spacing: 2px;
}
.logout-button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #edf5ff;
  font-weight: 700;
}

.main-area {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 75px;
  padding: 0 28px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 18px rgba(15, 35, 56, 0.03);
}
.mobile-menu { display: none; }
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.breadcrumb b {
  color: var(--ink-900);
}
.breadcrumb span { margin: 0 6px; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.today-label {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0f5ff;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 700;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #f3f7fb;
  color: #475d73;
  position: relative;
}
#notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 2px #fff;
}
.notification-button.has-unread #notification-dot { background: #f15b56; }
.top-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  color: var(--ink-900);
  font-weight: 700;
}
.top-user > span:last-child { color: var(--muted); }

.page-content {
  flex: 1;
  padding: 30px 28px 22px;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.page-heading h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  letter-spacing: -0.06em;
  color: var(--ink-900);
}
.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-grid,
.content-grid,
.quick-actions,
.lecturer-grid,
.slot-grid {
  display: grid;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--shadow-card);
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
}
.stat-icon.tone-blue { background: #edf5ff; color: var(--blue-700); }
.stat-icon.tone-green { background: var(--success-bg); color: var(--success); }
.stat-icon.tone-amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.tone-purple { background: var(--purple-bg); color: var(--purple); }
.stat-value {
  margin: 18px 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.stat-foot {
  font-size: 12px;
  color: var(--muted);
}

.content-grid {
  grid-template-columns: 1.45fr 0.8fr;
  gap: 18px;
}
.panel,
.table-panel,
.lecturer-card,
.slot-card,
.quick-action,
.empty-state,
.modal {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.panel {
  padding: 18px 18px 10px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.panel-head h3,
.panel-head .h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.text-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue-700);
  font-weight: 700;
}
.muted-small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.appointment-list {
  display: grid;
  gap: 4px;
}
.appointment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.appointment-row:first-child { border-top: 0; }
.date-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f1f7ff 0%, #eef3f8 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  text-align: center;
}
.date-tile b {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.date-tile small {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.appointment-info {
  min-width: 0;
}
.appointment-info b {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}
.appointment-info small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 800;
  text-transform: uppercase;
}
.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(199, 135, 28, 0.18);
}
.status-approved {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(15, 154, 109, 0.15);
}
.status-rejected,
.status-cancelled {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(208, 90, 90, 0.12);
}
.status-rescheduled {
  background: #eef2ff;
  color: #4a5ec4;
  border-color: rgba(74, 94, 196, 0.12);
}

.quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.quick-action {
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  min-height: 120px;
  text-align: left;
  color: var(--ink-900);
}
.quick-action span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf5ff 0%, #e9f2ff 100%);
  color: var(--blue-700);
  font-size: 16px;
}
.quick-action b {
  font-size: 1rem;
}
.quick-action small {
  color: var(--muted);
  line-height: 1.5;
}
.quick-action:hover,
.lecturer-card:hover,
.slot-card:hover { box-shadow: 0 16px 26px rgba(16, 37, 61, 0.08); }

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.notice-item:first-child { border-top: 0; }
.notice-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue-700);
  box-shadow: 0 0 0 5px rgba(45, 108, 223, 0.12);
}
.notice-item b { display: block; margin-bottom: 4px; }
.notice-item p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.6;
}
.notice-item small { color: #8ea0b2; }
.inline-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f9ff 0%, #eef5ff 100%);
  border: 1px solid rgba(45, 108, 223, 0.12);
  color: var(--ink-800);
  line-height: 1.7;
}
.tech-stack-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.tech-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7fafe;
  border: 1px solid var(--line);
}
.tech-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tech-item strong {
  color: var(--ink-900);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.search-box {
  position: relative;
  flex: 1;
}
.search-box span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
}
.search-box input {
  padding-left: 38px;
}
.filter-bar select {
  min-width: 150px;
  max-width: 180px;
}

.lecturer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.lecturer-card {
  padding: 18px;
}
.lecturer-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.lecturer-card-top h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.lecturer-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.lecturer-card .bio {
  margin: 0 0 16px;
  color: var(--ink-700);
  line-height: 1.7;
}
.lecturer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f7ff;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 700;
}

.slot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.slot-card {
  padding: 16px;
}
.slot-card b {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}
.slot-card small {
  display: block;
  color: var(--muted);
}
.slot-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.slot-open {
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-panel {
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
th, td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: #f7faff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
tbody tr:hover { background: rgba(45, 108, 223, 0.015); }
td strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}
td small {
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  padding: 24px 18px;
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef6ff;
  color: var(--blue-700);
  font-size: 22px;
}
.empty-state b {
  font-size: 1.05rem;
}
.empty-state p {
  margin: 0;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.6;
}

.user-menu {
  position: fixed;
  z-index: 999;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 20px 34px rgba(15, 35, 56, 0.16);
}
.user-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  color: var(--ink-800);
  font-weight: 600;
}
.user-menu button:hover {
  background: #f4f8ff;
  color: var(--navy-800);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(12, 26, 41, 0.5);
  padding: 24px;
}
.modal {
  width: min(100%, 560px);
  padding: 22px;
  box-shadow: 0 30px 80px rgba(11, 26, 43, 0.26);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
}
.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #edf3fa;
  color: var(--ink-700);
  font-size: 24px;
  line-height: 1;
}
.modal-form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 8px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  gap: 10px;
}
.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(9, 24, 39, 0.92);
  color: white;
  box-shadow: 0 18px 36px rgba(16, 34, 51, 0.2);
  font-weight: 700;
}
.toast.error {
  background: rgba(168, 54, 54, 0.96);
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 28px 20px;
  color: #6f8396;
  font-size: 12px;
}
.app-footer span { color: #8ea4b7; }
.footer-right {
  margin-left: auto;
}

.mobile-brand { display: none; }

@media (max-width: 1150px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lecturer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--navy-900);
    font-weight: 800;
  }
  .mobile-brand .brand-mark {
    background: linear-gradient(135deg, #102b46 0%, #1d4d74 100%);
    color: white;
  }
  .auth-panel { padding: 30px 18px 40px; }
  .sidebar {
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 0 100vmax rgba(9, 24, 40, 0.35);
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-menu {
    display: block;
    border: 0;
    background: transparent;
    padding: 6px 8px;
    color: #51677d;
    font-size: 22px;
  }
  .topbar { padding: 0 16px; }
  .page-content { padding: 22px 16px 18px; }
  .today-label { display: none; }
  .topbar-actions { gap: 8px; }
  .top-user > span:not(.avatar) { display: none; }
  .top-user { padding: 6px; }
  .app-footer { padding: 12px 16px 18px; }
  .footer-right { display: none; }
}

@media (max-width: 560px) {
  .page-heading {
    display: block;
  }
  .heading-actions {
    margin-top: 12px;
  }
  .stats-grid,
  .lecturer-grid,
  .slot-grid,
  .quick-actions,
  .field-grid {
    grid-template-columns: 1fr;
  }
  .search-box input { min-width: 0; }
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-bar select {
    min-width: 0;
    max-width: none;
  }
  .appointment-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }
  .appointment-row .status,
  .appointment-row .btn { justify-self: start; }
  .appointment-row .status { grid-column: 2; }
  .appointment-row .btn { grid-column: 2; }
  .app-footer { display: none; }
  .auth-card { padding: 22px 18px; }
  .auth-card h2 { font-size: 1.9rem; }
  .modal { padding: 18px; }
  .modal-actions { justify-content: stretch; }
  .modal-actions .btn { flex: 1; }
}
