/* Admin workspace v4 */
body.admin-page {
  --admin-sidebar: 248px;
  --admin-topbar: 76px;
  --admin-content: 1240px;
  background: radial-gradient(circle at 92% 4%, rgba(43, 111, 235, .08), transparent 26rem), #f3f6fa;
}

body.admin-page .site-header { min-height: var(--admin-topbar); }
body.admin-page .admin-sidebar {
  width: var(--admin-sidebar);
  top: var(--admin-topbar);
  padding: 25px 16px 18px;
}
body.admin-page .admin-main.container {
  margin-top: var(--admin-topbar);
  margin-left: var(--admin-sidebar);
  padding: 28px clamp(22px, 3vw, 44px) 56px;
  min-height: calc(100vh - var(--admin-topbar));
}
body.admin-page .admin-main > * {
  width: min(100%, var(--admin-content));
  margin-left: auto;
  margin-right: auto;
}
body.admin-page .admin-page-heading {
  min-height: 94px;
  margin-bottom: 18px;
  padding: 5px 0 20px;
}
body.admin-page .admin-page-heading h1 {
  font-size: clamp(1.75rem, 2.35vw, 2.25rem);
  letter-spacing: -.045em;
}
body.admin-page .card {
  border: 1px solid #dce5f0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(16, 39, 70, .045);
}
body.admin-page .card > h2:first-child,
body.admin-page .card > h3:first-child {
  margin-top: 0;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e9f2;
}
body.admin-page input,
body.admin-page select,
body.admin-page textarea {
  min-height: 46px;
  border-color: #cbd8e8;
  border-radius: 11px;
  background: #fff;
}
body.admin-page textarea { min-height: 96px; }
body.admin-page .row { gap: 7px; }
body.admin-page .row > label:first-child {
  color: #263b59;
  font-size: .82rem;
  font-weight: 700;
}
body.admin-page .btn {
  min-height: 43px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 700;
}
.admin-avatar {
  overflow: hidden;
}
.admin-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: #f8fafc;
}
.profile-avatar-preview {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  flex: 0 0 88px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 24px;
  color: #fff;
  background: #1768ae;
  box-shadow: 0 8px 22px rgba(17, 54, 92, .14);
  font-size: 1.6rem;
  font-weight: 800;
}
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-copy {
  display: grid;
  gap: 4px;
}
.profile-avatar-copy > strong {
  color: #1d3552;
  font-size: .86rem;
}
.profile-avatar-copy > p {
  margin: 0 0 7px;
  color: #76869b;
  font-size: .72rem;
}
.profile-avatar-copy > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.avatar-upload-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 9px;
  color: #fff;
  background: #2468e5;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 700;
}
.avatar-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.avatar-remove-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b23842;
  font-size: .7rem;
  font-weight: 650;
}
.avatar-remove-option input {
  width: 15px;
  height: 15px;
  min-height: 15px;
}

/* Consistent admin action language */
.action-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  white-space: nowrap;
}
.action-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-save,
.action-approve {
  border-color: #118563 !important;
  color: #fff !important;
  background: #118563 !important;
  box-shadow: 0 8px 18px rgba(17,133,99,.16) !important;
}
.action-save:hover,
.action-approve:hover { background: #0b7154 !important; }
.action-delete {
  border-color: #d83b45 !important;
  color: #fff !important;
  background: #d83b45 !important;
  box-shadow: 0 8px 18px rgba(216,59,69,.15) !important;
}
.action-delete:hover { background: #be2933 !important; }
.action-close {
  border-color: #e2a72e !important;
  color: #704b00 !important;
  background: #fff4d6 !important;
  box-shadow: none !important;
}
.action-add {
  border-color: #2468e5 !important;
  color: #fff !important;
  background: #2468e5 !important;
}
.action-edit,
.action-view {
  border-color: #c9d7e8 !important;
  color: #24405f !important;
  background: #fff !important;
  box-shadow: none !important;
}
.action-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Dashboard */
body.admin-page-dashboard .dashboard {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
body.admin-page-dashboard .dashboard .stat {
  position: relative;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-top: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 39, 70, .04);
}
body.admin-page-dashboard .dashboard .stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2868df;
}
body.admin-page-dashboard .dashboard .stat::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  right: -29px;
  top: -29px;
  border: 16px solid rgba(40, 104, 223, .065);
  border-radius: 50%;
}
body.admin-page-dashboard .dashboard .stat h2 {
  margin: 3px 0 22px;
  color: #081d3d;
  font-size: 2rem;
  line-height: 1;
}
body.admin-page-dashboard .dashboard .stat p {
  margin: 0;
  color: #65758e;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.35;
}
body.admin-page-dashboard .dashboard .stat > span {
  display: inline-flex;
  margin-bottom: 12px;
  color: #6c7d94;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.dashboard-livebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px !important;
  margin-bottom: 14px !important;
  color: #118563;
  font-size: .72rem;
  font-weight: 750;
}
.dashboard-livebar small {
  padding-left: 9px;
  border-left: 1px solid #ced9e7;
  color: #8390a3;
  font-size: .68rem;
  font-weight: 500;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19ad82;
  box-shadow: 0 0 0 5px rgba(25,173,130,.12);
}
.stat-cyan::before { background: #17a7c7 !important; }
.stat-amber::before { background: #e3a51e !important; }
.stat-green::before { background: #139267 !important; }
.stat-red::before { background: #d84b55 !important; }
.stat-slate::before { background: #60728d !important; }
.card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e9f2;
}
.card-heading-row h3,
.quick-action-card h3 {
  margin: 2px 0 0;
  color: #0b2243;
}
.section-kicker {
  color: #2a68de;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.text-action,
.icon-link {
  color: #2a68de;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.icon-link {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd9ea;
  border-radius: 10px;
}
.status-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.status-progress {
  padding: 15px;
  border-radius: 13px;
  background: #f7f9fc;
}
.status-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  color: #52657f;
  font-size: .76rem;
}
.status-progress strong { color: #102b50; font-size: .9rem; }
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .35s ease;
}
.status-pending i { background: #e2a72e; }
.status-approved i { background: #15946a; }
.status-cancelled i { background: #d84b55; }
.erph-dashboard-card { overflow: hidden; }
.erph-dashboard-heading small {
  display: block;
  margin-top: 5px;
  color: #7c8ba0;
  font-size: .66rem;
}
.erph-dashboard-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.erph-dashboard-summary article {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 82px;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid #e1e8f1;
  border-radius: 13px;
  background: #f8fafd;
}
.erph-dashboard-summary article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #6f8199;
}
.erph-dashboard-summary article.submitted::before { background: #2a68de; }
.erph-dashboard-summary article.reviewed::before { background: #15946a; }
.erph-dashboard-summary article.pending::before { background: #e2a72e; }
.erph-dashboard-summary article.revision::before { background: #d84b55; }
.erph-dashboard-summary span {
  color: #6b7b91;
  font-size: .64rem;
  font-weight: 750;
}
.erph-dashboard-summary strong {
  color: #102b50;
  font-size: 1.35rem;
  line-height: 1;
}
.erph-teacher-list {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #e1e8f1;
  border-radius: 14px;
  background: #fff;
}
.erph-teacher-list-head,
.erph-teacher-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.7fr) repeat(4, minmax(78px, .55fr));
  align-items: center;
  gap: 10px;
}
.erph-teacher-list-head {
  padding: 11px 16px;
  color: #76869b;
  background: #f4f7fb;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.erph-teacher-list-head span:not(:first-child) { text-align: center; }
.erph-teacher-list-body {
  max-height: 390px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.erph-teacher-row {
  min-height: 62px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf1f6;
}
.erph-teacher-row:last-child { border-bottom: 0; }
.erph-teacher-row > div { display: grid; gap: 3px; }
.erph-teacher-row a {
  color: #183554;
  font-size: .75rem;
  font-weight: 750;
  text-decoration: none;
}
.erph-teacher-row a:hover { color: #2a68de; }
.erph-teacher-row small { color: #8a97a8; font-size: .6rem; }
.erph-teacher-row > strong {
  justify-self: center;
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #53667e;
  background: #f0f3f7;
  font-size: .7rem;
  text-align: center;
}
.erph-teacher-row > strong.is-reviewed { color: #0c7856; background: #e9f8f2; }
.erph-teacher-row > strong.is-pending { color: #926511; background: #fff6df; }
.erph-teacher-row > strong.is-revision { color: #b13b46; background: #fff0f1; }
.erph-teacher-row > strong::before { display: none; }
.erph-teacher-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: #8794a6;
  font-size: .75rem;
}
.dashboard-content-grid { align-items: stretch; }
.dashboard-list-card { min-height: 390px !important; }
.dashboard-list,
.activity-feed { display: grid; }
.upcoming-item {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}
.upcoming-item:last-child,
.activity-item:last-child { border-bottom: 0; }
.date-tile {
  width: 43px;
  height: 47px;
  display: grid;
  place-content: center;
  border-radius: 11px;
  color: #1f61d5;
  background: #edf4ff;
  text-align: center;
}
.date-tile strong { font-size: .95rem; line-height: 1; }
.date-tile span { margin-top: 3px; font-size: .54rem; font-weight: 800; }
.upcoming-item > div:nth-child(2) { display: grid; gap: 2px; }
.upcoming-item > div:nth-child(2) strong { color: #18314f; font-size: .79rem; }
.upcoming-item > div:nth-child(2) span,
.upcoming-item > div:nth-child(2) small { color: #718198; font-size: .66rem; }
.mini-status {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0b7154;
  background: #e8f8f2;
  font-size: .6rem;
  font-weight: 750;
}
.activity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}
.activity-marker {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2a68de;
  box-shadow: 0 0 0 2px #bcd1f7;
}
body.admin-page-dashboard .activity-item p {
  padding: 1px 0 !important;
  border: 0 !important;
  color: #66778e;
  font-size: .7rem;
  line-height: 1.45;
}
.activity-item strong {
  color: #253e5c;
  font-size: .7rem;
  text-transform: capitalize;
}
.activity-item small { color: #9aa5b4; font-size: .6rem; }
.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #8794a6;
  font-size: .78rem;
  text-align: center;
}
.quick-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.quick-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.admin-page-dashboard .admin-main > .card,
body.admin-page-dashboard .admin-main > .grid-2 { margin-bottom: 18px; }
body.admin-page-dashboard .admin-main > .grid-2 { gap: 18px; }
body.admin-page-dashboard .admin-main > .grid-2 > .card {
  margin: 0;
  min-height: 280px;
}
body.admin-page-dashboard .card p {
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid #edf1f6;
  line-height: 1.55;
}
body.admin-page-dashboard .card p:last-child { border-bottom: 0; }
body.admin-page-dashboard .card .grid-3 { gap: 16px; }
body.admin-page-dashboard .card .grid-3 > div {
  padding: 14px;
  border-radius: 12px;
  background: #f7f9fc;
}

/* Booking management */
body.admin-page-bookings .admin-main > section.card { padding: 22px; }
.booking-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.booking-list-heading > div:first-child { display: grid; gap: 3px; }
.booking-list-heading > div:first-child > span {
  color: #1763d8;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.booking-list-heading h2 { margin: 0; font-size: 1.35rem; }
.booking-list-heading p { margin: 0; color: #718196; font-size: .72rem; }
.booking-list-heading p strong { color: #263b55; }
.booking-list-heading > .btn { flex: 0 0 auto; }
.booking-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(175px, .35fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  margin: 0 0 16px;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  background: #f7f9fc;
}
.booking-filterbar input,.booking-filterbar select { min-height: 42px; border-radius: 8px; }
.booking-filterbar .btn { min-height: 42px; min-width: 95px; justify-content: center; }
.booking-filterbar > a { padding: 0 8px; color: #64778c; font-size: .72rem; font-weight: 700; text-align: center; }
body.admin-page-bookings .admin-main > section.card > .grid-3:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
body.admin-page-bookings .admin-main > section.card > .grid-3:first-child h2 {
  flex: 1;
  margin: 0;
  font-size: 1.35rem;
}
body.admin-page-bookings .admin-main > section.card > .grid-3:first-child .btn {
  width: auto;
  white-space: nowrap;
}
body.admin-page-bookings .admin-main > section.card > form.grid-3 {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, .38fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: #f7f9fc;
}
body.admin-page-bookings .admin-main > section.card > form.grid-3 .btn { min-width: 112px; }
.booking-management-table { min-width: 980px; }
.booking-management-table th {
  padding: 12px 13px;
  color: #60728d;
  font-size: .72rem;
  letter-spacing: .045em;
}
.booking-management-table td {
  padding: 13px;
  vertical-align: middle;
}
.booking-management-table tbody tr { transition: background .16s ease; }
.booking-management-table tbody tr:hover { background: #f8fbff; }
.booking-reference { color: #195bc4; font-size: .73rem; white-space: nowrap; }
.booking-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--status-color) 42%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--status-color) 76%, #15283e);
  background: color-mix(in srgb, var(--status-color) 12%, white);
  font-size: .66rem;
  font-weight: 750;
  white-space: nowrap;
}
.booking-status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: var(--status-color); content: ""; }
.booking-actions { display: flex; align-items: center; gap: 6px; }
.booking-actions > .btn { min-height: 35px !important; padding: 0 10px !important; }
.booking-row-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 155px;
}
.booking-row-actions > a,
.booking-row-actions > .btn {
  min-height: 35px !important;
  padding: 0 11px !important;
  border-radius: 9px !important;
  font-size: .76rem !important;
}
.row-action-menu { position: relative; }
.row-action-menu summary {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  color: #263b59;
  background: #fff;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 700;
  list-style: none;
}
.row-action-menu summary::-webkit-details-marker { display: none; }
.row-action-menu[open] summary {
  border-color: #2868df;
  color: #1457cf;
}
.row-action-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  padding: 7px;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(17, 38, 68, .16);
}
.row-action-popover form,
.row-action-popover button { width: 100%; }
.row-action-popover form { margin: 0; }
.row-action-popover button {
  min-height: 36px !important;
  margin: 2px 0;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px !important;
  background: transparent;
  color: #263b59;
  box-shadow: none;
}
.row-action-popover button:hover {
  background: #edf4ff;
  color: #1457cf;
}

/* Admin add booking */
.admin-booking-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  align-items: start;
  gap: 18px;
}
.admin-booking-fields {
  display: grid;
  gap: 16px;
}
.admin-booking-form .card { margin: 0; }
.form-section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e2e9f2;
}
.form-section-heading h2 {
  margin: 0 0 2px;
  color: #0b2243;
  font-size: 1.05rem;
}
.form-section-heading p {
  margin: 0;
  color: #75849a;
  font-size: .76rem;
}
.form-step {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  border-radius: 11px;
  color: #fff;
  background: #102b50;
  font-size: .74rem;
  font-weight: 800;
}
.compact-form-grid { gap: 15px; }
.compact-form-grid .field-wide { grid-column: 1 / -1; }
.time-field-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 15px;
}
.equipment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.check-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #d6e0ec;
  border-radius: 10px;
  color: #31445f;
  background: #f8fafc;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 650;
}
.check-option:has(input:checked) {
  border-color: #4f83eb;
  color: #1457cf;
  background: #edf4ff;
}
.check-option input {
  width: 16px;
  min-height: 16px !important;
  height: 16px;
  margin: 0;
}
.admin-booking-summary {
  position: sticky;
  top: calc(var(--admin-topbar, 76px) + 20px);
}
.summary-card { border-top: 4px solid #2868df !important; }
.summary-eyebrow {
  color: #2868df;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.summary-card h2 {
  margin: 7px 0 6px;
  color: #0b2243;
  font-size: 1.25rem;
}
.summary-card > p {
  margin: 0;
  color: #74839a;
  font-size: .78rem;
  line-height: 1.55;
}
.summary-rule {
  height: 1px;
  margin: 18px 0;
  background: #e2e9f2;
}
.summary-card .row { margin-bottom: 15px; }
.summary-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 2px;
}
.summary-calendar-link {
  display: block;
  margin-top: 14px;
  color: #526781;
  font-size: .75rem;
  font-weight: 650;
  text-align: center;
}

/* Settings: one focused section at a time */
.settings-tabs {
  position: sticky;
  z-index: 20;
  top: calc(var(--admin-topbar, 76px) + 10px);
  display: flex;
  gap: 5px;
  padding: 6px;
  margin-bottom: 16px !important;
  overflow-x: auto;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(16, 39, 70, .07);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: #60728d;
  background: transparent;
  cursor: pointer;
  font: 700 .75rem/1 Poppins, sans-serif;
  white-space: nowrap;
}
.settings-tabs button:hover {
  color: #1457cf;
  background: #f0f5fd;
}
.settings-tabs button.active {
  color: #fff;
  background: #1e63dc;
  box-shadow: 0 6px 15px rgba(30, 99, 220, .22);
}
body.admin-page-settings .settings-panel {
  display: none;
  animation: adminPanelIn .25s ease both;
}
body.admin-page-settings .settings-panel.settings-panel-active { display: block; }
body.admin-page-settings .settings-panel > form.grid-2,
body.admin-page-settings .settings-panel > form.grid-3 { gap: 15px; }
body.admin-page-settings .settings-panel .table-wrap { margin-top: 18px; }
.maintenance-mode-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border: 1px solid #f0c977;
  border-radius: 13px;
  background: #fff9e9;
}
.maintenance-mode-control > div { display: grid; gap: 3px; }
.maintenance-mode-control strong { color: #6f4b00; font-size: .82rem; }
.maintenance-mode-control > div span { color: #8a7347; font-size: .7rem; }
.switch-control {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  white-space: nowrap;
}
.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .2s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: .2s ease;
}
.switch-control input:checked + .switch-track { background: #d94751; }
.switch-control input:checked + .switch-track::after { transform: translateX(20px); }
.switch-label { color: #5e6d82; font-size: .7rem; font-weight: 700; }
.settings-create-form {
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #dce5f0;
  border-radius: 13px;
  background: #f8fafc;
}
.settings-create-form .action-button { min-width: 140px; }
.settings-record-table {
  display: block;
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.settings-record-table thead { display: none; }
.settings-record-table tbody {
  display: grid;
  gap: 11px;
}
.settings-record-table .settings-record {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 16px;
  border: 1px solid #dce5f0;
  border-radius: 13px;
  background: #fff;
}
.settings-record-table .settings-record > td {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 0;
  border: 0;
  color: #304762;
  font-size: .78rem;
}
.settings-record-table .settings-record > td::before {
  content: attr(data-label);
  color: #8a98aa;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.settings-record-table .settings-action-cell {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: end !important;
  flex-wrap: wrap;
  gap: 8px !important;
  padding-top: 13px !important;
  border-top: 1px solid #edf1f6 !important;
}
.settings-record-table .settings-action-cell::before { display: none; }
.settings-record-form {
  min-width: 0;
  flex: 1 1 650px;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
  align-items: end;
  gap: 9px !important;
  margin: 0 !important;
}
.settings-delete-form {
  flex: 0 0 auto;
  margin: 0 !important;
}
.settings-record-form input,
.settings-record-form select { min-width: 0; }
.settings-record-form .action-save,
.settings-delete-form .action-delete {
  min-width: 105px;
}
@keyframes adminPanelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.settings-help {
  max-width: 760px;
  margin: -4px 0 16px;
  color: #667789;
  font-size: .76rem;
  line-height: 1.6;
}
.page-settings form label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: #647488;
  font-size: .68rem;
  font-weight: 700;
}
.page-settings form label strong {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #25384d;
}

/* Compact class and subject catalogues */
.settings-catalog-panel { overflow: hidden; }
.settings-catalog-create.settings-create-form {
  display: grid !important;
  grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1.15fr) 90px 105px 145px !important;
  align-items: end;
  gap: 10px !important;
  padding: 14px 16px !important;
  margin: 0 0 18px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f4f7fb !important;
}
.settings-catalog-create label { margin: 0; }
.settings-catalog-create input,
.settings-catalog-edit input {
  min-height: 42px;
  border-color: #d4deea;
  border-radius: 8px;
  background: #fff;
}
.settings-catalog-create .btn { min-height: 42px; justify-content: center; }
.catalog-order input,
.catalog-order-input { text-align: center; }
.catalog-toggle {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0;
  cursor: pointer;
}
.catalog-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.catalog-toggle i {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 34px;
  border-radius: 999px;
  background: #b8c4d1;
  transition: .2s ease;
}
.catalog-toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(18, 38, 62, .2);
  content: "";
  transition: .2s ease;
}
.catalog-toggle input:checked + i { background: #168b6c; }
.catalog-toggle input:checked + i::after { transform: translateX(14px); }
.catalog-toggle > span:last-child {
  margin: 0 !important;
  color: #42566d !important;
  font-size: .7rem !important;
  font-weight: 700;
}
.settings-catalog-list {
  border-top: 1px solid #dfe6ef;
  border-bottom: 1px solid #dfe6ef;
}
.catalog-list-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1.15fr) 90px 105px 188px;
  gap: 10px;
  padding: 10px 12px;
  color: #7d8da1;
  background: #f8fafc;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.settings-catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-top: 1px solid #e8edf3;
  transition: background .18s ease;
}
.settings-catalog-row:first-of-type { border-top: 0; }
.settings-catalog-row:hover { background: #fbfcfe; }
.settings-catalog-edit {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1.15fr) 90px 105px 105px;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
}
.settings-catalog-edit .catalog-toggle { min-width: 0; }
.settings-catalog-edit .btn {
  min-height: 40px;
  justify-content: center;
  box-shadow: none;
}
.catalog-delete-form { margin: 0 !important; }
.catalog-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #a54750;
  background: transparent;
  cursor: pointer;
  font: 500 1.25rem/1 Arial, sans-serif;
  transition: .18s ease;
}
.catalog-delete:hover { color: #fff; background: #d94751; }

/* Focused account pages */
body.admin-page-profile .admin-main > .card,
body.admin-page-admins .admin-main > .card,
body.admin-page-activity-logs .admin-main > .card,
body.admin-page-booking-view .admin-main > .card,
body.admin-page-booking-edit .admin-main > .card { max-width: 1120px; }

/* Login composition */
.page-login .login-shell {
  width: min(100% - 34px, 980px);
  min-height: 570px;
  grid-template-columns: .9fr 1.1fr;
  border-radius: 22px;
  overflow: hidden;
}
.page-login .login-visual { padding: 46px 42px; }
.page-login .login-panel {
  display: grid;
  place-items: center;
  padding: 34px;
}
.page-login .login-card {
  width: min(100%, 420px);
  padding: 0;
  border: 0;
  box-shadow: none;
}

@media (max-width: 1180px) {
  body.admin-page-dashboard .dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .erph-dashboard-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-booking-form { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  body.admin-page { --admin-sidebar: 0px; }
  body.admin-page .admin-main.container {
    margin-left: 0;
    padding: 22px 16px 44px;
  }
  body.admin-page .admin-sidebar { width: min(84vw, 300px); }
  .admin-booking-form { display: block; }
  .admin-booking-summary {
    position: static;
    margin-top: 16px;
  }
  .page-login .login-shell {
    display: block;
    min-height: 0;
  }
  .page-login .login-visual { display: none; }
  .page-login .login-panel { padding: 34px 24px; }
  .settings-catalog-create.settings-create-form { grid-template-columns: 1fr 1fr 90px !important; }
  .settings-catalog-create .catalog-toggle,
  .settings-catalog-create .btn { align-self: end; }
  .catalog-list-head { display: none; }
  .settings-catalog-edit { grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) 72px 100px 90px; }
}
@media (max-width: 680px) {
  body.admin-page-dashboard .dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-page-bookings .admin-main > section.card > .grid-3:first-child {
    align-items: stretch;
    flex-direction: column;
  }
  body.admin-page-bookings .admin-main > section.card > form.grid-3,
  .booking-filterbar,
  .time-field-grid,
  .compact-form-grid { grid-template-columns: 1fr; }
  .compact-form-grid .field-wide { grid-column: auto; }
  .equipment-options { grid-template-columns: 1fr; }
  .settings-tabs {
    margin-left: -4px !important;
    margin-right: -4px !important;
  }
  .status-overview { grid-template-columns: 1fr; }
  .erph-dashboard-heading { align-items: flex-start; }
  .erph-dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erph-teacher-list-head { display: none; }
  .erph-teacher-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
  }
  .erph-teacher-row > div { grid-column: 1 / -1; margin-bottom: 4px; }
  .erph-teacher-row > strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    justify-self: stretch;
    border-radius: 9px;
    text-align: right;
  }
  .erph-teacher-row > strong::before {
    content: attr(data-label);
    display: inline;
    margin-right: 8px;
    font-size: .56rem;
    font-weight: 650;
  }
  .quick-action-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .settings-record-table .settings-record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-record-form { grid-template-columns: 1fr !important; }
  .settings-delete-form,
  .settings-delete-form .action-delete { width: 100% !important; }
  .maintenance-mode-control {
    align-items: flex-start;
    flex-direction: column;
  }
  .booking-list-heading { align-items: flex-start; flex-direction: column; }
  .booking-list-heading > .btn { width: 100%; justify-content: center; }
  .settings-catalog-create.settings-create-form,
  .settings-catalog-edit { grid-template-columns: 1fr 1fr !important; }
  .settings-catalog-row {
    align-items: end;
    grid-template-columns: minmax(0,1fr) 36px;
    padding: 12px 8px;
  }
  .settings-catalog-edit .catalog-order-input { max-width: 100%; }
  .settings-catalog-edit .btn { width: 100%; }
}
