/* EduFlow Enterprise LMS redesign: restrained, responsive, production-grade */
:root {
  --bg: #f4f5f7;
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --ink: #0f172a;
  --muted: #64748b;
  --soft-muted: #94a3b8;
  --line: #dbe3ef;
  --line-strong: #cbd5e1;
  --primary: #0f3d5e;
  --primary-dark: #0b2d45;
  --primary-soft: #e8f1f6;
  --accent: #157f72;
  --success: #047857;
  --success-soft: #e7f6ee;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b42318;
  --danger-soft: #fff1f1;
  --shadow: 0 22px 54px rgba(15, 23, 42, .09);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, .055);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { font-size: 14.5px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body:before { content: none !important; }
body.home-page, body.auth-page, body.dashboard-page { background: var(--page); }
a { text-decoration: none; }
p { color: var(--muted); line-height: 1.55; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.page { padding: 24px 0 48px; }
.app-page-shell { padding-top: 22px; }
.stack { gap: 12px; }
.grid { gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

h1, h2, h3, h4 { color: var(--text); letter-spacing: -.032em; line-height: 1.08; }
h1 { font-size: clamp(2rem, 4.2vw, 4rem); }
h2 { font-size: clamp(1.25rem, 2.3vw, 2rem); }
h3 { font-size: 1rem; }
.lead { font-size: .98rem; max-width: 58ch; color: #526173; }
.eyebrow {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #dbe8f0;
  background: #f5f9fc;
  color: #345066;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .095em;
  text-transform: uppercase;
}

/* Navigation */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(203,213,225,.8);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.nav-inner { min-height: 58px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; color: var(--text); }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-grid; place-items: center;
  background: linear-gradient(135deg, #0f3d5e, #157f72);
  color: #fff; font-size: .9rem; font-weight: 900;
  box-shadow: 0 8px 18px rgba(15,61,94,.16);
}
.nav-links { gap: 4px; }
.nav-link {
  padding: 7px 9px;
  border-radius: 8px;
  color: #475569;
  font-size: .86rem;
  font-weight: 760;
}
.nav-link:hover, .nav-link.active { background: #edf4f7; color: #0f3d5e; }
.nav-mobile-toggle { display: none; }

/* Controls */
.btn {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 780;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,23,42,.08); }
.btn-primary { background: #0f3d5e; color: #fff; }
.btn-primary:hover { background: #0b2d45; }
.btn-outline { background: #fff; border-color: #d7e0ea; color: #253346; }
.btn-success { background: #047857; color: #fff; }
.btn-danger { background: #b42318; color: #fff; }
.btn-small { min-height: 31px; padding: 6px 9px; border-radius: 8px; font-size: .8rem; }
.status-pill, .badge {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
  line-height: 1;
  font-weight: 820;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #475569;
}
.status-online, .badge-success { color: #047857; background: var(--success-soft); border-color: #c7ead7; }
.status-offline, .badge-warning { color: #b45309; background: var(--warning-soft); border-color: #fed7aa; }
.status-sync, .badge-primary { color: #0f3d5e; background: var(--primary-soft); border-color: #cfe1ea; }
.badge-neutral { color: #475569; background: #f1f5f9; }

.card, .feature-tile, .home-role-card, .role-card, .auth-choice, .auth-card, .auth-brand-card,
.dashboard-hero, .hero-kpi-card, .course-hero-panel, .module-sidebar, .quiz-question, .quiz-submit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card { padding: 17px; }
.card-lg { padding: 22px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.section-head { align-items: center; gap: 14px; margin-bottom: 14px; }
.section-head p { max-width: 46ch; font-size: .9rem; }
.compact-head h2 { font-size: clamp(1.15rem, 1.8vw, 1.55rem); }

input, textarea, select, .input {
  min-height: 39px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font-size: .92rem;
}
input:focus, textarea:focus, select:focus, .input:focus {
  border-color: #6a94ad;
  box-shadow: 0 0 0 3px rgba(15,61,94,.11);
}
textarea { min-height: 96px; }
.form { gap: 12px; }
.field { gap: 6px; }
.field span, .field label { color: #334155; font-size: .78rem; font-weight: 800; }
.form-grid { gap: 12px; }

/* Home: first-class LMS landing page */
.home-hero {
  min-height: auto;
  padding: 64px 0 52px;
  border-bottom: 1px solid #dbe3ef;
  background:
    linear-gradient(90deg, rgba(15,61,94,.045) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  background-size: 56px 56px, auto;
}
.home-glow { display: none; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 52px; align-items: center; }
.home-copy { max-width: 650px; display: grid; gap: 16px; }
.home-copy h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.065em; }
.home-copy .lead { font-size: 1.02rem; max-width: 520px; color: #475569; }
.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 6px; }
.home-actions .btn { min-width: 118px; }
.home-trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.home-trust-row span {
  padding: 6px 9px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  font-weight: 740;
  box-shadow: none;
}
.home-preview { min-height: 360px; display: grid; align-items: center; justify-items: center; position: relative; }
.preview-card.main-preview-card {
  width: min(410px, 100%);
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #d6e0eb;
  box-shadow: 0 30px 70px rgba(15,23,42,.12);
  background: #fff;
}
.preview-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-topbar strong { font-size: .92rem; }
.preview-topbar span { display: block; color: #64748b; font-size: .78rem; margin-top: 2px; }
.preview-chart { height: 130px; display: flex; align-items: end; gap: 8px; padding: 18px 4px 8px; border-bottom: 1px solid #edf2f7; }
.preview-chart span { flex: 1; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #0f3d5e, #93b5c8); min-height: 24px; }
.preview-list { display: grid; gap: 8px; margin-top: 12px; }
.preview-list div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 11px; background: #f8fafc; border: 1px solid #edf2f7; }
.preview-list p { font-size: .82rem; color: #334155; }
.preview-list strong { font-size: .8rem; color: #0f172a; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: #0f3d5e; }
.floating-card {
  position: absolute;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15,23,42,.11);
}
.floating-card-one { left: 2px; bottom: 32px; }
.floating-card-two { right: 4px; top: 22px; }
.floating-card strong { display: block; font-size: .78rem; }
.floating-card small { display: block; color: #64748b; font-size: .7rem; }
.mini-icon { width: 28px; height: 28px; border-radius: 8px; background: #e8f1f6; color: #0f3d5e; display:grid; place-items:center; font-weight:900; font-size:.8rem; }
.home-section { padding: 34px 0; }
.home-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-role-card { min-height: 190px; padding: 18px; display: grid; align-content: start; gap: 12px; position: relative; overflow: hidden; }
.home-role-card:before { content: none; }
.role-icon { width: 42px; height: 42px; border-radius: 12px; display:grid; place-items:center; background: #eef5f7; color:#0f3d5e; font-weight:900; box-shadow:none; }
.home-role-card h3 { font-size: 1.05rem; }
.home-role-card p { font-size: .86rem; }
.role-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.text-link { color: #0f3d5e; font-weight: 760; font-size: .85rem; }
.home-features-wrap { display: grid; grid-template-columns: 1.35fr .85fr .85fr; gap: 14px; }
.feature-tile { min-height: 154px; padding: 18px; box-shadow: var(--shadow-soft); }
.feature-tile-primary { background: linear-gradient(135deg, #0f3d5e, #145f69); color: #fff; }
.feature-tile-primary h2, .feature-tile-primary p, .feature-tile-primary .eyebrow { color: #fff; }
.feature-tile-primary .eyebrow { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.feature-icon { width: 36px; height: 36px; border-radius: 10px; display:grid; place-items:center; background:#eef5f7; color:#0f3d5e; font-weight:900; }
.home-cta-panel { margin: 8px auto 42px; padding: 22px; border-radius: 20px; background:#fff; border:1px solid #dbe3ef; box-shadow: var(--shadow-soft); display:flex; align-items:center; justify-content:space-between; gap:16px; }
.home-cta-panel h2 { font-size: clamp(1.25rem, 2vw, 1.8rem); }

/* Auth: serious product entry */
.auth-page {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, rgba(15,61,94,.08), transparent 30rem), #f7f9fc;
}
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-choice { width: min(840px, 100%); padding: 24px; }
.auth-choice h1 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.role-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-card {
  min-height: 120px;
  padding: 16px;
  display: grid; align-content: center; gap: 6px;
  border-radius: 16px;
  background: #fff;
}
.role-card:hover { border-color: #9fb6c6; box-shadow: 0 12px 26px rgba(15,23,42,.08); }
.role-card strong { font-size: .98rem; }
.role-card span { color: #64748b; font-size: .82rem; }
.auth-grid { width: min(980px, 100%); display: grid; grid-template-columns: .9fr 1fr; align-items: stretch; gap: 16px; }
.auth-brand-card { padding: 24px; min-height: 410px; background: linear-gradient(135deg, #0f3d5e, #145f69); color: #fff; }
.auth-brand-card h1, .auth-brand-card h2, .auth-brand-card p { color: #fff; }
.auth-brand-card .eyebrow { color:#fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.auth-card { padding: 24px; align-content: center; }
.clean-auth h2 { font-size: clamp(1.35rem, 2.2vw, 2rem); }
.auth-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: #64748b; font-size: .86rem; }
.auth-foot a { color: #0f3d5e; font-weight: 800; }

/* Dashboards */
.dashboard-hero, .dashboard-hero.pro-hero, .course-hero-panel {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, #f8fafc);
}
.dashboard-hero h1, .course-hero-panel h1 { font-size: clamp(1.55rem, 3vw, 2.55rem); }
.dashboard-hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.hero-kpi-card { padding: 16px; min-height: 132px; box-shadow: none; background:#0f172a; color:#fff; }
.hero-kpi-card * { color: inherit; }
.dashboard-empty-card h3, .dashboard-side-card h3 { color: inherit; }
.dashboard-ring { width: 112px; height: 112px; border-radius: 50%; }
.dashboard-ring strong { font-size: 1.65rem; }
.hero-kpi-list { gap: 8px; }
.hero-kpi-list > div { padding: 10px; border-radius: 12px; }
.dashboard-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0 18px; }
.stat-card, .dashboard-strip .stat-card { min-height: 88px; padding: 14px; display:flex; align-items:center; gap:12px; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; background:#edf4f7; color:#0f3d5e; font-size:.78rem; }
.stat-value { font-size: clamp(1.25rem, 2.4vw, 1.85rem); letter-spacing: -.04em; }
.stat-label { color:#64748b; font-size:.78rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }
.panel-zone, .focus-panel { background: transparent; }
.side-panel { min-width: 0; }
.search-box { width: min(280px, 100%); }

/* Cards, lists, tables */
.course-card { min-height: 212px; padding: 0; overflow:hidden; gap: 10px; }
.course-cover { height: 86px; border-radius: 16px 16px 0 0; background: linear-gradient(135deg, #e7eef3, #cad9e3); }
.cover-fallback { font-size: 1.6rem; color: #0f3d5e; }
.course-card > :not(.course-cover) { margin-left: 15px; margin-right: 15px; }
.course-card > .course-footer { margin-bottom: 15px; }
.course-title { gap: 10px; }
.course-title h3 { font-size: .98rem; line-height:1.2; }
.course-summary { min-height: auto; font-size: .84rem; line-height:1.45; }
.course-meta { gap: 6px; font-size: .74rem; }
.course-footer { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.progress-track { height: 7px; background:#e6edf3; border-radius:999px; overflow:hidden; }
.progress-fill { background: linear-gradient(90deg, #0f3d5e, #157f72); }
.table-wrap { overflow-x: auto; border: 1px solid #dbe3ef; border-radius: 14px; background:#fff; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th { text-transform: uppercase; letter-spacing:.07em; color:#64748b; font-size:.66rem; background:#f8fafc; }
th, td { padding: 10px 11px; border-bottom:1px solid #edf2f7; font-size:.86rem; }
.empty { padding: 28px 18px; text-align:center; color:#64748b; }
.empty h3 { margin-bottom: 4px; }

/* Course learning page */
.course-top { margin-bottom: 16px; }
.course-hero-panel { grid-template-columns: minmax(0, 1fr) auto; }
.module-layout, .learning-layout { display:grid; grid-template-columns: 300px minmax(0, 1fr); gap:16px; }
.module-sidebar { position: sticky; top: 76px; align-self:start; padding:16px; }
.module-list { display:grid; gap:8px; }
.module-item { display:grid; grid-template-columns: 28px minmax(0,1fr); gap:10px; padding:10px; border:1px solid #dbe3ef; border-radius:12px; background:#fff; }
.module-item.active, .module-item:hover { border-color:#9fb6c6; background:#f8fafc; }
.module-number { width:26px; height:26px; border-radius:8px; display:grid; place-items:center; background:#e8f1f6; color:#0f3d5e; font-weight:850; font-size:.76rem; }
.module-detail-card { min-height: 300px; }
.module-content { max-width: 78ch; line-height: 1.7; font-size: .94rem; color:#334155; }
.resource-list { display:grid; gap:8px; }
.resource-link { padding:10px; border-radius:10px; border:1px solid #dbe3ef; background:#f8fafc; }

/* Builder */
.builder-page .course-hero-panel { grid-template-columns: minmax(0, 1fr) auto; }
.editor-layout, .quiz-builder-layout { display:grid; gap:16px; }
.editor-layout { grid-template-columns: minmax(0,1fr) 340px; }
.quiz-builder-layout { grid-template-columns: minmax(0,1fr) 320px; }
.builder-panel { display:grid; gap:10px; }
.builder-item { padding:14px; border:1px solid #dbe3ef; border-radius:14px; background:#f8fafc; }
.sticky-form { position: sticky; top:76px; }
.option-row { display:flex; align-items:center; gap:8px; color:#334155; font-size:.86rem; }

/* Quiz */
.professional-quiz { max-width: 1080px; margin: 0 auto; }
.quiz-hero { display:grid; grid-template-columns: minmax(0,1fr) 220px; gap:16px; align-items:center; padding:22px; margin-bottom:16px; background:linear-gradient(135deg,#fff,#f8fafc); }
.quiz-hero h1 { font-size: clamp(1.55rem, 3vw, 2.45rem); }
.quiz-meta-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.quiz-score-card { border:1px solid #dbe3ef; border-radius:16px; padding:14px; background:#fff; }
.quiz-score-card strong { display:block; font-size:1.55rem; margin:2px 0 8px; }
.quiz-progress-track { height:7px; border-radius:999px; background:#e6edf3; overflow:hidden; }
.quiz-progress-fill { height:100%; background:linear-gradient(90deg,#0f3d5e,#157f72); }
.quiz-layout { display:grid; grid-template-columns: 190px minmax(0,1fr); gap:16px; align-items:start; }
.quiz-sidebar { position:sticky; top:76px; padding:14px; }
.quiz-sidebar h3 { margin-bottom:10px; }
.quiz-dots { display:grid; grid-template-columns: repeat(4, 1fr); gap:6px; }
.quiz-dot { min-height:31px; display:grid; place-items:center; border:1px solid #dbe3ef; border-radius:9px; background:#fff; color:#334155; font-weight:800; font-size:.78rem; }
.quiz-dot.answered { background:#e8f1f6; color:#0f3d5e; border-color:#bcd2df; }
.quiz-form { display:grid; gap:12px; }
.quiz-question { padding:0; overflow:hidden; }
.quiz-question legend { width:100%; padding:16px 16px 10px; display:grid; gap:7px; }
.question-number { width:max-content; padding:4px 7px; border-radius:999px; background:#eef5f7; color:#0f3d5e; font-size:.66rem; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.quiz-question legend strong { font-size:.96rem; line-height:1.4; }
.quiz-options { display:grid; gap:8px; padding:0 16px 16px; }
.professional-option { display:grid; grid-template-columns: 28px minmax(0,1fr); align-items:center; gap:10px; padding:10px; border:1px solid #dbe3ef; border-radius:12px; background:#fff; cursor:pointer; }
.professional-option:hover { border-color:#9fb6c6; background:#f8fafc; }
.professional-option input { position:absolute; opacity:0; pointer-events:none; }
.professional-option:has(input:checked) { border-color:#0f3d5e; background:#eef5f7; }
.option-letter { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; background:#f1f5f9; color:#334155; font-weight:850; font-size:.78rem; }
.professional-option:has(input:checked) .option-letter { background:#0f3d5e; color:#fff; }
.option-text { color:#263445; font-weight:620; font-size:.9rem; }
.quiz-submit-card { padding:16px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.quiz-result-card { margin-top:16px; }

/* Mobile and tablet */
@media (max-width: 980px) {
  .container { width: min(100% - 28px, 900px); }
  .home-hero { padding: 40px 0 34px; }
  .home-hero-grid, .dashboard-hero, .dashboard-hero.pro-hero, .auth-grid { grid-template-columns: 1fr; gap: 18px; }
  .home-preview { min-height: 300px; }
  .home-features-wrap, .home-role-grid, .dashboard-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .module-layout, .learning-layout, .editor-layout, .quiz-builder-layout, .quiz-layout { grid-template-columns: 1fr; }
  .module-sidebar, .quiz-sidebar, .sticky-form { position: static; }
  .quiz-dots { grid-template-columns: repeat(8, 1fr); }
  .hero-kpi-card { min-height: auto; }
}

@media (max-width: 720px) {
  html { font-size: 14px; }
  .container { width: calc(100% - 22px); }
  .page { padding: 16px 0 34px; }
  .nav-inner { min-height: 54px; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 11px; right: 11px; top: 60px;
    display: none; padding: 10px; background:#fff; border:1px solid #dbe3ef; border-radius:14px;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
  }
  .nav-links.open { display:grid; grid-template-columns: 1fr; }
  .nav-link, .nav-links .btn, .nav-links .status-pill { width:100%; justify-content:center; text-align:center; }
  .logo span:last-child { font-size: .95rem; }

  h1 { font-size: clamp(1.65rem, 9vw, 2.45rem); }
  h2 { font-size: 1.22rem; }
  .lead { font-size: .92rem; }
  .home-copy h1 { font-size: clamp(2rem, 12vw, 3rem); }
  .home-copy .lead { font-size: .94rem; }
  .home-actions .btn { min-width: 0; flex: 1 1 135px; }
  .home-trust-row span { font-size: .72rem; padding: 5px 8px; }
  .home-preview { min-height: 0; padding-top: 8px; }
  .floating-card { display:none; }
  .preview-card.main-preview-card { box-shadow: var(--shadow-soft); }
  .preview-chart { height: 104px; }
  .home-section { padding: 22px 0; }
  .home-role-grid, .home-features-wrap, .dashboard-strip, .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .home-role-card { min-height: 150px; padding: 15px; }
  .feature-tile { min-height: auto; padding: 16px; }
  .home-cta-panel { display:grid; padding:17px; margin-bottom:28px; }
  .role-actions, .course-footer, .quiz-submit-card { align-items:stretch; flex-direction:column; }
  .role-actions .btn, .course-footer .btn, .quiz-submit-card .btn { width:100%; }

  .auth-shell { padding: 16px; place-items: start center; }
  .auth-choice, .auth-card, .auth-brand-card { padding: 18px; }
  .role-card-grid { grid-template-columns: 1fr; }
  .auth-brand-card { min-height: auto; }
  .auth-grid { gap: 12px; }

  .dashboard-hero, .dashboard-hero.pro-hero, .course-hero-panel, .quiz-hero { padding: 17px; grid-template-columns:1fr; }
  .dashboard-hero h1, .course-hero-panel h1, .quiz-hero h1 { font-size: 1.55rem; }
  .dashboard-hero-actions .btn, .dashboard-hero-actions .status-pill { flex: 1 1 auto; justify-content:center; }
  .stat-card { min-height: 76px; }
  .section-head { display:grid; align-items:start; }
  .search-box { width: 100%; }
  .card, .card-lg { padding: 15px; border-radius: 15px; }
  .course-cover { height: 76px; }
  .course-title { align-items:start; }
  .module-item { grid-template-columns: 26px 1fr; }
  .quiz-dots { grid-template-columns: repeat(5, 1fr); }
  .quiz-question legend { padding:14px 14px 9px; }
  .quiz-options { padding:0 14px 14px; }
  .professional-option { grid-template-columns: 26px 1fr; padding:9px; }
  .option-letter { width:26px; height:26px; }
  th, td { padding: 9px 10px; font-size: .82rem; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 18px); }
  .btn { min-height: 36px; padding: 8px 10px; }
  input, textarea, select, .input { font-size: .88rem; }
  .home-copy h1 { font-size: 2rem; }
  .dashboard-hero h1, .course-hero-panel h1, .quiz-hero h1 { font-size: 1.42rem; }
  .preview-list div { padding: 8px; }
  .quiz-dots { grid-template-columns: repeat(4, 1fr); }
}

/* Role-specific auth pages */
.role-auth-shell { align-items: center; }
.auth-layout { width: min(980px, 100%); display: grid; grid-template-columns: .9fr 1fr; gap: 16px; align-items: stretch; }
.role-symbol { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; font-size: 1.35rem; font-weight: 900; border: 1px solid rgba(255,255,255,.18); }
.auth-role-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.auth-role-links a { color: #fff; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); border-radius: 999px; padding: 6px 9px; font-size: .76rem; font-weight: 780; }
.auth-role-links a:hover { background: rgba(255,255,255,.16); }
.clean-auth { box-shadow: var(--shadow-soft); }
.role-student .auth-brand-card { background: linear-gradient(135deg, #0f3d5e, #15646f); }
.role-instructor .auth-brand-card { background: linear-gradient(135deg, #17324d, #475569); }
.role-admin .auth-brand-card { background: linear-gradient(135deg, #111827, #334155); }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .auth-layout { gap: 12px; }
  .role-symbol { width: 46px; height: 46px; border-radius: 13px; font-size: 1.15rem; }
  .auth-role-links a { flex: 1 1 auto; text-align: center; }
}
