/* ══════════════════════════════════════
   КРУИЗ ПРАЧЕЧНАЯ — Professional PWA Styles
   ══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Unbounded:wght@400;500;600;700&display=swap');

:root {
    --primary: #A3D3E6;
    --primary-dark: #8EBFD2;
    --primary-text: #333333;
    --accent: #292929;
    --success: #2E7D32;
    --warning: #FF9500;
    --danger: #D32F2F;
    --bg: #F5F7FA;
    --card: #FFFFFF;
    --text: #333333;
    --text-secondary: #757575;
    --border: rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 12px;
    --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
}
html { height: -webkit-fill-available; }

h1, h2, h3, h4, h5, h6, .header__logo, .splash__title, .hero-card h2, .auth-header h1 {
    font-family: 'Unbounded', sans-serif;
    color: var(--text);
}

/* ── Splash ── */
.splash {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--card);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__inner { text-align: center; color: var(--text); }
.splash__icon { width: 80px; height: 80px; margin: 0 auto 16px; color: var(--primary); }
.splash__title { font-size: 32px; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.splash__sub { font-size: 15px; color: var(--text-secondary); font-weight: 500; }
.splash__loader { margin-top: 32px; }

.dot-loader { display: flex; gap: 8px; justify-content: center; }
.dot-loader span {
    width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
    animation: dotPulse 1.2s ease-in-out infinite;
}
.dot-loader span:nth-child(2) { animation-delay: 0.15s; }
.dot-loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── Fullscreen message ── */
.fullscreen-msg {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; padding: 40px 24px; text-align: center;
}
.fullscreen-msg__icon { width: 64px; height: 64px; color: var(--primary); margin-bottom: 24px; }
.fullscreen-msg h2 { font-size: 24px; margin-bottom: 12px; }
.fullscreen-msg p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; max-width: 320px; }

/* ── Header ── */
.header {
    background: var(--card);
    color: var(--text);
    padding: 20px 24px;
    padding-top: calc(20px + constant(safe-area-inset-top));
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}
.header__top { display: flex; align-items: center; justify-content: center; position: relative; }
.header__logo { font-size: 22px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }
.header__logout {
    position: absolute; right: 0;
    background: transparent; border: none; color: var(--text-secondary);
    width: 36px; height: 36px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.header__logout:active { background: var(--bg); color: var(--danger); }

.header__bonus {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--bg);
    padding: 8px 16px; border-radius: 24px;
    font-size: 13px; font-weight: 600; color: var(--text);
    margin-top: 16px; width: fit-content; margin-left: auto; margin-right: auto;
}
.header__bonus-icon { color: var(--primary); width: 16px; height: 16px; }

/* ── Navigation ── */
.nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(var(--nav-height) + constant(safe-area-inset-bottom));
    height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    display: flex;
    z-index: 100;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    border-top: 1px solid var(--border);
}
.nav__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 10px; color: #B0B0B0;
    text-decoration: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 0; gap: 4px;
}
.nav__item.active { color: var(--primary-text); }
.nav__icon { width: 24px; height: 24px; stroke-width: 2; transition: transform 0.3s, color 0.3s; }
.nav__item.active .nav__icon { color: var(--primary); stroke-width: 2.5; transform: scale(1.1); }
.nav__label { font-weight: 600; font-family: 'Montserrat', sans-serif; letter-spacing: 0.2px; }

/* ── Pages ── */
.page { display: none; padding-bottom: calc(var(--nav-height) + 40px + constant(safe-area-inset-bottom)); padding-bottom: calc(var(--nav-height) + 40px + env(safe-area-inset-bottom, 0px)); }
.page.active { display: block; animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header { padding: 32px 24px 16px; }
.page-header__title { font-size: 28px; line-height: 1.2; }

/* ── Section ── */
.section {
    background: var(--card);
    margin: 16px 20px;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative; overflow: hidden;
}
.section__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section__title { font-size: 18px; line-height: 1.3; }

/* ── Hero card ── */
.hero-card {
    background: var(--primary);
    color: var(--primary-text);
    text-align: center;
    padding: 40px 24px;
    margin: 0 0 20px 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 26px; margin-bottom: 12px; }
.hero-card p { font-size: 15px; opacity: 0.85; margin-bottom: 28px; font-weight: 500; line-height: 1.5; max-width: 300px; margin-left: auto; margin-right: auto;}
.hero-card .btn { background: var(--card); color: var(--primary-text); box-shadow: var(--shadow-sm); }
.hero-card .btn:active { background: #f0f0f0; }

/* ── Price table in PWA ── */
.price-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -24px; padding: 0 24px; }
.ptable { width: 100%; border-collapse: collapse; min-width: 460px; font-family: 'Montserrat', sans-serif;}
.ptable th {
    padding: 12px 8px; font-size: 11px; font-weight: 600; text-align: center;
    color: var(--text-secondary); border-bottom: 2px solid var(--border);
    vertical-align: bottom;
}
.ptable th small { display: block; font-weight: 400; opacity: 0.7; margin-top: 4px; font-size: 10px; }
.ptable td {
    padding: 16px 8px; text-align: center; border-bottom: 1px solid var(--border);
    font-weight: 500; font-size: 14px;
}
.ptable__svc { text-align: left !important; font-weight: 600 !important; color: var(--text); padding-right: 16px !important; }
.ptable tr:last-child td { border-bottom: none; }

/* ── Order categories ── */
.order-cat { margin-bottom: 12px; }
.order-cat__header {
    font-family: 'Unbounded', sans-serif; font-size: 16px;
    padding: 16px 0 8px; border-bottom: 2px solid var(--primary);
    margin-bottom: 8px; color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
}
.order-cat__unit { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 500; color: var(--text-secondary); }

/* ── Service items (order page) ── */
.service-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.service-item:last-child { border-bottom: none; }
.service-item__left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.service-item__icon { font-size: 24px; width: 40px; height: 40px; background: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-item__info { min-width: 0; }
.service-item__name { font-size: 15px; font-weight: 600; }
.service-item__meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.service-item__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.service-item__price { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }

.qty { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 20px; padding: 4px; }
.qty__btn {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: var(--card); color: var(--text); font-size: 16px; font-weight: 500;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.qty__btn:active { background: var(--primary); color: var(--primary-text); transform: scale(0.95); }
.qty__val { font-size: 15px; font-weight: 600; min-width: 24px; text-align: center; }

/* ── Cart preview ── */
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; }
.cart-total__price { color: var(--text); font-size: 22px; font-family: 'Unbounded', sans-serif;}

/* ── Steps bar ── */
.steps-bar {
    display: flex; align-items: center; justify-content: center;
    padding: 24px 20px 16px; gap: 12px;
}
.steps-bar__item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-secondary); transition: all 0.3s;
}
.steps-bar__item.active { color: var(--text); }
.steps-bar__item.done { color: var(--primary-dark); }
.steps-bar__item span {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--card); box-shadow: var(--shadow-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; transition: all 0.3s;
}
.steps-bar__item.active span { background: var(--primary); color: var(--primary-text); box-shadow: 0 4px 12px rgba(163,211,230,0.4); }
.steps-bar__item.done span { background: var(--primary-dark); color: #fff; }
.steps-bar__divider { flex: 1; max-width: 30px; height: 2px; background: var(--border); border-radius: 1px; }

.order-step { display: none; }
.order-step.active { display: block; animation: fadeUp 0.3s ease-out; }

/* ── Inputs ── */
.input {
    width: 100%; padding: 16px;
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 15px; background: var(--bg); color: var(--text); font-family: 'Montserrat', sans-serif;
    font-weight: 500; transition: all 0.3s;
    -webkit-appearance: none; appearance: none;
}
.input:focus { outline: none; border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 4px rgba(163,211,230,0.15); }
.input::placeholder { color: #A0A0A0; font-weight: 400; }
.textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

/* ── Time grid ── */
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-chip {
    padding: 14px 12px; text-align: center;
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; background: var(--card);
}
.time-chip:active { transform: scale(0.96); }
.time-chip.selected { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 16px; border: none; border-radius: 32px;
    font-size: 16px; font-weight: 600; font-family: 'Montserrat', sans-serif;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:active { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:active { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 18px; font-size: 17px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.page-actions { padding: 16px 20px 0; display: flex; gap: 12px; }
.page-actions .btn { flex: 1; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Summary rows ── */
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; }
.summary-row__label { color: var(--text-secondary); font-weight: 500; }
.summary-row__value { font-weight: 600; }

/* ── Bonus section ── */
.bonus-row { display: flex; justify-content: space-between; align-items: center; }
.bonus-row__label { font-size: 15px; font-weight: 600; }
.bonus-row__hint { font-size: 13px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

.switch { position: relative; width: 56px; height: 32px; display: inline-block; }
.switch input { display: none; }
.switch__slider {
    position: absolute; inset: 0; background: var(--border); border-radius: 16px;
    cursor: pointer; transition: background 0.3s;
}
.switch__slider::before {
    content: ''; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px;
    background: #fff; border-radius: 50%; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.switch input:checked + .switch__slider { background: var(--primary); }
.switch input:checked + .switch__slider::before { transform: translateX(24px); }

.range-slider {
    width: 100%; margin: 20px 0 8px; -webkit-appearance: none; appearance: none;
    height: 8px; border-radius: 4px; background: var(--bg); outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bonus-slider-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.bonus-use-value { text-align: center; font-size: 15px; margin-top: 12px; font-weight: 500; }
.bonus-use-value b { color: var(--primary-dark); font-family: 'Unbounded', sans-serif;}

/* ── Summary final ── */
.summary-final { background: var(--accent); color: #fff; }
.summary-final__row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 500; }
.summary-final__price { font-size: 28px; font-weight: 700; font-family: 'Unbounded', sans-serif;}
.summary-final__cashback { font-size: 13px; opacity: 0.8; margin-top: 8px; display: flex; align-items: center; gap: 6px; }

/* ── Order cards ── */
.orders-container { padding: 0 20px; }
.order-card {
    background: var(--card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.order-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border);
}
.order-card[data-status="new"]::before, .order-card[data-status="confirmed"]::before { background: var(--primary); }
.order-card[data-status="pickup"]::before, .order-card[data-status="delivery"]::before { background: var(--warning); }
.order-card[data-status="in_progress"]::before, .order-card[data-status="ready"]::before { background: #5E35B1; }
.order-card[data-status="completed"]::before { background: var(--success); }
.order-card[data-status="cancelled"]::before { background: var(--danger); }

.order-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.order-card__id { font-weight: 700; font-size: 18px; font-family: 'Unbounded', sans-serif;}
.status-badge {
    font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.status-badge.new { background: #E3F2FD; color: #1565C0; }
.status-badge.confirmed { background: #E8F5E9; color: #2E7D32; }
.status-badge.pickup { background: #FFF3E0; color: #E65100; }
.status-badge.in_progress { background: #F3E5F5; color: #7B1FA2; }
.status-badge.ready { background: #E0F2F1; color: #00695C; }
.status-badge.delivery { background: #E1F5FE; color: #0277BD; }
.status-badge.completed { background: #E8F5E9; color: #1B5E20; }
.status-badge.cancelled { background: #FFEBEE; color: #C62828; }

.order-card__items { font-size: 14px; color: var(--text-secondary); line-height: 1.6; font-weight: 500; }
.order-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.order-card__date { font-size: 13px; font-weight: 500; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.order-card__price { font-size: 20px; font-weight: 700; font-family: 'Unbounded', sans-serif; color: var(--text); }

/* ── Promo cards ── */
.promos-container { padding: 0 20px; }
.promo-card {
    border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; color: #fff;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.promo-card::after {
    content: ''; position: absolute; right: -20px; bottom: -20px; width: 100px; height: 100px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.promo-card.info { background: linear-gradient(135deg, #292929 0%, #434343 100%); }
.promo-card.discount { background: linear-gradient(135deg, var(--primary-dark) 0%, #5E9CAE 100%); color: var(--card); }
.promo-card.discount .promo-card__title { color: var(--card); }
.promo-card.raffle { background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%); color: var(--text); }
.promo-card.raffle .promo-card__title { color: var(--text); }

.promo-card__title { font-size: 20px; font-family: 'Unbounded', sans-serif; margin-bottom: 8px; }
.promo-card__desc { font-size: 14px; font-weight: 500; opacity: 0.9; line-height: 1.5; }
.promo-card__badge {
    display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.25);
    padding: 6px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-top: 16px; backdrop-filter: blur(4px);
}
.promo-card.discount .promo-card__badge { background: rgba(0,0,0,0.1); color: var(--card); }
.promo-card.raffle .promo-card__badge { background: rgba(0,0,0,0.05); color: var(--text); }


/* ── Profile ── */
.profile-card { text-align: center; padding: 32px 24px; }
.profile-card__avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--primary);
    color: var(--primary-text); font-family: 'Unbounded', sans-serif; font-size: 32px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; box-shadow: var(--shadow);
}
.profile-card__name { font-size: 22px; font-family: 'Unbounded', sans-serif; }
.profile-card__address { font-size: 15px; color: var(--text-secondary); font-weight: 500; margin-top: 8px; }

.profile-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}
.profile-info-row:active { opacity: 0.7; }
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row__label { color: var(--text-secondary); font-weight: 500; }
.profile-info-row__value { font-weight: 600; }

/* ── Bonus card ── */
.bonus-card {
    background: var(--accent);
    color: #fff; border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow-lg);
}
.bonus-card__balance { display: flex; justify-content: space-between; align-items: flex-start; }
.bonus-card__label { font-size: 15px; font-weight: 500; opacity: 0.9; }
.bonus-card__amount { font-size: 32px; font-family: 'Unbounded', sans-serif; color: var(--primary); }
.bonus-card__info { font-size: 13px; opacity: 0.8; margin-top: 16px; line-height: 1.5; font-weight: 500; background: rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; }

/* ── Notification toggle ── */
.notif-toggle {
    width: 44px; height: 24px; border-radius: 12px;
    background: var(--border); position: relative;
    transition: background .3s; flex-shrink: 0;
    display: inline-block; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.notif-toggle::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
    transition: transform .3s;
}
.notif-toggle:active::after { transform: scale(0.9); }
.notif-toggle.on { background: var(--success, #34C759); }
.notif-toggle.on::after { transform: translateX(20px); }
.notif-toggle.on:active::after { transform: translateX(20px) scale(0.9); }
.notif-hint {
    font-size: 12px; color: var(--text-secondary);
    padding: 0 16px 12px; line-height: 1.5; display: none;
}
.notif-hint.visible { display: block; }

/* ── Push prompt modal ── */
.push-prompt-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    animation: fadeIn .3s;
}
.push-prompt {
    background: var(--card); border-radius: 24px 24px 0 0;
    padding: 32px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    width: 100%; max-width: 480px; text-align: center;
    animation: slideUp .35s cubic-bezier(.4,0,.2,1);
}
.push-prompt__icon { width: 56px; height: 56px; color: var(--primary); margin: 0 auto 16px; }
.push-prompt__title { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.push-prompt__text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.push-prompt__btn {
    width: 100%; padding: 16px; border: none; border-radius: 16px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: 'Montserrat', sans-serif; transition: transform .15s;
}
.push-prompt__btn:active { transform: scale(.97); }
.push-prompt__btn--allow { background: var(--primary); color: #fff; margin-bottom: 10px; }
.push-prompt__btn--skip { background: var(--bg); color: var(--text-secondary); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Bonus history ── */
.bonus-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 15px;
}
.bonus-item:last-child { border-bottom: none; }
.bonus-item__desc { flex: 1; min-width: 0; }
.bonus-item__desc-text { font-weight: 600; }
.bonus-item__desc-date { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.bonus-item__amount { font-weight: 700; font-family: 'Unbounded', sans-serif; font-size: 16px; white-space: nowrap; margin-left: 16px; }
.bonus-item__amount.earn { color: var(--success); }
.bonus-item__amount.spend { color: var(--text); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state__icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--border); stroke-width: 1.5;}
.empty-state__text { font-size: 16px; font-weight: 500; color: var(--text-secondary); line-height: 1.5; }

/* ── Toast ── */
.toast {
    position: fixed; bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom, 0px));
    left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--accent); color: #fff;
    padding: 14px 24px; border-radius: 32px;
    font-size: 14px; font-weight: 600;
    z-index: 200; opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 8px;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Auth screens ── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-header {
    background: var(--primary); color: var(--primary-text);
    text-align: center; padding: 80px 24px 40px;
    padding-top: calc(80px + constant(safe-area-inset-top));
    padding-top: calc(80px + env(safe-area-inset-top, 0px));
    border-radius: 0 0 32px 32px; box-shadow: var(--shadow);
}
.auth-header__icon { width: 64px; height: 64px; margin: 0 auto 16px; }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.auth-header p { font-size: 15px; font-weight: 500; opacity: 0.9; }

.auth-form { padding: 32px 24px 40px; flex: 1; max-width: 480px; margin: 0 auto; width: 100%; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; padding-left: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-field { flex: 1; }

.auth-error {
    color: var(--danger); font-size: 14px; font-weight: 600; min-height: 20px;
    margin-bottom: 16px; text-align: center; background: #FFEBEE; padding: 12px; border-radius: var(--radius-sm);
    display: none;
}
.auth-error:not(:empty) { display: block; animation: fadeUp 0.2s; }

.auth-switch { text-align: center; margin-top: 24px; font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.auth-switch a { color: var(--primary-text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--primary); transition: all 0.2s; }
.auth-switch a:active { opacity: 0.7; }

/* ── Rules banner on home ── */
.rules-banner { cursor: pointer; transition: all 0.2s; }
.rules-banner:active { transform: scale(0.98); }
.rules-banner__icon {
    width: 48px; height: 48px; border-radius: 50%; background: #FFF3E0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rules-banner__icon .lucide { width: 24px; height: 24px; color: var(--warning); }

/* ── Rules page ── */
.rules-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rules-section-icon { width: 28px; height: 28px; flex-shrink: 0; }
.rules-subtitle { font-size: 14px; color: var(--text-secondary); font-weight: 500; line-height: 1.5; margin-bottom: 20px; }

.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rules-card {
    display: flex; align-items: flex-start; gap: 12px;
    background: var(--bg); border-radius: var(--radius); padding: 16px;
    font-size: 14px; font-weight: 600; line-height: 1.4;
}
.rules-card__icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--danger); margin-top: 1px; }

.rules-notice-list { display: flex; flex-direction: column; gap: 12px; }
.rules-notice {
    display: flex; align-items: flex-start; gap: 12px;
    background: #FFF8E1; border-radius: var(--radius); padding: 16px;
    font-size: 14px; font-weight: 600; line-height: 1.4;
}
.rules-notice__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--warning); margin-top: 1px; }

.rules-conditions { display: flex; flex-direction: column; gap: 8px; }
.rules-condition-item {
    padding: 14px 16px; background: rgba(255,255,255,0.1); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; line-height: 1.4; border-left: 3px solid var(--primary);
}

@media (max-width: 480px) {
    .rules-grid { grid-template-columns: 1fr; }
    #page-rules .section:last-of-type > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; height: 0; }
