/* ============================================================
   IMPETUS — CEO TRAINING HUB
   CLIENT MVP
   SESSION PREPARATION V1
   ============================================================ */


:root {
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-soft: #171b21;
  --surface-raised: #1d2229;

  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  --text: #f5f7fa;
  --text-soft: #a6adb7;
  --text-muted: #717985;

  --accent: #d6ff4b;
  --accent-soft: rgba(214,255,75,0.12);

  --danger: #ff7373;
  --success: #7ce7a6;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow:
    0 24px 60px rgba(0,0,0,0.3);

  --max-width: 760px;
}


* {
  box-sizing: border-box;
}


html {
  min-height: 100%;
}


body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at top right,
      rgba(214,255,75,0.06),
      transparent 28%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  -webkit-font-smoothing:
    antialiased;
}


button,
input,
textarea,
select {
  font: inherit;
}


button {
  cursor: pointer;
}


button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}


#app {
  min-height: 100vh;
}


/* ============================================================
   GENERIC
   ============================================================ */


.screen {
  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;

  padding:
    22px
    18px
    60px;
}


.brand-mark {
  font-size: 18px;
  font-weight: 900;

  letter-spacing: 0.2em;
}


.brand-subtitle {
  color: var(--text-muted);

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}


.page-subtitle {
  margin: 0;

  color: var(--text-soft);

  font-size: 15px;
  line-height: 1.55;
}


.section-title {
  margin:
    30px
    0
    12px;

  color: var(--text-soft);

  font-size: 13px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}


.card {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.025),
      rgba(255,255,255,0.005)
    ),
    var(--surface);

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  padding: 18px;
}


.card + .card {
  margin-top: 12px;
}


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


.hidden {
  display: none !important;
}


/* ============================================================
   HEADER
   ============================================================ */


.topbar {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 26px;
}


.topbar-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}


.icon-button {
  min-width: 42px;
  height: 42px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--border);

  border-radius: 50%;

  background: var(--surface);

  color: var(--text);

  font-size: 16px;
}


/* ============================================================
   BUTTONS
   ============================================================ */


.button {
  width: 100%;

  min-height: 50px;

  border: 0;

  border-radius:
    var(--radius-md);

  padding:
    13px
    16px;

  font-weight: 800;
}


.button-primary {
  background: var(--accent);

  color: #0a0c0e;
}


.button-secondary {
  background:
    var(--surface-raised);

  color: var(--text);

  border:
    1px solid
    var(--border);
}


.button-group {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 10px;

  margin-top: 16px;
}


/* ============================================================
   LOGIN
   ============================================================ */


.login-screen {
  min-height: 100vh;

  display: flex;

  flex-direction: column;

  justify-content: center;
}


.login-brand {
  margin-bottom: 42px;
}


.login-heading {
  margin:
    32px
    0
    8px;

  font-size: 38px;

  letter-spacing: -0.05em;
}


.login-copy {
  max-width: 430px;

  margin:
    0
    0
    28px;

  color: var(--text-soft);

  line-height: 1.6;
}


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


.form-label {
  display: block;

  margin-bottom: 7px;

  color: var(--text-soft);

  font-size: 13px;
  font-weight: 700;
}


.input {
  width: 100%;

  min-height: 50px;

  padding:
    12px
    14px;

  border:
    1px solid
    var(--border-strong);

  border-radius:
    var(--radius-md);

  outline: none;

  background:
    var(--surface);

  color: var(--text);
}


.input:focus {
  border-color:
    rgba(214,255,75,0.55);

  box-shadow:
    0 0 0 3px
    rgba(214,255,75,0.08);
}


textarea.input {
  min-height: 92px;

  resize: vertical;
}


.form-error {
  margin-top: 14px;

  color: var(--danger);

  font-size: 13px;
}


/* ============================================================
   DASHBOARD
   ============================================================ */


.welcome {
  margin-bottom: 26px;
}


.welcome-eyebrow {
  color: var(--text-muted);

  font-size: 13px;
}


.welcome-title {
  margin:
    5px
    0
    0;

  font-size: 32px;

  letter-spacing:
    -0.045em;
}


.status-row {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 14px;
}


.badge {
  display: inline-flex;

  align-items: center;

  min-height: 28px;

  padding:
    4px
    9px;

  border-radius: 999px;

  background:
    var(--surface-raised);

  color:
    var(--text-soft);

  border:
    1px solid
    var(--border);

  font-size: 11px;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.05em;
}


.badge-accent {
  color: var(--accent);

  background:
    var(--accent-soft);

  border-color:
    rgba(214,255,75,0.17);
}


.session-hero {
  position: relative;

  overflow: hidden;

  padding: 22px;
}


.session-hero::after {
  content: "";

  position: absolute;

  width: 190px;
  height: 190px;

  right: -85px;
  top: -100px;

  border-radius: 50%;

  background:
    rgba(214,255,75,0.08);
}


.session-kicker {
  position: relative;

  z-index: 1;

  color: var(--accent);

  font-size: 12px;
  font-weight: 900;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}


.session-name {
  position: relative;

  z-index: 1;

  margin:
    10px
    0
    8px;

  font-size: 27px;

  letter-spacing:
    -0.04em;
}


.session-meta {
  position: relative;

  z-index: 1;

  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin:
    14px
    0
    20px;
}


.empty-state {
  text-align: center;

  padding:
    34px
    20px;
}


.empty-state-title {
  font-size: 19px;

  font-weight: 800;
}


.empty-state-copy {
  margin:
    8px
    0
    0;

  color:
    var(--text-muted);

  font-size: 14px;

  line-height: 1.6;
}


/* ============================================================
   SESSION
   ============================================================ */


.session-header {
  margin-bottom: 26px;
}


.session-title {
  margin:
    14px
    0
    8px;

  font-size: 31px;

  letter-spacing:
    -0.045em;
}


/* ============================================================
   SESSION PREPARATION
   ============================================================ */


.preparation-card {
  padding: 20px;
}


.prep-block {
  position: relative;
}


.prep-step {
  margin-bottom: 7px;

  color: var(--accent);

  font-size: 10px;

  font-weight: 900;

  letter-spacing: 0.12em;
}


.prep-heading {
  margin:
    0
    0
    6px;

  font-size: 21px;

  letter-spacing:
    -0.035em;
}


.prep-copy {
  margin:
    0
    0
    16px;

  color: var(--text-muted);

  font-size: 13px;

  line-height: 1.5;
}


.prep-divider {
  height: 1px;

  margin:
    22px
    0;

  background:
    var(--border);
}


/* ============================================================
   CONTEXT
   ============================================================ */


.context-options {
  display: grid;

  grid-template-columns: 1fr;

  gap: 9px;
}


.context-option {
  position: relative;

  width: 100%;

  display: flex;

  flex-direction: column;

  gap: 8px;

  padding:
    15px
    42px
    15px
    15px;

  text-align: left;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-md);

  background:
    var(--surface-soft);

  color:
    var(--text);

  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}


.context-option:active {
  transform:
    scale(0.99);
}


.context-option.active {
  border-color:
    rgba(214,255,75,0.65);

  background:
    var(--accent-soft);
}


.context-option-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;
}


.context-name {
  font-size: 15px;

  font-weight: 850;
}


.context-duration {
  color: var(--accent);

  font-size: 12px;

  font-weight: 800;
}


.context-description {
  color: var(--text-soft);

  font-size: 13px;

  line-height: 1.4;
}


.selection-check {
  position: absolute;

  right: 14px;
  top: 50%;

  width: 22px;
  height: 22px;

  display: flex;

  align-items: center;
  justify-content: center;

  transform:
    translateY(-50%);

  border:
    1px solid
    var(--border-strong);

  border-radius: 50%;

  color: transparent;

  font-size: 12px;

  font-weight: 900;
}


.context-option.active
.selection-check {
  background: var(--accent);

  border-color: var(--accent);

  color: #0b0d10;
}


/* ============================================================
   READINESS
   ============================================================ */


.readiness-options {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 8px;
}


.readiness-option {
  min-height: 48px;

  padding:
    8px
    6px;

  border:
    1px solid
    var(--border);

  border-radius:
    13px;

  background:
    var(--surface-soft);

  color:
    var(--text-soft);

  font-size: 13px;

  font-weight: 800;
}


.readiness-option.active {
  background:
    var(--accent);

  color:
    #0a0c0e;

  border-color:
    var(--accent);
}


/* ============================================================
   EQUIPMENT
   ============================================================ */


.equipment-summary {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 14px;
}


.equipment-status {
  color: var(--text);

  font-size: 14px;

  font-weight: 800;
}


.equipment-status::first-letter {
  color: var(--accent);
}


.equipment-helper {
  margin-top: 4px;

  color: var(--text-muted);

  font-size: 12px;
}


.equipment-change {
  border: 0;

  background: transparent;

  color: var(--accent);

  font-size: 12px;

  font-weight: 850;
}


.equipment-options {
  display: grid;

  grid-template-columns: 1fr;

  gap: 7px;

  margin-top: 14px;
}


.equipment-option {
  min-height: 44px;

  padding:
    10px
    12px;

  border:
    1px solid
    var(--border);

  border-radius:
    12px;

  background:
    var(--surface-soft);

  color:
    var(--text-soft);

  text-align: left;

  font-size: 13px;

  font-weight: 750;
}


.equipment-option.active {
  border-color:
    rgba(214,255,75,0.55);

  color: var(--accent);

  background:
    var(--accent-soft);
}


/* ============================================================
   PREPARATION SUMMARY
   ============================================================ */


.prep-result {
  display: flex;

  align-items: center;

  gap: 8px;

  margin:
    24px
    0
    12px;

  padding:
    12px
    14px;

  border:
    1px solid
    var(--border);

  border-radius:
    13px;

  background:
    rgba(255,255,255,0.025);

  font-size: 12px;
}


.prep-result-label {
  color:
    var(--text-muted);
}


.prep-result strong {
  margin-left: auto;

  color:
    var(--text);
}


.prep-result span:last-child {
  color:
    var(--accent);

  font-weight: 800;
}


.preparation-note {
  margin:
    11px
    2px
    0;

  text-align: center;

  color:
    var(--text-muted);

  font-size: 11px;

  line-height: 1.5;
}


/* ============================================================
   EXERCISE
   ============================================================ */


.exercise-card {
  padding: 0;

  overflow: hidden;
}


.exercise-main {
  padding: 18px;
}


.exercise-number {
  color: var(--accent);

  font-size: 11px;
  font-weight: 900;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}


.exercise-name {
  margin:
    7px
    0
    4px;

  font-size: 22px;

  letter-spacing:
    -0.035em;
}


.exercise-instruction {
  margin:
    10px
    0
    0;

  color: var(--text-soft);

  font-size: 14px;

  line-height: 1.55;
}


.exercise-prescription {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 8px;

  margin-top: 16px;
}


.metric {
  padding: 11px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-sm);

  background:
    var(--surface-soft);
}


.metric-label {
  display: block;

  margin-bottom: 5px;

  color:
    var(--text-muted);

  font-size: 10px;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.05em;
}


.metric-value {
  font-size: 14px;

  font-weight: 800;
}


/* ============================================================
   HISTORY
   ============================================================ */


.history-box {
  margin-top: 16px;

  padding: 14px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-md);

  background:
    rgba(255,255,255,0.025);
}


.history-title {
  margin-bottom: 10px;

  color:
    var(--text-muted);

  font-size: 11px;

  font-weight: 900;

  text-transform: uppercase;

  letter-spacing: 0.07em;
}


.history-set {
  display: flex;

  justify-content: space-between;

  gap: 12px;

  padding:
    7px
    0;

  border-bottom:
    1px solid
    var(--border);

  font-size: 13px;
}


.history-set:last-child {
  border-bottom: 0;
}


/* ============================================================
   SET LOGGING
   ============================================================ */


.sets-area {
  padding:
    16px
    18px
    18px;

  background:
    rgba(255,255,255,0.018);

  border-top:
    1px solid
    var(--border);
}


.set-header {
  display: grid;

  grid-template-columns:
    34px 1fr 1fr 1fr 42px;

  gap: 7px;

  align-items: center;

  margin-bottom: 7px;

  color:
    var(--text-muted);

  font-size: 10px;

  font-weight: 800;

  text-align: center;

  text-transform: uppercase;
}


.set-row {
  display: grid;

  grid-template-columns:
    34px 1fr 1fr 1fr 42px;

  gap: 7px;

  align-items: center;

  margin-bottom: 8px;
}


.set-number {
  display: flex;

  align-items: center;
  justify-content: center;

  color:
    var(--text-soft);

  font-weight: 800;
}


.set-input {
  width: 100%;

  min-width: 0;

  height: 42px;

  padding: 6px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--bg);

  color:
    var(--text);

  outline: none;

  text-align: center;
}


.set-save {
  width: 42px;
  height: 42px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface-raised);

  color:
    var(--text);
}


.set-save.saved {
  background:
    var(--success);

  color:
    #0b0d10;

  border-color:
    transparent;
}


/* ============================================================
   REVIEW
   ============================================================ */


.review-grid {
  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 7px;
}


.rating-option {
  min-height: 44px;

  border:
    1px solid
    var(--border);

  border-radius: 11px;

  background:
    var(--surface);

  color:
    var(--text-soft);

  font-weight: 800;
}


.rating-option.active {
  background:
    var(--accent);

  color:
    #0a0c0e;

  border-color:
    var(--accent);
}


.rating-ten {
  grid-template-columns:
    repeat(5, 1fr);
}


.pain-option.active {
  background:
    var(--accent);

  color:
    #0a0c0e;

  border-color:
    var(--accent);
}


/* ============================================================
   FEEDBACK
   ============================================================ */


.toast {
  position: fixed;

  left: 50%;
  bottom: 24px;

  z-index: 999;

  width:
    calc(100% - 32px);

  max-width: 440px;

  transform:
    translateX(-50%);

  padding:
    13px
    15px;

  border:
    1px solid
    var(--border);

  border-radius: 13px;

  background:
    #20252c;

  color:
    var(--text);

  box-shadow:
    var(--shadow);

  font-size: 13px;
}


.spinner {
  width: 22px;
  height: 22px;

  margin:
    20px
    auto;

  border:
    2px solid
    rgba(255,255,255,0.12);

  border-top-color:
    var(--accent);

  border-radius: 50%;

  animation:
    spin 0.7s linear infinite;
}


@keyframes spin {

  to {
    transform:
      rotate(360deg);
  }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */


@media (min-width: 640px) {

  .screen {
    padding-top: 34px;

    padding-left: 24px;

    padding-right: 24px;
  }


  .exercise-main {
    padding: 22px;
  }


  .sets-area {
    padding:
      18px
      22px
      22px;
  }


  .welcome-title {
    font-size: 38px;
  }


  .session-title {
    font-size: 38px;
  }


  .context-options {
    grid-template-columns:
      repeat(3, 1fr);
  }


  .context-option {
    min-height: 156px;

    padding:
      16px;
  }


  .context-option-top {
    display: block;
  }


  .context-duration {
    display: block;

    margin-top: 5px;
  }


  .selection-check {
    top: auto;

    right: 14px;
    bottom: 14px;

    transform: none;
  }


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