/* ==========================================================================
   Learnify — marketplace theme (loaded after rx.css / site.css / panel.css)
   Purple + near-black, squarer corners, course-card centred layout.
   ========================================================================== */
:root {
    --ink: #1c1d1f;
    --ink-2: #2d2f31;
    --ink-3: #3e4143;
    --muted: #6a6f73;
    --line: #d1d7dc;
    --bg: #f7f9fa;
    --accent: #0d9488;
    --accent-600: #0f766e;
    --accent-700: #115e59;
    --accent-soft: #e6f7f4;
    --gold: #e59819;
    --gold-text: #b4690e;
    --radius: 12px;
    --radius-sm: 8px;
    --bs-link-color: #115e59;
    --bs-link-hover-color: #0b4a46;
    --shadow: 0 8px 24px -10px rgba(28, 29, 31, .25);
}
body { background: var(--bg); }
a { color: var(--accent-700); }
a:hover { color: #0b4a46; }
.btn { border-radius: 8px; letter-spacing: -.005em; }
.btn-lg { border-radius: 10px; }
.btn-primary {
    --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--accent-600); --bs-btn-hover-border-color: var(--accent-600); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--accent-700); --bs-btn-active-border-color: var(--accent-700); --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); --bs-btn-disabled-color: #fff;
    --bs-btn-focus-shadow-rgb: 164, 53, 240;
    box-shadow: none;
}
.btn-dark { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: #000; }
.btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink); }
.btn-outline-primary { --bs-btn-color: var(--accent-700); --bs-btn-border-color: var(--accent-700); --bs-btn-hover-bg: var(--accent-700); --bs-btn-hover-border-color: var(--accent-700); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--accent-700); }
.btn-soft { background: #eceef0; }
.btn-soft:hover { background: #dfe3e6; }
.form-control, .form-select { border-radius: 8px; border-color: #b0b6bb; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .2); }
.form-check-input:checked { background-color: var(--accent-700); border-color: var(--accent-700); }
.form-switch .form-check-input:checked { background-color: var(--accent-700); border-color: var(--accent-700); }
.card-rx { border-radius: var(--radius); }
.chip-lime { background: var(--accent-soft); color: #0f5f59; }
.chip-purple { background: #d5f3ee; color: #0f5f59; }
.icon-bubble { background: var(--accent-soft); color: var(--accent-700); }
.icon-bubble.dark { background: var(--ink); color: #fff; }
.avatar { background: var(--accent-700); color: #fff; }
.pagination { --bs-pagination-active-bg: var(--accent-700); --bs-pagination-active-border-color: var(--accent-700); }
.nav-pills-rx .nav-link.active { background: var(--ink); }
.dropdown-item:active { background: var(--accent-700); }
.stepper li.current .dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(13, 148, 136, .25); }
.stepper li.done .dot { background: var(--accent-700); border-color: var(--accent-700); color: #fff; }

/* ---------- navbar ---------- */
.navbar-rx { background: #fff; backdrop-filter: none; border-bottom: 1px solid var(--line); box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .08); padding: .5rem 0; }
.brand { color: var(--ink); font-weight: 800; letter-spacing: -.04em; }
.brand .logo { background: var(--accent); color: #fff; border-radius: 10px; transform: none; }
.navbar-rx .nav-link:hover, .navbar-rx .nav-link.active { background: var(--accent-soft); color: var(--accent-700); }
.nav-search { flex: 1; max-width: 560px; position: relative; }
.nav-search input { border-radius: 999px; border: 1px solid var(--ink); background: #f7f9fa; padding: .6rem 1rem .6rem 2.7rem; height: 46px; font-size: .92rem; width: 100%; }
.nav-search input:focus { background: #fff; outline: 0; box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .18); border-color: var(--accent); }
.nav-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.nav-cart { position: relative; }
.nav-cart .count { position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff; font-size: .62rem; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; }
.cat-bar { background: #fff; border-bottom: 1px solid var(--line); }
.cat-bar .container { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.cat-bar a { white-space: nowrap; color: var(--ink-3); font-size: .86rem; padding: .55rem .8rem; font-weight: 500; border-bottom: 2px solid transparent; }
.cat-bar a:hover { color: var(--accent-700); border-bottom-color: var(--accent-700); }
.notice-bar { background: var(--ink); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .88rem; }
.notice-bar a { color: #99f6e4; font-weight: 700; margin-left: .4rem; }
.notice-bar.maint { background: #b4690e; }

/* ---------- hero slider ---------- */
.hero-slider { position: relative; }
.hero-slide { display: none; }
.hero-slide.active { display: block; animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-banner { padding: 3.2rem 0; color: #fff; position: relative; overflow: hidden; }
.hero-banner.t-purple { background: linear-gradient(120deg, #053f3b 0%, #115e59 55%, #0d9488 100%); }
.hero-banner.t-dark { background: linear-gradient(120deg, #111214 0%, #2d2f31 100%); }
.hero-banner.t-teal { background: linear-gradient(120deg, #064e4b 0%, #0f766e 60%, #14b8a6 100%); }
.hero-banner.t-rose { background: linear-gradient(120deg, #6b1033 0%, #be123c 70%, #fb7185 100%); }
.hero-banner.t-amber { background: linear-gradient(120deg, #6b3a05 0%, #b45309 70%, #f59e0b 100%); }
.hero-banner::before { content: ''; position: absolute; right: -80px; top: -120px; width: 460px; height: 460px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.hero-banner::after { content: ''; position: absolute; right: 140px; bottom: -160px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.hero-banner .inner { position: relative; z-index: 1; max-width: 560px; }
.hero-banner h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; line-height: 1.08; }
.hero-banner p { color: rgba(255, 255, 255, .88); font-size: 1.08rem; margin: .9rem 0 1.4rem; }
.hero-banner .btn-light { color: var(--ink); font-weight: 700; }
.hero-art { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); font-size: 11rem; color: rgba(255, 255, 255, .16); z-index: 1; }
.hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; z-index: 3; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .45); padding: 0; }
.hero-dots button.active { background: #fff; width: 24px; border-radius: 6px; }
.hero-search { background: #fff; border-radius: 999px; display: flex; padding: .3rem .3rem .3rem 1.2rem; max-width: 520px; align-items: center; gap: .5rem; box-shadow: var(--shadow); }
.hero-search input { border: 0; flex: 1; outline: 0; font-size: 1rem; min-width: 0; background: transparent; }
.hero-search .btn { border-radius: 999px; }
.stats-strip { background: #fff; border-bottom: 1px solid var(--line); }
.stats-strip .item { display: flex; align-items: center; gap: .7rem; padding: 1rem .5rem; font-size: .9rem; }
.stats-strip i { font-size: 1.6rem; color: var(--accent-700); }
.stats-strip b { display: block; font-size: 1.15rem; line-height: 1.1; }

/* ---------- sections ---------- */
.section { padding: 3.2rem 0; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.section-title h2 { font-size: 1.65rem; font-weight: 800; margin: 0; }
.section-title p { margin: .2rem 0 0; color: var(--muted); }
.section-head .eyebrow { background: var(--accent-soft); color: var(--accent-700); }
.cat-tile { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 700; height: 100%; transition: all .15s; }
.cat-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--accent-700); }
.cat-tile i { font-size: 1.5rem; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); display: grid; place-items: center; flex-shrink: 0; }
.cat-tile small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; }
.path-card { background: linear-gradient(135deg, #fff, var(--accent-soft)); border: 1px solid #bfe9e2; border-radius: var(--radius); padding: 1.4rem; height: 100%; display: block; color: var(--ink); transition: all .15s; }
.path-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.cta-band { background: linear-gradient(120deg, #053f3b, #115e59 60%, #0d9488); border-radius: 18px; }
.cta-band::after { background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.cta-band p { color: #ccfbf1; }

/* ---------- course card ---------- */
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; position: relative; transition: transform .18s, box-shadow .18s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-card .thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; color: rgba(255, 255, 255, .92); font-size: 2.6rem; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.course-card .thumb .t-title { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: .78rem; font-weight: 700; line-height: 1.2; opacity: .95; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; gap: .2rem; }
.course-card h3, .course-card .c-title { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); min-height: 2.6em; }
.course-card .by { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-card .meta { font-size: .76rem; color: var(--muted); }
.course-card .price-row { margin-top: auto; padding-top: .45rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.course-card a.stretched { position: absolute; inset: 0; z-index: 1; }
.course-card .wish-btn { position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); display: grid; place-items: center; color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.course-card .wish-btn.on { color: #e11d48; }
.course-card .badge-tag { position: absolute; z-index: 2; left: 8px; top: 8px; font-size: .68rem; font-weight: 800; padding: .2rem .55rem; border-radius: 4px; background: #eceb98; color: #3d3c0a; }
.course-card .badge-tag.free { background: #d3f5de; color: #14532d; }
.price { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.price-old { text-decoration: line-through; color: var(--muted); font-size: .85rem; }
.price-off { color: #166534; font-weight: 700; font-size: .78rem; }
.rating { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; }
.rating b { color: var(--gold-text); font-weight: 800; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: .78rem; white-space: nowrap; }
.stars i { margin-right: 1px; }
.rating .cnt { color: var(--muted); }

/* ---------- catalogue ---------- */
.filter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.filter-card h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .5rem; }
.filter-card h6:first-child { margin-top: 0; }
.filter-card .form-check { margin-bottom: .25rem; font-size: .9rem; }
.filter-card a.cat-link { display: block; padding: .25rem 0; color: var(--ink-3); font-size: .9rem; }
.filter-card a.cat-link.active { color: var(--accent-700); font-weight: 700; }
.filter-card a.cat-link.sub { padding-left: 1rem; font-size: .84rem; }
.result-bar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.chip-filter { display: inline-flex; align-items: center; gap: .3rem; background: var(--accent-soft); color: var(--accent-700); font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.chip-filter a { color: inherit; }

/* ---------- course page ---------- */
.course-hero { background: var(--ink); color: #fff; padding: 2rem 0 2.4rem; }
.course-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
.course-hero .sub { color: #e0e3e6; font-size: 1.1rem; margin: .5rem 0 .9rem; }
.course-hero .crumbs { font-size: .82rem; font-weight: 700; margin-bottom: .8rem; }
.course-hero .crumbs a { color: #99f6e4; }
.course-hero .crumbs span { color: #9aa0a4; padding: 0 .35rem; }
.course-hero .stars { font-size: .85rem; }
.course-hero .rating b { color: #f3ca8c; }
.course-hero .facts { font-size: .86rem; color: #dfe2e5; display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.course-hero .facts i { margin-right: .3rem; }
.buy-card { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .12); border-radius: 12px; overflow: hidden; color: var(--ink); }
.buy-card .preview { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; background-size: cover; background-position: center; cursor: pointer; color: #fff; }
.buy-card .preview::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
.buy-card .preview .play { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 1.8rem; }
.buy-card .preview small { position: absolute; z-index: 1; bottom: 8px; left: 0; right: 0; text-align: center; font-weight: 700; }
.buy-card .pad { padding: 1.2rem 1.3rem 1.4rem; }
.buy-card .big-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.buy-card ul { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .88rem; display: grid; gap: .45rem; }
.buy-card li i { width: 1.4rem; color: var(--ink-3); }
@media (min-width: 992px) { .buy-wrap { position: sticky; top: 90px; margin-top: -9.5rem; z-index: 5; } }
.learn-box { border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem 1.5rem; background: #fff; }
.learn-box ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.4rem; font-size: .92rem; }
.learn-box li { display: flex; gap: .6rem; }
.learn-box li i { color: var(--accent-700); margin-top: 3px; }
@media (max-width: 767.98px) { .learn-box ul { grid-template-columns: 1fr; } }
.curriculum .sec { border: 1px solid var(--line); background: #fff; }
.curriculum .sec + .sec { border-top: 0; }
.curriculum .sec:first-child { border-radius: 10px 10px 0 0; }
.curriculum .sec:last-child { border-radius: 0 0 10px 10px; }
.curriculum .sec-head { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; background: #f7f9fa; font-weight: 700; cursor: pointer; align-items: center; }
.curriculum .sec-head small { font-weight: 500; color: var(--muted); }
.curriculum .les { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.1rem; font-size: .9rem; border-top: 1px solid #eceef0; }
.curriculum .les i { color: var(--ink-3); }
.curriculum .les .t { flex: 1; min-width: 0; }
.curriculum .les .prev { color: var(--accent-700); font-weight: 600; text-decoration: underline; background: none; border: 0; padding: 0; text-align: left; }
.curriculum .les .dur { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.rich { line-height: 1.7; }
.rich img { max-width: 100%; }
.rich pre { background: #1c1d1f; color: #f1f1f1; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.rate-big { font-size: 3.4rem; font-weight: 800; color: var(--gold-text); line-height: 1; }
.bar-row { display: flex; align-items: center; gap: .6rem; font-size: .82rem; }
.bar-row .bar { flex: 1; height: 8px; background: #e9ebed; border-radius: 4px; overflow: hidden; }
.bar-row .bar > div { height: 100%; background: var(--gold); }
.review-item { padding: 1rem 0; border-top: 1px solid var(--line); display: flex; gap: .9rem; }
.review-item:first-child { border-top: 0; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: .1rem; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.9rem; color: #c9ced2; cursor: pointer; line-height: 1; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--gold); }
.inst-card { display: flex; gap: 1rem; align-items: flex-start; }
.inst-card .avatar-xl { width: 96px; height: 96px; font-size: 2rem; border-radius: 50%; }
.avatar img, .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- cart / checkout ---------- */
.cart-row { display: flex; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: flex-start; }
.cart-row:first-child { border-top: 0; }
.cart-row .mini { width: 120px; aspect-ratio: 16 / 9; border-radius: 8px; flex-shrink: 0; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-size: 1.6rem; }
.summary-box .total { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.pay-methods { display: grid; gap: .6rem; }
.pay-methods label { border: 1.5px solid var(--line); border-radius: 10px; padding: .8rem 1rem; display: flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 600; background: #fff; }
.pay-methods input { display: none; }
.pay-methods input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.result-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; margin: 0 auto 1rem; }
.result-ico.ok { background: #dcfce7; color: #166534; }
.result-ico.bad { background: #fee2e2; color: #991b1b; }

/* ---------- dashboards ---------- */
.dash-head { background: var(--ink); color: #fff; padding: 2rem 0 1.2rem; }
.dash-head h1 { color: #fff; font-size: 2rem; font-weight: 800; }
.dash-tabs { display: flex; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; margin-top: 1.2rem; }
.dash-tabs a { color: #c7cbce; padding: .7rem 0; font-weight: 600; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.dash-tabs a.active, .dash-tabs a:hover { color: #fff; border-bottom-color: #fff; }
.my-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; transition: box-shadow .15s, transform .15s; color: var(--ink); }
.my-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.my-card .thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; color: rgba(255, 255, 255, .9); font-size: 2.4rem; background-size: cover; background-position: center; }
.my-card .body { padding: .8rem 1rem 1rem; }
.progress-thin { height: 6px; background: #e9ebed; border-radius: 3px; overflow: hidden; }
.progress-thin > div { height: 100%; background: var(--accent); border-radius: 3px; }
.progress-thin.done > div { background: #16a34a; }
.resume-card { background: linear-gradient(120deg, #053f3b, #115e59); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.resume-card h4 { color: #fff; }

/* ---------- learning player ---------- */
body.player-page { background: #fff; }
.player-top { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; position: sticky; top: 0; z-index: 1040; }
.player-top a { color: #fff; }
.player-top .t { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top .ring { --p: 0; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(#99f6e4 calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); display: grid; place-items: center; font-size: .65rem; font-weight: 800; position: relative; }
.player-top .ring::before { content: ''; position: absolute; inset: 4px; background: var(--ink); border-radius: 50%; }
.player-top .ring span { position: relative; }
.player-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 58px); }
.player-main { min-width: 0; }
.video-stage { background: #000; aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; position: relative; }
.video-stage iframe, .video-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-doc { padding: 2.2rem clamp(1rem, 4vw, 3rem); max-width: 900px; margin: 0 auto; }
.lesson-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: #fff; }
.player-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 1.4rem; padding: 0 1rem; overflow-x: auto; scrollbar-width: none; background: #fff; }
.player-tabs button { background: none; border: 0; padding: .9rem 0; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.player-tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-pane-rx { display: none; padding: 1.4rem clamp(1rem, 3vw, 2.4rem); max-width: 960px; }
.tab-pane-rx.active { display: block; }
.player-side { border-left: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; max-height: calc(100vh - 58px); position: sticky; top: 58px; }
.player-side .head { padding: .9rem 1rem; font-weight: 800; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.player-side .scroll { overflow-y: auto; flex: 1; }
.pside-sec { background: #f7f9fa; padding: .7rem 1rem; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; cursor: pointer; }
.pside-sec small { font-weight: 500; color: var(--muted); }
.pside-les { display: flex; gap: .7rem; padding: .65rem 1rem; font-size: .86rem; align-items: flex-start; color: var(--ink); border-bottom: 1px solid #f0f1f2; }
.pside-les:hover { background: #f7f9fa; color: var(--ink); }
.pside-les.current { background: var(--accent-soft); }
.pside-les .chk { width: 18px; height: 18px; border: 2px solid #9aa0a4; border-radius: 4px; flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; font-size: .7rem; color: #fff; }
.pside-les.done .chk { background: var(--accent-700); border-color: var(--accent-700); }
.pside-les small { display: block; color: var(--muted); font-size: .74rem; }
.side-toggle-m { display: none; }
@media (max-width: 991.98px) {
    .player-grid { grid-template-columns: 1fr; }
    .player-side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
    .side-toggle-m { display: inline-flex; }
}
.quiz-q { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1rem; background: #fff; }
.quiz-q label.opt { display: flex; gap: .6rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; margin-top: .5rem; cursor: pointer; }
.quiz-q label.opt:hover { background: #f7f9fa; }
.quiz-q input:checked + span { font-weight: 700; }
.quiz-q.right { border-color: #86efac; background: #f4fdf7; }
.quiz-q.wrong { border-color: #fca5a5; background: #fff7f7; }
.qa-item { border-top: 1px solid var(--line); padding: 1rem 0; }
.ans { margin-left: 2.4rem; padding: .7rem .9rem; background: #f7f9fa; border-radius: 8px; margin-top: .6rem; font-size: .9rem; }
.ans.inst { background: var(--accent-soft); }

/* ---------- builder ---------- */
.builder-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.builder-sec .sh { background: #f7f9fa; padding: .8rem 1rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.builder-les { display: flex; align-items: center; gap: .7rem; padding: .65rem 1rem; border-bottom: 1px solid #eceef0; flex-wrap: wrap; }
.builder-les:last-child { border-bottom: 0; }
.builder-les .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-700); display: grid; place-items: center; flex-shrink: 0; }
.checklist-issues li { color: #991b1b; font-size: .88rem; padding: .15rem 0; }
.bar-chart { display: flex; align-items: flex-end; gap: .5rem; height: 140px; }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .68rem; color: var(--muted); }
.bar-chart .b > div { width: 100%; max-width: 40px; background: linear-gradient(180deg, var(--accent), var(--accent-700)); border-radius: 6px 6px 0 0; min-height: 3px; }
.bar-chart .b span { margin-top: .3rem; white-space: nowrap; }
.bar-chart .b em { font-style: normal; font-weight: 700; color: var(--ink); font-size: .66rem; margin-bottom: 2px; }

/* ---------- certificate ---------- */
.cert-wrap { max-width: 980px; margin: 1.5rem auto; padding: 0 1rem; }
.cert { background: #fff; border: 12px solid #115e59; outline: 2px solid #99f6e4; outline-offset: -22px; padding: 3.2rem 2.5rem; text-align: center; position: relative; }
.cert .seal { width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(135deg, #115e59, #0d9488); color: #fff; display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 1rem; }
.cert h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: .06em; text-transform: uppercase; color: #0b4a46; }
.cert .name { font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.7rem); font-style: italic; border-bottom: 2px solid #d1d7dc; display: inline-block; padding: 0 2rem .3rem; margin: .6rem 0; }
.cert .course { font-size: 1.5rem; font-weight: 800; }
.cert .foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
@media print { .cert-wrap { margin: 0; max-width: none; } .cert { border-width: 10px; } }

/* ---------- footer ---------- */
footer.site { background: var(--ink); }
footer.site a:hover { color: #99f6e4; }
footer.site .brand .logo { background: var(--accent); }

/* ---------- auth ---------- */
.auth-side { background: radial-gradient(800px 400px at 80% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(150deg, #053f3b, #115e59 60%, #0d9488); }
.auth-side ul i { color: #ccfbf1; }
.auth-tabs button.active { color: var(--accent-700); }
.demo-otp { background: var(--accent-soft); border-color: #c79bff; }
.admin-login { background: radial-gradient(900px 500px at 80% -10%, rgba(13, 148, 136, .35), transparent 60%), linear-gradient(160deg, #111214, #053f3b); }

/* ---------- admin panel ---------- */
body.panel { background: #f4f5f7; }
.sidebar { background: linear-gradient(180deg, #17102b 0%, #1c1d1f 100%); }
.sidebar .brand small { background: var(--accent); color: #fff; }
.side-link.active { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -14px var(--accent); }
.side-link.active .badge-count { background: #fff; color: var(--accent-700); }
.side-user .avatar { background: var(--accent); color: #fff; }
.side-group { color: #7d6aa8; }
.panel .btn-primary { --bs-btn-color: #fff; }
.live-item:hover, .live-item.sel { background: var(--accent-soft); }
.accordion-rx .accordion-button:not(.collapsed) { background: var(--accent-soft); }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.mini-bars > div { flex: 1; background: linear-gradient(180deg, var(--accent), var(--accent-700)); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.tree-lesson { display: flex; gap: .6rem; padding: .35rem 0; font-size: .88rem; align-items: center; }

@media (max-width: 575.98px) {
    .hero-art { display: none; }
    .hero-banner { padding: 2.2rem 0 2.8rem; }
    .section { padding: 2.2rem 0; }
    .cart-row .mini { width: 92px; }
    .dash-head h1 { font-size: 1.5rem; }
}

/* ---- Course page polish ---- */
.course-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.6rem; margin-bottom: 1.5rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.course-block > h2:first-child { margin-top: 0; }
.course-block h2 { letter-spacing: -.01em; }
.course-block ul { padding-left: 1.2rem; }
.course-block ul li { margin-bottom: .35rem; }
.learn-box { border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.curriculum .sec-head { transition: background .15s; }
.curriculum .sec-head:hover { background: #eef0f3; }
.curriculum .les:hover { background: #fafbfc; }
.buy-card { border-radius: 14px; border-color: #e3e6ea; }
.buy-card .pad .btn-lg { font-weight: 700; padding: .8rem 1rem; border-radius: 10px; }
.buy-card ul { border-top: 1px solid var(--line); padding-top: 1rem; }
.buy-card li { display: flex; align-items: center; color: var(--ink-2, #3d4451); }
.inst-card { background: #f8f9fb; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; }
.inst-card .avatar-xl { flex: none; box-shadow: 0 0 0 4px #fff, 0 2px 8px rgba(0, 0, 0, .12); }
.rating-summary { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; align-items: center; background: #f8f9fb; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.rating-summary .rate-big { font-size: 3.2rem; }
.review-item { padding: 1.1rem 0; }
.review-item .avatar { flex: none; }
@media (max-width: 575.98px) { .rating-summary { grid-template-columns: 1fr; text-align: center; } .course-block { padding: 1.1rem; } }

/* ---- Logged-in pages: spacing + professional polish ---- */
/* Root cause of missing padding: pages put card-rx + card-body-rx on the SAME element */
.card-rx.card-body-rx { padding: 1.6rem 1.75rem; }
.card-rx { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-rx > .card-head { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-rx > .card-head h5, .card-rx > .card-head h6 { margin: 0; font-size: 1rem; font-weight: 700; }
.card-rx > .card-body-rx { padding: 1.5rem; }
.card-rx.card-body-rx h5, .card-rx.card-body-rx .h5 { font-size: 1.2rem; letter-spacing: -.01em; }
.card-rx.card-body-rx > p.text-muted { margin-bottom: 1.25rem; }
.card-rx .form-label { font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: .4rem; }
.card-rx .form-control, .card-rx .form-select { padding: .65rem .9rem; font-size: .95rem; border-color: #c9ced3; }
.card-rx textarea.form-control { line-height: 1.5; }
.card-rx .form-text, .card-rx .field-error { font-size: .8rem; margin-top: .3rem; }
.card-rx form > .btn, .card-rx.card-body-rx > .btn-primary:last-child { margin-top: .5rem; }
.card-rx .btn-primary, .card-rx .btn-dark { font-weight: 700; border-radius: 8px; padding: .6rem 1.25rem; }
.card-rx .btn-sm { padding: .35rem .8rem; }

/* page containers: breathing room */
.container.py-4 { padding-top: 2rem !important; padding-bottom: 3rem !important; }
h1.h3, h2.h3, .page-title { font-weight: 800; letter-spacing: -.02em; }

/* tables */
.table-rx { width: 100%; margin: 0; }
.table-rx th { background: #f7f9fa; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-rx td { padding: .9rem 1.1rem; vertical-align: middle; border-top: 1px solid #eceef0; font-size: .92rem; }
.table-rx tbody tr:hover { background: #fafbfc; }
.card-rx > .table-responsive:first-child .table-rx th:first-child { border-top-left-radius: 14px; }

/* buttons & chips */
.btn { border-radius: 8px; font-weight: 600; }
.btn-soft { background: #f3f4f6; border: 1px solid transparent; color: var(--ink-2); }
.btn-soft:hover { background: #e9ebee; }
.alert { border-radius: 10px; border: 1px solid transparent; font-size: .92rem; }
.pagination { gap: .25rem; }
.page-link { border-radius: 8px !important; color: var(--ink-2); }

@media (max-width: 575.98px) { .card-rx.card-body-rx { padding: 1.2rem; } }

/* ---- Invoice ---- */
.invoice { max-width: 820px; margin: 2.5rem auto 3rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2.5rem 2.75rem; box-shadow: 0 4px 24px rgba(16, 24, 40, .06); border-top: 5px solid var(--accent); }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.inv-muted { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.inv-title { text-align: right; }
.inv-title h2 { font-size: 2rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .25rem; color: var(--ink); }
.inv-no { font-weight: 700; color: var(--ink-2); }
.inv-status { display: inline-block; margin-top: .6rem; padding: .22rem .8rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #fff4e0; color: #b4690e; }
.inv-status.ok { background: #e3f6ea; color: #137a3b; }
.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.6rem 0; }
.inv-name { font-weight: 700; font-size: 1.02rem; margin: .3rem 0 .15rem; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { background: #f7f9fa; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.inv-table td { padding: 1rem; border-bottom: 1px solid #eceef0; font-size: .93rem; vertical-align: middle; }
.inv-table th:first-child, .inv-table td:first-child { width: 44px; }
.inv-totals { margin: 1.4rem 0 0 auto; max-width: 320px; }
.inv-grand { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; padding: .9rem 1rem; border-radius: 10px; background: var(--accent-soft); font-weight: 700; color: var(--accent-700); }
.inv-grand span:last-child { font-size: 1.4rem; font-weight: 800; }
.inv-foot { text-align: center; color: var(--muted); font-size: .82rem; margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
@media (max-width: 575.98px) { .invoice { padding: 1.4rem; margin: 1rem auto; } .inv-meta { grid-template-columns: 1fr; } .inv-title { text-align: left; } }
@media print { body { background: #fff !important; } .invoice { box-shadow: none; border: 0; border-top: 4px solid var(--accent); margin: 0; max-width: 100%; padding: 1rem 0; } .inv-status, .inv-grand, .inv-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---- Gateway picker + accepted-payments strip + floating chat ---- */
.gw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.gw { cursor: pointer; margin: 0; }
.gw input { position: absolute; opacity: 0; pointer-events: none; }
.gw-body { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; height: 100%; transition: border-color .15s, box-shadow .15s, background .15s; }
.gw-body > i { font-size: 1.5rem; color: var(--accent-700); }
.gw-body b { display: block; font-size: .92rem; }
.gw-body small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.gw input:checked + .gw-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
.gw input:focus-visible + .gw-body { outline: 2px solid var(--accent-700); }
.accept-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.accept-strip .pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; font-size: .78rem; }
.float-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.float-chat:hover { color: #fff; transform: translateY(-2px); }

/* ---- Admin integrations cards ---- */
.gw { position: relative; }
.int-card { overflow: hidden; border-left: 4px solid var(--line); }
.int-card.is-on { border-left-color: #1f9d55; }
.int-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; }
.int-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft, #e6f7f4); color: var(--accent-700, #115e59); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.int-body { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--line); background: #fafbfc; }
