/* ============================================================
   LovelyTask — Design System
   Light · Pink · Mobile-first · Clean · Premium
   ============================================================ */

:root {
    /* Brand */
    --primary: #EC4899;
    --primary-dark: #DB2777;
    --primary-light: #FCE7F3;
    --primary-soft: #FDF2F8;

    /* Surfaces */
    --bg: #FFF9FC;
    --surface: #FFFFFF;

    /* Text */
    --text: #18181B;
    --text-secondary: #71717A;
    --text-muted: #A1A1AA;

    /* Semantic */
    --success: #22C55E;
    --success-soft: #F0FDF4;
    --warning: #F59E0B;
    --warning-soft: #FFFBEB;
    --danger: #EF4444;
    --danger-soft: #FEF2F2;

    /* Lines */
    --border: #F3E8EF;
    --border-strong: #EFDCE8;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
    --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05), 0 6px 16px -6px rgba(236, 72, 153, 0.10);
    --shadow-md: 0 8px 24px -8px rgba(24, 24, 27, 0.08), 0 12px 32px -14px rgba(236, 72, 153, 0.18);
    --shadow-lg: 0 24px 60px -24px rgba(24, 24, 27, 0.18);

    /* Shape */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-full: 999px;

    /* Type */
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Metrics */
    --nav-h: 64px;
    --bottomnav-h: 76px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset & base
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(920px 400px at 50% -140px, #FDE6F2 0%, rgba(255, 249, 252, 0) 72%),
        var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

:focus-visible {
    outline: 3px solid rgba(236, 72, 153, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--primary-light); color: var(--primary-dark); }

/* ============================================================
   Utilities
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 20px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hidden { display: none !important; }

.skip-link {
    position: fixed; top: -48px; left: 16px; z-index: 200;
    background: var(--primary); color: #fff;
    padding: 10px 18px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.9rem;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

.heart-icon {
    color: var(--primary);
    display: inline-block;
    font-size: 1.05em;
    line-height: 1;
    margin: 0 2px;
}

/* App shell */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1 0 auto;
    padding: 24px 0 calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + 28px);
}

/* Page heading */
.page-head { margin-bottom: 24px; }
.page-head-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.page-head-sub {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 560px;
}

/* Section headings */
.section { margin-top: 34px; }
.section:first-of-type { margin-top: 0; }
.dashboard-top .section { margin-top: 24px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.section-title {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.section-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.section-link:hover { color: var(--primary-dark); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
    white-space: nowrap;
    text-decoration: none;
    min-height: 46px;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(236, 72, 153, 0.55), var(--shadow-xs);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 28px -10px rgba(219, 39, 119, 0.6), var(--shadow-sm); }

.btn-soft {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.btn-soft:hover { background: #F9D8EC; color: var(--primary-dark); }

.btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
}
.btn-danger:hover { background: #FEE2E2; color: #DC2626; }

.btn-block { width: 100%; }

.btn-sm { padding: 9px 14px; min-height: 38px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-small { padding: 9px 14px; min-height: 38px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 24px; min-height: 54px; font-size: 1.02rem; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(236, 72, 153, 0.6);
}
.brand-name {
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}

.main-nav {
    display: none;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
}
.nav-link {
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--primary-soft); }
.nav-link.active { color: var(--primary-dark); background: var(--primary-light); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.main-nav ~ .topbar-actions { margin-left: 0; }

.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px 7px 9px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.balance-chip:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.balance-chip-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}
.balance-chip-num {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.balance-chip-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 14px -6px rgba(236, 72, 153, 0.55);
    transition: transform 0.15s var(--ease);
    text-transform: uppercase;
}
.avatar:hover { transform: translateY(-1px); color: #fff; }

.topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface);
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.topbar-btn:hover { color: var(--danger); border-color: #FECACA; }

.admin-pill {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--warning-soft);
    color: #B45309;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Language switch */
.lang-switch { position: relative; }
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }
.lang-label { text-transform: uppercase; }

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 90;
}
.lang-dropdown.open { display: block; animation: pop 0.18s var(--ease); }
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}
.lang-option:hover { background: var(--primary-soft); color: var(--primary-dark); }
.lang-flag { font-size: 1.05rem; line-height: 1; }

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}
.card-pad { padding: 20px; }
.form-card { max-width: 560px; margin: 0 auto; }
.card h3,
.form-card h2 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.card-head {
    padding: 18px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-title { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.card-sub { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}
.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}
.field-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.form-control,
textarea.form-control,
select.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.form-actions .btn { flex: 1; }

/* ============================================================
   Toast (flash messages)
   ============================================================ */
.toast-host {
    position: fixed;
    top: calc(var(--nav-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    width: min(92vw, 420px);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s var(--ease);
    pointer-events: auto;
}
.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.toast-msg { flex: 1; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.toast-close {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
}
.toast-close:hover { color: var(--text); background: var(--primary-soft); }

.toast-success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast-danger .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast-warning .toast-icon { background: var(--warning-soft); color: var(--warning); }
.toast-info .toast-icon { background: var(--primary-soft); color: var(--primary); }

/* ============================================================
   Bottom navigation (mobile & tablet)
   ============================================================ */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255, 249, 252, 0) 0%, rgba(255, 249, 252, 0.95) 28%);
    pointer-events: none;
}
.bottom-nav-inner {
    pointer-events: auto;
    display: flex;
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: 0 12px 32px -12px rgba(24, 24, 27, 0.18), 0 4px 12px -6px rgba(236, 72, 153, 0.16);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px 7px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    min-height: 54px;
}
.bottom-nav-item:active { background: var(--primary-soft); }
.bottom-nav-icon { display: inline-flex; }
.bottom-nav-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
}
.bottom-nav-item.active {
    color: var(--primary-dark);
    background: var(--primary-light);
}

/* ============================================================
   Dashboard — greeting
   ============================================================ */
.greeting { margin-bottom: 20px; }
.greeting-title {
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
}
.greeting-sub {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.greeting-sub strong { color: var(--primary); font-weight: 800; }

/* ============================================================
   Balance hero
   ============================================================ */
.balance-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 200px at 100% -40px, var(--primary-light) 0%, rgba(255,255,255,0) 60%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
}
.balance-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    opacity: 0.9;
}
.balance-hero-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.balance-hero-eyebrow {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}
.balance-hero-value {
    margin-top: 4px;
    font-size: clamp(2rem, 6vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.balance-hero-value .heart-icon { font-size: 0.85em; }
.balance-hero-sub {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}
.balance-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.balance-hero-stats {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.hero-stat {}
.hero-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
}
.hero-stat-value {
    margin-top: 3px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.hero-stat-value .heart-icon { font-size: 0.9em; }
.hero-stat-value.positive { color: var(--success); }
.hero-stat-value.positive .heart-icon { color: var(--success); }

/* ============================================================
   Quick actions
   ============================================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    color: var(--text);
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.quick-action:hover { color: var(--text); border-color: var(--primary-light); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.qa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    background: var(--primary-soft);
    color: var(--primary);
}
.qa-icon.violet { background: #F3E8FF; color: #9333EA; }
.qa-icon.amber { background: var(--warning-soft); color: var(--warning); }
.qa-icon.green { background: var(--success-soft); color: var(--success); }
.qa-body { min-width: 0; }
.qa-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qa-hint {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qa-chevron {
    margin-left: auto;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ============================================================
   Banners
   ============================================================ */
.offer-banner,
.referral-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
}
.offer-banner {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-soft) 55%, #FFF0F7 100%);
    border: 1px solid #F9D5EA;
}
.referral-banner {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: #fff;
    box-shadow: 0 16px 36px -16px rgba(219, 39, 119, 0.6);
}
.banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    flex-shrink: 0;
}
.offer-banner .banner-icon { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.referral-banner .banner-icon { background: rgba(255,255,255,0.18); color: #fff; }
.banner-content { flex: 1; min-width: 0; }
.banner-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.banner-sub {
    margin-top: 3px;
    font-size: 0.84rem;
    opacity: 0.92;
    line-height: 1.45;
}
.offer-banner .banner-sub { color: var(--text-secondary); }
.referral-banner .banner-sub { color: rgba(255,255,255,0.85); }
.banner-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.86rem;
    white-space: nowrap;
}
.offer-banner .banner-cta { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -8px rgba(236,72,153,0.7); }
.offer-banner .banner-cta:hover { background: var(--primary-dark); color: #fff; }
.referral-banner .banner-cta { background: #fff; color: var(--primary-dark); }
.referral-banner .banner-cta:hover { background: var(--primary-light); color: var(--primary-dark); }

/* ============================================================
   Lists (activity / friends / transactions)
   ============================================================ */
.list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text);
}
.list-item:hover { color: var(--text); }
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    flex-shrink: 0;
    background: var(--primary-soft);
    color: var(--primary);
}
.list-icon.green { background: var(--success-soft); color: var(--success); }
.list-icon.amber { background: var(--warning-soft); color: var(--warning); }
.list-icon.red { background: var(--danger-soft); color: var(--danger); }
.list-icon.neutral { background: #F4F4F5; color: var(--text-secondary); }
.list-icon.violet { background: #F3E8FF; color: #9333EA; }
.list-body { flex: 1; min-width: 0; }
.list-title {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.list-amount {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}
.list-amount .heart-icon { font-size: 0.85em; }
.list-amount.positive { color: var(--success); }
.list-amount.negative { color: var(--danger); }
.list-amount.neutral { color: var(--text-secondary); }
.list-amount.amber { color: var(--warning); }

/* ============================================================
   Empty states
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 44px 20px;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}
.es-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 12px;
}
.es-title { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.es-sub { margin-top: 4px; font-size: 0.86rem; color: var(--text-secondary); }
.es-action { margin-top: 16px; }

/* ============================================================
   Skeleton loading (fallback/utility)
   ============================================================ */
.skeleton {
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #F6EFF4 25%, #FDF6FA 50%, #F6EFF4 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
}

/* ============================================================
   Offerwall
   ============================================================ */
.offerwall-frame {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.offerwall-frame iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    min-height: 640px;
}
.offerwall-note {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 16px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}
.offerwall-note .icon { color: var(--primary); margin-top: 1px; }

/* ============================================================
   Wallet
   ============================================================ */
.conversion-card {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.conversion-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 14px;
}
.conversion-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
}
.conversion-value {
    margin-top: 3px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.withdraw-card { margin-top: 16px; }
.amount-wrap { position: relative; }
.amount-input {
    width: 100%;
    padding: 16px 15px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
.amount-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}
.amount-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95rem;
    pointer-events: none;
}
.amount-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.chip-btn {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.15s var(--ease);
}
.chip-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ============================================================
   Referral
   ============================================================ */
.ref-link-card { margin-top: 16px; }
.ref-link-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.ref-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg);
}
.ref-link-value {
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ref-link-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.ref-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.ref-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.ref-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.ref-stat-value .heart-icon { font-size: 0.8em; }
.ref-stat-label {
    margin-top: 2px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   Leaderboard
   ============================================================ */
.lb-card { margin-top: 16px; }
.lb-tabs {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-light);
    padding: 5px;
    border-radius: var(--radius-full);
    max-width: 100%;
    overflow-x: auto;
}
.lb-tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.86rem;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.lb-tab:hover { color: var(--primary-dark); }
.lb-tab.active {
    background: var(--surface);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}
.lb-panel { margin-top: 16px; }
.lb-panel .lb-card { margin-top: 0; }
.lb-list { padding: 6px; }
.lb-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border-radius: var(--radius);
    transition: background 0.15s var(--ease);
}
.lb-item + .lb-item { margin-top: 2px; }
.lb-item.is-me {
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px var(--primary-light);
}
.lb-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.82rem;
    background: #F4F4F5;
    color: var(--text-secondary);
}
.lb-rank.rank-1 { background: linear-gradient(180deg, #FBBF24, #F59E0B); color: #fff; box-shadow: 0 6px 12px -6px rgba(245,158,11,0.7); }
.lb-rank.rank-2 { background: linear-gradient(180deg, #D4D4D8, #A1A1AA); color: #fff; }
.lb-rank.rank-3 { background: linear-gradient(180deg, #EAB894, #C2804F); color: #fff; }
.lb-user {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}
.lb-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    flex-shrink: 0;
}
.lb-item.is-me .lb-user-avatar { background: var(--primary); color: #fff; }
.lb-user-name {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-item.is-me .lb-user-name::after { content: ' (you)'; color: var(--primary); font-weight: 700; }
.lb-value {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.lb-value .heart-icon { font-size: 0.85em; }

.lb-position {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.lb-position-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}
.lb-position-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }
.lb-position-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
    line-height: 1.1;
}

/* ============================================================
   Profile
   ============================================================ */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background:
        radial-gradient(420px 160px at 100% -30px, var(--primary-light) 0%, rgba(255,255,255,0) 60%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 10px 22px -10px rgba(236,72,153,0.7);
}
.profile-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
}
.profile-email {
    font-size: 0.86rem;
    color: var(--text-secondary);
    margin-top: 1px;
    word-break: break-all;
}
.profile-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
}
.profile-pill .heart-icon { font-size: 0.85em; color: var(--primary); }

.account-list { padding: 4px 0; }
.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
}
.account-item + .account-item { border-top: 1px solid var(--border); }
.account-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.account-value {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
    word-break: break-all;
    color: var(--text);
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.method-card { position: relative; }
.method-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.method-card label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 12px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.method-card label:hover { border-color: var(--primary-light); }
.method-card input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    color: var(--primary-dark);
}
.method-card input[type="radio"]:focus-visible + label {
    outline: 3px solid rgba(236, 72, 153, 0.45);
    outline-offset: 2px;
}
.method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}
.payment-field { margin-top: 14px; }

.more-links { margin-top: 24px; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth-page {
    min-height: calc(100vh - var(--nav-h) - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px 26px;
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--text);
}
.auth-brand:hover { color: var(--text); }
.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.auth-sub {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 22px;
}
.auth-alt {
    margin-top: 18px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ============================================================
   Public landing
   ============================================================ */
.landing-hero {
    padding: 34px 0 10px;
    text-align: center;
}
.landing-hero h1 {
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    max-width: 640px;
    margin: 0 auto;
}
.landing-hero h1 .grad {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.landing-hero .lead {
    margin: 16px auto 0;
    max-width: 520px;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.7;
}
.landing-cta {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-stats {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.landing-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-xs);
}
.landing-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.landing-stat-value .heart-icon { font-size: 0.8em; }
.landing-stat-label {
    margin-top: 3px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.feature-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 12px;
}
.feature-card h3 {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.feature-card p {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================
   Stats grid (admin + shared)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-xs);
}
.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-value {
    margin-top: 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.stat-value .heart-icon { font-size: 0.75em; color: var(--primary); }

/* ============================================================
   Tables (admin + desktop)
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}
.table,
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9rem;
}
.table th,
.table-wrap table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--primary-soft);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td,
.table-wrap table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td,
.table-wrap table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover,
.table-wrap table tbody tr:hover { background: var(--primary-soft); }
.card .table { border: 0; border-radius: 0; }

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}
.badge.pending, .badge.warning { background: var(--warning-soft); color: #B45309; }
.badge.completed, .badge.success { background: var(--success-soft); color: #15803D; }
.badge.rejected, .badge.danger { background: var(--danger-soft); color: #DC2626; }
.badge.neutral, .badge.info { background: #F4F4F5; color: var(--text-secondary); }
.badge.primary { background: var(--primary-light); color: var(--primary-dark); }

/* ============================================================
   Alerts (legacy)
   ============================================================ */
.alert {
    margin: 18px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary-light); }
.alert-success { background: var(--success-soft); color: #15803D; border-color: #BBF7D0; }
.alert-danger { background: var(--danger-soft); color: #DC2626; border-color: #FECACA; }
.alert-warning { background: var(--warning-soft); color: #B45309; border-color: #FDE68A; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
    font-size: 0.95rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
    from { opacity: 0; transform: scale(0.96) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.fade-in { animation: fadeUp 0.45s var(--ease) both; }
.fade-in-1 { animation: fadeUp 0.45s var(--ease) 0.05s both; }
.fade-in-2 { animation: fadeUp 0.45s var(--ease) 0.1s both; }
.fade-in-3 { animation: fadeUp 0.45s var(--ease) 0.15s both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Tablet (640–1023px)
   ============================================================ */
@media (min-width: 640px) {
    .page { padding: 32px 0 calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + 32px); }

    .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .quick-action { flex-direction: column; align-items: flex-start; gap: 10px; }
    .qa-chevron { display: none; }

    .balance-hero { padding: 30px; }
    .balance-hero-main { flex-direction: row; align-items: center; justify-content: space-between; }
    .balance-hero-actions { flex-wrap: nowrap; }

    .ref-stats { grid-template-columns: repeat(4, 1fr); }
    .conversion-card { grid-template-columns: repeat(3, 1fr); }

    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-stats { grid-template-columns: repeat(3, 1fr); }

    .auth-card { padding: 36px 34px; }
    .method-grid { grid-template-columns: repeat(4, 1fr); }

    .offer-banner, .referral-banner { padding: 24px 26px; }
}

/* ============================================================
   Desktop (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
    .page { padding: 40px 0 72px; }

    .main-nav { display: flex; }

    .bottom-nav { display: none; }

    .topbar-btn { display: inline-flex; }

    .dashboard-top {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 24px;
        align-items: stretch;
    }
    .dashboard-top .balance-hero { margin: 0; }
    .dashboard-top .section { margin-top: 0; }
    .dashboard-top .quick-actions { height: 100%; }

    .dashboard-mid {
        display: grid;
        grid-template-columns: 1.4fr 0.6fr;
        gap: 24px;
        align-items: start;
    }
    .dashboard-mid .section { margin-top: 34px; }

    .balance-hero { padding: 34px; }

    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }

    .profile-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .footer-copy { margin-left: auto; }

    .section-title { font-size: 1.25rem; }
}

/* ============================================================
   Large desktop
   ============================================================ */
@media (min-width: 1024px) and (max-width: 1279px) {
    .balance-chip-sub { display: none; }
}

@media (min-width: 1280px) {
    .landing-hero { padding: 56px 0 20px; }
}

/* ============================================================
   Small screens fine-tuning
   ============================================================ */
@media (max-width: 479px) {
    .brand-name { font-size: 1.02rem; }
    .balance-chip-sub { display: none; }
    .lang-label { display: none; }
    .lang-toggle { padding: 8px 10px; }
    .page { padding: 18px 0 36px; }
    .toast-host { top: calc(var(--nav-h) + 8px); }
    .topbar-inner { gap: 8px; }
}

@media (max-width: 1023px) {
    .site-footer { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px) + 96px); }
}

/* ============================================================
   Email verification · Forgot/reset password · Auth states
   ============================================================ */
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.form-label-row .form-label { margin-bottom: 0; }
.auth-forgot {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.auth-forgot:hover { color: var(--primary-dark); text-decoration: underline; }

.auth-state-card { text-align: center; }
.auth-state-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.auth-state-icon.primary { background: var(--primary-soft); color: var(--primary); }
.auth-state-icon.danger { background: var(--danger-soft); color: var(--danger); }
.auth-state-icon.neutral { background: #F4F4F5; color: var(--text-secondary); }
.auth-actions { margin-top: 22px; }
.auth-actions .btn-block + .btn-block { margin-top: 10px; }
.auth-hint { color: var(--text-muted); }

.verify-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}
.verify-pill.verified { background: var(--success-soft); color: var(--success); }
.verify-pill.unverified { background: var(--warning-soft); color: var(--warning); }

.email-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--warning-soft);
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
}
.email-banner-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: #FEF3C7;
    color: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
}
.email-banner-content { flex: 1; min-width: 0; }
.email-banner-title {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
}
.email-banner-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.email-banner .btn { flex-shrink: 0; }

.email-verified-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--success-soft);
    border: 1px solid #BBF7D0;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #15803D;
}
.email-verified-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--success);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .email-banner { flex-wrap: wrap; }
    .email-banner .btn { width: 100%; }
}

.ad-zone {
    margin: 18px 0;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ad-zone > * {
    max-width: 100%;
}

.telegram-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-soft) 55%, #FFF0F7 100%);
    border: 1px solid var(--primary-light);
    border-radius: 18px;
    padding: 22px 24px;
    margin: 20px 0;
}

.telegram-cta-body {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 260px;
}

.telegram-cta-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -8px rgba(236, 72, 153, 0.7);
}

.telegram-cta .section-title { margin: 0 0 4px; }

.telegram-cta p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

.telegram-cta .btn { flex-shrink: 0; }

@media (max-width: 560px) {
    .telegram-cta .btn { width: 100%; }
}

/* ============================================================
   Weekly earnings chart
   ============================================================ */
.chart-card { padding: 20px 16px 14px; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-bar-wrap { position: relative; width: 100%; max-width: 34px; height: 130px; background: var(--primary-soft); border-radius: 8px; overflow: hidden; }
.chart-bar { position: absolute; left: 0; right: 0; bottom: 0; min-height: 4px; background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 8px; }
.chart-value { font-size: .68rem; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.chart-label { font-size: .66rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .02em; }

/* ============================================================
   Balance display mode (love / USDT / VND)
   ============================================================ */
.balance-mode { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--primary-soft); border: 1px solid var(--primary-light); border-radius: var(--radius-full); }
.balance-mode-btn { padding: 6px 12px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-secondary); font-size: .72rem; font-weight: 800; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.balance-mode-btn.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-xs); }

/* ============================================================
   Bank search & select (VietQR)
   ============================================================ */
.bank-combo { position: relative; }
.bank-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; max-height: 240px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px; display: none; }
.bank-combo.open .bank-list { display: block; }
.bank-option { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--text); }
.bank-option:hover { background: var(--primary-soft); }
.bank-option-short { font-size: .9rem; font-weight: 700; }
.bank-option-name { font-size: .76rem; font-weight: 600; color: var(--text-muted); }

/* ============================================================
   Mobile polish — stable, aligned, no zoom
   ============================================================ */
html, body { overflow-x: hidden; }
.topbar-inner { flex-wrap: nowrap; }
.brand { min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { flex-shrink: 1; min-width: 0; }
.balance-chip { min-width: 0; }
.balance-chip-num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1023px) {
    .topbar-btn { display: none; }
}

@media (max-width: 380px) {
    .container { padding-inline: 14px; }
    .topbar-actions { gap: 6px; }
}

/* ============================================================
   Shortlink (Vượt Link)
   ============================================================ */
.shortlink-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.shortlink-summary-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 14px;
    box-shadow: var(--shadow-xs);
}
.shortlink-summary-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
}
.shortlink-summary-value {
    margin-top: 3px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: block;
}
.shortlink-summary-value.positive { color: var(--success); }
.shortlink-summary-value.reset { color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.shortlink-reset-hint {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.shortlink-reset-hint .icon { color: var(--primary); }
.shortlink-grid {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.shortlink-card { overflow: hidden; }
.shortlink-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 0;
}
.shortlink-provider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--sl-accent, var(--primary)) 12%, #fff);
    color: var(--sl-accent, var(--primary));
    border: 1px solid color-mix(in srgb, var(--sl-accent, var(--primary)) 22%, #fff);
}
.shortlink-provider-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.shortlink-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.shortlink-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: #F4F4F5;
    border-radius: var(--radius-full);
    padding: 3px 9px;
}
.shortlink-meta-chip.reward { background: var(--success-soft); color: #15803D; }
.shortlink-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-variant-numeric: tabular-nums;
}
.shortlink-card-body { padding-top: 12px; }
.shortlink-progress {
    height: 8px;
    background: var(--primary-soft);
    border-radius: 999px;
    overflow: hidden;
}
.shortlink-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 999px;
    transition: width 0.3s var(--ease);
}
.shortlink-turns {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.shortlink-limit-box {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: var(--radius);
    background: var(--warning-soft);
    border: 1px solid #FDE68A;
    color: #92400E;
}
.shortlink-limit-box .icon { flex-shrink: 0; margin-top: 2px; }
.shortlink-limit-title { font-weight: 800; font-size: 0.92rem; }
.shortlink-limit-sub { font-size: 0.84rem; margin-top: 2px; }
.shortlink-limit-sub strong { font-variant-numeric: tabular-nums; }
.shortlink-pending-box { margin-top: 12px; }
.shortlink-pending-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}
.shortlink-actions { display: flex; gap: 10px; margin-top: 12px; }
.shortlink-actions .btn { flex: 1; }
.auth-state-icon.success { background: var(--success-soft); color: var(--success); }

@media (min-width: 640px) {
    .shortlink-summary { grid-template-columns: repeat(4, 1fr); }
    .shortlink-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .shortlink-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1023px) {
    .bottom-nav-inner { max-width: 620px; }
    .bottom-nav-item { min-height: 52px; }
    .bottom-nav-label { font-size: 0.6rem; }
}
/* ============================================================
   Admin navigation
   ============================================================ */
.admin-nav {
    position: sticky;
    top: var(--nav-h);
    z-index: 55;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.admin-nav-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.admin-nav-inner::-webkit-scrollbar { display: none; }
.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.admin-nav-link:hover { color: var(--text); background: var(--primary-soft); }
.admin-nav-link.active { color: #fff; background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%); box-shadow: 0 6px 14px -6px rgba(236, 72, 153, 0.55); }

/* ============================================================
   Admin shared (filter bar, user rows, detail)
   ============================================================ */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.admin-filter-bar .form-control { width: auto; flex: 1 1 160px; min-width: 0; }
.admin-filter-bar select.form-control { flex: 0 1 auto; }
.admin-search-row { display: flex; gap: 8px; flex: 1 1 240px; min-width: 200px; }
.admin-search-row .form-control { flex: 1; }
.admin-user-row { cursor: pointer; }
.admin-user-row:hover { background: var(--primary-soft); }
.admin-detail-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}
.admin-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 14px;
}
.admin-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
}
.admin-stat-value {
    margin-top: 3px;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    word-break: break-all;
}
.admin-stat-value.positive { color: var(--success); }
.admin-stat-value.negative { color: var(--danger); }
@media (max-width: 560px) {
    .admin-detail-grid { grid-template-columns: 1fr 1fr; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.pager-info { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); }
.load-more-wrap { text-align: center; margin-top: 14px; }

/* ============================================================
   Notification popup (center modal)
   ============================================================ */
.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(24, 24, 27, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: pop 0.2s var(--ease);
}
.notif-overlay.hidden { display: none; }
.notif-modal {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: pop 0.22s var(--ease);
}
.notif-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 0;
}
.notif-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    background: var(--primary-soft);
    color: var(--primary);
}
.notif-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.notif-modal-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    background: #F4F4F5;
    border-radius: var(--radius-full);
    padding: 3px 10px;
}
.notif-modal-body {
    padding: 12px 20px 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 40vh;
    overflow-y: auto;
}
.notif-modal-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 20px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.notif-modal-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.notif-modal-actions { display: flex; gap: 10px; padding: 16px 20px 20px; }
.notif-modal-actions .btn { flex: 1; }
