:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #182033;
  --muted: #68758c;
  --line: #dfe6f1;
  --primary: #2454ff;
  --primary-dark: #1736a8;
  --soft-blue: #eef3ff;
  --green: #1d9a5b;
  --warning: #b56b00;
  --shadow: 0 18px 40px rgba(19, 32, 60, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #e9efff 0, transparent 28%),
    radial-gradient(circle at top right, #f0f7ff 0, transparent 24%),
    var(--bg);
  color: var(--ink);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow,
.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.95;
  margin: 0;
}

.subtitle {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.status-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 12px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
  font-weight: 700;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--warning);
  border-radius: 50%;
  display: inline-block;
}

.status-dot.ok {
  background: var(--green);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items: stretch;
}

.interview-panel,
.score-panel > div,
.rubric-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.interview-panel {
  padding: 26px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.35;
  margin: 0;
}

textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  font-size: 1rem;
  line-height: 1.6;
  outline: none;
  color: var(--ink);
  background: #fbfcff;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(36, 84, 255, 0.1);
}

.action-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

button {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 800;
  font-size: 0.95rem;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: var(--soft-blue);
  color: var(--primary-dark);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.score-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.score-card,
.feedback-card,
.followup-card {
  padding: 22px;
}

.score-value {
  font-size: 4.2rem;
  line-height: 1;
  font-weight: 900;
  color: var(--primary);
}

.level {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.feedback-card p,
.followup-card p {
  line-height: 1.6;
}

.rubric-panel {
  margin-top: 22px;
  padding: 24px;
}

.rubric-panel h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.rubric-item {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.rubric-item span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.rubric-item strong {
  font-size: 1.5rem;
  color: var(--ink);
}

@media (max-width: 900px) {
  .hero,
  .panel-header {
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .rubric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-card {
    width: fit-content;
  }
}

.report-panel {
  margin-top: 22px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.report-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.report-header p {
  color: var(--muted);
  font-weight: 800;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.report-card {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.report-card span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.report-card strong {
  font-size: 1.25rem;
  color: var(--primary);
}

.report-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.report-columns h4,
.recommendation-box h4,
.timeline-box h4 {
  margin: 0 0 10px;
}

.report-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.8;
}

.recommendation-box,
.timeline-box {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-top: 14px;
}

.recommendation-box p {
  color: var(--ink);
  line-height: 1.7;
}

/* =========================
   TIMELINE (FIXED SECTION)
   ========================= */

/* FIX 1: modern readable card style replaces dark block */
.timeline-item {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 14px;
  margin: 10px 0;
  border-radius: 12px;
}

/* FIX 2: text hierarchy */
.timeline-item p {
  color: var(--ink);
  margin: 6px 0;
}

.timeline-item strong {
  color: var(--primary);
}

.timeline-item small {
  color: var(--muted);
}

/* legacy timeline styling preserved for structure compatibility */
.timeline-item:hover {
  background: #333;
}

.session-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background: #111;
  padding: 20px;
  border-radius: 10px;
  color: white;
}

.full {
  margin-top: 20px;
}

.session-bar {
  margin: 20px 0;
}

.card {
  background: white;
  padding: 16px;
  margin: 12px 0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

input[type="range"] {
  width: 100%;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px;
  font-family: Arial, sans-serif;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.card {
  display: block;
  padding: 20px;
  border-radius: 12px;
  background: #f6f8ff;
  text-decoration: none;
  color: black;
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  background: #e8eeff;
}

.panel {
  background: white;
  padding: 20px;
  margin-top: 20px;
  border-radius: 10px;
}

/* =========================
   V2 PLATFORM SHELL
========================= */

.platform-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #f6f8fb;
}

.platform-sidebar {
  background: #07111f;
  color: #ffffff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.platform-sidebar .subtitle {
  color: #c8d3e1;
}

.platform-nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  background: #2454ff;
  border-color: #2454ff;
}

.platform-main {
  padding: 32px;
  overflow-x: hidden;
}

.platform-view {
  display: none;
}

.platform-view.active {
  display: block;
}

.page-header {
  background: #ffffff;
  border: 1px solid #dce3ee;
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 24px;
}

.page-header h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.mode-card {
  background: #ffffff;
  border: 1px solid #dce3ee;
  border-radius: 22px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.mode-card:hover {
  border-color: #2454ff;
  transform: translateY(-2px);
}

.mode-card h3 {
  margin-top: 0;
}

.platform-view input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 1rem;
}

.timeline-item {
  border: 1px solid #dce3ee;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .platform-shell {
    grid-template-columns: 1fr;
  }

  .platform-sidebar {
    position: static;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .platform-main {
    padding: 18px;
  }
}
