/* ════════════════════════════════════════════════════════════
   Buyer cabinet — shared shell (sidebar, top bar) for pages that
   extend base.html, plus the .pa-* components used by Кабинет,
   Мои тренажёры, Прогресс, Каталог, Корзина, Устройства, Пароль.
   Palette follows the landing: warm paper, ink, coral, teal, yellow.
   Dark theme (the platform default) uses the landing's deep teal.
   ════════════════════════════════════════════════════════════ */

html[data-theme="light"] body.b2c-shell {
    --pa-bg: #f4f1e9;
    --pa-surface: #fffdf8;
    --pa-surface-2: #ece6da;
    --pa-ink: #192326;
    --pa-muted: #5b6769;
    --pa-line: #ddd7cb;
    --pa-accent: #b8561a;
    --pa-accent-hover: #9f4914;
    --pa-accent-ink: #ffffff;
    --pa-accent-text: #b25518;
    --pa-teal: #2d6b60;
    --pa-teal-soft: #dcebe6;
    --pa-yellow: #f4c95d;
    --pa-yellow-soft: #fbf0cf;
    --pa-deep: #243f45;
    --pa-deep-ink: #f4f1e9;
    --pa-side: #192326;
    --pa-shadow: 0 18px 44px rgba(25, 35, 38, .12);
}
html:not([data-theme="light"]) body.b2c-shell {
    --pa-bg: #10181c;
    --pa-surface: #17232a;
    --pa-surface-2: #23333b;
    --pa-ink: #eef3f1;
    --pa-muted: #a7b6b4;
    --pa-line: #2b3c44;
    --pa-accent: #ee8a45;
    --pa-accent-hover: #f39d5f;
    --pa-accent-ink: #192326;
    --pa-accent-text: #f29b5d;
    --pa-teal: #9cc9be;
    --pa-teal-soft: rgba(156, 201, 190, .13);
    --pa-yellow: #f4c95d;
    --pa-yellow-soft: rgba(244, 201, 93, .12);
    --pa-deep: #1d3338;
    --pa-deep-ink: #f4f1e9;
    --pa-side: #0b1215;
    --pa-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}
/* Existing b2c components inside the shell follow the same palette.
   Specificity must beat style.css's html:not([data-theme]) .b2c-shell rules. */
html body.b2c-shell.b2c {
    --ink: var(--pa-ink);
    --paper: var(--pa-bg);
    --muted: var(--pa-muted);
    --line: var(--pa-line);
    --cream: var(--pa-surface-2);
    padding-left: 0;
    background: var(--pa-bg) !important;
    color: var(--pa-ink);
}

/* ── Sidebar ─────────────────────────────────────────────── */
body.b2c-shell .app-sidebar {
    width: 248px;
    background: var(--pa-side);
    border-right: 1px solid rgba(255, 255, 255, .06);
    padding: 26px 16px 22px;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
}
body.b2c-shell .app-sidebar .sidebar-brand { color: #fff; padding: 0 8px; }
body.b2c-shell .app-sidebar .sidebar-brand-text { color: #fff; -webkit-text-fill-color: #fff; background: none; }
body.b2c-shell .sidebar-nav { margin-top: 44px; display: grid; gap: 4px; }
body.b2c-shell .sidebar-group-label {
    margin: 22px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
}
body.b2c-shell .app-sidebar .sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .66);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 0;
    box-shadow: none;
    transition: background .15s, color .15s;
}
body.b2c-shell .app-sidebar .sidebar-link svg { width: 18px; height: 18px; flex: none; opacity: .8; }
body.b2c-shell .app-sidebar .sidebar-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
body.b2c-shell .app-sidebar .sidebar-link.active { background: rgba(255, 255, 255, .09); color: #fff; border: 0; box-shadow: none; }
body.b2c-shell .app-sidebar .sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pa-accent);
}
body.b2c-shell .app-sidebar .sidebar-link.active svg { opacity: 1; color: #f4a066; }
body.b2c-shell .sidebar-spacer { flex: 1; }
body.b2c-shell .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px 12px;
    margin-bottom: 4px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    min-width: 0;
}
body.b2c-shell .sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: none;
    display: grid;
    place-items: center;
    background: #9cc9be;
    color: #192326;
    font: 700 14px 'Space Grotesk', sans-serif;
}
body.b2c-shell .sidebar-user-text { min-width: 0; }
body.b2c-shell .sidebar-user-name { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.b2c-shell .sidebar-user-mail { display: block; font-size: 11px; color: rgba(255, 255, 255, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Main column + top bar ───────────────────────────────── */
body.b2c-shell > .container {
    margin-left: 248px;
    width: auto;
    max-width: none;
    min-height: 100vh;
    padding: 0 clamp(22px, 4vw, 60px);
    display: flex;
    flex-direction: column;
}
body.b2c-shell > .container > * { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; }
body.b2c-shell .top-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 0;
    margin-bottom: 38px;
    border-bottom: 1px solid var(--pa-line);
}
body.b2c-shell .top-bar-logo {
    display: none;
    align-items: center;
    gap: 9px;
    font: 700 18px 'Space Grotesk', sans-serif;
    color: var(--pa-ink);
    -webkit-text-fill-color: currentColor;
    background: none;
    text-decoration: none;
}
body.b2c-shell .top-bar-logo-img { width: 30px; height: 30px; box-shadow: none; }
body.b2c-shell .top-bar-crumb { font-size: 13px; color: var(--pa-muted); }
body.b2c-shell .top-bar-crumb strong { color: var(--pa-ink); font-weight: 600; }
body.b2c-shell .top-bar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
body.b2c-shell .top-bar-cart {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--pa-line);
    border-radius: 999px;
    background: var(--pa-surface);
    color: var(--pa-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
body.b2c-shell .top-bar-cart svg { width: 17px; height: 17px; }
body.b2c-shell .top-bar-cart:hover { border-color: var(--pa-accent); transform: translateY(-1px); }
body.b2c-shell .top-bar-cart b {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--pa-accent);
    color: var(--pa-accent-ink);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.b2c-shell .b2c-legal-footer { margin-top: auto; }

/* ── Building blocks ─────────────────────────────────────── */
.pa-page { padding-bottom: 72px; }
.pa-page a { color: inherit; }
.pa-page :focus-visible { outline: 2px solid var(--pa-accent); outline-offset: 3px; border-radius: 4px; }
.pa-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pa-accent-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pa-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pa-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.pa-head h1 {
    font: 600 clamp(34px, 4.2vw, 54px)/1 'Space Grotesk', sans-serif;
    letter-spacing: -.045em;
    margin: 14px 0 12px;
    color: var(--pa-ink);
}
.pa-lead { font-size: 16px; line-height: 1.6; color: var(--pa-muted); max-width: 580px; margin: 0; }
.pa-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: var(--pa-accent);
    color: var(--pa-accent-ink) !important;
    font: 700 15px 'DM Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s;
    white-space: nowrap;
}
.pa-btn:hover { background: var(--pa-accent-hover); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(224, 117, 44, .25); }
.pa-btn-yellow { background: var(--pa-yellow); color: #192326 !important; }
.pa-btn-yellow:hover { background: #f7d77d; box-shadow: 0 12px 24px rgba(0, 0, 0, .2); }
.pa-btn-ghost { background: transparent; color: var(--pa-ink) !important; border: 1px solid var(--pa-line); }
.pa-btn-ghost:hover { background: var(--pa-surface); border-color: var(--pa-ink); box-shadow: none; }
.pa-btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.pa-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--pa-ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.pa-link:hover { color: var(--pa-accent-text); }

.pa-section { margin-top: 56px; }
.pa-section:first-child { margin-top: 0; }
.pa-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--pa-line);
    flex-wrap: wrap;
}
.pa-section-head h2 { font: 600 24px/1.1 'Space Grotesk', sans-serif; letter-spacing: -.035em; margin: 0; color: var(--pa-ink); }
.pa-section-head p { margin: 6px 0 0; font-size: 14px; color: var(--pa-muted); max-width: 640px; line-height: 1.5; }
.pa-note { font-size: 13px; line-height: 1.55; color: var(--pa-muted); margin: 0; }

.pa-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: var(--pa-yellow-soft);
    border: 1px solid rgba(244, 201, 93, .45);
    color: var(--pa-ink);
    font-size: 14px;
    line-height: 1.55;
}
.pa-notice::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--pa-yellow); box-shadow: 0 0 0 4px rgba(244, 201, 93, .25); }
.pa-notice.success { background: var(--pa-teal-soft); border-color: rgba(156, 201, 190, .5); }
.pa-notice.success::before { background: var(--pa-teal); box-shadow: 0 0 0 4px rgba(156, 201, 190, .25); }
.pa-notice-body { flex: 1; min-width: 0; }
.pa-notice-body strong { display: block; margin-bottom: 2px; }
.pa-notice-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.pa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--pa-teal-soft);
    color: var(--pa-teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}
.pa-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pa-badge.muted { background: var(--pa-surface-2); color: var(--pa-muted); }
.pa-badge.on-media { position: absolute; top: 14px; left: 14px; background: rgba(16, 24, 28, .72); color: #fff; backdrop-filter: blur(6px); }

.pa-bar { height: 6px; border-radius: 6px; background: var(--pa-surface-2); overflow: hidden; }
.pa-bar > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--pa-accent); transition: width .6s ease; }
.pa-bar.teal > span { background: var(--pa-teal); }
.pa-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 13px; color: var(--pa-muted); }
.pa-progress-row strong { color: var(--pa-ink); font-weight: 600; }

/* ── Continue hero ───────────────────────────────────────── */
.pa-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    min-height: 320px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--pa-deep);
    color: var(--pa-deep-ink);
    box-shadow: var(--pa-shadow);
}
.pa-hero-body { padding: 38px 40px; display: flex; flex-direction: column; gap: 16px; }
.pa-hero .pa-kicker { color: var(--pa-yellow); }
.pa-hero h2 { font: 600 clamp(30px, 3.2vw, 44px)/1.02 'Space Grotesk', sans-serif; letter-spacing: -.045em; margin: 0; color: #fff; }
.pa-hero p { color: rgba(244, 241, 233, .72); margin: 0; font-size: 15px; line-height: 1.55; max-width: 460px; }
.pa-hero .pa-progress-row { color: rgba(244, 241, 233, .7); margin-top: auto; }
.pa-hero .pa-progress-row strong { color: #fff; font: 600 22px 'Space Grotesk', sans-serif; }
.pa-hero .pa-bar { background: rgba(255, 255, 255, .14); height: 8px; }
.pa-hero .pa-bar > span { background: var(--pa-yellow); }
.pa-hero-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.pa-hero-actions .pa-link { color: #fff; }
.pa-hero-media { position: relative; min-height: 260px; }
.pa-hero-media::before {
    content: "";
    position: absolute;
    inset: 28px 28px 28px 0;
    border-radius: 140px 10px 10px 10px;
    background: #9cc9be;
    transform: rotate(-3deg);
    opacity: .9;
}
.pa-hero-media img {
    position: absolute;
    inset: 36px 36px 36px 14px;
    width: calc(100% - 50px);
    height: calc(100% - 72px);
    object-fit: cover;
    border-radius: 4px 4px 70px 4px;
    filter: saturate(.85);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
}

/* ── Summary numbers ─────────────────────────────────────── */
.pa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border: 1px solid var(--pa-line);
    border-radius: 18px;
    background: var(--pa-surface);
    overflow: hidden;
}
.pa-stat { padding: 22px 24px; border-left: 1px solid var(--pa-line); }
.pa-stat:first-child { border-left: 0; }
.pa-stat-num { font: 600 34px/1 'Space Grotesk', sans-serif; letter-spacing: -.04em; color: var(--pa-ink); }
.pa-stat-num small { font-size: 18px; color: var(--pa-muted); letter-spacing: -.02em; }
.pa-stat-label { margin-top: 8px; font-size: 13px; color: var(--pa-muted); line-height: 1.4; }

/* ── Course cards (grid) ─────────────────────────────────── */
.pa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.pa-card {
    display: flex;
    flex-direction: column;
    background: var(--pa-surface);
    border: 1px solid var(--pa-line);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.pa-card:hover { transform: translateY(-4px); box-shadow: var(--pa-shadow); }
.pa-card-media { position: relative; aspect-ratio: 16 / 9; background: var(--pa-surface-2); overflow: hidden; }
.pa-card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.88); transition: transform .5s; }
.pa-card:hover .pa-card-media img { transform: scale(1.04); }
.pa-card-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; }
.pa-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pa-accent-text); }
.pa-card h3 { font: 600 21px/1.15 'Space Grotesk', sans-serif; letter-spacing: -.03em; margin: 0; color: var(--pa-ink); }
.pa-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pa-muted); }
.pa-card p.pa-promise { font: 600 15px/1.35 'Space Grotesk', sans-serif; letter-spacing: -.01em; color: var(--pa-ink); padding-left: 12px; border-left: 3px solid var(--pa-accent); }
.pa-card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pa-price { font: 700 22px 'Space Grotesk', sans-serif; letter-spacing: -.03em; color: var(--pa-ink); }
.pa-features { list-style: none; margin: 2px 0 6px; padding: 0; display: grid; gap: 8px; }
.pa-features li { position: relative; padding-left: 20px; font-size: 13px; color: var(--pa-muted); line-height: 1.45; }
.pa-features li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--pa-accent); }

/* ── Detailed course panel (Мои тренажёры, Прогресс) ─────── */
.pa-course-list { display: grid; gap: 18px; }
.pa-course {
    display: grid;
    grid-template-columns: 250px 1fr;
    background: var(--pa-surface);
    border: 1px solid var(--pa-line);
    border-radius: 20px;
    overflow: hidden;
}
.pa-course-media { position: relative; background: var(--pa-surface-2); min-height: 220px; }
.pa-course-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.88); }
.pa-course-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pa-course-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.pa-course-top h3 { font: 600 25px/1.1 'Space Grotesk', sans-serif; letter-spacing: -.035em; margin: 10px 0 0; color: var(--pa-ink); }
.pa-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pa-meter { padding: 14px 16px; border-radius: 12px; background: var(--pa-bg); border: 1px solid var(--pa-line); }
.pa-meter-label { font-size: 12px; line-height: 1.4; color: var(--pa-muted); min-height: 34px; }
.pa-meter-value { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; font-size: 13px; color: var(--pa-muted); }
.pa-meter-value strong { font: 600 26px/1 'Space Grotesk', sans-serif; letter-spacing: -.03em; color: var(--pa-ink); }
.pa-empty-scores { padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--pa-line); font-size: 13px; line-height: 1.5; color: var(--pa-muted); }

.pa-history { border-top: 1px solid var(--pa-line); padding-top: 4px; }
.pa-history > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--pa-ink);
}
.pa-history > summary::-webkit-details-marker { display: none; }
.pa-history > summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .2s;
}
.pa-history[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.pa-history-count { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--pa-surface-2); font-size: 12px; color: var(--pa-muted); }
.pa-timeline { list-style: none; margin: 6px 0 0; padding: 0; display: grid; }
.pa-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 18px;
    padding: 12px 0 12px 22px;
    border-top: 1px solid var(--pa-line);
}
.pa-timeline li::before { content: ""; position: absolute; left: 3px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--pa-accent); }
.pa-timeline li:first-child { border-top: 0; }
.pa-timeline-title { font-size: 14px; font-weight: 600; color: var(--pa-ink); }
.pa-timeline time { font-size: 12px; color: var(--pa-muted); white-space: nowrap; }
.pa-timeline-scores { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pa-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--pa-bg); border: 1px solid var(--pa-line); font-size: 12px; color: var(--pa-ink); }
.pa-delta { font-weight: 700; }
.pa-delta.up { color: var(--pa-teal); }
.pa-delta.down { color: var(--pa-accent-text); }
.pa-delta.same { color: var(--pa-muted); font-weight: 500; }

/* ── Compact list rows ───────────────────────────────────── */
.pa-rows { display: grid; gap: 10px; }
.pa-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px 12px 12px;
    border: 1px solid var(--pa-line);
    border-radius: 14px;
    background: var(--pa-surface);
    text-decoration: none;
    color: var(--pa-ink);
}
a.pa-row { transition: border-color .15s, transform .15s; }
a.pa-row:hover { border-color: var(--pa-accent); transform: translateX(3px); }
.pa-row img { width: 72px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; }
.pa-row-text { flex: 1; min-width: 0; }
.pa-row-text strong { display: block; font-size: 15px; font-weight: 600; }
.pa-row-text span { display: block; font-size: 13px; color: var(--pa-muted); margin-top: 2px; }
.pa-row-arrow { color: var(--pa-muted); font-size: 18px; }

.pa-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pa-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--pa-line);
    background: var(--pa-surface);
    text-decoration: none;
    color: var(--pa-ink);
    transition: border-color .15s, transform .15s;
}
.pa-tile:hover { border-color: var(--pa-accent); transform: translateY(-2px); }
.pa-tile strong { font-size: 15px; font-weight: 600; }
.pa-tile span { font-size: 12px; color: var(--pa-muted); }

/* ── Empty state ─────────────────────────────────────────── */
.pa-empty {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 26px;
    align-items: center;
    padding: 34px 36px;
    border-radius: 22px;
    border: 1px solid var(--pa-line);
    background: var(--pa-surface);
}
.pa-empty h2 { font: 600 28px/1.1 'Space Grotesk', sans-serif; letter-spacing: -.04em; margin: 0 0 10px; color: var(--pa-ink); }
.pa-empty p { margin: 0; color: var(--pa-muted); line-height: 1.6; max-width: 520px; }
.pa-empty-thumbs { display: flex; }
.pa-empty-thumbs img { width: 88px; height: 112px; object-fit: cover; border-radius: 12px; border: 3px solid var(--pa-surface); margin-left: -22px; box-shadow: 0 8px 18px rgba(0, 0, 0, .15); }
.pa-empty-thumbs img:first-child { margin-left: 0; transform: rotate(-5deg); }
.pa-empty-thumbs img:last-child { transform: rotate(5deg); }

/* ── Cart ────────────────────────────────────────────────── */
.pa-cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.pa-cart-item { display: flex; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--pa-line); border-radius: 16px; background: var(--pa-surface); margin-bottom: 12px; }
.pa-cart-item img { width: 120px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; }
.pa-cart-item h3 { margin: 0 0 4px; font: 600 18px 'Space Grotesk', sans-serif; letter-spacing: -.02em; color: var(--pa-ink); }
.pa-cart-item form { margin: 0; }
.pa-summary { position: sticky; top: 24px; padding: 24px; border-radius: 18px; background: var(--pa-surface); border: 1px solid var(--pa-line); }
.pa-summary h2 { font: 600 20px 'Space Grotesk', sans-serif; margin: 0 0 16px; color: var(--pa-ink); }
.pa-summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--pa-muted); padding: 6px 0; }
.pa-summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0; margin: 10px 0 14px; border-top: 1px solid var(--pa-line); border-bottom: 1px solid var(--pa-line); font-weight: 600; color: var(--pa-ink); }
.pa-summary-total strong { font: 700 26px 'Space Grotesk', sans-serif; letter-spacing: -.03em; }
.pa-summary .pa-btn { width: 100%; margin-top: 6px; }
.pa-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 13px; line-height: 1.5; color: var(--pa-ink); }
.pa-check input { margin-top: 3px; accent-color: var(--pa-accent); width: 16px; height: 16px; flex: none; }
.pa-summary .pa-note + .pa-note { margin-top: 8px; }

/* ── Devices ─────────────────────────────────────────────── */
.pa-device-group { padding: 22px 24px; border: 1px solid var(--pa-line); border-radius: 18px; background: var(--pa-surface); margin-bottom: 16px; }
.pa-device-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pa-device-group-head h2 { font: 600 20px 'Space Grotesk', sans-serif; letter-spacing: -.02em; margin: 0; color: var(--pa-ink); }
.pa-slots { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pa-muted); }
.pa-slots i { width: 10px; height: 10px; border-radius: 50%; background: var(--pa-surface-2); border: 1px solid var(--pa-line); }
.pa-slots i.on { background: var(--pa-accent); border-color: var(--pa-accent); }
.pa-device { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--pa-line); flex-wrap: wrap; }
.pa-device strong { display: block; font-size: 15px; font-weight: 600; color: var(--pa-ink); }
.pa-device span { font-size: 13px; color: var(--pa-muted); }
.pa-device form { margin: 0; }

/* ── Forms ───────────────────────────────────────────────── */
.pa-form-card { max-width: 520px; padding: 28px 30px; border: 1px solid var(--pa-line); border-radius: 20px; background: var(--pa-surface); }
.pa-form-card .b2c-field { color: var(--pa-ink); font-size: 14px; margin-top: 0; margin-bottom: 18px; }
.pa-form-card .b2c-field input { background: var(--pa-bg); border-color: var(--pa-line); color: var(--pa-ink); border-radius: 10px; }
.pa-form-card .b2c-field input:focus { border-color: var(--pa-accent); box-shadow: 0 0 0 3px rgba(224, 117, 44, .18); }
.pa-form-card .pa-btn { width: 100%; margin-top: 6px; }
.pa-error { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; background: rgba(224, 117, 44, .12); border: 1px solid rgba(224, 117, 44, .35); color: var(--pa-ink); font-size: 14px; }

.pa-owner { margin-top: 40px; padding: 18px 20px; border-radius: 14px; border: 1px dashed var(--pa-line); }
.pa-owner h2 { font: 600 16px 'Space Grotesk', sans-serif; margin: 0 0 10px; color: var(--pa-ink); }
.pa-owner-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
    .pa-card, .pa-card-media img, .pa-btn, .pa-tile, a.pa-row, .pa-bar > span { transition: none; }
}

/* ── Tablet ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .pa-hero { grid-template-columns: 1fr; }
    .pa-hero-media { min-height: 220px; order: -1; }
    .pa-hero-media::before { inset: 20px 20px 0 20px; border-radius: 120px 10px 0 0; transform: none; }
    .pa-hero-media img { inset: 28px 28px 0 28px; width: calc(100% - 56px); height: calc(100% - 28px); border-radius: 4px 70px 0 0; }
    .pa-cart { grid-template-columns: 1fr; }
    .pa-summary { position: static; }
}

/* ── Mobile: sidebar becomes a bottom tab bar ────────────── */
@media (max-width: 800px) {
    body.b2c-shell .app-sidebar {
        inset: auto 0 0 0;
        width: 100%;
        height: auto;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        flex-direction: row;
        border-right: 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
        overflow: visible;
    }
    body.b2c-shell .app-sidebar .sidebar-brand,
    body.b2c-shell .sidebar-spacer,
    body.b2c-shell .sidebar-user,
    body.b2c-shell .sidebar-group-label,
    body.b2c-shell .app-sidebar .sidebar-link.sidebar-logout,
    body.b2c-shell .app-sidebar .sidebar-link.sidebar-secondary { display: none; }
    body.b2c-shell .app-sidebar .sidebar-nav { display: flex; flex-direction: row; width: 100%; min-width: 0; margin: 0; gap: 2px; justify-content: space-around; }
    body.b2c-shell .app-sidebar .sidebar-link {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
        padding: 8px 2px 6px;
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
    }
    body.b2c-shell .app-sidebar .sidebar-link span { display: block; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    body.b2c-shell .app-sidebar .sidebar-link svg { width: 20px; height: 20px; }
    body.b2c-shell .app-sidebar .sidebar-link.active::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
    body.b2c-shell > .container { margin-left: 0; padding: 0 18px 96px; }
    body.b2c-shell .top-bar { margin-bottom: 26px; padding: 14px 0; }
    body.b2c-shell .top-bar-logo { display: inline-flex; }
    body.b2c-shell .top-bar-crumb { display: none; }
    body.b2c-shell .top-bar-cart span { display: none; }
    .pa-head { margin-bottom: 26px; }
    .pa-hero-body { padding: 26px 22px 28px; }
    .pa-stat { padding: 18px; }
    .pa-stats { grid-template-columns: 1fr 1fr; }
    .pa-stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--pa-line); }
    .pa-stat-num { font-size: 28px; }
    .pa-course { grid-template-columns: 1fr; }
    .pa-course-media { min-height: 0; aspect-ratio: 16 / 7; }
    .pa-course-body { padding: 20px; }
    .pa-course-top .pa-btn { width: 100%; }
    .pa-empty { grid-template-columns: 1fr; padding: 26px 22px; }
    .pa-empty-thumbs { order: -1; }
    .pa-cart-item { flex-wrap: wrap; }
    .pa-cart-item img { width: 96px; height: 70px; }
    .pa-section { margin-top: 44px; }
}

.pa-mobile-only { display: none; }
@media (max-width: 800px) { .pa-mobile-only { display: block; } }
/* style.css switches light-theme headings to Manrope; the cabinet keeps the landing type. */
html body.b2c-shell h1, html body.b2c-shell h2, html body.b2c-shell h3,
html body.b2c-shell .sidebar-brand-text, html body.b2c-shell .top-bar-logo { font-family: 'Space Grotesk', sans-serif; }
/* Legal pages inside the shell: legal.css hardcodes white cards, which made dark-theme text unreadable. */
body.b2c-shell .legal-card, body.b2c-shell .legal-document, body.b2c-shell .legal-links a { background: var(--pa-surface); border-color: var(--pa-line); color: var(--pa-ink); }
body.b2c-shell .legal-alert { background: var(--pa-yellow-soft); border-color: rgba(244, 201, 93, .45); color: var(--pa-ink); }
@media (max-width: 800px) { .pa-row .pa-badge { display: none; } }
