.admin-mentor-shell {
  background: radial-gradient(circle at 40% 0%, #ffffff 0%, var(--cream) 48%, var(--cream-2) 100%);
}

.mentor-app-main {
  width: min(100%, 1540px);
}

.mentor-app-main .admin-topbar {
  min-height: 82px;
}

.admin-mentor-drawer-open {
  overflow: hidden;
}

.refresh-btn,
.filter-btn {
  min-height: 40px;
  gap: 8px;
  padding-inline: 14px;
}

.refresh-btn svg,
.filter-btn svg,
.mentor-stat-icon svg,
.search-field svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mentor-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 18px;
}

.mentor-stat-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.mentor-stat-icon {
  width: 52px;
  height: 52px;
  grid-row: span 3;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.tone-gold {
  color: var(--gold);
  background: #fbf0dc;
}

.tone-green {
  color: var(--green);
  background: #e6f5e8;
}

.tone-violet {
  color: var(--purple);
  background: #eeeafe;
}

.tone-blue {
  color: #2e61b7;
  background: #e8f0ff;
}

.mentor-stat-card strong {
  align-self: end;
  font-family: Fraunces, Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.mentor-stat-card span:not(.mentor-stat-icon) {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.mentor-stat-card small {
  color: var(--muted);
  font-size: 12px;
}

.mentor-table-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.mentor-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(135px, 0.7fr) minmax(135px, 0.7fr) minmax(135px, 0.7fr) auto;
  gap: 16px;
  align-items: end;
  padding: 22px 22px 20px;
  border-bottom: 1px solid var(--line);
}

.mentor-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mentor-filters input,
.mentor-filters select,
.mentor-pagination select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 13px;
}

.mentor-filters input {
  padding: 0 38px 0 14px;
}

.mentor-filters select,
.mentor-pagination select {
  padding: 0 12px;
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  right: 13px;
  bottom: 11px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.mentor-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.mentor-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mentor-table th,
.mentor-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.mentor-table th {
  color: #37405b;
  font-size: 11px;
  font-weight: 900;
}

.mentor-table tbody tr.is-selected {
  background: #fff6e5;
}

.mentor-table tbody tr:hover {
  background: rgba(251, 240, 220, 0.5);
}

.mentor-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mentor-avatar,
.detail-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fbf0dc;
  color: #7a520e;
  font-weight: 900;
  overflow: hidden;
}

.mentor-avatar img,
.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mentor-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 12px;
}

.mentor-cell strong,
.mentor-cell small {
  display: block;
  min-width: 0;
}

.mentor-cell small,
.muted-cell {
  color: var(--muted);
}

.specialism-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}

.specialism-pill,
.mentor-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.specialism-pill {
  color: #37405b;
  background: #f1eee6;
}

.mentor-status.approved,
.mentor-status.available {
  color: var(--green);
  background: #dff4e4;
}

.mentor-status.pending {
  color: #a86d09;
  background: #fff0d0;
}

.mentor-status.unavailable {
  color: var(--muted);
  background: #ece8df;
}

.mentor-pagination {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  color: var(--muted);
  font-size: 12px;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-controls button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 700;
}

.page-controls button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.mentor-pagination label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mentor-detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1600;
  width: min(560px, calc(100vw - 32px));
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-left: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: -22px 0 60px rgba(3, 17, 41, 0.18);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s ease, visibility 0s linear 0.28s;
}

.mentor-detail-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.28s ease, visibility 0s;
}

.mentor-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1550;
  background: rgba(3, 17, 41, 0.42);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mentor-drawer-backdrop.is-open {
  opacity: 1;
}

.mentor-drawer-backdrop[hidden] {
  display: none;
}

.mentor-panel-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 26px;
}

.mentor-detail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mentor-drawer-tabs {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.detail-loading,
.detail-empty {
  padding: 32px 24px;
  color: var(--muted);
}

.mentor-detail h2,
.detail-loading h2,
.detail-empty h2 {
  margin: 0 0 22px;
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
}

.detail-drawer-header {
  padding: 28px 24px 0;
}

.detail-person {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-avatar {
  width: 62px;
  height: 62px;
  font-size: 20px;
}

.detail-person strong,
.detail-person small {
  display: block;
}

.detail-person strong {
  font-size: 16px;
}

.detail-person small {
  color: var(--muted);
}

.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-person-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.detail-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.detail-tag {
  padding: 4px 9px;
  border-radius: 6px;
  background: #f1eee6;
  color: #30374d;
  font-size: 11px;
  font-weight: 800;
}

.detail-tag.verified {
  color: var(--green);
  background: #e6f5e8;
}

.mentor-tabs {
  display: flex;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.mentor-tab {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mentor-tab.is-active {
  border-color: #1d39b8;
  color: #1d39b8;
}

.mentor-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 24px 120px;
}

.mentor-tab-panel[hidden] {
  display: none;
}

.detail-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.detail-section:first-child {
  border-top: 0;
}

.detail-section h3 {
  margin: 0 0 14px;
  font-size: 13px;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.detail-row strong,
.detail-row a {
  justify-self: end;
  color: var(--ink);
  text-align: right;
}

.detail-block {
  margin: 0;
  color: #37405b;
  font-size: 13px;
  line-height: 1.6;
}

.drawer-decision {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 -14px 34px rgba(3, 17, 41, 0.08);
}

.drawer-decision h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.decision-card {
  display: grid;
  gap: 12px;
}

.decision-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.decision-action {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  font-weight: 900;
}

.decision-action.approve {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.decision-action.reject {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.decision-action.secondary {
  color: var(--ink);
  background: #fffdf8;
}

.decision-action:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.decision-warning,
.inline-message {
  padding: 12px;
  border-radius: 7px;
  background: #fff6e5;
  color: #6f4f13;
  font-size: 12px;
}

.drawer-empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: rgba(255, 246, 229, 0.45);
  color: var(--muted);
  font-size: 13px;
}

.document-link {
  justify-self: start;
  width: fit-content;
}

.inline-message.error {
  color: var(--danger);
  background: #fde8e8;
}

.inline-message.success {
  color: var(--green);
  background: #e6f5e8;
}

@media (max-width: 1240px) {
  .mentor-detail-panel {
    width: min(480px, 100vw);
  }

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

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

@media (max-width: 760px) {
  .mentor-detail-panel {
    width: 100vw;
  }

  .mentor-stats,
  .mentor-filters,
  .decision-actions {
    grid-template-columns: 1fr;
  }

  .mentor-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .mentor-table th,
  .mentor-table td {
    padding: 13px 14px;
  }
}
