/* Admin portal styles — extends theme.css, does not override it */

.admin-body {
  background: #f0ede8;
  min-height: 100vh;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
  text-decoration: none;
}

.admin-sidebar__logo {
  width: 36px;
  height: 36px;
  background: var(--amber);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  text-decoration: none;
}

.admin-sidebar__name {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.admin-sidebar__sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.admin-nav-item--active {
  background: rgba(200,135,58,0.2);
  color: var(--amber);
}

.admin-sidebar__back {
  padding: 16px 20px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
  padding-top: 20px;
  transition: color 0.15s;
}

.admin-sidebar__back:hover { color: rgba(255,255,255,0.65); }

/* ── MAIN ── */
.admin-main {
  flex: 1;
  overflow: auto;
}

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px;
}

.admin-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}

.admin-page__title {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 4px;
}

.admin-page__sub {
  font-size: 15px;
  color: var(--ink-3);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── PIPELINE CARDS ── */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.pipeline-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px 20px;
  border: 1px solid rgba(28,26,23,0.07);
  text-align: center;
}

.pipeline-card__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.pipeline-card__num {
  font-family: 'Fraunces', serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.pipeline-card--requested { border-top: 3px solid #c8873a; }
.pipeline-card--requested .pipeline-card__num { color: #c8873a; }
.pipeline-card--scheduled { border-top: 3px solid #4a7fb5; }
.pipeline-card--scheduled .pipeline-card__num { color: #4a7fb5; }
.pipeline-card--completed { border-top: 3px solid #5a7c5a; }
.pipeline-card--completed .pipeline-card__num { color: #5a7c5a; }
.pipeline-card--noshow { border-top: 3px solid #b55a5a; }
.pipeline-card--noshow .pipeline-card__num { color: #b55a5a; }
.pipeline-card--total { border-top: 3px solid var(--navy); }
.pipeline-card--total .pipeline-card__num { color: var(--navy); }

/* ── SECTIONS ── */
.admin-section {
  margin-bottom: 36px;
}

.admin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-section__title {
  font-size: 18px;
  color: var(--ink);
}

/* ── FILTERS ── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select, .filter-search {
  padding: 8px 12px;
  border: 1px solid rgba(28,26,23,0.15);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

.filter-search { min-width: 200px; }
.filter-select:focus, .filter-search:focus { border-color: var(--amber); }

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(28,26,23,0.07);
}

.data-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid rgba(28,26,23,0.07);
  background: #f7f5f0;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(28,26,23,0.04);
  color: var(--ink-2);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: #faf8f4; }

.client-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.client-link:hover { color: var(--amber); }

/* ── STATUS BADGES ── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.status-badge--requested { background: #fef3e8; color: #c8873a; }
.status-badge--scheduled { background: #e8f0f8; color: #4a7fb5; }
.status-badge--completed { background: var(--green-light); color: var(--green); }
.status-badge--noshow, .status-badge--no-show { background: #fce8e8; color: #b55a5a; }

.program-tag {
  font-size: 13px;
  color: var(--ink-3);
}

/* ── DETAIL VIEW ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.detail-card {
  background: var(--surface);
  border: 1px solid rgba(28,26,23,0.07);
  border-radius: 12px;
  padding: 20px;
}

.detail-card__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.detail-card__value {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}

.status-select {
  font-weight: 500;
}

.challenge-box {
  background: var(--surface);
  border: 1px solid rgba(28,26,23,0.07);
  border-radius: 12px;
  padding: 24px;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ── NOTES ── */
.notes-list {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-item {
  background: var(--surface);
  border: 1px solid rgba(28,26,23,0.07);
  border-radius: 10px;
  padding: 16px 20px;
}

.note-item__text {
  font-size: 15px;
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.65;
  margin-bottom: 8px;
}

.note-item__date {
  font-size: 12px;
  color: var(--ink-3);
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── FORM ── */
.form-card {
  background: var(--surface);
  border: 1px solid rgba(28,26,23,0.07);
  border-radius: 16px;
  padding: 36px;
  max-width: 700px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row--2 > .form-group { flex: 1; }

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.required { color: var(--amber); }

.form-input {
  padding: 11px 14px;
  border: 1px solid rgba(28,26,23,0.15);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form-input:focus { border-color: var(--amber); background: #fff; }

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  font-size: 14px;
  color: #b55a5a;
  background: #fce8e8;
  padding: 10px 14px;
  border-radius: 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--amber); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid rgba(28,26,23,0.2); color: var(--ink); }
.btn--danger { background: #fce8e8; color: #b55a5a; }
.btn--sm { padding: 6px 14px; font-size: 13px; }

/* ── STATES ── */
.loading-state, .empty-state {
  text-align: center;
  padding: 48px;
  color: var(--ink-3);
  font-size: 15px;
}

.save-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .admin-sidebar { display: none; }
  .admin-page { padding: 24px; }
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; }
}

@media (max-width: 600px) {
  .pipeline-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .admin-page__header { flex-direction: column; }
}
