/* === PLC Mentoring Hub — Dark Theme === */
/* Design: Refined dark luxury. Precise motion. Intentional restraint. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #00f15e;
  --primary-dim: rgba(0,241,94,0.5);
  --primary-glow: rgba(0,241,94,0.08);
  --warm: #ffb72e;
  --alert: #ff5252;
  --bg: #0a0f0d;
  --nav-bg: #060a08;
  --surface: #111916;
  --surface-hover: #161f1b;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.5);

  /* Easing curves */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

/* === Base === */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(20px, 3vw, 48px);
}

/* === Page Load Animation === */

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

.section-label,
.kpi-grid,
.table-wrap,
.list-toolbar,
.detail-header,
.detail-progress,
.detail-columns,
.changelog-header,
.breadcrumb {
  animation: fadeInUp 0.4s var(--ease-out-expo) both;
}

.section-label:nth-of-type(1) { animation-delay: 0.03s; }
.kpi-grid:nth-of-type(1) { animation-delay: 0.06s; }
.section-label:nth-of-type(2) { animation-delay: 0.10s; }
.kpi-grid:nth-of-type(2) { animation-delay: 0.14s; }
.table-wrap { animation-delay: 0.18s; }
.list-toolbar { animation-delay: 0.03s; }
.breadcrumb { animation-delay: 0.02s; }
.detail-header { animation-delay: 0.04s; position: relative; z-index: 10; }
.detail-progress { animation-delay: 0.08s; }
.detail-columns { animation-delay: 0.12s; }

/* KPI cards stagger */
.kpi-card:nth-child(1) { animation: fadeInUp 0.35s var(--ease-out-expo) 0.06s both; }
.kpi-card:nth-child(2) { animation: fadeInUp 0.35s var(--ease-out-expo) 0.10s both; }
.kpi-card:nth-child(3) { animation: fadeInUp 0.35s var(--ease-out-expo) 0.14s both; }
.kpi-card:nth-child(4) { animation: fadeInUp 0.35s var(--ease-out-expo) 0.18s both; }
.kpi-card:nth-child(5) { animation: fadeInUp 0.35s var(--ease-out-expo) 0.22s both; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Nav === */

nav {
  background: var(--nav-bg);
  padding: 0 clamp(20px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
  border-bottom: 1px solid var(--border);
}

.logo {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-decoration: none;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 14px 12px;
  position: relative;
  transition: color 0.15s var(--ease-out-quart);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease-out-expo);
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--text-secondary);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  transform: scaleX(1);
  background: var(--primary);
}

.logout {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.12s var(--ease-out-quart);
}

.logout:hover {
  color: var(--text-secondary);
}

button.logout {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.logout-form {
  display: inline;
  margin: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav-user {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

/* === KPI Cards === */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s var(--ease-out-expo),
              border-color 0.2s var(--ease-out-quart),
              box-shadow 0.2s var(--ease-out-quart);
  cursor: default;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.2);
}

.kpi-card:active {
  transform: translateY(0);
  transition-duration: 0.06s;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 500;
}

/* KPI detail — reveals on hover */
.kpi-detail {
  font-size: 11px;
  color: var(--text-muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.25s var(--ease-out-quart),
              opacity 0.18s var(--ease-out-quart),
              margin-top 0.25s var(--ease-out-quart);
}

.kpi-card:hover .kpi-detail {
  max-height: 40px;
  opacity: 1;
  margin-top: 6px;
}

.kpi-card.hero {
  background: linear-gradient(135deg, rgba(0,241,94,0.07), rgba(0,241,94,0.02));
  border-top: 2px solid var(--primary);
}

.kpi-card.hero .kpi-value { color: var(--primary); }

.kpi-card.hero:hover {
  border-color: rgba(0, 241, 94, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 0 16px rgba(0, 241, 94, 0.06);
}

.kpi-card.attention {
  background: linear-gradient(135deg, rgba(255,183,46,0.07), rgba(255,183,46,0.02));
  border-top: 2px solid var(--warm);
}

.kpi-card.attention .kpi-value { color: var(--warm); }

.kpi-card.attention:hover {
  border-color: rgba(255, 183, 46, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 0 16px rgba(255, 183, 46, 0.06);
}

.kpi-card.alert {
  background: linear-gradient(135deg, rgba(255,82,82,0.07), rgba(255,82,82,0.02));
  border-top: 2px solid var(--alert);
}

.kpi-card.alert .kpi-value { color: var(--alert); }

.kpi-card.alert:hover {
  border-color: rgba(255, 82, 82, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 0 16px rgba(255, 82, 82, 0.06);
}

/* KPI filter states */
.kpi-filter { cursor: pointer; }
.kpi-selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.filter-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* === Tables === */

.table-wrap { }

table { width: 100%; border-collapse: collapse; }

th {
  background: var(--nav-bg);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
}

td {
  color: var(--text-secondary);
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
}

tbody tr {
  transition: background 0.1s var(--ease-out-quart);
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Clickable rows */
.clickable-row {
  cursor: pointer;
  transition: background 0.1s var(--ease-out-quart);
}

.clickable-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.clickable-row:active {
  background: rgba(255, 255, 255, 0.05);
}

/* When a dropdown is open inside a table row, dim the rows behind it */
.dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}
details[open] > .dropdown-panel {
  display: flex;
  flex-direction: column;
}
.dropdown-panel {
  position: fixed;
  z-index: 9999;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  display: none;
}

/* Table row stagger animation */
.data-table tbody tr {
  animation: fadeInUp 0.25s var(--ease-out-expo) both;
  animation-delay: calc(0.18s + var(--row-index, 0) * 0.03s);
}

/* === Badges === */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-active {
  color: var(--primary);
  border: 1px solid rgba(0,241,94,0.35);
  background: rgba(0,241,94,0.08);
}

.badge-completing {
  color: var(--warm);
  border: 1px solid rgba(255,183,46,0.35);
  background: rgba(255,183,46,0.08);
}

.badge-new, .badge-not_started {
  color: #80cbc4;
  border: 1px solid rgba(128,203,196,0.35);
  background: rgba(128,203,196,0.08);
}

.badge-paused, .badge-done {
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.badge-archived {
  color: #b0b0b0;
  border: 1px solid rgba(176,176,176,0.25);
  background: rgba(176,176,176,0.06);
}

.badge-inactive {
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

.pause-banner {
  padding: 12px 16px;
  margin: 12px 0 16px;
  border-radius: 8px;
  background: rgba(255,183,46,0.06);
  border: 1px solid rgba(255,183,46,0.25);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pause-banner-text { color: var(--warm, #ffb72e); font-size: 13px; }
.pause-banner-text b { color: var(--text-primary, #fff); }

.pause-history-table { width: 100%; font-size: 13px; }
.pause-history-table th { text-align: left; padding: 6px 8px; color: var(--text-muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.pause-history-table td { padding: 6px 8px; border-top: 1px solid rgba(255,255,255,0.04); }
.pause-history-table .open-ended { color: var(--warm, #ffb72e); font-style: italic; }
.pause-history-table tr.pause-current { background: rgba(0,241,94,0.04); border-left: 2px solid var(--primary); }
.pause-history-table .pause-delete-btn { opacity: 0.3; transition: opacity 0.15s; }
.pause-history-table .pause-delete-btn:hover { opacity: 1; }

/* === Horizontal Frequency Bars === */

.bar-track { flex: 1; height: 20px; background: rgba(255,255,255,0.03); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.fill-warm { background: var(--warm); }

/* === Cards === */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart);
}

.card:hover {
  border-color: var(--border-hover);
}

/* === Stats Row === */

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  flex: 1;
  transition: transform 0.2s var(--ease-out-expo),
              border-color 0.15s var(--ease-out-quart);
}

.stat-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
}

.stat-card .value { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.stat-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 500; }

/* === Text Helpers === */

.text-alert { color: var(--alert); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }

/* === Banner === */

.banner-warn {
  background: rgba(255,183,46,0.08);
  border: 1px solid rgba(255,183,46,0.2);
  color: var(--warm);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* === Toast === */

#toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 280px;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  animation: toastIn 0.25s var(--ease-out-expo) both;
  transition: opacity 0.35s var(--ease-out-quart), transform 0.35s var(--ease-out-quart);
}
.toast-success { border-color: rgba(0,241,94,0.3); }
.toast-success .toast-icon { color: var(--primary); }
.toast-error { border-color: rgba(255,82,82,0.3); }
.toast-error .toast-icon { color: var(--alert); }
.toast-warn { border-color: rgba(255,183,46,0.3); }
.toast-warn .toast-icon { color: var(--warm); }
.toast-icon { font-weight: 700; font-size: 14px; }
.toast-text { flex: 1; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
}
.toast-close:hover { color: var(--text-primary); }
.toast-fading {
  opacity: 0;
  transform: translateX(20px);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === Buttons === */

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.12s var(--ease-out-expo),
              box-shadow 0.12s var(--ease-out-quart),
              background 0.12s var(--ease-out-quart);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 241, 94, 0.2);
  color: var(--bg);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
  transition-duration: 0.06s;
}

/* === Links === */

a { color: var(--text-secondary); text-decoration: none; transition: color 0.12s var(--ease-out-quart); }
a:hover { color: var(--primary); }

/* === Headings === */

h1 { color: var(--text-primary); margin-bottom: 16px; font-weight: 700; letter-spacing: -0.3px; }
h2 { color: var(--text-primary); margin: 20px 0 12px; font-weight: 600; }

/* === Login Page === */

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 53px);
}

.login-card { width: 100%; max-width: 380px; }
.login-title { text-align: center; margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart);
}

.form-input:focus {
  border-color: var(--primary-dim);
  box-shadow: 0 0 0 3px rgba(0, 241, 94, 0.06);
}

.btn-full { width: 100%; text-align: center; padding: 12px; font-size: 14px; }

/* === Section Label === */

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

/* === Inline Progress Bar === */

.progress-inline { display: flex; align-items: center; gap: 8px; }

.progress-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  transition: width 0.4s var(--ease-out-quart);
}

.progress-paused { background: rgba(255,255,255,0.15); }

.progress-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 48px;
  font-variant-numeric: tabular-nums;
}

/* === Day-of-Week Bar Chart === */

.day-of-week-chart { display: flex; gap: 4px; align-items: flex-end; height: 52px; }

.dow-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.dow-bar {
  width: 100%;
  background: rgba(255,255,255,0.25);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.4s var(--ease-out-quart),
              background 0.15s var(--ease-out-quart);
}

.dow-bar-container:hover .dow-bar {
  background: var(--primary-dim);
}

.dow-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
  text-align: center;
  font-weight: 500;
}

/* === GitHub Link === */

.github-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: color 0.12s var(--ease-out-quart);
}

.github-link:hover {
  color: var(--primary);
}

/* === Sortable Column Header === */

.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s var(--ease-out-quart);
}

.sortable:hover { color: var(--text-secondary); }
.sort-icon { font-size: 10px; color: var(--text-muted); margin-left: 4px; }

/* === Mentee List Toolbar === */

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.search-box { flex: 1; min-width: 180px; max-width: 320px; }

.search-box input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart);
}

.search-box input:focus {
  border-color: var(--primary-dim);
  box-shadow: 0 0 0 3px rgba(0, 241, 94, 0.06);
}

.filter-pills { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-out-quart),
              color 0.15s var(--ease-out-quart),
              background 0.15s var(--ease-out-quart);
}

.pill:hover {
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
}

.pill-active {
  color: var(--primary);
  border-color: rgba(0,241,94,0.4);
  background: rgba(0,241,94,0.06);
}

/* === Small Action Buttons === */

.btn-sm {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  text-decoration: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  transition: background 0.12s var(--ease-out-quart),
              border-color 0.12s var(--ease-out-quart),
              transform 0.1s var(--ease-out-expo);
}

.btn-sm:hover { transform: translateY(-1px); }
.btn-sm:active { transform: translateY(0); transition-duration: 0.04s; }

.btn-warn { color: var(--warm); border-color: rgba(255,183,46,0.35); background: rgba(255,183,46,0.08); }
.btn-warn:hover { background: rgba(255,183,46,0.16); }

.btn-success { color: var(--primary); border-color: rgba(0,241,94,0.35); background: rgba(0,241,94,0.08); }
.btn-success:hover { background: rgba(0,241,94,0.16); }

.btn-info { color: #5dade2; border-color: rgba(93,173,226,0.35); background: rgba(93,173,226,0.08); }
.btn-info:hover { background: rgba(93,173,226,0.16); }

.btn-danger { color: var(--alert); border-color: rgba(255,82,82,0.35); background: rgba(255,82,82,0.08); }
.btn-danger:hover { background: rgba(255,82,82,0.16); }

/* === Form Stack === */

.form-stack { display: flex; flex-direction: column; gap: 4px; }

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-dim);
  box-shadow: 0 0 0 3px rgba(0, 241, 94, 0.06);
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart);
}

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

/* === Breadcrumb === */

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.12s var(--ease-out-quart);
}

.breadcrumb a:hover { color: var(--primary); }

/* === Secondary Button (full size) === */

.btn-secondary {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.12s var(--ease-out-quart),
              color 0.12s var(--ease-out-quart),
              transform 0.1s var(--ease-out-expo);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* === Mentee Detail Page === */

.detail-header { margin-bottom: 20px; }

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 14px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 20;
}

/* === Detail Progress Bar === */

.detail-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-track-lg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  max-width: 500px;
}

.progress-fill-lg {
  height: 100%;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  transition: width 0.5s var(--ease-out-quart);
}

.progress-fill-lg.progress-paused {
  background: rgba(255,255,255,0.15);
}

/* === Detail Columns Layout === */

.detail-columns {
  display: grid;
  grid-template-columns: 5fr 2fr;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

.detail-main { min-width: 0; }

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === Timeline Header === */

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

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

.date-jump {
  padding: 6px 10px;
  font-size: 12px;
  width: 160px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s var(--ease-out-quart);
}

.date-jump:focus { border-color: var(--primary-dim); }

/* === Timeline Container === */

.timeline-container { position: relative; }

/* === Timeline Date Header === */

.timeline-date-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

/* === Timeline Cluster === */

.timeline-cluster {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.cluster-bracket {
  width: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  align-self: stretch;
  min-height: 40px;
  transition: background 0.2s var(--ease-out-quart);
}

.bracket-good { background: var(--primary); }
.bracket-alert { background: var(--alert); }
.bracket-mid { background: var(--warm); }

.cluster-body { flex: 1; min-width: 0; }

.cluster-time {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cluster-unreviewed {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 0;
}

/* === Timeline Interaction Card === */

.timeline-interaction {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-out-quart),
              background 0.15s var(--ease-out-quart);
}

.timeline-interaction:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.interaction-content {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.timeline-interaction.expanded .interaction-content {
  display: block;
  -webkit-line-clamp: unset;
  overflow-y: auto;
  max-height: 60vh;
  overflow-wrap: anywhere;
}

.interaction-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* === Review Card === */

.review-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
  transition: border-color 0.15s var(--ease-out-quart);
}

.review-good { border-left: 3px solid var(--primary); background: rgba(0,241,94,0.03); }
.review-alert { border-left: 3px solid var(--alert); background: rgba(255,82,82,0.03); }
.review-mid { border-left: 3px solid var(--warm); background: rgba(255,183,46,0.03); }

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

.review-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.review-score-wrap { display: flex; align-items: center; gap: 8px; }

.review-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.review-label {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-good { color: var(--primary); background: rgba(0,241,94,0.1); }
.label-alert { color: var(--alert); background: rgba(255,82,82,0.1); }
.label-mid { color: var(--warm); background: rgba(255,183,46,0.1); }

.review-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 8px; overflow-wrap: anywhere; }

.review-flags { margin-bottom: 8px; }

.review-flags-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 500;
}

.flag-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.flag-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.flag-critical { color: var(--alert); background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.25); }
.flag-warning { color: var(--warm); background: rgba(255,183,46,0.1); border: 1px solid rgba(255,183,46,0.25); }

.review-tip {
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.tip-label { font-weight: 600; color: var(--primary); margin-right: 4px; }

/* === Sidebar Card === */

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.15s var(--ease-out-quart);
}

.sidebar-card:hover {
  border-color: var(--border-hover);
}

.flag-trend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.flag-trend-label {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Notes === */

.note-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.note-item:last-of-type { border-bottom: none; }
.note-content { font-size: 14px; color: var(--text-primary); margin-bottom: 2px; line-height: 1.5; overflow-wrap: anywhere; }
.note-meta { font-size: 11px; }
.note-form { margin-top: 12px; }

.note-textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  resize: vertical;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart);
}

.note-textarea:focus {
  border-color: var(--primary-dim);
  box-shadow: 0 0 0 3px rgba(0, 241, 94, 0.06);
}

/* === Recent PRs === */

.pr-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.pr-item:last-child { border-bottom: none; }

.pr-link {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s var(--ease-out-quart);
}

.pr-link:hover { color: var(--primary); }

/* === Timeline Sentinel / Loading === */

.timeline-sentinel { padding: 16px 0; text-align: center; }

.loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* === Back-to-top === */

.back-to-top {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: background 0.12s var(--ease-out-quart),
              color 0.12s var(--ease-out-quart),
              border-color 0.12s var(--ease-out-quart),
              transform 0.12s var(--ease-out-expo);
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: rgba(0,241,94,0.2);
  transform: translateY(-2px);
}

/* === Changelog === */

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-top: 4px;
}

.live-indicator { display: flex; align-items: center; gap: 8px; }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--primary-dim); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(0, 241, 94, 0); }
}

.changelog-date-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.changelog-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s var(--ease-out-quart);
}

.changelog-entry:hover {
  background: rgba(255,255,255,0.015);
}

.commit-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 3px;
  min-width: 68px;
  text-align: center;
  text-transform: uppercase;
}

.commit-feat    { background: rgba(0, 200, 83, 0.12); color: #00c853; }
.commit-fix     { background: rgba(255, 82, 82, 0.12); color: #ff5252; }
.commit-docs    { background: rgba(41, 121, 255, 0.12); color: #2979ff; }
.commit-chore   { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); }
.commit-test    { background: rgba(170, 0, 255, 0.12); color: #aa00ff; }
.commit-refactor { background: rgba(255, 109, 0, 0.12); color: #ff6d00; }
.commit-other   { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); }

.commit-info { flex: 1; min-width: 0; }

.commit-message {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commit-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.commit-hash {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 11px;
  text-decoration: none;
}

a.commit-hash:hover {
  color: var(--primary);
  text-decoration: underline;
}

.changelog-sentinel { padding: 16px 0; text-align: center; }

/* === Utility Classes === */

.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-24 { margin-bottom: 24px; }
.mb-0 { margin-bottom: 0; }
.m-0 { margin: 0; }
.d-inline { display: inline; }
.d-flex { display: flex; }
.gap-8 { gap: 8px; }
.flex-1 { flex: 1; }
.pad-section { padding: 16px 0; }
.pad-section-lg { padding: 24px 0; }
.text-11 { font-size: 11px; }
.text-13 { font-size: 13px; }
.text-color-primary { color: var(--primary); }
.text-color-alert { color: var(--alert); }
.card-narrow { max-width: 560px; }
.card-error { max-width: 560px; margin: 80px auto; padding: 40px; }
.flag-count-value { font-size: 11px; min-width: 20px; text-align: right; }
.filter-clear-btn { color: var(--text-secondary); border-color: var(--border-hover); }

/* === Responsive Breakpoints === */

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-columns { grid-template-columns: 1fr; }
  .stats-row { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .container { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  nav { gap: 12px; height: 48px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 8px; font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; font-size: 12px; }
}

/* === HTMX Loading States === */

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.btn-sm,
.htmx-request .btn-sm {
  opacity: 0.6;
  pointer-events: none;
}

.htmx-request .form-input {
  opacity: 0.6;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.htmx-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-hover);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}
