:root {
  --red: #e53935;
  --red-deep: #a92327;
  --ink: #171315;
  --muted: #756c6d;
  --cream: #fffaf7;
  --paper: #ffffff;
  --line: #eadfdb;
  --green: #2f7b4a;
  --gold: #efb735;
  --shadow: 0 20px 50px rgba(52, 26, 23, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100% - 36px)); pointer-events: none; }
.toast { padding: 14px 16px; border-radius: 14px; color: #fff; background: var(--ink); box-shadow: 0 16px 35px rgba(23,19,21,.24); font-weight: 700; line-height: 1.45; }
.toast.success { color: #fff; background: var(--green); border: 0; }
.toast.error { color: #fff; background: var(--red-deep); border: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app-shell { min-height: 100vh; }
.boot-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.boot-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 20px; background: var(--red); color: #fff; font: 800 34px "Playfair Display", serif; box-shadow: 0 12px 25px rgba(229,57,53,.28); }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(234,223,219,.8); background: rgba(255,250,247,.9); backdrop-filter: blur(18px); }
.nav-wrap { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 170px; }
.brand img { width: 142px; height: auto; max-height: 48px; object-fit: contain; }
.brand-wordmark { font: 800 22px "Playfair Display", serif; letter-spacing: -.5px; }
.brand-wordmark span { color: var(--red); }
.desktop-nav { display: flex; align-items: center; gap: 5px; flex: 1; }
.nav-link { padding: 10px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 13px; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--ink); background: #fff; box-shadow: 0 5px 18px rgba(52,26,23,.06); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: #fff; color: var(--ink); position: relative; }
.badge { position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 20px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; }
.menu-toggle { display: none; }
.mobile-account-link { display: none; }

.main { max-width: 1240px; margin: 0 auto; padding: 34px 24px 80px; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; color: var(--red); font-size: 11px; font-weight: 800; }
h1, h2, h3 { font-family: "Playfair Display", serif; letter-spacing: -.03em; }
h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1; margin: 12px 0 16px; }
h2 { font-size: clamp(27px, 3.5vw, 42px); line-height: 1.08; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 8px; }
.lead { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero { min-height: 570px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 span { color: var(--red); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { min-height: 460px; border-radius: 44px; overflow: hidden; position: relative; background: radial-gradient(circle at 65% 26%, #fff7a6 0 8%, transparent 9%), linear-gradient(145deg, #e53935, #a92327 55%, #3e1c20); box-shadow: var(--shadow); }
.hero-art:before { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; left: 12%; top: 12%; box-shadow: 0 0 0 42px rgba(255,255,255,.06), 0 0 0 85px rgba(255,255,255,.04); }
.hero-art:after { content: "SMARTER\A SHOPPING"; white-space: pre; position: absolute; right: 34px; bottom: 30px; color: #fff; opacity: .86; font: 700 17px/1.2 "DM Sans", sans-serif; letter-spacing: .22em; text-align: right; }
.hero-card { position: absolute; left: 34px; top: 58px; width: 240px; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 24px 40px rgba(36,9,12,.24); transform: rotate(-7deg); }
.hero-card img { height: 180px; width: 100%; object-fit: contain; border-radius: 14px; background: #f6ece7; }
.hero-card strong { display: -webkit-box; margin-top: 12px; overflow: hidden; font-size: 15px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hero-card small { color: var(--muted); }
.hero-card .price { color: var(--red-deep); font-weight: 800; margin-top: 6px; }
.hero-product-card { color: var(--ink); cursor: pointer; animation: heroProductIn .45s ease both; }
.hero-product-card:hover { transform: rotate(-4deg) translateY(-4px); }
.hero-product-hint { display: inline-block; margin-top: 8px; color: var(--red-deep); font-size: 11px; font-weight: 800; }
@keyframes heroProductIn { from { opacity: 0; translate: 12px 0; } to { opacity: 1; translate: 0 0; } }

.whatsapp-help { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 14px 34px rgba(12, 91, 48, .32); font-weight: 800; transition: transform .2s ease, box-shadow .2s ease; }
.whatsapp-help:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(12, 91, 48, .4); }
.whatsapp-help svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-tab-bar { display: none; }

.section { margin-top: 84px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head p { margin: 0; color: var(--muted); max-width: 520px; line-height: 1.6; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); box-shadow: 0 8px 22px rgba(52,26,23,.04); transition: transform .2s ease, box-shadow .2s ease; cursor: pointer; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-open { display: block; color: inherit; text-decoration: none; }
.product-image { aspect-ratio: 1 / 1.05; background: #f6efec; position: relative; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.stock-pill { position: absolute; top: 11px; left: 11px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 11px; font-weight: 800; }
.stock-pill.out { color: var(--red); }
.stock-pill.low { color: #9a6800; background: #fff7df; }
.product-body { padding: 14px; }
.product-body h3 { font-family: "DM Sans", sans-serif; font-size: 16px; letter-spacing: -.02em; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-meta { color: var(--muted); font-size: 12px; min-height: 18px; }
.price { color: var(--red-deep); font-weight: 800; font-size: 17px; margin-top: 10px; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.price-row .price { margin: 0; }
.price-row-large .price { font-size: 28px; }
.old-price { color: var(--muted); font-size: 12px; text-decoration: line-through; }
.price-row-large .old-price { font-size: 16px; }
.product-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.product-badges span { padding: 4px 8px; border: 1px solid #8b0000; border-radius: 999px; color: #8b0000; background: #fff8f7; font-size: 10px; font-weight: 800; }

.product-gallery { min-width: 0; }
.gallery-main { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 20px; background: #f6efec; border: 1px solid var(--line); }
.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.gallery-thumb { padding: 0; aspect-ratio: 1 / 1; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: #f6efec; cursor: pointer; }
.gallery-thumb.active { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,57,53,.12); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.feature-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 22px; border-radius: 24px; background: var(--ink); color: #fff; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #ffd84d; }
.feature strong { display: block; margin-bottom: 4px; }
.feature span { color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.45; }

.panel { padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(52,26,23,.04); }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.soft-panel { border-radius: 22px; padding: 24px; background: linear-gradient(135deg, #fff0ed, #fff); border: 1px solid #f4d5ce; }
.btn { border: 0; border-radius: 999px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.btn-primary { color: #fff; background: var(--red); box-shadow: 0 10px 20px rgba(229,57,53,.2); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn-dark { color: #fff; background: var(--ink); }
.btn-dark:hover { background: #34292a; }
.btn-light { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn-light:hover { border-color: var(--red); }
.btn-danger { color: #fff; background: #a92327; }
.btn-small { padding: 8px 12px; font-size: 12px; }
.text-link { appearance: none; border: 0; padding: 0; margin: 0; background: transparent; color: var(--red-deep); font-weight: 800; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.summary-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.summary-line strong { color: var(--ink); }
.summary-line.total { padding-top: 15px; border-bottom: 0; font-size: 18px; color: var(--ink); }
.summary-line.total strong { color: var(--red-deep); font-size: 24px; }
.free-shipping { color: var(--green) !important; }
.accepted-payments { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.accepted-payments > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.payment-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.payment-chips span { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 11px; font-weight: 800; }
.payment-chips img { width: 28px; height: 20px; object-fit: contain; }
.checkout-review { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.checkout-review > div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.checkout-review span,.checkout-review small { color: var(--muted); font-size: 11px; }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 12px 14px; outline: none; color: var(--ink); }
.field:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(229,57,53,.1); }
.search-row .field { flex: 1 1 280px; }
textarea.field { resize: vertical; min-height: 100px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-field label { display: block; margin: 0 0 7px; font-size: 12px; font-weight: 800; color: var(--muted); }
.form-field.full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.error { color: #a92327; background: #fff0f0; border: 1px solid #f0c9c9; padding: 12px 14px; border-radius: 12px; line-height: 1.5; }
.success { color: #1d653d; background: #effaf2; border: 1px solid #ccebd5; padding: 12px 14px; border-radius: 12px; line-height: 1.5; }

.agent-card { padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.agent-list { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 880px; }
.agent-list .agent-card { width: 100%; }
.agent-avatar { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 18px; background: #fff0ed; color: var(--red-deep); display: grid; place-items: center; font: 800 23px "Playfair Display", serif; overflow: hidden; }
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; }
.application-status { margin-top: 18px; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.application-status p { flex-basis: 100%; margin: 0; }
.file-field { padding: 10px; }
.form-field small { display: block; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.consent-row { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; line-height: 1.5; }
.consent-row input { margin-top: 4px; }
.application-list { margin-top: 24px; }
.application-card { margin-bottom: 12px; padding: 0; overflow: hidden; }
.application-card summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; }
.application-card summary::-webkit-details-marker { display: none; }
.application-card summary span:first-child { display: grid; gap: 4px; }
.application-card summary small { color: var(--muted); }
.application-summary-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.application-details { border-top: 1px solid var(--line); padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.application-details p { margin: 5px 0 0; }
.application-details .full { grid-column: 1 / -1; }
.certificate-signature-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 18px; }
.certificate-signature-form p { margin: 4px 0 0; }
.application-documents { display: flex; flex-wrap: wrap; gap: 10px; }
.application-review-form label { display: block; font-weight: 700; margin-bottom: 7px; }
.agent-admin-hero { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; margin-bottom: 22px; background: linear-gradient(135deg,#fff,#f6fbff); }
.agent-admin-hero img { width: 170px; }
.agent-admin-hero h2 { font-family: "DM Sans",sans-serif; font-size: clamp(27px,4vw,46px); letter-spacing: -.04em; }
.agent-admin-hero p { color: var(--muted); max-width: 780px; line-height: 1.6; }
.agent-admin-tabs { margin: 24px 0; }
.course-builder > .soft-panel { max-width: 600px; }
.course-admin-list { display: grid; gap: 14px; margin-top: 24px; }
.course-admin-card { padding: 0; overflow: hidden; }
.course-admin-card summary { display: flex; justify-content: space-between; align-items: center; padding: 20px; cursor: pointer; }
.course-admin-card summary span:first-child { display: grid; gap: 5px; }
.course-admin-card summary small,.lesson-admin-row small { display: block; color: var(--muted); }
.course-admin-body { border-top: 1px solid var(--line); padding: 20px; }
.course-lessons { margin-top: 26px; }
.lesson-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.lesson-admin-card { border: 1px solid var(--line); border-radius: 18px; margin: 12px 0; overflow: hidden; }
.lesson-admin-card > summary { display: flex; justify-content: space-between; gap: 12px; padding: 16px; cursor: pointer; }
.lesson-admin-card > summary span:first-child { display: grid; gap: 4px; }
.lesson-admin-card small { color: var(--muted); }
.lesson-admin-details { padding: 0 16px 16px; }
.quiz-admin-question { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.quiz-admin-question ol { margin: 8px 0 0; padding-left: 26px; color: var(--muted); }
.quiz-admin-question .correct-option { color: var(--green); font-weight: 700; }
.admin-lesson-form { margin-top: 18px; }
.learning-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.learning-sidebar { display: grid; gap: 8px; position: sticky; top: 100px; }
.learning-course, .learning-lesson { appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 13px; color: inherit; cursor: pointer; text-align: left; display: grid; gap: 4px; }
.learning-course small { color: var(--muted); }
.learning-course.active, .learning-lesson.active { border-color: var(--red); background: #fff4f2; }
.learning-lessons-title { margin-top: 15px; }
.learning-lesson { grid-template-columns: 30px 1fr; align-items: center; }
.learning-lesson span { width: 28px; height: 28px; border-radius: 50%; background: #f3e8e6; display: grid; place-items: center; color: var(--red-deep); font-weight: 800; }
.learning-progress { margin-bottom: 20px; }
.learning-progress > div:first-child, .lesson-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.progress-track { height: 9px; background: #eadfdd; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress-track span { display: block; height: 100%; background: var(--red); border-radius: inherit; transition: width .25s ease; }
.learning-video { display: block; width: 100%; max-height: 560px; background: #111; border-radius: 18px; margin-top: 18px; }
.learning-quiz { margin-top: 24px; display: grid; gap: 18px; }
.quiz-question { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.quiz-question legend { font-weight: 800; padding: 0 5px; }
.quiz-question label { display: flex; gap: 9px; padding: 9px; border-radius: 10px; cursor: pointer; }
.quiz-question label:hover { background: #fff4f2; }
.agent-card h3 { font-family: "DM Sans", sans-serif; font-size: 16px; letter-spacing: -.02em; margin: 0 0 4px; }
.agent-detail { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.tag { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #faf4f1; border: 1px solid #f1e1db; }

.portal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.portal-head p { margin: 6px 0 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { margin-top: 7px; color: var(--ink); font: 800 28px "Playfair Display", serif; }
.admin-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.account-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
.account-tabs .tab { white-space: nowrap; }
.account-form-head { margin-bottom: 18px; }
.settings-stack { display: grid; gap: 18px; }
.settings-panel { max-width: 760px; }
.settings-list { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.setting-row { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.setting-row small { display: block; color: var(--muted); margin-top: 4px; }
.setting-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--red); }
.setting-button { border-left: 0; border-right: 0; border-top: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.setting-button:hover { color: var(--red-deep); }
.theme-options { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.danger-panel { border-color: #efc3c3; }

html[data-theme="dark"] body { background: #161112; color: #f8eeee; }
html[data-theme="dark"] .site-header, html[data-theme="dark"] .panel, html[data-theme="dark"] .product-card, html[data-theme="dark"] .agent-card, html[data-theme="dark"] .stat, html[data-theme="dark"] .field, html[data-theme="dark"] .modal { background: #241d1e; color: #f8eeee; }
html[data-theme="dark"] .field { border-color: #554548; }
html[data-theme="dark"] .setting-button { color: #f8eeee; }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] body { background: #161112; color: #f8eeee; }
  html[data-theme="system"] .site-header, html[data-theme="system"] .panel, html[data-theme="system"] .product-card, html[data-theme="system"] .agent-card, html[data-theme="system"] .stat, html[data-theme="system"] .field, html[data-theme="system"] .modal { background: #241d1e; color: #f8eeee; }
}
.tab { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 9px 13px; font-weight: 800; cursor: pointer; }
.tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: 13px; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #f2f5f5; }
.status.good { color: var(--green); background: #edf8f0; }
.status.warn { color: #9a6800; background: #fff7df; }
.status.bad { color: var(--red-deep); background: #fff0ed; }
.portal-note { border-left: 4px solid var(--gold); padding: 12px 14px; background: #fff8df; color: #5d4a12; border-radius: 0 12px 12px 0; line-height: 1.55; }

.policy-grid { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.policy-nav { position: sticky; top: 100px; display: grid; gap: 6px; }
.policy-nav button { text-align: left; border: 0; border-radius: 10px; background: transparent; padding: 10px; color: var(--muted); cursor: pointer; font-weight: 700; }
.policy-nav button:hover, .policy-nav button.active { color: var(--red-deep); background: #fff0ed; }
.policy-copy { color: #4d4545; line-height: 1.8; }
.policy-copy h3 { color: var(--ink); font-family: "DM Sans", sans-serif; font-size: 17px; letter-spacing: 0; margin-top: 26px; }

.site-footer { margin-top: 60px; background: var(--ink); color: #fff; padding: 46px 24px 24px; }
.footer-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 30px; }
.footer-title { font: 800 22px "Playfair Display", serif; margin-bottom: 11px; }
.footer-copy, .footer-link { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.7; }
.footer-link { display: block; margin: 8px 0; }
.footer-link:hover { color: #fff; }
.footer-bottom { max-width: 1240px; margin: 34px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.55); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; }
.footer-credit { color: inherit; text-decoration: none; }
.footer-credit:hover { color: #fff; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(23,19,21,.55); backdrop-filter: blur(8px); }
.modal { width: min(560px, 100%); max-height: min(760px, calc(100vh - 36px)); overflow: auto; border-radius: 24px; background: var(--cream); box-shadow: 0 30px 80px rgba(23,19,21,.25); }
.modal-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.close-btn { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; color: var(--muted); }
.close-btn:hover { color: var(--ink); background: #f5e9e5; }
.auth-submit .btn { min-width: 130px; }
.auth-providers { display: grid; grid-template-columns: 1fr; }
.auth-providers .btn { width: 100%; }
.auth-links { display: grid; justify-items: center; gap: 10px; margin-top: 18px; padding: 16px; border-radius: 14px; background: #f7f1ef; color: var(--muted); text-align: center; }
.auth-links > div { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px; }
.empty { padding: 48px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.cart-line { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; background: #f6efec; }
.qty { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; margin-top: 8px; }
.qty button { border: 0; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; background: #f7eeea; }
.notice { padding: 12px 14px; border-radius: 12px; color: var(--muted); background: #f7f1ef; line-height: 1.55; }

@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .desktop-nav.mobile-open { position: absolute; top: 70px; left: 16px; right: 16px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
  .desktop-nav.mobile-open .mobile-account-link { display: flex; width: 100%; justify-content: flex-start; border: 0; text-align: left; background: #fff0ed; color: var(--red-deep); cursor: pointer; }
  .menu-toggle { display: grid; }
  .nav-wrap { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { min-height: 360px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .agent-admin-hero { grid-template-columns: 1fr; }
  .agent-admin-hero img { width: 140px; }
  body { padding-bottom: 76px; }
  .site-footer { margin-bottom: 0; }
  .mobile-tab-bar { position: fixed; z-index: 45; left: 10px; right: 10px; bottom: 8px; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(38,19,22,.18); backdrop-filter: blur(14px); }
  .mobile-tab { display: grid; place-items: center; gap: 2px; min-height: 48px; border-radius: 14px; color: var(--muted); }
  .mobile-tab span { font-size: 22px; line-height: 1; }
  .mobile-tab small { font-size: 10px; font-weight: 800; }
  .mobile-tab.active { color: var(--red); background: #fff0ed; }
  .whatsapp-help { bottom: 78px; }
  .checkout-review { grid-template-columns: 1fr; }
  .learning-layout { grid-template-columns: 1fr; }
  .learning-sidebar { position: static; }
  .application-details { grid-template-columns: 1fr; }
  .application-details .full { grid-column: auto; }
  .application-card summary { align-items: flex-start; }
  .certificate-signature-form { grid-template-columns: 1fr; }
  .nav-wrap { padding: 11px 16px; }
  .brand { min-width: 0; }
  .brand img { width: 124px; }
  .nav-actions .btn { display: none; }
  .main { padding: 22px 16px 60px; }
  h1 { font-size: 40px; }
  h2 { font-size: 29px; }
  .lead { font-size: 14px; line-height: 1.6; }
  .hero-art { min-height: 300px; border-radius: 28px; }
  .hero-card { left: 22px; top: 30px; width: 150px; padding: 10px; border-radius: 15px; transform: rotate(-5deg); }
  .hero-product-card:hover { transform: rotate(-5deg); }
  .hero-card img { height: 92px; object-fit: contain; border-radius: 10px; }
  .hero-card strong { margin-top: 7px; font-size: 11px; line-height: 1.25; }
  .hero-card small { font-size: 9px; }
  .hero-card .price { margin-top: 3px; font-size: 13px; }
  .hero-product-hint { margin-top: 4px; font-size: 8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feature-band { grid-template-columns: 1fr; }
  .split, .policy-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .setting-row { align-items: flex-start; }
  .theme-options { justify-content: flex-start; }
  .policy-nav { position: static; display: flex; overflow-x: auto; }
  .policy-nav button { white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .portal-head { flex-direction: column; }
  .stat-grid { gap: 9px; }
  .stat { padding: 13px; }
  .stat-value { font-size: 23px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .whatsapp-help { right: 14px; bottom: 14px; width: 58px; height: 58px; padding: 0; justify-content: center; }
  .whatsapp-help span { display: none; }
  .whatsapp-help svg { width: 34px; height: 34px; }
}
