:root {
  --ink: #0d1726;
  --navy: #071321;
  --navy-2: #102337;
  --cyan: #08afe2;
  --cyan-soft: #eaf9fe;
  --yellow: #ffc400;
  --yellow-soft: #fff8d8;
  --paper: #f5f7fa;
  --card: #ffffff;
  --muted: #667085;
  --line: #e7ebf0;
  --green: #1c9b69;
  --red: #c55252;
  --radius: 24px;
  --shadow: 0 16px 40px rgba(13, 23, 38, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  background: var(--navy);
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}
.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: .18;
}
.login-brand::before { width: 520px; height: 520px; background: var(--cyan); right: -260px; top: -230px; }
.login-brand::after { width: 360px; height: 360px; background: var(--yellow); left: -220px; bottom: -220px; }
.login-brand img { width: 150px; border-radius: 28px; margin-bottom: 42px; box-shadow: 0 24px 60px rgba(0,0,0,.32); position: relative; z-index: 1; }
.product-name { color: var(--cyan); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 13px; }
.login-brand h1 { font-size: clamp(44px, 5.2vw, 78px); line-height: .98; margin: 16px 0 24px; max-width: 760px; letter-spacing: -.055em; }
.login-brand p { color: #c6d0dc; font-size: 18px; line-height: 1.6; max-width: 540px; margin: 0; }
.login-panel { background: #fff; padding: clamp(32px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px; background: var(--paper); margin-bottom: 34px; }
.login-tab { border: 0; padding: 13px; border-radius: 12px; color: var(--muted); font-weight: 750; background: transparent; }
.login-tab.active { background: white; color: var(--ink); box-shadow: 0 4px 16px rgba(13,23,38,.08); }
.login-form { display: none; }
.login-form.active { display: block; animation: fade .24s ease; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { color: #344054; font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; background: #fff; color: var(--ink); outline: none; transition: .18s ease; }
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(8,175,226,.12); }
.button { border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #071321; background: var(--yellow); box-shadow: 0 10px 24px rgba(255,196,0,.24); }
.button.dark { color: #fff; background: var(--navy); }
.button.soft { color: var(--ink); background: var(--paper); }
.button.outline { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button.wide { width: 100%; padding: 15px; }
.demo-help { color: var(--muted); font-size: 13px; text-align: center; margin: 14px 0 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.trust-row span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: #475467; background: var(--paper); border-radius: 999px; padding: 8px 10px; }

.app { min-height: 100vh; }
.side-rail { width: 230px; position: fixed; inset: 0 auto 0 0; background: var(--navy); color: white; padding: 28px 18px 20px; display: flex; flex-direction: column; z-index: 30; }
.rail-logo { display: flex; justify-content: center; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rail-logo img { width: 108px; border-radius: 18px; }
.rail-nav { display: grid; gap: 7px; margin-top: 28px; }
.rail-item { border: 0; background: transparent; color: #aebbc9; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 14px; font-weight: 700; text-align: left; }
.rail-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.rail-item.active { color: #071321; background: var(--yellow); }
.nav-icon { width: 22px; text-align: center; font-size: 18px; }
.rail-logout { margin-top: auto; border: 0; background: transparent; color: #91a0b1; padding: 12px; font-weight: 700; }
.app-main { margin-left: 230px; min-height: 100vh; }
.page { display: none; max-width: 1320px; margin: 0 auto; padding: 40px clamp(26px, 4vw, 58px) 70px; }
.page.active { display: block; animation: fade .24s ease; }
.mobile-header, .bottom-nav { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin: 5px 0 7px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -.045em; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.6; }
.kicker { color: #067ea3; font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.hero-card { position: relative; overflow: hidden; border-radius: 30px; padding: clamp(26px, 4vw, 48px); background: var(--navy); color: white; box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(8,175,226,.19); right: -80px; top: -130px; }
.hero-card .hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); align-items: end; gap: 26px; position: relative; z-index: 1; }
.hero-card h1 { margin: 8px 0 14px; max-width: 720px; font-size: clamp(35px, 4.4vw, 61px); line-height: 1.03; letter-spacing: -.052em; }
.hero-card p { margin: 0; color: #b9c8d7; line-height: 1.65; max-width: 660px; }
.hero-card .kicker { color: var(--cyan); }
.focus-panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); border-radius: 22px; padding: 20px; backdrop-filter: blur(8px); }
.focus-panel small { display: block; color: #a9bacb; margin-bottom: 10px; }
.focus-panel strong { display: block; font-size: 20px; line-height: 1.35; }
.focus-panel span { display: inline-flex; margin-top: 14px; color: var(--navy); background: var(--yellow); padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.metric .metric-value { display: block; font-size: 27px; font-weight: 850; letter-spacing: -.03em; }
.metric .metric-label { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr); gap: 18px; margin-top: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 30px rgba(13,23,38,.035); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-head h2 { font-size: 21px; margin: 3px 0 0; letter-spacing: -.025em; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.link-button { border: 0; padding: 0; background: transparent; color: #067ea3; font-weight: 800; }

.feedback-feature { padding: 0; overflow: hidden; }
.feedback-top { padding: 24px; background: linear-gradient(135deg, var(--cyan-soft), #fff); }
.feedback-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #fff; color: #067ea3; font-size: 11px; font-weight: 850; }
.feedback-top h2 { margin: 18px 0 8px; font-size: 25px; letter-spacing: -.035em; }
.feedback-top p { color: #344054; line-height: 1.65; margin: 0; }
.feedback-bottom { padding: 21px 24px 24px; display: grid; gap: 16px; }
.feedback-line { display: grid; grid-template-columns: 34px 1fr; gap: 11px; }
.feedback-line .line-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--paper); font-weight: 900; }
.feedback-line strong { display: block; font-size: 13px; }
.feedback-line p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.pressure-map { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pressure-cell { min-height: 102px; border-radius: 18px; padding: 15px; background: var(--paper); border: 1px solid transparent; display: flex; flex-direction: column; justify-content: space-between; }
.pressure-cell.active { background: var(--yellow-soft); border-color: #f3d45c; }
.pressure-cell.strong { background: var(--cyan-soft); border-color: #a5e5f7; }
.pressure-cell small { color: var(--muted); }
.pressure-cell strong { font-size: 18px; }
.pressure-cell .level { font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }

.next-card { background: var(--yellow); border-color: transparent; color: var(--navy); }
.next-card .kicker { color: #634d00; }
.next-card h2 { margin: 9px 0 10px; font-size: 25px; }
.next-card p { margin: 0; line-height: 1.6; color: #493c0c; }
.next-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(7,19,33,.15); }
.next-date strong { font-size: 15px; }
.next-date span { font-size: 12px; font-weight: 850; background: rgba(255,255,255,.62); border-radius: 999px; padding: 7px 10px; }

.skill-list { display: grid; gap: 15px; }
.skill-row { display: grid; grid-template-columns: 150px 1fr 72px; align-items: center; gap: 12px; }
.skill-row strong { font-size: 13px; }
.skill-track { height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: inherit; background: var(--cyan); }
.skill-state { color: var(--muted); font-size: 11px; text-align: right; font-weight: 750; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 22px; }
.timeline-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: white; border: 2px solid var(--cyan); color: #067ea3; font-weight: 900; z-index: 1; }
.timeline-item.milestone .timeline-dot { border-color: var(--yellow); background: var(--yellow-soft); color: #6c5200; }
.timeline-copy { padding: 5px 0 0; }
.timeline-copy .timeline-date { color: var(--muted); font-size: 11px; }
.timeline-copy h3 { margin: 4px 0 5px; font-size: 15px; }
.timeline-copy p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }

.library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.library-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: #fff; min-height: 150px; display: flex; flex-direction: column; }
.library-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--cyan-soft); color: #067ea3; font-weight: 900; }
.library-card h3 { margin: 17px 0 6px; font-size: 15px; }
.library-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.library-card .file-meta { margin-top: auto; padding-top: 16px; font-size: 11px; font-weight: 800; color: #475467; }

.list { display: grid; gap: 10px; }
.list-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 15px; }
.avatar { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--navy); color: white; font-weight: 850; }
.avatar.cyan { background: var(--cyan-soft); color: #067ea3; }
.avatar.yellow { background: var(--yellow-soft); color: #6c5200; }
.list-copy strong { display: block; font-size: 14px; }
.list-copy span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; background: var(--paper); color: #475467; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status.review { background: var(--yellow-soft); color: #6c5200; }
.status.ready { background: #eaf7f1; color: #187350; }
.status.future { background: var(--cyan-soft); color: #067ea3; }

.queue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.queue-card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 21px; }
.queue-card strong { display: block; font-size: 30px; letter-spacing: -.04em; }
.queue-card span { color: var(--muted); font-size: 12px; }
.queue-card.highlight { background: var(--yellow); border-color: transparent; }
.queue-card.highlight span { color: #5e4b08; }

.student-detail { display: grid; grid-template-columns: 310px 1fr; gap: 18px; }
.profile-card { text-align: center; }
.profile-avatar { width: 88px; height: 88px; border-radius: 28px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--navy); color: white; font-size: 31px; font-weight: 900; }
.profile-card h2 { margin: 0 0 5px; }
.profile-card p { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.profile-data { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.profile-data div { padding: 13px; border-radius: 15px; background: var(--paper); }
.profile-data small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.profile-data strong { display: block; margin-top: 5px; font-size: 13px; }

.empty { padding: 36px; text-align: center; color: var(--muted); border: 1px dashed #cfd6df; border-radius: 20px; background: rgba(255,255,255,.5); }

.modal { width: min(620px, calc(100vw - 28px)); border: 0; border-radius: 26px; padding: 0; box-shadow: 0 30px 90px rgba(7,19,33,.3); }
.modal::backdrop { background: rgba(7,19,33,.58); backdrop-filter: blur(4px); }
.modal form { padding: 26px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.modal-head h2 { margin: 5px 0 0; font-size: 27px; letter-spacing: -.04em; }
.modal-close { border: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--paper); font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle-row { display: flex; align-items: center; gap: 10px; color: #344054; font-size: 13px; font-weight: 700; }
.toggle-row input { width: auto; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; background: var(--navy); color: white; border-radius: 14px; padding: 13px 16px; box-shadow: 0 18px 45px rgba(7,19,33,.25); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; font-weight: 700; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: 48vh; padding: 38px 28px; }
  .login-brand img { width: 104px; margin-bottom: 24px; }
  .login-brand h1 { font-size: 48px; }
  .login-panel { padding: 38px 28px 48px; }
  .side-rail { display: none; }
  .app-main { margin-left: 0; padding-bottom: 84px; }
  .mobile-header { position: sticky; top: 0; z-index: 25; height: 66px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: rgba(245,247,250,.92); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(231,235,240,.8); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-weight: 850; font-size: 14px; }
  .brand-dot { width: 13px; height: 13px; border-radius: 4px; background: linear-gradient(135deg, var(--cyan) 50%, var(--yellow) 50%); }
  .avatar-button { border: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--navy); color: white; font-weight: 900; }
  .coach-avatar { background: var(--yellow); color: var(--navy); }
  .bottom-nav { display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; grid-template-columns: repeat(4, 1fr); padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bottom-item { border: 0; background: transparent; color: #7c8796; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; font-size: 10px; font-weight: 800; }
  .bottom-item span { font-size: 18px; }
  .bottom-item.active { color: #067ea3; }
  .coach-bottom .bottom-item.active { color: #7a5f00; }
  .page { padding: 22px 16px 28px; }
  .hero-card { border-radius: 24px; padding: 25px 21px; }
  .hero-card .hero-grid { grid-template-columns: 1fr; }
  .hero-card h1 { font-size: 38px; }
  .focus-panel { margin-top: 4px; }
  .content-grid, .student-detail { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .login-brand { min-height: 43vh; }
  .login-brand h1 { font-size: 39px; }
  .login-brand p { font-size: 15px; }
  .login-panel { padding: 30px 20px 42px; }
  .trust-row span { font-size: 9px; }
  .page-head { display: block; }
  .page-head h1 { font-size: 34px; }
  .header-actions { justify-content: flex-start; margin-top: 18px; }
  .header-actions .button { flex: 1; min-width: 135px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics .metric:last-child { grid-column: span 2; }
  .content-grid { margin-top: 14px; gap: 14px; }
  .card { border-radius: 21px; padding: 20px; }
  .pressure-cell { min-height: 94px; padding: 13px; }
  .skill-row { grid-template-columns: 115px 1fr; }
  .skill-state { grid-column: 2; text-align: left; margin-top: -7px; }
  .library-grid { grid-template-columns: 1fr; }
  .queue-grid { grid-template-columns: 1fr 1fr; }
  .queue-card:last-child { grid-column: span 2; }
  .list-row { grid-template-columns: auto 1fr; }
  .list-row .status, .list-row .button { grid-column: 2; justify-self: start; }
  .split-fields { grid-template-columns: 1fr; gap: 0; }
  .modal form { padding: 22px 18px; }
}
