.private-admin-page {
  min-height: 100vh;
  padding: 118px 20px 80px;
  background: #f5f8fd;
}

.private-admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-heading,
.admin-section-heading,
.admin-list-heading,
.lead-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-heading > div:first-child > span,
.admin-section-heading > div > span {
  color: #00a99d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-heading h1,
.admin-section-heading h2 {
  margin: 4px 0 7px;
  color: #012970;
  font-family: "Nunito", sans-serif;
}

.admin-heading h1 { font-size: 40px; }
.admin-section-heading h2 { font-size: 30px; }

.admin-heading p,
.admin-section-heading p {
  max-width: 520px;
  margin: 0;
  color: #667085;
}

.admin-heading-actions,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-heading-actions a,
.admin-tabs a {
  padding: 10px 14px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  color: #012970;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
}

.admin-tabs {
  margin: 28px 0;
  padding-bottom: 13px;
  border-bottom: 1px solid #dae4f1;
}

.admin-tabs a { border: 0; background: transparent; }
.admin-tabs a:hover { background: #e9f0fb; }
.admin-tabs span { padding: 2px 7px; border-radius: 99px; color: #fff; background: #4154f1; }

.admin-alert {
  margin: 20px 0;
  padding: 13px 15px;
  border-radius: 10px;
  font-weight: 700;
}

.admin-alert.success { border: 1px solid #bce7dc; color: #067266; background: #ecfbf7; }
.admin-alert.error { border: 1px solid #fecaca; color: #a71919; background: #fff1f1; }

.admin-section {
  padding-top: 10px;
  scroll-margin-top: 90px;
}

.admin-section + .admin-section {
  margin-top: 65px;
}

.admin-setup-stack {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.admin-panel,
.lead-card {
  padding: 23px;
  border: 1px solid #dee7f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(1, 41, 112, .05);
}

form.admin-panel {
  display: grid;
  gap: 14px;
}

.tutor-create-panel {
  position: relative;
  grid-template-columns: minmax(260px, .75fr) minmax(520px, 1.25fr);
  align-items: end;
  gap: 28px !important;
  overflow: hidden;
  border-color: #d7e4f5;
  background: linear-gradient(120deg, #ffffff 0%, #ffffff 62%, #f2f7ff 100%);
}

.tutor-create-panel::after {
  position: absolute;
  top: -70px;
  right: -45px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(65, 84, 241, .055);
  content: "";
  pointer-events: none;
}

.tutor-create-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tutor-create-heading p {
  max-width: 360px;
  margin: 5px 0 0;
  color: #6f7e91;
  font-size: 12px;
  line-height: 1.5;
}

.tutor-create-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #012970, #4154f1);
  box-shadow: 0 8px 18px rgba(1, 41, 112, .2);
  font-size: 21px;
}

.tutor-create-fields {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 150px auto;
  gap: 11px;
  align-items: end;
}

.tutor-create-submit {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  white-space: nowrap;
}

.admin-panel h3,
.admin-list-heading h3,
.lead-card h3 {
  margin: 0;
  color: #012970;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
}

.admin-panel label,
.lead-update-form label {
  display: grid;
  gap: 6px;
  color: #34445b;
  font-size: 13px;
  font-weight: 700;
}

.admin-panel input,
.admin-panel select,
.lead-update-form select,
.lead-update-form textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  color: #34445b;
  font: inherit;
}

.lead-update-form textarea { min-height: 70px; resize: vertical; }

.admin-fields-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr .65fr;
  gap: 10px;
}

.weekly-availability-panel {
  align-content: start;
}

.availability-settings {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(210px, .55fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #dce6f3;
  border-radius: 12px;
  background: #f8faff;
}

.availability-settings label > small {
  color: #7a899d;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.weekly-editor-help {
  margin: -3px 0 0;
  color: #6f7e91;
  font-size: 12px;
  line-height: 1.55;
}

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

.weekly-day {
  padding: 12px;
  border: 1px solid #e1e8f2;
  border-radius: 11px;
  background: #f9fbff;
}

.weekly-day > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #012970;
}

.weekly-day .add-interval,
.weekly-day .remove-interval {
  border: 0;
  color: #4154f1;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.interval-list {
  display: grid;
  gap: 8px;
}

.interval-row {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  gap: 8px;
  align-items: end;
}

.weekly-day .remove-interval {
  display: grid;
  width: 28px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  color: #b42318;
  font-size: 20px;
  line-height: 1;
}

.weekly-day .remove-interval:hover {
  background: #fff0ef;
}

.admin-panel .placement-button,
.lead-update-form .placement-button {
  justify-self: start;
  min-height: 42px;
  padding-inline: 20px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 14px;
}

.admin-list-panel { margin-top: 18px; }
.admin-list-heading { align-items: center; margin-bottom: 18px; }
.admin-list-heading > span { color: #76869a; font-size: 12px; }

.schedule-filters {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(135px, 1fr) 120px 120px minmax(145px, 1fr) auto;
  gap: 9px;
  align-items: end;
  margin-bottom: 17px;
  padding: 14px;
  border: 1px solid #dce6f3;
  border-radius: 12px;
  background: #f8faff;
}

.schedule-filters label {
  display: grid;
  gap: 5px;
  color: #52657e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.schedule-filters select,
.schedule-filters input {
  width: 100%;
  min-height: 39px;
  padding: 7px 9px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  color: #34445b;
  background: #fff;
  font: 12px "Open Sans", sans-serif;
}

.schedule-filters button {
  display: inline-flex;
  min-height: 39px;
  padding: 8px 11px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cfdced;
  border-radius: 8px;
  color: #4154f1;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-filters button:hover { background: #edf2ff; }
.schedule-filter-empty { margin: 20px 0 5px; }

.tutor-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tutor-list article {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e8f2;
  border-radius: 11px;
}

.tutor-actions {
  display: flex !important;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.tutor-actions details {
  flex: 1 0 100%;
}

.tutor-actions summary {
  width: fit-content;
  color: #4154f1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style-position: inside;
}

.tutor-edit-form {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #f8faff;
}

.tutor-edit-form label {
  display: grid;
  gap: 4px;
  color: #52657e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tutor-edit-form input,
.tutor-edit-form select {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #fff;
  color: #34445b;
  font: 12px "Open Sans", sans-serif;
}

.tutor-list article button,
.admin-table button {
  padding: 0;
  border: 0;
  color: #4154f1;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.tutor-list article button.danger-action {
  color: #b42318;
}

.tutor-list article button.save-tutor-button {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 7px;
  color: #fff;
  background: #4154f1;
}

.admin-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #012970;
  font-weight: 800;
}

.tutor-list article > div { display: grid; }
.tutor-list small,
.admin-table td small { display: block; color: #7d8b9e; font-size: 11px; }
.is-inactive { opacity: .55; }

.status-pill,
.spots-pill {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
}

.status-pill.active { color: #067266; background: #dcf8f0; }
.status-pill.inactive { color: #8b4b16; background: #fff2d7; }
.spots-pill { min-width: 27px; justify-content: center; color: #1648b0; background: #e8efff; }
.spots-pill.reserved { color: #8b4b16; background: #fff2d7; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td { padding: 11px 10px; border-bottom: 1px solid #e8edf4; text-align: left; font-size: 13px; }
.admin-table th { color: #6f7e91; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.admin-table td { color: #34445b; }
.admin-empty { color: #7c899a; text-align: center; }

.lead-overview-panel,
.lead-detail-card {
  margin-top: 24px;
}

.lead-overview-table td {
  padding-block: 15px;
  vertical-align: middle;
}

.lead-overview-table td:nth-child(2) strong {
  color: #012970;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
}

.lead-overview-table td:last-child {
  text-align: right;
}

.lead-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #cad9ef;
  border-radius: 8px;
  color: #1648b0;
  background: #f7faff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.lead-detail-link:hover {
  color: #fff;
  background: #1648b0;
}

.lead-detail-page .private-admin-shell {
  width: min(1080px, 100%);
}

.lead-card > header { align-items: center; }
.lead-id { color: #00a99d; font-size: 11px; font-weight: 800; }
.lead-card h3 { margin-top: 3px; }

.lead-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
  padding: 17px 0;
  border-block: 1px solid #e8edf4;
}

.lead-details div { display: grid; gap: 4px; align-content: start; }
.lead-details .lead-schedule { grid-column: span 2; }
.lead-details .lead-motivation,
.lead-details .lead-priority { grid-column: 1 / -1; }
.lead-details dt { color: #7d8b9e; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.lead-details dd { margin: 0; color: #34445b; font-size: 13px; line-height: 1.55; }
.lead-details a { color: #4154f1; }

.lead-assignments {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8edf4;
}

.lead-assignments-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.lead-assignments-heading > div {
  display: grid;
  gap: 3px;
}

.lead-assignments-heading > div > span {
  color: #52657e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lead-assignments-heading small,
.lead-assignments-heading > span {
  color: #7d8b9e;
  font-size: 11px;
}

.lead-assignment-list {
  display: grid;
  gap: 8px;
}

.lead-assignment-row {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) minmax(240px, 1.6fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 11px 12px;
  border: 1px solid #e0e8f3;
  border-radius: 10px;
  background: #f9fbff;
}

.assignment-time {
  display: grid;
  gap: 2px;
  align-self: center;
  color: #012970;
  font-size: 13px;
}

.assignment-time span { color: #667085; font-size: 12px; }

.lead-assignment-row label {
  display: grid;
  gap: 5px;
  color: #52657e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-assignment-row select {
  width: 100%;
  min-height: 39px;
  padding: 7px 9px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  color: #34445b;
  background: #fff;
  font: 12px "Open Sans", sans-serif;
}

.lead-assignment-row > .status-pill {
  align-self: center;
  white-space: nowrap;
}

.lead-assignment-row > button {
  min-height: 39px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #4154f1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lead-assignment-row > button:hover { background: #3042d8; }

.lead-update-form {
  display: grid;
  grid-template-columns: minmax(160px, .5fr) minmax(260px, 1.5fr) auto;
  gap: 13px;
  align-items: end;
}

@media (max-width: 900px) {
  .tutor-create-panel { grid-template-columns: 1fr; align-items: stretch; }
  .tutor-create-fields { grid-template-columns: minmax(210px, 1fr) 150px auto; }
  .tutor-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-update-form { grid-template-columns: 1fr; }
  .tutor-edit-form { grid-template-columns: 1fr; }
  .schedule-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-assignment-row { grid-template-columns: 120px minmax(220px, 1fr) auto; }
  .lead-assignment-row > button { grid-column: 2 / -1; }
}

@media (max-width: 600px) {
  .private-admin-page { padding-inline: 13px; }
  .admin-heading,
  .admin-section-heading { display: grid; }
  .admin-heading h1 { font-size: 34px; }
  .tutor-create-fields,
  .weekly-editor,
  .availability-settings { grid-template-columns: 1fr; }
  .tutor-create-submit { width: 100%; }
  .schedule-filters { grid-template-columns: 1fr 1fr; }
  .schedule-filters label:first-child,
  .schedule-filters label:nth-child(2),
  .schedule-filters label:nth-child(5),
  .schedule-filters button { grid-column: 1 / -1; }
  .admin-fields-row,
  .tutor-list,
  .lead-details { grid-template-columns: 1fr; }
  .interval-row { grid-template-columns: 1fr 1fr 28px; }
  .lead-details .lead-schedule { grid-column: auto; }
  .lead-assignments-heading { display: grid; }
  .lead-assignment-row { grid-template-columns: 1fr auto; }
  .lead-assignment-row label { grid-column: 1 / -1; }
  .lead-assignment-row > button { grid-column: 1 / -1; }
}
