:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #171a2b;
  --muted: #5f6680;
  --border: #e3e6ef;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --accent: #0ea5a4;
  --success: #16a34a;
  --success-50: #dcfce7;
  --warning: #b45309;
  --warning-50: #fef3c7;
  --danger: #dc2626;
  --danger-50: #fee2e2;
  --tier1: #0ea5e9;
  --tier2: #8b5cf6;
  --tier3: #f59e0b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.page { padding: 36px 0 64px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Navbar ---------- */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.nav .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: .95rem; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a, .nav-user a:not(.btn) { color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.dropdown { position: relative; }
.dropdown > button { background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; font: inherit; color: var(--text); padding: 4px; border-radius: 10px; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: #c9cede; background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--tier3); color: #1f1300; }
.btn-warning:hover { background: #d97706; }
.btn-lg { padding: 13px 24px; font-size: 1.02rem; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; padding: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-header { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { margin: 0; }

.course-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; color: inherit; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #6366f1, #0ea5a4); position: relative; display: grid; place-items: center; color: rgba(255,255,255,.95); font-weight: 800; font-size: 1.3rem; text-align: center; padding: 16px; overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.c1 { background: linear-gradient(135deg, #6366f1, #0ea5a4); }
.cover.c2 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
.cover.c3 { background: linear-gradient(135deg, #0ea5e9, #8b5cf6); }
.cover.c4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.course-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.course-card h3 { margin: 0; }
.course-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.course-card .price { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-t1 { background: #e0f2fe; color: #0369a1; }
.badge-t2 { background: #ede9fe; color: #6d28d9; }
.badge-t3 { background: #fef3c7; color: #92400e; }
.badge-success { background: var(--success-50); color: #15803d; }
.badge-danger { background: var(--danger-50); color: #b91c1c; }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-live { background: var(--danger); color: #fff; }
.badge-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; border: 1px solid; margin-bottom: 16px; }
.alert-success { background: var(--success-50); border-color: #bbf7d0; color: #14532d; }
.alert-error { background: var(--danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert-info { background: var(--primary-50); border-color: #c7d2fe; color: #312e81; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #78350f; }
.flash-wrap { padding-top: 18px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.input, input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font: inherit; font-size: .9rem; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.checkbox input { margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card-body { padding: 32px; }
.social { display: grid; gap: 10px; }
.btn-social { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 11px; }
.btn-social:hover { background: var(--surface-2); }
.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #222; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 22px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1000px 400px at 80% -10%, rgba(14,165,164,.18), transparent), radial-gradient(800px 400px at 0% 0%, rgba(79,70,229,.18), transparent), var(--surface); border-bottom: 1px solid var(--border); padding: 72px 0; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.section { padding: 56px 0; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.feature { padding: 22px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 12px; background: var(--primary-50); }

/* ---------- Tier cards ---------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.tier { position: relative; padding: 26px; display: flex; flex-direction: column; border-top: 4px solid var(--tier1); }
.tier.t2 { border-top-color: var(--tier2); }
.tier.t3 { border-top-color: var(--tier3); }
.tier.highlight { box-shadow: 0 0 0 3px rgba(245, 158, 11, .45), var(--shadow-lg); }
.tier.owned { background: linear-gradient(180deg, #f0fdf4, var(--surface) 40%); }
.tier .tier-num { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tier h3 { font-size: 1.25rem; margin: 6px 0 10px; }
.tier .amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.tier .amount small { font-size: .9rem; font-weight: 500; }
.tier ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; flex: 1; align-content: start; }
.tier li { display: flex; gap: 9px; font-size: .94rem; }
.tier li::before { content: '✓'; color: var(--success); font-weight: 800; }
.tier .ribbon { position: absolute; top: 14px; right: 14px; }

/* ---------- Course detail ---------- */
.course-hero { background: #111427; color: #fff; padding: 48px 0; }
.course-hero .muted { color: #b7bdd6; }
.course-hero a { color: #a5b4fc; }
.course-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: flex; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.lesson-list li:last-child { border-bottom: 0; }
.lesson-num { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.prose { white-space: pre-line; }

/* ---------- Learn (player) ---------- */
.learn { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - 64px); }
.learn.with-chat { grid-template-columns: 300px 1fr 360px; }
.learn-side { background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; max-height: calc(100vh - 64px); position: sticky; top: 64px; }
.learn-side .head { padding: 18px; border-bottom: 1px solid var(--border); }
.learn-side a.lesson { display: flex; gap: 11px; align-items: center; padding: 12px 18px; color: var(--text); border-left: 3px solid transparent; font-size: .93rem; }
.learn-side a.lesson:hover { background: var(--surface-2); text-decoration: none; }
.learn-side a.lesson.active { background: var(--primary-50); border-left-color: var(--primary); font-weight: 600; }
.learn-side a.lesson.done .lesson-num { background: var(--success); color: #fff; }
.learn-main { padding: 24px; min-width: 0; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; color: #c7cbe0; }
.player video { width: 100%; height: 100%; background: #000; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .3s; }
.learn-chat { background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; height: calc(100vh - 64px); position: sticky; top: 64px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; background: var(--surface-2); font-size: .93rem; word-wrap: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: .72rem; opacity: .75; margin-top: 3px; }
.msg .ctx { display: block; font-size: .72rem; opacity: .8; margin-bottom: 3px; font-weight: 600; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form textarea { min-height: 42px; height: 42px; max-height: 120px; resize: none; padding: 10px 12px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: .9rem; padding: 20px; }
.typing { font-size: .78rem; color: var(--muted); padding: 0 16px 6px; min-height: 18px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head .avatar { width: 72px; height: 72px; font-size: 1.6rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 28px 0 24px; overflow-x: auto; }
.tabs a { padding: 11px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.my-course { display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center; padding: 16px; }
.my-course .cover { border-radius: 10px; font-size: .95rem; }
.classroom-cta { background: linear-gradient(135deg, #1e1b4b, #312e81); color: #fff; border: 0; }
.classroom-cta .muted { color: #c7d2fe; }
.classroom-cta.locked { background: linear-gradient(135deg, #374151, #1f2937); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

.stat { padding: 20px; }
.stat .value { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: .88rem; }

/* ---------- Exam ---------- */
.question { padding: 22px; }
.question .opts { display: grid; gap: 9px; margin-top: 14px; }
.opt { display: flex; gap: 11px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.opt:hover { background: var(--surface-2); }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.grade-ring { width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: conic-gradient(var(--ring, var(--success)) calc(var(--p) * 1%), var(--surface-2) 0); }
.grade-ring > div { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.grade-ring strong { font-size: 2.2rem; display: block; line-height: 1; }
.grade-letter { font-size: 1rem; font-weight: 700; color: var(--muted); }

/* ---------- Classroom code ---------- */
.code-box { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 2.6rem; font-weight: 800; letter-spacing: .14em; background: var(--surface-2); border: 2px dashed #c7d2fe; padding: 18px 28px; border-radius: 14px; text-align: center; color: var(--primary); }
.lock-ico { font-size: 3rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0; color: var(--muted); font-size: .9rem; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.payment-logos { height: 32px; width: auto; max-width: 100%; margin-left: auto; }
@media (max-width: 560px) { .footer-bottom { justify-content: center; text-align: center; } .payment-logos { margin: 0 auto; height: auto; } }

/* ---------- Demo payment ---------- */
.pay-card { max-width: 460px; margin: 0 auto; }
.demo-banner { background: repeating-linear-gradient(45deg, #fef3c7, #fef3c7 10px, #fde68a 10px, #fde68a 20px); color: #78350f; font-weight: 700; text-align: center; padding: 8px; border-radius: 10px; margin-bottom: 18px; font-size: .88rem; }

.btn.disabled { opacity: .5; }

/* ---------- Video kaynağı seçimi ---------- */
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 10px; }
.segmented label { margin: 0; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--muted); }
.segmented input { display: none; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.player iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Dökümanlar ---------- */
.doc-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.student-picker { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.picker-all { padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.picker-list { max-height: 220px; overflow-y: auto; display: grid; gap: 8px; padding-top: 4px; }
.picker-list.disabled { opacity: .45; }
.doc-group { margin-bottom: 24px; }
.doc-group .card-header .cover { width: 64px; border-radius: 8px; font-size: .45rem; padding: 4px; flex-shrink: 0; }
.doc-row { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .info strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.badge-new { background: var(--primary); color: #fff; }

/* ---------- Sertifika kartları ---------- */
.cert-card { overflow: hidden; color: inherit; transition: transform .15s, box-shadow .15s; }
.cert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cert-card-top { display: flex; gap: 14px; align-items: center; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #1e40af, #38bdf8); }
.cert-card-purple .cert-card-top { background: linear-gradient(135deg, #5b21b6, #c084fc); }
.cert-card-gold .cert-card-top { background: linear-gradient(135deg, #8a5a00, #f6d365 55%, #b8860b); }
.cert-card-seal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,.2); border: 2px dashed rgba(255,255,255,.75); flex-shrink: 0; }
.cert-card-title { font-weight: 700; }

/* ---------- Aktif/pasif anahtarı ---------- */
.switch { width: 44px; height: 24px; border-radius: 999px; border: 0; background: #cbd0dd; position: relative; cursor: pointer; padding: 0; transition: background .15s; vertical-align: middle; }
.switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--success); }
.switch.on span { left: 23px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Paket görseli ---------- */
.tier-img { aspect-ratio: 16 / 9; margin: -26px -26px 18px; overflow: hidden; border-radius: 10px 10px 0 0; background: var(--surface-2); }
form.tier .tier-img { margin: 0; }
.tier-img img { width: 100%; height: 100%; object-fit: cover; }
.tier-img.empty { display: grid; place-items: center; color: var(--muted); font-size: .9rem; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 35, .55); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .learn.with-chat { grid-template-columns: 280px 1fr; }
  .learn.with-chat .learn-chat { grid-column: 1 / -1; position: static; height: 520px; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .course-layout { grid-template-columns: 1fr; }
  .learn, .learn.with-chat { grid-template-columns: 1fr; }
  .learn-side { position: static; max-height: 320px; border-right: 0; border-bottom: 1px solid var(--border); }
  .my-course { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 10px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav.open .nav-links { display: flex; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .auth-card .card-body { padding: 22px; }
  .code-box { font-size: 1.9rem; padding: 14px; }
  .nav-user .btn-outline { display: none; }
}
