:root {
  --ink: #172523;
  --muted: #64726f;
  --line: #dfe6e4;
  --paper: #ffffff;
  --canvas: #eef3f1;
  --brand: #175b52;
  --brand-dark: #103f3a;
  --mint: #dcece8;
  --coral: #e66a52;
  --warning: #f5bb57;
  --shadow: 0 24px 70px rgba(20, 49, 45, .14);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", Arial, sans-serif; letter-spacing: 0; }
body.login-page #app { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
button, input { font: inherit; }
button { cursor: pointer; }
.login-shell { width: 100%; max-width: 1140px; height: min(740px, calc(100vh - 64px)); min-height: 620px; margin: 0; display: grid; grid-template-columns: 44% 56%; overflow: hidden; border: 1px solid rgba(23, 91, 82, .08); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.login-panel { width: 100%; min-width: 0; padding: 34px clamp(48px, 5.5vw, 82px) 28px; display: flex; flex-direction: column; background: #fcfdfd; }
.login-top { display: flex; align-items: center; justify-content: flex-end; }
.domain { color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: Manrope, sans-serif; font-size: 19px; font-weight: 700; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--brand); color: white; font-size: 14px; }
.login-copy { width: min(100%, 420px); margin: auto; padding: 42px 0; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
h1, h2, h3 { font-family: Manrope, sans-serif; margin: 0; letter-spacing: 0; }
.login-copy h1 { margin: 9px 0 8px; font-size: 36px; line-height: 1.15; }
.login-copy form { margin-top: 34px; }
.field { display: grid; gap: 9px; margin-bottom: 19px; }
.field label { font-size: 12px; font-weight: 700; }
.field input { width: 100%; height: 54px; border: 1px solid #d7e1de; border-radius: 6px; padding: 0 16px; outline: none; background: white; transition: border-color .18s, box-shadow .18s; }
.field input:hover { border-color: #b7c8c4; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23,91,82,.09); }
.primary, .secondary, .ghost { border: 0; border-radius: 6px; font-weight: 700; min-height: 46px; padding: 0 18px; }
.primary { width: 100%; min-height: 50px; color: white; background: var(--brand); transition: background .18s, transform .18s; }
.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.secondary { color: var(--brand); background: var(--mint); }
.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.demo-access { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--muted); }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.demo-buttons button { min-height: 38px; background: white; border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; color: var(--ink); transition: background .18s, border-color .18s; }
.demo-buttons button:hover { background: var(--mint); border-color: #bdd4ce; }
.login-footer { color: #82908d; font-size: 10px; text-align: right; }
.login-visual { position: relative; height: 100%; min-height: 0; overflow: hidden; background: #e8e6e1; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.login-visual-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,32,29,.02) 35%, rgba(11,32,29,.82) 100%); }
.visual-caption { position: absolute; left: 30px; bottom: 28px; color: white; }
.visual-caption > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 30px 16px 20px; background: #102f2c; color: white; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.08); z-index: 4; }
.sidebar-brand { padding: 8px 12px 22px; color: white; font: 700 13px Manrope, sans-serif; letter-spacing: .1em; }
.nav { display: grid; gap: 7px; margin-top: 24px; }
.nav button { position: relative; height: 46px; border: 0; border-radius: 6px; color: #b9cfca; background: transparent; text-align: left; padding: 0 14px; font-weight: 600; transition: color .18s, background .18s; }
.nav button::before { content: ""; position: absolute; left: 0; top: 13px; width: 3px; height: 20px; border-radius: 0 2px 2px 0; background: transparent; }
.nav button.active { background: rgba(255,255,255,.1); color: white; }
.nav button.active::before { background: #79b9aa; }
.nav button:hover { background: rgba(255,255,255,.07); color: white; }
.sidebar-user { margin-top: auto; padding: 18px 12px 4px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user strong, .sidebar-user span { display: block; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user span { color: #98b7b1; font-size: 11px; margin: 4px 0 15px; }
.logout { padding: 0; border: 0; background: none; color: #c7d9d5; font-size: 12px; transition: color .18s; }
.logout:hover { color: white; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 76px; padding: 0 clamp(22px, 4vw, 54px); background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.topbar h2 { font-size: 19px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--coral); color: white; display: grid; place-items: center; font-weight: 700; }
.content { padding: 36px clamp(22px, 4vw, 54px) 60px; max-width: 1400px; margin: auto; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.welcome h1 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 6px; }
.welcome p, .section-head p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 34px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 7px; font: 700 29px Manrope, sans-serif; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 28px 0 16px; }
.section-head h2 { font-size: 20px; margin-bottom: 4px; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.course { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.course-image { position: relative; height: 154px; overflow: hidden; background: var(--mint); }
.course-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.course:nth-child(2) img { object-position: 24% center; }
.course:nth-child(3) img { object-position: 82% center; }
.course:hover img { transform: scale(1.025); }
.course-tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); border-radius: 4px; padding: 5px 8px; color: var(--brand-dark); font-size: 11px; font-weight: 700; }
.course-body { padding: 17px; }
.course h3 { font-size: 16px; min-height: 43px; line-height: 1.35; }
.course-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin: 14px 0; }
.progress-track { height: 6px; overflow: hidden; border-radius: 3px; background: #e7eceb; }
.progress-track i { display: block; height: 100%; background: var(--coral); }
.course-action { width: 100%; margin-top: 15px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 670px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; border-radius: 4px; padding: 5px 8px; background: var(--mint); color: var(--brand); font-size: 11px; font-weight: 700; }
.status.pending { background: #fff1d5; color: #7b5716; }
.course-view { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
.video-panel, .quiz-panel { background: white; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.video-frame { aspect-ratio: 16/9; display: grid; place-items: center; position: relative; overflow: hidden; background: #132b28; color: white; }
.video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.play-button { z-index: 1; width: 62px; height: 62px; padding-left: 5px; border: 0; border-radius: 50%; background: white; color: var(--brand); font-size: 22px; box-shadow: var(--shadow); }
.video-current { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 15px; font-size: 12px; font-weight: 700; }
.video-copy { padding: 22px; }
.video-copy h1 { font-size: 24px; margin-bottom: 9px; }
.video-copy p { color: var(--muted); line-height: 1.6; }
.lesson-list { background: white; border: 1px solid var(--line); border-radius: 7px; padding: 18px; height: fit-content; }
.lesson-list h3 { font-size: 15px; margin-bottom: 14px; }
.lesson { width: 100%; display: flex; gap: 10px; padding: 12px 8px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: 13px; }
.lesson:hover, .lesson.active { background: var(--mint); }
.lesson span:first-child { color: var(--brand); font-weight: 700; }
.quiz-panel { max-width: 760px; padding: clamp(22px, 4vw, 40px); }
.quiz-panel h1 { font-size: 26px; }
.compact-quiz { min-height: 485px; display: flex; flex-direction: column; }
.quiz-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.quiz-heading h1 { margin-top: 6px; font-size: 22px; }
.quiz-heading > strong { color: var(--brand); font-size: 13px; white-space: nowrap; }
.quiz-progress { height: 5px; margin: 22px 0 8px; overflow: hidden; border-radius: 3px; background: #e7eceb; }
.quiz-progress i { display: block; height: 100%; background: var(--coral); transition: width .2s; }
.question { margin: 28px 0; }
.question > p { font-weight: 700; line-height: 1.45; }
.single-question { margin: 20px 0; }
.single-question > p { min-height: 46px; margin: 0 0 16px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.option:has(input:checked) { background: var(--mint); border-color: var(--brand); }
.quiz-actions { display: grid; grid-template-columns: 120px 1fr; gap: 10px; margin-top: auto; padding-top: 18px; }
.quiz-actions .primary { min-height: 46px; }
.quiz-actions button:disabled { cursor: default; opacity: .4; }
.result-box { padding: 34px; text-align: center; background: var(--mint); border-radius: 7px; }
.result-box strong { display: block; font: 700 48px Manrope, sans-serif; color: var(--brand); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 330px; padding: 13px 16px; background: #172523; color: white; border-radius: 6px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; z-index: 10; }
.toast.show { opacity: 1; transform: translateY(0); }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
@media (max-width: 960px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-view { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body.login-page #app { display: block; padding: 16px; }
  .login-shell { display: block; width: 100%; height: auto; min-height: 0; margin: 0; background: white; }
  .login-visual { width: 100%; height: auto; aspect-ratio: 2 / 3; }
  .login-visual img { object-position: center; }
  .login-visual-shade { background: linear-gradient(180deg, rgba(11,32,29,.04), rgba(11,32,29,.56)); }
  .visual-caption { left: 24px; bottom: 22px; }
  .visual-caption { left: 20px; bottom: 20px; }
  .visual-caption > span { display: block; }
  .login-panel { min-height: 660px; padding: 24px; }
  .login-top { align-items: flex-start; }
  .domain { display: block; }
  .login-copy { margin: 35px 0; padding: 0; }
  .login-copy h1 { font-size: 29px; }
  .demo-buttons { grid-template-columns: 1fr; }
  .demo-buttons button { width: 100%; }
  .login-footer { margin-top: auto; text-align: center; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; }
  .menu-button { display: block; }
  .topbar { height: 66px; padding: 0 20px; }
  .topbar > div:first-child { display: flex; align-items: center; gap: 12px; }
  .content { padding: 26px 20px 50px; }
  .stats, .course-grid { grid-template-columns: 1fr; }
  .welcome { align-items: flex-start; flex-direction: column; }
}
