/* Admin dashboard styles — extends theme.css tokens */

/* ===== NAV ===== */
.admin-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  height: 60px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: var(--bg-card); color: var(--white); }
.nav-link.active { background: var(--cyan-dim); color: var(--cyan); }

/* ===== LAYOUT ===== */
.admin-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 120px;
}

.stat-chip-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}

.stat-chip-label {
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== ADMIN GRID ===== */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
}

.admin-card.full-width { grid-column: 1 / -1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.card-date {
  font-size: 0.82rem;
  color: var(--gray);
}

/* ===== SLOT LIST ===== */
.slot-list { display: flex; flex-direction: column; gap: 8px; }
.slot-list.compact .slot-row { padding: 10px 14px; }

.slot-row {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  align-items: center;
  gap: 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color 0.15s;
}

.slot-row:hover { border-color: rgba(0, 229, 204, 0.2); }

.slot-time {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

.slot-time-end { color: var(--gray); font-weight: 400; }
.slot-time-sm { font-size: 0.78rem; color: var(--gray); font-weight: 400; }

.slot-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.slot-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--gray);
  flex-wrap: wrap;
}

.slot-capacity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 90px;
}

.capacity-bar-wrap {
  width: 80px;
  height: 4px;
  background: var(--bg-card-hover);
  border-radius: 2px;
  overflow: hidden;
}

.capacity-bar {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
  transition: width 0.3s;
}

.capacity-text { font-size: 0.75rem; color: var(--gray); }

.waitlist-badge {
  font-size: 0.7rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 2px 8px;
  border-radius: 6px;
}

.slot-actions { display: flex; gap: 8px; }

/* ===== SKILL BADGES ===== */
.skill-badge {
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 6px;
}

.skill-beginner  { background: rgba(0,229,204,0.12); color: #00e5cc; }
.skill-intermediate { background: rgba(100,180,255,0.12); color: #64b4ff; }
.skill-advanced  { background: rgba(255,160,80,0.12); color: #ffa050; }
.skill-competitive { background: rgba(255,80,80,0.12); color: #ff5050; }
.skill-all       { background: rgba(255,255,255,0.06); color: var(--gray-light); }

/* ===== LANE UTILIZATION ===== */
.lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.lane-card {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.lane-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.lane-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
}

.lane-cap-badge {
  font-size: 0.72rem;
  color: var(--gray);
  background: var(--bg-card-hover);
  padding: 2px 8px;
  border-radius: 6px;
}

.lane-slot {
  display: grid;
  grid-template-columns: 55px 1fr auto auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.lane-slot-time { color: var(--cyan); font-weight: 600; }
.lane-slot-title { color: var(--gray-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lane-util-bar-wrap {
  width: 40px;
  height: 3px;
  background: var(--bg-card-hover);
  border-radius: 2px;
  overflow: hidden;
}

.lane-util-bar {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
}

.lane-util-pct { font-size: 0.72rem; color: var(--gray); white-space: nowrap; }
.lane-no-slots { font-size: 0.8rem; color: var(--gray); text-align: center; padding: 10px 0; }

/* ===== DATA TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--gray-light);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== INSTRUCTORS ===== */
.instructor-list { display: flex; flex-direction: column; gap: 8px; }

.instructor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-section);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.instructor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cyan-dim);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.instructor-name { font-size: 0.9rem; font-weight: 500; }
.instructor-email { font-size: 0.78rem; color: var(--gray); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--cyan);
  color: #0a0e1a;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-outline:hover { border-color: var(--gray); color: var(--white); }

.btn-danger {
  background: rgba(255, 80, 80, 0.12);
  color: #ff5050;
  border: 1px solid rgba(255, 80, 80, 0.2);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover { background: rgba(255, 80, 80, 0.2); }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal.modal-wide { max-width: 600px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.modal-close:hover { color: var(--white); }

/* ===== FORMS ===== */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.form-row label {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.input:focus {
  outline: none;
  border-color: var(--cyan);
}

.input option { background: var(--bg-card); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--white);
  z-index: 300;
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: slideInUp 0.2s ease;
}

.toast.success { border-color: rgba(0,229,204,0.3); }
.toast.error { border-color: rgba(255,80,80,0.3); color: #ff8080; }

@keyframes slideInUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  padding: 32px 16px;
}

.empty-state a { color: var(--cyan); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card.full-width { grid-column: 1; }
  .slot-row { grid-template-columns: 80px 1fr; }
  .slot-capacity, .slot-actions { grid-column: 1 / -1; justify-self: start; flex-direction: row; }
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stats-bar { gap: 8px; }
  .stat-chip { min-width: 90px; padding: 12px 16px; }
  .admin-nav { gap: 16px; padding: 0 16px; }
}
