/* =========================================================================
   SH DONAT TJ — Mini App Design System
   Единая палитра: оранжевый бренд + нейтральные оттенки.
   ======================================================================== */

:root {
    /* Brand ------------------------------------------------------------- */
    --brand:            #FF8400;
    --brand-hover:      #E97600;
    --brand-dark:       #C45400;
    --brand-soft:       #FFF2E0;
    --brand-softer:     #FFF8ED;

    /* Ink (текст/фон) --------------------------------------------------- */
    --ink:              #14181F;
    --ink-2:            #29303B;
    --ink-3:            #4B5361;
    --muted:            #697180;
    --muted-2:          #8B93A1;

    /* Surface ----------------------------------------------------------- */
    --surface:          #FFFFFF;
    --surface-2:        #FAFBFD;
    --bg:               #F5F7FB;
    --bg-2:             #EEF2F8;
    --line:             #E5EAF2;
    --line-2:           #EDF1F7;

    /* Semantic ---------------------------------------------------------- */
    --success:          #14AA5F;
    --success-soft:     #E4F7ED;
    --warning:          #E5A017;
    --warning-soft:     #FEF5E0;
    --error:            #E23A3A;
    --error-soft:       #FCEAEA;
    --info:             #2F6BFF;
    --info-soft:        #E7EFFF;

    /* Radius ------------------------------------------------------------ */
    --r-xs:  8px;
    --r-sm:  12px;
    --r:     16px;
    --r-lg:  20px;
    --r-xl:  28px;
    --r-2xl: 36px;

    /* Shadows ----------------------------------------------------------- */
    --shadow-xs: 0 1px 2px rgba(20, 24, 31, 0.04);
    --shadow-sm: 0 2px 8px rgba(20, 24, 31, 0.05);
    --shadow:    0 6px 20px rgba(20, 24, 31, 0.07);
    --shadow-lg: 0 14px 40px rgba(20, 24, 31, 0.10);
    --shadow-brand: 0 10px 30px rgba(255, 132, 0, 0.35);

    /* Spacing scale (based on 4px) -------------------------------------- */
    --gap-xs: 6px;
    --gap-sm: 10px;
    --gap:    14px;
    --gap-lg: 20px;
    --gap-xl: 28px;

    /* Type -------------------------------------------------------------- */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;

    /* Safe area (для iPhone notch и Android gestures) ------------------- */
    --safe-top:    env(safe-area-inset-top, 0);
    --safe-bottom: env(safe-area-inset-bottom, 0);
}

/* Reset ================================================================== */

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
}
a:hover { color: var(--brand); }

img { display: block; max-width: 100%; }

.dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    background: var(--muted-2);
    border-radius: 50%;
    margin: 0 6px;
    vertical-align: middle;
}

/* Иконки Lucide рендерятся как <svg>, нормализуем размер ---------------- */
[data-lucide], svg.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* App root =============================================================== */

.app {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    position: relative;
}

/* Screen switching ------------------------------------------------------- */

.screen {
    display: none;
    animation: screen-in 240ms ease;
}
.screen--active {
    display: block;
}

@keyframes screen-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Section wrapper -------------------------------------------------------- */

.section {
    padding: 18px 20px 0;
}
.section:last-child { padding-bottom: 32px; }

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 2px;
}
.section__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.section__hint {
    font-size: 12px;
    color: var(--muted-2);
}

/* =======================================================================
   HERO (главная — верхний блок)
   ====================================================================== */

.hero {
    padding: 24px 20px 20px;
    background:
        radial-gradient(1000px 380px at 90% -10%, rgba(255, 132, 0, 0.14), transparent 60%),
        linear-gradient(180deg, #FFFFFF 0%, #F5F7FB 100%);
    border-bottom: 1px solid var(--line);
}

.hero__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.hero__logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-brand);
    flex-shrink: 0;
}
.hero__title {
    flex: 1;
    min-width: 0;
}
.hero__name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.hero__tag {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.hero__menu {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    transition: background 100ms ease, transform 100ms ease;
    flex-shrink: 0;
}
.hero__menu:active {
    background: var(--bg-2);
    transform: scale(0.94);
}
.hero__menu [data-lucide],
.hero__menu svg {
    width: 22px;
    height: 22px;
}

/* Drawer (правая шторка) ------------------------------------------------ */

.drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
}
.drawer[hidden] { display: none; }

.drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 31, 0.55);
    opacity: 0;
    transition: opacity 220ms ease;
}
.drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 84vw);
    background: var(--bg);
    box-shadow: -14px 0 44px rgba(20, 24, 31, 0.18);
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
}
.drawer--open .drawer__backdrop { opacity: 1; }
.drawer--open .drawer__panel { transform: translateX(0); }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.drawer__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.drawer__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 100ms ease;
}
.drawer__close:active { background: var(--bg-2); }
.drawer__close [data-lucide],
.drawer__close svg { width: 20px; height: 20px; }

.drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.hero__greeting {
    margin-bottom: 20px;
}
.hero__hi {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2px;
}
.hero__user {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* =======================================================================
   Stat cards (баланс / заказы / статистика реферала)
   ====================================================================== */

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.stat__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat__icon [data-lucide], .stat__icon svg { width: 22px; height: 22px; }
.stat__body { min-width: 0; flex: 1; }
.stat__label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 2px;
}
.stat__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.stat__unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 3px;
}

/* Trust chips — маленькие «плашки» с иконками, подчёркивают надёжность --- */

.trust-chips {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
}
.trust-chip [data-lucide],
.trust-chip svg {
    width: 14px;
    height: 14px;
    color: var(--brand-dark);
}

/* =======================================================================
   Game Hero Cards (большие обложки FF / PUBG на главной)
   ====================================================================== */

.game-hero-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.game-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2.2 / 1;
    border-radius: var(--r-lg);
    overflow: hidden;
    text-align: left;
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 250ms ease;
    isolation: isolate;
}
.game-card::after {
    /* Тонкая внутренняя обводка для «объёмного» края */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.game-card:active {
    transform: scale(0.985);
    box-shadow: var(--shadow-sm);
}

.game-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.game-card__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg,
            transparent 0%,
            transparent 35%,
            rgba(10, 8, 4, 0.55) 78%,
            rgba(10, 8, 4, 0.85) 100%);
}

.game-card__content {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #FFFFFF;
}

.game-card__brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.game-card__title {
    margin-top: 4px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.game-card__cta {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    align-self: flex-start;
}
.game-card__cta [data-lucide],
.game-card__cta svg { width: 14px; height: 14px; }

/* =======================================================================
   Tile grid (для мелких кнопок — оставлено на случай если понадобится)
   ====================================================================== */

.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px 16px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    text-align: left;
    box-shadow: var(--shadow-xs);
    transition: transform 100ms ease, box-shadow 200ms ease;
    position: relative;
    overflow: hidden;
}
.tile:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}
.tile__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    margin-bottom: 10px;
}
.tile__icon [data-lucide], .tile__icon svg { width: 24px; height: 24px; }

.tile__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.tile__sub {
    font-size: 12px;
    color: var(--muted);
}
.tile__cta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-dark);
}
.tile__cta [data-lucide], .tile__cta svg { width: 14px; height: 14px; }

/* =======================================================================
   Row list (пункты-строки)
   ====================================================================== */

.row-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}
.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: transparent;
    text-align: left;
    width: 100%;
    border-bottom: 1px solid var(--line-2);
    transition: background 100ms ease;
}
.row:last-child { border-bottom: none; }
.row:active { background: var(--bg-2); }

.row__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    flex-shrink: 0;
}
.row__icon [data-lucide], .row__icon svg { width: 18px; height: 18px; }

.row__body { flex: 1; min-width: 0; }
.row__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
}
.row__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}
.row__chevron {
    color: var(--muted-2);
    flex-shrink: 0;
}

/* =======================================================================
   Topbar (общий заголовок экрана)
   ====================================================================== */

.topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.topbar__back,
.topbar__spacer {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--ink);
    transition: background 100ms ease;
    flex-shrink: 0;
}
.topbar__back:active {
    background: var(--bg-2);
}
.topbar__title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =======================================================================
   Product list (каталог товаров)
   ====================================================================== */

.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    text-align: left;
    width: 100%;
    transition: transform 100ms ease, border-color 200ms ease;
}
.product-card:active {
    transform: scale(0.99);
    border-color: var(--brand);
}

.product-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.product-card__icon [data-lucide], .product-card__icon svg { width: 22px; height: 22px; }

.product-card__body { flex: 1; min-width: 0; }
.product-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.product-card__bonus {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-radius: 6px;
}
.product-card__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-align: right;
    flex-shrink: 0;
}
.product-card__price__unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 2px;
}

/* =======================================================================
   Order screen elements
   ====================================================================== */

.order-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.order-summary__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.order-summary__icon [data-lucide], .order-summary__icon svg { width: 24px; height: 24px; }

.order-summary__body { flex: 1; min-width: 0; }
.order-summary__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 3px;
}
.order-summary__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.order-summary__price {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.order-summary__unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 2px;
}

/* Input --------------------------------------------------------------- */

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 0 14px;
    transition: border-color 150ms ease, box-shadow 200ms ease;
}
.input-wrap:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(255, 132, 0, 0.14);
}
.input-wrap__icon {
    color: var(--muted);
    margin-right: 10px;
    width: 18px !important;
    height: 18px !important;
}
.input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
}
.input::placeholder {
    color: var(--muted-2);
    font-weight: 400;
}

.input-status {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.input-status--ok {
    background: var(--success-soft);
    color: var(--success);
}
.input-status--warn {
    background: var(--warning-soft);
    color: var(--warning);
}
.input-status--err {
    background: var(--error-soft);
    color: var(--error);
}
.input-status [data-lucide], .input-status svg { width: 16px; height: 16px; }

/* Option (radio) ------------------------------------------------------- */

.option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    cursor: pointer;
    transition: border-color 150ms ease, background 100ms ease;
    position: relative;
}
.option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.option:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-softer);
}
.option__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms ease;
}
.option:has(input:checked) .option__icon {
    background: var(--brand);
    color: #FFFFFF;
}
.option__icon [data-lucide], .option__icon svg { width: 20px; height: 20px; }

.option__body { flex: 1; min-width: 0; }
.option__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
}
.option__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}
.option__check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 150ms ease;
    flex-shrink: 0;
}
.option:has(input:checked) .option__check {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}
.option__check [data-lucide], .option__check svg { width: 14px; height: 14px; }

/* Consent (checkbox) -------------------------------------------------- */

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
}
.consent input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.consent__box {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 120ms ease;
}
.consent:has(input:checked) .consent__box {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}
.consent__box [data-lucide], .consent__box svg { width: 14px; height: 14px; }
.consent__text {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.4;
}

/* =======================================================================
   Buttons
   ====================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 100ms ease, box-shadow 200ms ease, background 150ms ease;
    white-space: nowrap;
}
.btn [data-lucide], .btn svg { width: 18px; height: 18px; }

.btn--lg {
    padding: 15px 22px;
    font-size: 15px;
    border-radius: var(--r);
    width: 100%;
}

.btn--primary {
    background: var(--brand);
    color: #FFFFFF;
    box-shadow: var(--shadow-brand);
}
.btn--primary:hover:not(:disabled) {
    background: var(--brand-hover);
}
.btn--primary:active:not(:disabled) {
    transform: scale(0.98);
}
.btn--primary:disabled {
    background: var(--line);
    color: var(--muted-2);
    box-shadow: none;
    cursor: not-allowed;
}

.btn--secondary {
    background: var(--ink);
    color: #FFFFFF;
}
.btn--secondary:hover:not(:disabled) {
    background: var(--ink-2);
}
.btn--secondary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1.5px solid var(--line);
}
.btn--ghost:active {
    background: var(--bg-2);
    transform: scale(0.98);
}

/* CTA bar (sticky bottom для главных действий) ------------------------- */

.cta-bar {
    padding: 20px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 30%);
    padding-top: 40px;
}
.cta-bar__note {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

/* =======================================================================
   Tabs (фильтры в истории заказов)
   ====================================================================== */

.tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-2);
    border-radius: 12px;
    margin-bottom: 16px;
}
.tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 8px;
    transition: all 150ms ease;
    text-align: center;
}
.tab--active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
}

/* =======================================================================
   Orders list
   ====================================================================== */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: transform 100ms ease, border-color 200ms ease;
}
.order-item:active {
    transform: scale(0.99);
    border-color: var(--brand);
}

.order-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.order-item__id {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-dark);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.order-item__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 4px;
    letter-spacing: -0.01em;
}
.order-item__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.order-item__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.order-item__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.order-item__price__unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 2px;
}

/* Badge --------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge [data-lucide], .badge svg { width: 12px; height: 12px; }

.badge--success  { background: var(--success-soft); color: var(--success); }
.badge--warning  { background: var(--warning-soft); color: var(--warning); }
.badge--error    { background: var(--error-soft);   color: var(--error);   }
.badge--info     { background: var(--info-soft);    color: var(--info);    }
.badge--muted    { background: var(--bg-2);         color: var(--ink-3);   }

/* Empty state --------------------------------------------------------- */

.empty {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.empty__icon {
    width: 72px;
    height: 72px;
    background: var(--bg-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-2);
}
.empty__icon [data-lucide], .empty__icon svg { width: 32px; height: 32px; }
.empty__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 4px;
}
.empty__sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

/* =======================================================================
   Order Detail
   ====================================================================== */

.detail-hero {
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    text-align: center;
    margin-bottom: 14px;
    box-shadow: var(--shadow-xs);
}
.detail-hero .badge {
    margin: 0 auto 14px;
}
.detail-hero__id {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.detail-hero__date {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.kv {
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}
.kv__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-2);
}
.kv__row:last-child { border-bottom: none; }
.kv__k {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    flex-shrink: 0;
}
.kv__v {
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    margin: 0;
    text-align: right;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}
.kv__v--strong {
    color: var(--brand-dark);
    font-size: 16px;
    font-weight: 800;
}

/* =======================================================================
   Profile
   ====================================================================== */

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.profile-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-card__avatar [data-lucide],
.profile-card__avatar svg { width: 28px; height: 28px; }

.profile-card__body { flex: 1; min-width: 0; }
.profile-card__name {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.profile-card__meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tier-card {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.tier-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.tier-card__label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.tier-card__value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.tier-card__value [data-lucide],
.tier-card__value svg { width: 18px; height: 18px; color: var(--brand-dark); }

.tier-card__foot {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.progress {
    height: 8px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
}
.progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand));
    border-radius: 999px;
    transition: width 400ms ease;
}

/* =======================================================================
   Referral
   ====================================================================== */

.ref-hero {
    padding: 24px 20px;
    background:
        radial-gradient(600px 200px at 90% -20%, rgba(255, 132, 0, 0.20), transparent 60%),
        var(--ink);
    color: #FFFFFF;
    border-radius: var(--r-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ref-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 14px;
}
.ref-hero__badge [data-lucide],
.ref-hero__badge svg { width: 14px; height: 14px; color: var(--brand); }

.ref-hero__title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brand);
    line-height: 1.15;
}
.ref-hero__sub {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.45;
}

.ref-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 12px 16px;
    background: var(--surface);
    border: 1px dashed var(--brand);
    border-radius: var(--r);
}
.ref-link__url {
    flex: 1;
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ref-link__copy {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 100ms ease;
}
.ref-link__copy:active { transform: scale(0.95); }

.tier-list {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}
.tier-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-bottom: 1px solid var(--line-2);
}
.tier-row:last-child { border-bottom: none; }

.tier-row__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tier-row__icon--hero { background: #E2ECFF; color: var(--info); }
.tier-row__icon--legend { background: #F1E7FF; color: #7A3EDB; }
.tier-row__icon [data-lucide],
.tier-row__icon svg { width: 20px; height: 20px; }

.tier-row__body { flex: 1; min-width: 0; }
.tier-row__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
}
.tier-row__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}
.tier-row__pct {
    font-size: 15px;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.01em;
}

/* =======================================================================
   Support
   ====================================================================== */

.support-hero {
    padding: 32px 20px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.support-hero__icon {
    width: 64px;
    height: 64px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.support-hero__icon [data-lucide],
.support-hero__icon svg { width: 30px; height: 30px; }
.support-hero__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.support-hero__sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

/* =======================================================================
   Footer
   ====================================================================== */

.footer {
    padding: 24px 20px 32px;
    text-align: center;
}
.footer__brand {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
}
.footer__ver {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted-2);
}
