/* ============================================================
   RewardEarn — Single stylesheet. Edit variables only.
   Add new pages using existing utility + component classes.
   ============================================================ */

:root {
    /* AdWatch palette (mockup) */
    --aw-navy: #1A1F3C;
    --aw-primary: #4F46E5;
    --aw-primary-dark: #4338CA;
    --aw-primary-light: #6366F1;
    --aw-bg: #F3F4F6;
    --aw-card: #FFFFFF;
    --aw-text: #1F2937;
    --aw-text-muted: #6B7280;
    --aw-border: #E5E7EB;

    /* Theme */
    --primary: var(--aw-primary);
    --primary-dark: var(--aw-primary-dark);
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-header: #1e293b;
    --bg-input: #0f172a;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;

    /* Layout */
    --header-h: 64px;
    --topbar-h: 64px;
    --footer-h: 64px;
    --sidebar-w: 250px;
    --sidebar-bg: var(--aw-navy);
    --sidebar-active: var(--aw-primary);
    --content-bg: var(--aw-bg);
    --radius: 12px;
    --radius-sm: 8px;
    --gap: 0.75rem;
    --gap-lg: 1rem;
    --gap-xl: 1.5rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

body:has(.app-shell) {
    background: var(--aw-bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; display: block; }

/* ============================================================
   Layout shells
   ============================================================ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--aw-bg);
    color: var(--aw-text);
    --primary: var(--aw-primary);
    --primary-dark: var(--aw-primary-dark);
    --bg: var(--aw-bg);
    --bg-card: var(--aw-card);
    --bg-header: #FFFFFF;
    --bg-input: #FFFFFF;
    --text: var(--aw-text);
    --text-muted: var(--aw-text-muted);
    --border: var(--aw-border);
}

/* ---- Sidebar (PC + mobile drawer) ---- */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-x: hidden;
}

.sidebar-open .app-sidebar {
    transform: translateX(0);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 190;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.75rem;
}

.sidebar-brand-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--aw-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.75rem;
    margin-bottom: 0.2rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.sidebar-link.active {
    background: var(--aw-primary);
    color: #fff;
}

.sidebar-link.active .sidebar-icon {
    opacity: 1;
}

.sidebar-icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.sidebar-promo {
    margin: 0.75rem 0;
    padding: 0.85rem;
    border-radius: 10px;
    background: linear-gradient(145deg, #312e81 0%, #4F46E5 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-promo strong {
    display: block;
    font-size: 0.82rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.sidebar-promo p {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.55rem;
}

.sidebar-logout {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.55);
}

/* ---- Top bar ---- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 120;
    height: var(--topbar-h);
    background: #FFFFFF;
    border-bottom: 1px solid var(--aw-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1rem;
    flex-shrink: 0;
}

.topbar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.topbar-toggle-bar {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--aw-text);
    border-radius: 2px;
}

.topbar-logo {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.topbar-spacer {
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.topbar-balance {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--success);
}

.topbar-icon-btn {
    position: relative;
    font-size: 1.15rem;
    text-decoration: none;
    line-height: 1;
    padding: 0.25rem;
}

.topbar-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    min-width: 1rem;
    height: 1rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
}

.topbar-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--aw-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-meta strong {
    font-size: 0.82rem;
    color: var(--text);
}

.topbar-user-meta small {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.app-main {
    flex: 1;
    padding: var(--gap-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--footer-h);
    background: var(--aw-bg);
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-h);
    background: #FFFFFF;
    border-top: 1px solid var(--aw-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.app-footer a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--aw-text-muted);
    font-size: 0.68rem;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
}

.app-footer a.active,
.app-footer a:hover {
    color: var(--aw-primary);
    text-decoration: none;
}

.app-footer .nav-icon {
    font-size: 1.2rem;
}

.mobile-only { display: inline-flex; }
.desktop-only { display: none !important; }

/* Legacy alias */
.app-header { display: none; }

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: var(--gap-lg);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.8rem;
    color: var(--text-muted);
    border-radius: 6px;
    margin-bottom: 0.25rem;
    text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.active { background: var(--primary); color: #fff; }

.admin-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: var(--gap-xl);
}

.auth-page {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--gap-lg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: min(400px, 100%);
    box-sizing: border-box;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: var(--gap-xl);
    font-size: 1.5rem;
}

/* ============================================================
   Components — reuse on any page
   ============================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap-lg);
    margin-bottom: var(--gap-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card h1 { font-size: 1.35rem; margin-bottom: var(--gap); color: var(--text); }
.card h2 { font-size: 1.1rem; margin-bottom: var(--gap); color: var(--text); }
.card h3 { font-size: 1rem; margin-bottom: var(--gap); color: var(--text); }
.card p  { color: var(--text-muted); font-size: 0.9rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    margin-bottom: var(--gap-lg);
}

.stats-grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-box .value { font-size: 1.25rem; font-weight: 700; color: var(--aw-text); }
.stat-box .label { font-size: 0.75rem; color: var(--text-muted); }

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: inherit;
}

.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-primary  { background: var(--aw-primary); color: #fff; }
.btn-primary:hover { background: var(--aw-primary-dark); opacity: 1; }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-warning  { background: var(--warning); color: #1e293b; }
.btn-outline  { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--aw-bg); opacity: 1; }
.btn-block    { display: block; width: 100%; }
.btn-sm       { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

button.btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-free { background: #E5E7EB; color: #4B5563; }
.badge-paid { background: var(--aw-primary); color: #fff; }

.alert {
    padding: 0.85rem var(--gap-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-lg);
    font-size: 0.9rem;
}

.app-body .alert-success { background: #ECFDF5; border: 1px solid #6EE7B7; color: #047857; }
.app-body .alert-danger  { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.app-body .alert-warning { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; }
.app-body .alert-info    { background: #EEF2FF; border: 1px solid #A5B4FC; color: #3730A3; }

.app-body .device-warning {
    background: #FEF2F2;
    border: 2px solid var(--danger);
    color: #991B1B;
}

.form-group { margin-bottom: var(--gap-lg); }

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 2.75rem;
}

.password-eye {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
}

.password-eye:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.05);
}

.password-eye svg {
    width: 1.15rem;
    height: 1.15rem;
}

.password-eye .icon-eye-off {
    display: none;
}

.password-eye.is-visible .icon-eye {
    display: none;
}

.password-eye.is-visible .icon-eye-off {
    display: block;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--gap-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-row input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--gap);
    align-items: end;
}

.form-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--gap);
}

.form-inline {
    display: inline-flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.form-stack {
    display: flex;
    gap: 0.25rem;
    flex-direction: column;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--gap-lg);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: none; }

.task-item {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.task-item:first-child { padding-top: 0; }
.task-item:last-child { border-bottom: none; padding-bottom: 0; }

.task-item-body {
    flex: 1;
    min-width: 0;
}

.task-item-body > strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--text);
}

.task-item-body > p {
    margin: 0.3rem 0 0.45rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.task-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.task-item-action {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 6.5rem;
    padding-left: 0.75rem;
}

.task-item-action .btn-sm {
    white-space: nowrap;
}

.task-item-action .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.5rem;
    min-height: 2.125rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.task-item--summary {
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 34%),
        #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    align-items: stretch;
}

.task-item--summary .task-item-body > strong {
    font-size: 1rem;
    font-weight: 850;
}

.task-item--summary .task-item-body > p {
    max-width: 22rem;
}

.task-item--daily-ad {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.tasks-daily-grid {
    display: grid;
}

.task-item--daily-ad:last-child {
    margin-bottom: 0;
}


.task-item--daily-ad-locked {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
    border-style: dashed;
    opacity: 0.95;
}

.task-item--daily-ad-locked .task-item-body strong {
    color: #64748b;
}

.task-item--daily-ad-completed {
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.08), transparent 34%),
        #fff;
}

.task-item-meta .app-icon,
.badge .app-icon {
    width: 0.8rem;
    height: 0.8rem;
    display: inline-block;
    vertical-align: -0.12em;
}

.tasks-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0.5rem 0 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.tasks-section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.daily-progress {
    height: 5px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.45rem;
    max-width: 180px;
}

.daily-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 99px;
    transition: width 0.25s ease;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.admin-table th { color: var(--text-muted); font-weight: 600; }

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    margin-bottom: var(--gap-lg);
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar .fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

/* ============================================================
   Utility classes — use instead of inline styles
   ============================================================ */

.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-success { color: var(--success); }
.text-small   { font-size: 0.75rem; }
.text-xs      { font-size: 0.85rem; }

.mt-sm  { margin-top: var(--gap); }
.mt-md  { margin-top: var(--gap-lg); }
.mt-lg  { margin-top: var(--gap-xl); }
.mt-xl  { margin-top: 2rem; }
.mb-0   { margin-bottom: 0; }
.flex         { display: flex; }
.flex-wrap    { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm       { gap: 0.5rem; }

.w-full   { width: 100%; }
.w-short  { width: 60px; }
.w-medium { width: 80px; }
.w-name   { width: 100px; }

.opacity-muted { opacity: 0.7; }
.uppercase     { text-transform: uppercase; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--gap-lg) 0;
}

.page-title { margin-bottom: var(--gap-xl); }

.app-body .ref-package-rate {
    background: var(--aw-bg);
}

.app-body .ref-package-rate strong {
    color: var(--aw-text);
}

.app-body .admin-table th {
    color: var(--aw-text-muted);
    background: var(--aw-bg);
}

.app-body .admin-table td {
    color: var(--aw-text);
}

.app-body .task-item {
    border-bottom-color: var(--aw-border);
}

.app-body .tasks-section-title {
    border-top-color: var(--aw-border);
    color: var(--aw-text-muted);
}

.app-body .daily-progress {
    background: var(--aw-border);
}

/* Referral — commission by package (Flokiy-style panels) */
.ref-packages-panel {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), transparent 40%);
}
.ref-package-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.ref-package-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
    margin-bottom: 0;
}
.ref-package-card--live {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}
.ref-package-card[open] {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15);
}
.ref-package-summary {
    list-style: none;
    cursor: pointer;
    padding: var(--gap-lg);
    position: relative;
    padding-right: 2.25rem;
}
.ref-package-summary::-webkit-details-marker { display: none; }
.ref-package-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.ref-package-name {
    font-size: 1.05rem;
    font-weight: 700;
}
.ref-package-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}
.ref-package-rates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.ref-package-rate {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}
.ref-package-rate small {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.ref-package-rate strong {
    font-size: 0.95rem;
}
.ref-package-rate--highlight {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.ref-package-rate--highlight strong {
    color: var(--success);
}
.ref-package-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.78rem;
}
.ref-package-pending {
    color: var(--success);
    font-weight: 600;
}
.ref-package-chevron {
    position: absolute;
    right: 1rem;
    top: 1.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.ref-package-card[open] .ref-package-chevron {
    transform: rotate(180deg);
}
.ref-package-body {
    padding: 0 var(--gap-lg) var(--gap-lg);
    border-top: 1px solid var(--border);
}
.ref-package-members {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ref-package-member {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
}
.ref-team-panel {
    margin-bottom: 1rem;
}
.ref-team-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ref-team-member {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
}
.ref-team-member-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.ref-team-member-meta,
.ref-team-member-status {
    margin-top: 0.35rem;
}

.ref-progress-card {
    background: linear-gradient(180deg, rgba(15, 32, 68, 0.95) 0%, rgba(10, 22, 48, 0.98) 100%);
    border: 1px solid rgba(80, 130, 220, 0.35);
}
.ref-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
.ref-progress-head h3 {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ref-progress-count {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}
.ref-progress-track-wrap {
    margin-top: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.ref-progress-track {
    position: relative;
    min-width: 280px;
    padding: 0.5rem 0 0.25rem;
}
.ref-progress-line,
.ref-progress-line-fill {
    position: absolute;
    top: 2.1rem;
    left: 8%;
    right: 8%;
    height: 2px;
    border-radius: 999px;
}
.ref-progress-line {
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.18) 0,
        rgba(255, 255, 255, 0.18) 6px,
        transparent 6px,
        transparent 12px
    );
}
.ref-progress-line-fill {
    background: linear-gradient(90deg, var(--primary), #6ee7b7);
    width: 0;
    transition: width 0.35s ease;
    z-index: 1;
}
.ref-progress-steps {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
}
.ref-progress-step {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}
.ref-progress-chest {
    position: relative;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ref-chest-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    pointer-events: none;
    transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
}

.ref-chest-img--locked {
    filter: grayscale(1) brightness(0.92) contrast(1.05);
    opacity: 0.82;
}

.ref-chest-img--claimable {
    filter: drop-shadow(0 10px 18px rgba(250, 204, 21, 0.42));
    animation: ref-chest-ready 1.85s ease-in-out infinite;
    opacity: 1;
}

.ref-chest-img--collected {
    filter: drop-shadow(0 10px 20px rgba(20, 184, 166, 0.45));
}

.ref-progress-step--locked .ref-progress-chest {
    background: rgba(15, 23, 42, 0.28);
    border-color: rgba(148, 163, 184, 0.22);
}

.ref-progress-step--ready .ref-progress-chest {
    border-color: rgba(250, 204, 21, 0.55);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12), 0 16px 30px rgba(250, 204, 21, 0.18);
}

.ref-progress-step--collected .ref-progress-chest {
    border-color: rgba(110, 231, 183, 0.55);
    background: rgba(20, 184, 166, 0.12);
}

.ref-progress-reward {
    font-size: 0.62rem;
    font-weight: 800;
    color: #fde68a;
    line-height: 1.1;
}

.ref-progress-reward--locked {
    color: #94a3b8;
    font-weight: 700;
}

.ref-progress-reward--claimable {
    font-size: 0.72rem;
    color: #fbbf24;
    text-shadow: 0 1px 8px rgba(251, 191, 36, 0.35);
}

.ref-progress-reward--done {
    color: #6ee7b7;
    font-weight: 800;
}

.ref-chest-icon {
    font-size: 2rem;
    line-height: 1;
    filter: grayscale(0.2);
}
.ref-progress-step--locked .ref-chest-icon {
    opacity: 0.55;
    filter: grayscale(0.8);
}
.ref-progress-step--ready .ref-chest-icon {
    filter: drop-shadow(0 0 8px rgba(110, 231, 183, 0.55));
    animation: ref-chest-pulse 1.6s ease-in-out infinite;
}
.ref-progress-step--collected .ref-chest-icon--open {
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.45));
}
.ref-chest-lock {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ref-progress-num {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.ref-progress-step--ready .ref-progress-num,
.ref-progress-step--collected .ref-progress-num {
    border-color: var(--primary);
    color: var(--primary);
}
.ref-progress-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.2;
    max-width: 4.5rem;
}
.ref-progress-label--done {
    color: #6ee7b7;
}
.ref-progress-collect-form {
    margin: 0;
    width: 100%;
}
.ref-progress-collect-btn {
    width: 100%;
    max-width: 100%;
    border: none;
    border-radius: 999px;
    padding: 0.38rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 800;
    cursor: pointer;
    color: #0b1a33;
    background: linear-gradient(180deg, #fde68a, #f59e0b);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    line-height: 1.15;
    white-space: normal;
    text-align: center;
}
.ref-progress-collect-btn:hover {
    filter: brightness(1.05);
}
.ref-package-summary--compact {
    padding: 0.85rem 1rem;
}
.ref-package-summary--compact .ref-package-head {
    margin-bottom: 0;
}
@keyframes ref-chest-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes ref-chest-ready {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.05) translateY(-2px); }
}

.referral-code {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.referral-share-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.16), transparent 28%),
        linear-gradient(180deg, #fff, #f8fafc);
}

.referral-share-head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.referral-share-icon {
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.referral-share-icon .app-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.referral-share-head h2 {
    margin-bottom: 0.25rem;
}

.referral-share-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.75rem;
    padding: 0.82rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        #f8fafc;
}

.referral-share-code span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

.referral-share-code strong {
    color: #0f172a;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.referral-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: stretch;
}

.referral-link-box {
    padding: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.referral-link-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.referral-copy-btn {
    min-width: 5.25rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 8px;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.42), transparent 36%),
        linear-gradient(135deg, #2563eb, #0f766e);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.referral-copy-btn .app-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.referral-copy-btn:hover {
    filter: brightness(1.04);
}

.referral-copy-status {
    margin-top: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 850;
    text-align: center;
}

/* App-style action tiles */
.action-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.action-tile-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile {
    position: relative;
    overflow: hidden;
    min-height: 6.2rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 8px;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.1), transparent 34%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.action-tile::after {
    content: '';
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: -55%;
    width: 28%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    opacity: 0.65;
    animation: action-tile-shine 4.8s ease-in-out infinite;
}

.action-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.12);
    text-decoration: none;
}

.action-tile--primary {
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.22), transparent 36%),
        linear-gradient(135deg, #2563eb, #155e75);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.22);
}

.action-tile-art {
    position: relative;
    z-index: 1;
    width: 3.1rem;
    height: 3.1rem;
    flex: 0 0 3.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.12));
    color: var(--aw-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.action-tile--primary .action-tile-art {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.action-tile-art .app-icon {
    width: 1.55rem;
    height: 1.55rem;
}

.action-tile-text {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.action-tile-text strong {
    font-size: 0.92rem;
    line-height: 1.2;
    color: inherit;
}

.action-tile-text small {
    font-size: 0.72rem;
    line-height: 1.25;
    color: #64748b;
}

.action-tile--primary .action-tile-text small {
    color: rgba(255, 255, 255, 0.76);
}

@keyframes action-tile-shine {
    0% { left: -55%; }
    36%, 100% { left: 130%; }
}

/* Advanced profile page */
.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 1.1rem;
    background:
        radial-gradient(circle at 92% 0%, rgba(20, 184, 166, 0.22), transparent 36%),
        radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.18), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #172554 48%, #0f766e 100%);
    color: #fff;
    border: none;
    box-shadow: 0 24px 56px rgba(37, 99, 235, 0.22);
    position: relative;
    overflow: hidden;
}

.profile-hero::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.profile-hero::after {
    content: '';
    position: absolute;
    right: -4rem;
    top: -4rem;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.profile-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.profile-avatar-xl {
    width: 4.4rem;
    height: 4.4rem;
    flex: 0 0 4.4rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
        linear-gradient(135deg, #60a5fa, #14b8a6);
    border: 3px solid rgba(255, 255, 255, 0.9);
    color: #fff;
    font-size: 1.65rem;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.profile-identity {
    min-width: 0;
}

.profile-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-kicker .app-icon {
    width: 0.85rem;
    height: 0.85rem;
}

.profile-identity h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.28rem, 2vw, 1.75rem);
    line-height: 1.15;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.profile-verified {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #22c55e);
    color: #fff;
    box-shadow: 0 8px 18px rgba(20, 184, 166, 0.3);
}

.profile-verified .app-icon {
    width: 0.78rem;
    height: 0.78rem;
}

.profile-contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.65rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.76rem;
}

.profile-contact-line span {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.34rem 0.55rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
        rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-contact-line .app-icon {
    width: 0.78rem;
    height: 0.78rem;
    flex: 0 0 auto;
}

.profile-plan-chip {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    padding: 0.78rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.18), transparent 42%),
        rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}

.profile-plan-label {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-plan-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.profile-plan-name .app-icon {
    width: 1rem;
    height: 1rem;
    color: #facc15;
}

.profile-plan-chip small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.75rem;
}

.profile-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: var(--gap-lg);
}

.profile-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: var(--gap-lg);
}

.profile-status-card {
    position: relative;
    overflow: hidden;
    padding: 0.95rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 8px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.profile-status-card::after {
    content: '';
    position: absolute;
    inset: auto -10% -45% 45%;
    height: 4.5rem;
    transform: rotate(-12deg);
    background: rgba(20, 184, 166, 0.08);
    pointer-events: none;
}

.profile-status-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.profile-status-top strong {
    display: block;
    color: #0f172a;
    font-size: 0.94rem;
}

.profile-status-top small {
    display: block;
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.3;
}

.profile-status-bar {
    position: relative;
    z-index: 1;
    height: 0.48rem;
    margin-top: 0.85rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.profile-status-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.24);
}

.profile-status-bar--earn span {
    background: linear-gradient(90deg, #14b8a6, #f59e0b);
}

.profile-metric-card {
    min-height: 6.5rem;
    padding: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: var(--gap-lg);
}

.profile-info-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.profile-info-card > span {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.12));
    color: var(--aw-primary);
}

.profile-info-card .app-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.profile-info-card strong {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
}

.profile-info-card small {
    display: block;
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}

.profile-metric-icon,
.profile-section-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--aw-primary);
}

.profile-metric-icon .app-icon,
.profile-section-icon .app-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.profile-metric-card strong {
    display: block;
    margin-top: 0.65rem;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.2;
}

.profile-metric-card small {
    color: #64748b;
    font-size: 0.74rem;
}

.profile-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-section-head h3 {
    margin: 0;
    color: var(--text);
}

.profile-section-head p {
    margin-top: 0.2rem;
    font-size: 0.84rem;
}

.profile-complete-card {
    border-color: rgba(245, 158, 11, 0.28);
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.12), transparent 32%),
        #fff;
}

.profile-danger-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(220, 38, 38, 0.08), transparent 34%),
        #fff;
    border-color: rgba(220, 38, 38, 0.16);
}

.profile-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.profile-plan-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.1), transparent 34%),
        #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.profile-plan-card.is-current {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.profile-plan-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.profile-plan-card-head strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}

.profile-plan-card-head span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.profile-plan-card-head b {
    color: var(--aw-primary);
    white-space: nowrap;
}

.profile-plan-features {
    display: grid;
    gap: 0.45rem;
}

.profile-plan-features span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #475569;
    font-size: 0.82rem;
}

.profile-plan-features .app-icon {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--aw-primary);
}

@media (max-width: 720px) {
    .profile-hero {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.8rem;
    }

    .profile-plan-chip {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.2rem 0.75rem;
        padding: 0.7rem 0.78rem;
    }

    .profile-plan-label {
        grid-column: 1 / -1;
    }

    .profile-plan-chip small {
        text-align: right;
    }

    .profile-metrics-grid,
    .profile-status-grid,
    .profile-info-grid,
    .profile-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .profile-status-card,
    .profile-info-card,
    .profile-plan-card {
        min-width: 0;
    }

    .profile-metric-card {
        min-height: auto;
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        gap: 0.32rem;
        padding: 0.75rem;
    }

    .profile-metric-card strong {
        margin-top: 0;
    }

    .profile-metric-card small {
        grid-column: auto;
    }

    .profile-status-card,
    .profile-info-card,
    .profile-plan-card {
        padding: 0.72rem;
    }

    .profile-status-top,
    .profile-info-card {
        gap: 0.55rem;
    }

    .profile-status-top strong,
    .profile-info-card strong,
    .profile-plan-card-head strong {
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .profile-status-top small,
    .profile-info-card small,
    .profile-plan-features span {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .profile-plan-card-head {
        display: grid;
        gap: 0.28rem;
    }

    .profile-plan-card-head b {
        white-space: normal;
        font-size: 0.82rem;
        line-height: 1.15;
    }
}

@media (max-width: 420px) {
    .profile-hero {
        padding: 0.9rem;
    }

    .profile-hero-main {
        gap: 0.72rem;
        align-items: flex-start;
    }

    .profile-avatar-xl {
        width: 3.25rem;
        height: 3.25rem;
        flex-basis: 3.25rem;
        border-width: 2px;
        font-size: 1.35rem;
    }

    .profile-identity h2 {
        font-size: 1.15rem;
    }

    .profile-contact-line {
        font-size: 0.7rem;
        margin-top: 0.5rem;
        gap: 0.32rem;
    }

    .profile-contact-line span {
        width: 100%;
        border-radius: 8px;
        padding: 0.3rem 0.48rem;
    }

    .profile-plan-chip {
        border-radius: 8px;
        padding: 0.62rem;
    }

    .profile-plan-name {
        font-size: 0.92rem;
    }

    .profile-plan-chip small {
        font-size: 0.7rem;
    }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .admin-sidebar { width: 100%; position: relative; height: auto; }
    .admin-content { margin-left: 0; }
    .admin-layout  { flex-direction: column; }
}

/* ---- Dashboard hero (AdWatch-style) ---- */
.dash-top-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
    margin-bottom: var(--gap-lg);
}

.dash-hero {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #4F46E5 100%);
    border: none;
    color: #fff;
    padding: 1.35rem 1.25rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    isolation: isolate;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.dash-hero::after {
    display: none;
}

.dash-hero h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

.dash-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 1;
}

.dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Keep button shine inside hero — no spill outside banner */
.dash-hero .btn {
    overflow: hidden;
    contain: paint;
}

.dash-hero .btn::before {
    z-index: 0;
}

.dash-hero .btn-light,
.dash-hero .btn-outline-light {
    animation: none;
    background-size: 100% 100%;
    background-position: 0 0;
}

.dash-hero .btn-light {
    background: #ffffff;
    color: var(--aw-primary);
}

.dash-hero .btn-outline-light {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

.btn-light {
    background: #fff;
    color: var(--aw-primary);
    border: none;
}

.btn-light:hover {
    opacity: 0.92;
    text-decoration: none;
    color: var(--aw-primary-dark);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: #fff;
}

.dash-balance-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
}

.dash-balance-card .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.dash-balance-card .value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.75rem;
}

.dash-stat-icon {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.dash-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--gap);
    color: var(--text);
}

.dash-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
}

/* ---- PC layout (≥992px) ---- */
@media (min-width: 992px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: block !important; }

    .topbar-user-meta.desktop-only {
        display: flex !important;
        flex-direction: column;
    }

    .topbar-toggle { display: none; }

    .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none !important;
    }

    .app-body {
        margin-left: var(--sidebar-w);
    }

    .app-footer {
        display: none;
    }

    .app-main {
        margin-bottom: 0;
        padding: 1.25rem 1.5rem 2rem;
    }

    .dash-top-grid {
        grid-template-columns: 1.4fr 1fr;
    }

    .stats-grid,
    .stats-grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .dash-two-col {
        grid-template-columns: 1.6fr 1fr;
    }

    .profile-gate-bar {
        left: var(--sidebar-w);
        top: var(--topbar-h);
    }

    body.profile-gate-visible .app-main {
        margin-top: 0;
        padding-top: calc(34px + 0.5rem);
    }
}

/* ---- Mobile tweaks ---- */
@media (max-width: 991px) {
    .profile-gate-bar {
        top: var(--topbar-h);
    }

    body.profile-gate-visible .app-main {
        padding-top: calc(var(--gap-lg) + 34px);
    }
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: var(--gap-lg);
}

.form-group.mb-0 { margin-bottom: 0; }

.alert-zone { margin-bottom: var(--gap-lg); }
.alert-zone .alert:last-child { margin-bottom: 0; }

.log-viewer {
    max-height: 600px;
    overflow-y: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.78rem;
    line-height: 1.6;
}

.log-line {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    word-break: break-all;
}

/* ---- Redeem page ---- */
.redeem-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.redeem-hero {
    display: grid;
    gap: var(--gap-lg);
    min-height: 260px;
    margin-bottom: var(--gap-lg);
    padding: 1.25rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.36), transparent 26%),
        linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #0f766e 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 22px 54px rgba(37, 99, 235, 0.26);
}

.redeem-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.redeem-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.85rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
}

.redeem-kicker .app-icon {
    width: 1rem;
    height: 1rem;
}

.redeem-hero h2 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 0.7rem;
    font-weight: 850;
}

.redeem-hero p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
}

.redeem-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.redeem-balance-panel {
    align-self: end;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.redeem-balance-panel span,
.redeem-balance-panel small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 700;
}

.redeem-balance-panel strong {
    display: block;
    margin: 0.3rem 0;
    color: #fff;
    font-size: 1.65rem;
    line-height: 1.15;
    word-break: break-word;
}

.redeem-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
}

.redeem-card {
    margin-bottom: 0;
}

.redeem-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.redeem-card-head h3 {
    margin-bottom: 0.2rem;
}

.redeem-card-head p {
    max-width: 46rem;
}

.redeem-icon {
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.redeem-icon--soft {
    background: #ecfdf5;
    color: #0f766e;
}

.redeem-icon .app-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.redeem-code-group {
    margin-bottom: 1rem;
}

.redeem-code-input {
    min-height: 3.35rem !important;
    font-size: 1.35rem !important;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.redeem-submit {
    min-height: 3.15rem;
}

.redeem-steps {
    display: grid;
    gap: 0.75rem;
}

.redeem-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.redeem-step span {
    flex: 0 0 auto;
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 850;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.redeem-step strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
    margin-bottom: 0.12rem;
}

.redeem-step small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

/* ---- Notifications page ---- */
.notifications-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.notifications-hero {
    display: grid;
    gap: var(--gap-lg);
    margin-bottom: var(--gap-lg);
    padding: 1.25rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 90% 10%, rgba(45, 212, 191, 0.34), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 50%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2);
}

.notifications-hero-copy {
    min-width: 0;
}

.notifications-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.85rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
}

.notifications-kicker .app-icon {
    width: 1rem;
    height: 1rem;
}

.notifications-hero h2 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 0.7rem;
    font-weight: 850;
}

.notifications-hero p {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
}

.notifications-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.65rem;
}

.notifications-hero-actions .btn,
.notifications-hero-actions form {
    min-width: 0;
}

.notifications-panel {
    overflow: hidden;
}

.notifications-panel-head {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: var(--gap-lg);
    margin-bottom: 0.85rem;
}

.notifications-panel-head h3 {
    margin-bottom: 0.25rem;
}

.notifications-live-pill {
    flex: 0 0 auto;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 850;
}

.notifications-list {
    display: grid;
    gap: 0.75rem;
}

.notification-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.notification-item.is-unread {
    border-color: rgba(37, 99, 235, 0.26);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.notification-item.is-read {
    opacity: 0.7;
}

.notification-mark {
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.notification-mark .app-icon {
    width: 1.18rem;
    height: 1.18rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.3rem;
}

.notification-title-row strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.25;
}

.notification-content p {
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 0.38rem;
}

.notification-content time {
    display: block;
    color: #94a3b8;
    font-size: 0.78rem;
}

.notifications-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 2.4rem 1rem;
    text-align: center;
}

.notifications-empty span {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.notifications-empty .app-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.notifications-empty strong {
    color: #0f172a;
    font-size: 1rem;
}

/* ---- Withdraw page ---- */
.withdraw-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.withdraw-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    margin-bottom: var(--gap-lg);
}

.withdraw-summary-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.withdraw-summary-card--primary {
    background:
        radial-gradient(circle at 90% 16%, rgba(45, 212, 191, 0.22), transparent 30%),
        linear-gradient(135deg, #1d4ed8, #0f766e);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
}

.withdraw-summary-card span,
.withdraw-summary-card small {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

.withdraw-summary-card--primary span,
.withdraw-summary-card--primary small {
    color: rgba(255, 255, 255, 0.74);
}

.withdraw-summary-card strong {
    display: block;
    margin: 0.28rem 0;
    color: #0f172a;
    font-size: 1.18rem;
    line-height: 1.16;
    word-break: break-word;
}

.withdraw-summary-card--primary strong {
    color: #fff;
    font-size: 1.55rem;
}

.withdraw-hero {
    display: grid;
    gap: var(--gap-lg);
    margin-bottom: var(--gap-lg);
    padding: 1.35rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 86% 14%, rgba(45, 212, 191, 0.34), transparent 24%),
        radial-gradient(circle at 12% 96%, rgba(250, 204, 21, 0.18), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.withdraw-hero-copy {
    align-self: center;
}

.withdraw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.85rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
}

.withdraw-kicker .app-icon {
    width: 1rem;
    height: 1rem;
}

.withdraw-hero h2 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 0.7rem;
    font-weight: 850;
}

.withdraw-hero p {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
}

.withdraw-smart-status {
    display: inline-grid;
    gap: 0.18rem;
    min-width: min(100%, 260px);
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.withdraw-smart-status span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 800;
}

.withdraw-smart-status strong {
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.1;
}

.withdraw-balance-card {
    align-self: end;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 16px 36px rgba(15, 23, 42, 0.14);
}

.withdraw-balance-card span,
.withdraw-balance-card small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 700;
}

.withdraw-balance-card strong {
    display: block;
    margin: 0.3rem 0;
    color: #fff;
    font-size: 1.65rem;
    line-height: 1.15;
    word-break: break-word;
}

.withdraw-alert {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: var(--gap-lg);
    padding: 0.95rem;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.withdraw-alert > span {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
}

.withdraw-alert strong {
    display: block;
    color: #92400e;
    font-size: 0.95rem;
}

.withdraw-alert p {
    color: #78350f;
    font-size: 0.82rem;
}

.withdraw-alert .btn {
    grid-column: 1 / -1;
}

.withdraw-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
}

.withdraw-card {
    margin-bottom: var(--gap);
}

.withdraw-layout .withdraw-card {
    margin-bottom: 0;
}

.withdraw-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.withdraw-card-head h3 {
    margin-bottom: 0.2rem;
}

.withdraw-icon {
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.withdraw-icon--soft {
    background: #ecfdf5;
    color: #0f766e;
}

.withdraw-icon--muted {
    background: #f8fafc;
    color: #64748b;
}

.withdraw-icon .app-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.withdraw-account {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.withdraw-account-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        #f8fafc;
    margin-bottom: 0.7rem;
}

.withdraw-account-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.withdraw-account-avatar {
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.withdraw-account-avatar .app-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.withdraw-account-main strong,
.withdraw-account-main small {
    display: block;
}

.withdraw-account-main strong {
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.2;
}

.withdraw-account-main small {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    word-break: break-word;
}

.withdraw-account-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.withdraw-account div,
.withdraw-account-details div,
.withdraw-mini-balance {
    min-width: 0;
    padding: 0.72rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.withdraw-account span,
.withdraw-account-details span,
.withdraw-mini-balance span {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
}

.withdraw-account strong,
.withdraw-account-details strong,
.withdraw-mini-balance strong {
    display: block;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.25;
    word-break: break-word;
}

.withdraw-mini-balance {
    margin-bottom: 1rem;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        #f8fafc;
}

.withdraw-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.58rem;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 850;
}

.withdraw-status-pill .app-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.withdraw-history-list {
    display: grid;
    gap: 0.75rem;
}

.withdraw-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.78rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.withdraw-history-item strong,
.withdraw-history-item small {
    display: block;
}

.withdraw-history-item strong {
    color: #0f172a;
}

.withdraw-history-item small {
    margin-top: 0.16rem;
    color: #64748b;
    font-size: 0.78rem;
}

.withdraw-request-status {
    flex: 0 0 auto;
    padding: 0.34rem 0.52rem;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: capitalize;
}

.withdraw-request-status--pending {
    background: #fffbeb;
    color: #92400e;
}

.withdraw-request-status--approved {
    background: #ecfdf5;
    color: #047857;
}

.withdraw-request-status--rejected {
    background: #fef2f2;
    color: #991b1b;
}

.withdraw-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 2.2rem 1rem;
    text-align: center;
}

.withdraw-empty span {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.withdraw-empty .app-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.withdraw-empty strong {
    color: #0f172a;
    font-size: 1rem;
}

@media (min-width: 992px) {
    .withdraw-summary-grid {
        grid-template-columns: 1.1fr 0.9fr 0.9fr;
    }

    .withdraw-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
        padding: 1.75rem;
    }

    .withdraw-hero h2 {
        font-size: 2.65rem;
    }

    .withdraw-layout {
        grid-template-columns: minmax(0, 0.78fr) minmax(360px, 0.62fr);
        align-items: start;
        margin-bottom: var(--gap-lg);
    }

    .withdraw-alert {
        grid-template-columns: auto 1fr auto;
    }

    .withdraw-alert .btn {
        grid-column: auto;
    }

    .withdraw-account-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- Plans page ---- */
.plans-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.plans-hero {
    display: grid;
    gap: var(--gap-lg);
    margin-bottom: var(--gap-lg);
    padding: 1.35rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 86% 14%, rgba(250, 204, 21, 0.36), transparent 24%),
        radial-gradient(circle at 12% 96%, rgba(45, 212, 191, 0.28), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.plans-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.85rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
}

.plans-kicker .app-icon {
    width: 1rem;
    height: 1rem;
}

.plans-hero h2 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 0.7rem;
    font-weight: 850;
}

.plans-hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
}

.plans-hero-copy {
    align-self: center;
}

.plans-hero-side {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
}

.plans-graphic {
    position: relative;
    min-height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06)),
        rgba(15, 23, 42, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 18px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.plans-graphic::before {
    content: '';
    position: absolute;
    inset: auto 12% 0;
    height: 38%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(255, 255, 255, 0.02));
}

.plans-graphic-card {
    position: absolute;
    display: grid;
    gap: 0.15rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.plans-graphic-card--front {
    left: 1rem;
    bottom: 1rem;
    width: 8.2rem;
    padding: 0.85rem;
}

.plans-graphic-card--back {
    right: 1rem;
    top: 1rem;
    width: 5.4rem;
    padding: 0.75rem;
    text-align: center;
    background: #fef3c7;
}

.plans-graphic-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}

.plans-graphic-card--back span {
    width: auto;
    height: auto;
    background: transparent;
    color: #92400e;
    font-size: 1.35rem;
}

.plans-graphic-card strong {
    font-size: 1.25rem;
    line-height: 1;
}

.plans-graphic-card small,
.plans-graphic-chip {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.plans-graphic-chip {
    position: absolute;
    right: 4.2rem;
    bottom: 1.25rem;
    padding: 0.42rem 0.55rem;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.plans-graphic-lines {
    position: absolute;
    left: 10.2rem;
    right: 1.2rem;
    bottom: 4.2rem;
    display: grid;
    gap: 0.35rem;
}

.plans-graphic-lines i {
    display: block;
    height: 0.42rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.48);
}

.plans-graphic-lines i:nth-child(2) {
    width: 72%;
}

.plans-graphic-lines i:nth-child(3) {
    width: 48%;
}

.plans-current {
    align-self: end;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 16px 36px rgba(15, 23, 42, 0.14);
}

.plans-current span,
.plans-current small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 700;
}

.plans-current strong {
    display: block;
    margin: 0.3rem 0;
    color: #fff;
    font-size: 1.55rem;
    line-height: 1.15;
    word-break: break-word;
}

.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.1rem;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.86), #fff 34%),
        #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.plan-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
    opacity: 0.8;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
}

.plan-card.is-current {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 22px 52px rgba(37, 99, 235, 0.15);
}

.plan-card.is-current::before {
    height: 5px;
    opacity: 1;
}

.plan-card.is-featured:not(.is-current) {
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.95), #fff 42%),
        #fff;
}

.plan-ribbon {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.32rem 0.48rem;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 850;
}

.plan-ribbon .app-icon {
    width: 0.82rem;
    height: 0.82rem;
}

.plan-card-art {
    position: relative;
    display: grid;
    gap: 0.42rem;
    margin: 0.25rem 0 1rem;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(20, 184, 166, 0.08)),
        #f8fafc;
}

.plan-art-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.plan-art-icon .app-icon {
    width: 1.18rem;
    height: 1.18rem;
}

.plan-art-line {
    display: block;
    height: 0.52rem;
    width: 56%;
    border-radius: 8px;
    background: #dbeafe;
}

.plan-art-line--wide {
    width: 82%;
    background: #ccfbf1;
}

.plan-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gap);
    min-height: 3.4rem;
    margin-bottom: 0.85rem;
    padding-right: 5rem;
}

.plan-card-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.plan-card h3 {
    color: #0f172a;
    font-size: 1.15rem;
    margin: 0;
}

.plan-currency {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.plan-price {
    margin-bottom: 0.9rem;
    color: #0f172a;
    font-size: 1.72rem;
    font-weight: 850;
    line-height: 1.1;
}

.plan-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.plan-metrics span {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 750;
}

.plan-metrics strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.18;
    word-break: break-word;
}

.plan-features {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}

.plan-features span {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.35;
}

.plan-features .app-icon {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    color: #2563eb;
    margin-top: 0.08rem;
}

.plan-card-action {
    margin-top: auto;
    padding-top: 0.2rem;
}

.plans-page .btn {
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.plans-page .btn::before {
    border-radius: 5px;
}

.plans-page .btn:hover {
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.plan-contact-admin {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0.72rem 0.85rem;
    text-align: center;
}

.plans-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 2.4rem 1rem;
    text-align: center;
}

.plans-empty span {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
}

.plans-empty .app-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.plans-empty strong {
    color: #0f172a;
    font-size: 1rem;
}

@media (min-width: 992px) {
    .redeem-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
        padding: 1.75rem;
    }

    .redeem-hero h2 {
        font-size: 2.65rem;
    }

    .redeem-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
        align-items: start;
    }

    .redeem-form-card,
    .redeem-guide-card {
        padding: 1.35rem;
    }

    .notifications-hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        padding: 1.75rem;
    }

    .notifications-hero h2 {
        font-size: 2.65rem;
    }

    .notifications-panel {
        padding: 1.35rem;
    }

    .plans-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
        padding: 1.75rem;
    }

    .plans-hero h2 {
        font-size: 2.65rem;
    }

    .plans-graphic {
        min-height: 180px;
    }

    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-card {
        padding: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .plans-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .redeem-page,
    .notifications-page,
    .plans-page {
        max-width: 100%;
    }

    .redeem-hero,
    .notifications-hero,
    .plans-hero {
        padding: 0.85rem;
        margin-bottom: 0.75rem;
        min-height: 0;
        gap: 0.7rem;
    }

    .redeem-kicker,
    .notifications-kicker,
    .plans-kicker {
        margin-bottom: 0.45rem;
        padding: 0.28rem 0.48rem;
        font-size: 0.68rem;
    }

    .redeem-hero h2,
    .notifications-hero h2,
    .plans-hero h2 {
        margin-bottom: 0;
        font-size: 1.35rem;
        line-height: 1.1;
    }

    .redeem-hero p,
    .notifications-hero p,
    .plans-hero p {
        display: none;
    }

    .plans-hero {
        background:
            radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 30%),
            linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    }

    .plans-hero-side {
        gap: 0;
    }

    .plans-graphic {
        display: none;
    }

    .plans-current {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.12rem 0.6rem;
        padding: 0.62rem 0.7rem;
    }

    .plans-current strong {
        margin: 0;
        font-size: 1rem;
        text-align: right;
    }

    .plans-current small {
        grid-column: 1 / -1;
        font-size: 0.66rem;
    }

    .redeem-hero-actions,
    .notifications-hero-actions {
        display: grid;
        align-items: stretch;
        gap: 0.35rem;
    }

    .redeem-hero-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notifications-hero-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .redeem-hero-actions .btn,
    .notifications-hero-actions .btn {
        width: 100%;
        min-height: 2.3rem;
        padding: 0.42rem 0.24rem;
        font-size: 0.66rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .redeem-balance-panel {
        align-self: stretch;
        padding: 0.65rem;
    }

    .redeem-balance-panel strong {
        margin: 0.12rem 0;
        font-size: 1.12rem;
    }

    .redeem-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .plan-card {
        padding: 0.72rem;
        min-width: 0;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    }

    .plan-card:hover {
        transform: none;
    }

    .plan-card-art {
        display: none;
    }

    .plan-ribbon {
        top: 0.48rem;
        right: 0.48rem;
        padding: 0.22rem 0.34rem;
        font-size: 0.56rem;
        border-radius: 7px;
    }

    .plan-ribbon .app-icon {
        width: 0.64rem;
        height: 0.64rem;
    }

    .plan-card-top {
        min-height: 2.25rem;
        margin-bottom: 0.5rem;
        padding-right: 3.4rem;
        gap: 0.4rem;
    }

    .plan-card-label {
        margin-bottom: 0.12rem;
        font-size: 0.58rem;
    }

    .plan-card h3 {
        font-size: 0.86rem;
        line-height: 1.1;
    }

    .plan-currency {
        margin-top: 0.08rem;
        font-size: 0.62rem;
    }

    .plan-card-top .badge {
        padding: 0.15rem 0.32rem;
        font-size: 0.55rem;
        border-radius: 6px;
    }

    .plan-price {
        margin-bottom: 0.48rem;
        font-size: 1.05rem;
    }

    .plan-metrics {
        gap: 0.32rem;
        margin-bottom: 0.52rem;
    }

    .plan-metrics span {
        padding: 0.42rem 0.34rem;
        font-size: 0.58rem;
        line-height: 1.15;
    }

    .plan-metrics strong {
        margin-bottom: 0.08rem;
        font-size: 0.68rem;
    }

    .plan-features {
        gap: 0.32rem;
        margin-bottom: 0.62rem;
    }

    .plan-features span {
        gap: 0.28rem;
        font-size: 0.6rem;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .plan-features .app-icon {
        width: 0.72rem;
        height: 0.72rem;
        margin-top: 0.02rem;
    }

    .plans-page .btn,
    .plan-contact-admin {
        min-height: 2.15rem;
        padding: 0.38rem 0.28rem;
        font-size: 0.64rem;
        line-height: 1.05;
        border-radius: 7px;
    }

    .plan-card-action {
        padding-top: 0;
    }

    .redeem-card {
        padding: 0.68rem;
        min-width: 0;
    }

    .redeem-card-head {
        gap: 0.45rem;
        margin-bottom: 0.65rem;
    }

    .redeem-card-head h3 {
        font-size: 0.78rem;
        line-height: 1.1;
        margin-bottom: 0;
    }

    .redeem-card-head p,
    .redeem-step small {
        display: none;
    }

    .redeem-icon {
        width: 1.75rem;
        height: 1.75rem;
        border-radius: 8px;
    }

    .redeem-icon .app-icon {
        width: 0.9rem;
        height: 0.9rem;
    }

    .redeem-code-group {
        margin-bottom: 0.55rem;
    }

    .redeem-code-group label {
        font-size: 0.68rem;
    }

    .redeem-code-input {
        min-height: 2.45rem !important;
        padding: 0.45rem 0.52rem !important;
        font-size: 0.95rem !important;
        letter-spacing: 0.03em;
    }

    .redeem-submit {
        min-height: 2.35rem;
        padding: 0.42rem 0.28rem;
        font-size: 0.68rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .redeem-steps {
        gap: 0.35rem;
    }

    .redeem-step {
        align-items: center;
        gap: 0.38rem;
        padding: 0.42rem;
    }

    .redeem-step span {
        width: 1.28rem;
        height: 1.28rem;
        border-radius: 7px;
        font-size: 0.62rem;
    }

    .redeem-step strong {
        font-size: 0.66rem;
        line-height: 1.08;
        margin-bottom: 0;
    }

    .notifications-panel {
        padding: 0.75rem;
    }

    .notification-item {
        gap: 0.55rem;
        padding: 0.65rem;
    }

    .notification-mark {
        width: 2rem;
        height: 2rem;
    }

    .notification-title-row strong {
        font-size: 0.86rem;
    }

    .notification-content p {
        font-size: 0.76rem;
        line-height: 1.3;
    }
}

.log-line:last-child { border-bottom: none; }
.log-error   { background: rgba(239,68,68,0.08); color: #fca5a5; }
.log-warning { background: rgba(245,158,11,0.08); color: #fcd34d; }
.log-info    { color: var(--text-muted); }
.log-user    { background: rgba(99,102,241,0.06); color: #c7d2fe; }

.log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.proof-thumb {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
}

.text-danger { color: var(--danger); }

code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
}

.hidden { display: none !important; }

.auth-footer {
    text-align: center;
    margin-top: var(--gap-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reg-success-card {
    max-width: 420px;
}

.reg-credential-card {
    background: linear-gradient(160deg, rgba(15, 32, 68, 0.98), rgba(22, 42, 82, 0.98));
    border: 1px solid rgba(110, 231, 183, 0.35);
    border-radius: 14px;
    padding: 1.25rem 1.1rem;
    text-align: left;
}

.reg-credential-brand {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
}

.reg-credential-title {
    color: var(--text);
    font-size: 0.95rem;
    margin: 0.35rem 0 1rem;
}

.reg-credential-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.reg-credential-row span {
    color: var(--text-muted);
}

.reg-credential-row strong {
    color: var(--text);
    font-size: 0.95rem;
    word-break: break-all;
    text-align: right;
}

.reg-credential-foot {
    margin: 0.85rem 0 0;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.reg-success-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.reg-success-modal.hidden {
    display: none;
}

.reg-success-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
}

.reg-success-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: min(92vh, 680px);
    overflow-y: auto;
    padding: 1rem;
    border-radius: 12px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.1), transparent 30%),
        #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    animation: reg-success-pop 0.2s ease-out;
}

.reg-success-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.reg-success-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.reg-success-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 2.3rem;
    margin-bottom: 0.85rem;
}

.reg-success-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ecfdf5;
    color: #0f766e;
}

.reg-success-icon .app-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.reg-success-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.18;
}

.reg-success-head p {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.reg-credential-card--modal {
    border-color: rgba(96, 165, 250, 0.18);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reg-save-status {
    margin: 0.75rem 0 0;
    color: #047857;
    font-size: 0.78rem;
    line-height: 1.35;
}

.reg-password-hint {
    margin: 0.75rem 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.reg-save-btn {
    margin-top: 0.85rem;
    min-height: 2.75rem;
}

@keyframes reg-success-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 540px) {
    .reg-success-modal {
        align-items: flex-start;
        padding: 0.65rem;
        padding-top: calc(var(--topbar-h) + 0.65rem);
    }

    .reg-success-dialog {
        padding: 0.82rem;
        border-radius: 12px;
    }

    .reg-success-head h3 {
        font-size: 0.96rem;
    }

    .reg-success-head p,
    .reg-save-status,
    .reg-password-hint {
        font-size: 0.72rem;
    }

    .reg-credential-card--modal {
        padding: 0.95rem 0.85rem;
    }

    .reg-credential-brand {
        font-size: 0.95rem;
    }

    .reg-credential-title {
        font-size: 0.82rem;
    }

    .reg-credential-row {
        gap: 0.45rem;
        padding: 0.52rem 0;
        font-size: 0.74rem;
    }

    .reg-credential-row strong {
        font-size: 0.82rem;
    }
}

.alert-compact { font-size: 0.8rem; }

.profile-gate-bar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    z-index: 115;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem 0.35rem 0.75rem;
    min-height: 34px;
    background: #FFFFFF;
    border-bottom: 1px solid #FCA5A5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.profile-gate-bar.hidden {
    display: none;
}

body.profile-gate-visible .app-main {
    padding-top: calc(var(--gap-lg) + 34px);
}

.profile-gate-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #DC2626;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-gate-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: #dc2626;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.profile-gate-btn:hover {
    background: #b91c1c;
    color: #fff;
}

.profile-gate-close {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #ef4444;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.notif-toast-stack {
    position: fixed;
    top: calc(var(--topbar-h) + 10px);
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(0);
    z-index: 1300;
    width: min(calc(100vw - 1rem), 370px);
    display: grid;
    gap: 0.45rem;
    pointer-events: none;
}

.notif-toast {
    position: relative;
    width: 100%;
    min-height: 3.45rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.68rem 0.72rem 0.78rem;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(20, 184, 166, 0.38)) border-box;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
    animation: notif-toast-in 0.18s ease-out;
    overflow: hidden;
    pointer-events: auto;
}

.notif-toast::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #2563eb;
    animation: notif-toast-bar 1s linear forwards;
}

.notif-toast--reward::before,
.notif-toast--unlock::before {
    background: #14b8a6;
}

.notif-toast--warning::before {
    background: #f59e0b;
}

.notif-toast-mark {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 38%),
        linear-gradient(135deg, #2563eb, #0f766e);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.notif-toast-mark::after {
    content: '!';
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #1d4ed8;
    font-size: 0.65rem;
    font-weight: 900;
}

.notif-toast--reward .notif-toast-mark,
.notif-toast--unlock .notif-toast-mark {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 38%),
        linear-gradient(135deg, #14b8a6, #059669);
}

.notif-toast--reward .notif-toast-mark::after,
.notif-toast--unlock .notif-toast-mark::after {
    content: '$';
    color: #047857;
}

.notif-toast--warning .notif-toast-mark {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 38%),
        linear-gradient(135deg, #fbbf24, #f59e0b);
}

.notif-toast--warning .notif-toast-mark::after {
    content: '!';
    color: #92400e;
}

.notif-toast-copy {
    min-width: 0;
    display: grid;
    gap: 0.08rem;
    flex: 1;
}

.notif-toast-close {
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.notif-toast-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.whatsapp-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1250;
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 3.35rem;
    padding: 0.55rem 0.8rem 0.55rem 0.58rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(22, 163, 74, 0.28);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.whatsapp-float:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(22, 163, 74, 0.34);
}

.whatsapp-float-icon {
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.whatsapp-float-icon img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 999px;
}

.whatsapp-float-copy {
    display: grid;
    gap: 0.04rem;
    line-height: 1.1;
}

.whatsapp-float-copy strong {
    font-size: 0.88rem;
    font-weight: 850;
}

.whatsapp-float-copy small {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.86);
}

.whatsapp-float--user {
    bottom: calc(var(--footer-h) + 1rem);
}

.notif-toast.hidden {
    display: none;
}

.notif-toast strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.15;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-toast-copy > span {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes notif-toast-bar {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (min-width: 992px) {
    .notif-toast-stack {
        left: auto;
        right: 20px;
        transform: none;
    }
}

@keyframes notif-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    @keyframes notif-toast-in {
        from {
            opacity: 0;
            transform: translateX(8px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Desktop sidebar rail */
@media (min-width: 992px) {
    .app-sidebar {
        width: var(--sidebar-collapsed-w);
        overflow-x: hidden;
        transition: width 0.24s ease, box-shadow 0.24s ease;
    }

    .app-sidebar:hover,
    .app-sidebar:focus-within {
        width: var(--sidebar-w);
        box-shadow: 22px 0 55px rgba(15, 23, 42, 0.24);
    }

    .app-body {
        margin-left: var(--sidebar-collapsed-w);
        transition: margin-left 0.24s ease;
    }

    .sidebar-brand {
        min-height: 3.3rem;
        white-space: nowrap;
        overflow: visible;
    }

    .sidebar-brand-icon {
        flex: 0 0 2.35rem;
    }

    .sidebar-brand-text {
        opacity: 0;
        transform: translateX(-0.35rem);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .app-sidebar:hover .sidebar-brand-text,
    .app-sidebar:focus-within .sidebar-brand-text {
        opacity: 1;
        transform: translateX(0);
    }

    .sidebar-link {
        position: relative;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        border: 1px solid transparent;
        transform: translateZ(0);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .sidebar-link::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 58%);
        opacity: 0;
        transition: opacity 0.18s ease;
        pointer-events: none;
    }

    .sidebar-link:hover::before,
    .sidebar-link.active::before {
        opacity: 1;
    }

    .sidebar-link:hover {
        border-color: rgba(255, 255, 255, 0.1);
        transform: translateX(3px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    }

    .sidebar-link.active {
        transform: translateX(3px);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    }

    .sidebar-icon {
        flex: 0 0 1.95rem;
        width: 1.95rem;
        height: 1.95rem;
        margin-right: 0.15rem;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .sidebar-promo {
        opacity: 0;
        transform: translateX(-0.35rem);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .app-sidebar:hover .sidebar-promo,
    .app-sidebar:focus-within .sidebar-promo {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

/* ============================================================
   Modern UI refresh
   ============================================================ */

:root {
    --aw-navy: #111827;
    --aw-primary: #2563eb;
    --aw-primary-dark: #1d4ed8;
    --aw-primary-light: #60a5fa;
    --aw-bg: #f6f8fb;
    --aw-card: #ffffff;
    --aw-text: #111827;
    --aw-text-muted: #6b7280;
    --aw-border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 8px;
    --radius-sm: 7px;
    --sidebar-w: 272px;
    --sidebar-collapsed-w: 86px;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body:has(.app-shell),
.app-body,
.app-main {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 280px),
        var(--aw-bg);
}

.app-sidebar {
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 26%),
        linear-gradient(180deg, #0f172a 0%, #111827 56%, #172033 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    padding: 1rem 0.9rem;
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.18);
}

.sidebar-brand {
    gap: 0.75rem;
    padding: 0.35rem 0.55rem 1.05rem;
}

.sidebar-brand-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.38);
}

.sidebar-brand-text {
    font-size: 1.08rem;
    letter-spacing: 0;
}

.sidebar-link {
    min-height: 2.65rem;
    padding: 0.68rem 0.78rem;
    border-radius: 8px;
    color: rgba(226, 232, 240, 0.82);
    font-weight: 600;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(20, 184, 166, 0.08));
    border-color: rgba(96, 165, 250, 0.18);
    color: #fff;
}

.sidebar-link.active {
    background:
        radial-gradient(circle at 0% 50%, rgba(37, 99, 235, 0.14), transparent 32%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
    color: #0f172a;
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-icon,
.nav-icon {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    transition: background 0.18s ease, color 0.18s ease;
}

.app-icon {
    width: 1em;
    height: 1em;
    display: block;
    flex: 0 0 auto;
}

.sidebar-brand-icon .app-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.sidebar-icon .app-icon,
.nav-icon .app-icon,
.topbar-icon-btn .app-icon,
.dash-stat-icon .app-icon {
    width: 1rem;
    height: 1rem;
}

.sidebar-link.active .sidebar-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(20, 184, 166, 0.14));
    color: #2563eb;
}

.sidebar-promo {
    border-radius: 8px;
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(19, 33, 58, 0.96), rgba(25, 78, 149, 0.5));
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(15, 23, 42, 0.16);
}

.sidebar-promo strong {
    color: #f8fafc;
}

.sidebar-promo p {
    color: rgba(226, 232, 240, 0.72);
}

.sidebar-promo .btn-primary {
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 45%, #0f766e 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.sidebar-promo .btn-primary:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 45%, #0f766e 100%);
}

@media (max-width: 991px) {
    .app-sidebar {
        background:
            radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.16), transparent 24%),
            linear-gradient(180deg, #0b1224 0%, #10192d 54%, #132238 100%);
        box-shadow: 22px 0 48px rgba(15, 23, 42, 0.28);
    }

    .sidebar-link.active {
        background:
            radial-gradient(circle at 0% 50%, rgba(37, 99, 235, 0.16), transparent 30%),
            linear-gradient(90deg, #ffffff 0%, #eff6ff 100%);
        border-color: rgba(96, 165, 250, 0.32);
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
    }

    .sidebar-link.active .sidebar-icon {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.app-topbar {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.topbar-toggle {
    align-items: center;
}

.topbar-icon-btn,
.topbar-avatar {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--aw-border);
}

.topbar-icon-btn {
    color: #334155;
}

.topbar-avatar {
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    border: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.app-main {
    padding: 1rem;
}

.card,
.stat-box,
.auth-card,
.ref-package-card,
.ref-team-member {
    border-color: rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.card {
    padding: 1.05rem;
}

.card h1,
.card h2,
.card h3,
.page-title {
    letter-spacing: 0;
    font-weight: 800;
}

.dash-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.32), transparent 26%),
        linear-gradient(135deg, #1d4ed8 0%, #2563eb 52%, #0f766e 100%);
    border-radius: 8px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.dash-hero::after {
    display: none;
}

.dash-hero h2 {
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
}

.dash-balance-card {
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(20, 184, 166, 0.45)) border-box;
    border: 1px solid transparent;
}

.dash-balance-card .value,
.stat-box .value {
    color: #0f172a;
    font-weight: 850;
}

.stat-box {
    text-align: left;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dash-stat-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--aw-primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.btn {
    --btn-bg: #ffffff;
    --btn-bg-hover: #f8fafc;
    --btn-fg: #111827;
    --btn-border: rgba(148, 163, 184, 0.36);
    --btn-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 10px 24px rgba(15, 23, 42, 0.06);
    --btn-shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.09), 0 16px 34px rgba(15, 23, 42, 0.11);
    --btn-ring: rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 2.5rem;
    padding: 0.68rem 1.05rem;
    border: 1px solid var(--btn-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 48%),
        var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: var(--btn-shadow);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
    transition:
        transform 0.18s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.btn:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 46%),
        var(--btn-bg-hover);
    box-shadow: var(--btn-shadow-hover);
    transform: translateY(-2px);
    opacity: 1;
}

.btn:active {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), inset 0 2px 6px rgba(15, 23, 42, 0.16);
    transform: translateY(0);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--btn-shadow-hover), 0 0 0 4px var(--btn-ring);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 45%);
    pointer-events: none;
    z-index: -1;
}

.btn::after {
    display: none;
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-light,
.btn-outline,
.btn-outline-light {
    background-image:
        linear-gradient(110deg, transparent 0%, transparent 42%, rgba(255, 255, 255, 0.24) 50%, transparent 58%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 48%),
        var(--btn-bg);
    background-size: 280% 100%, 100% 100%, 100% 100%;
    background-position: -160% 0, 0 0, 0 0;
    animation: button-bg-shine 7.8s cubic-bezier(.22,.61,.36,1) infinite;
}

.btn-primary {
    --btn-bg: linear-gradient(135deg, #2563eb 0%, #155e75 100%);
    --btn-bg-hover: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
    --btn-fg: #ffffff;
    --btn-border: rgba(255, 255, 255, 0.18);
    --btn-shadow: 0 2px 4px rgba(37, 99, 235, 0.18), 0 14px 30px rgba(37, 99, 235, 0.26);
    --btn-shadow-hover: 0 5px 10px rgba(37, 99, 235, 0.22), 0 20px 42px rgba(20, 118, 110, 0.28);
    --btn-ring: rgba(37, 99, 235, 0.28);
}

.btn-success {
    --btn-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-bg-hover: linear-gradient(135deg, #047857 0%, #065f46 100%);
    --btn-fg: #ffffff;
    --btn-border: rgba(255, 255, 255, 0.18);
    --btn-shadow: 0 2px 4px rgba(5, 150, 105, 0.16), 0 14px 30px rgba(5, 150, 105, 0.24);
    --btn-shadow-hover: 0 5px 10px rgba(5, 150, 105, 0.2), 0 20px 42px rgba(5, 150, 105, 0.28);
    --btn-ring: rgba(5, 150, 105, 0.24);
}

.btn-danger {
    --btn-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --btn-bg-hover: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    --btn-fg: #ffffff;
    --btn-border: rgba(255, 255, 255, 0.18);
    --btn-shadow: 0 2px 4px rgba(220, 38, 38, 0.15), 0 14px 30px rgba(220, 38, 38, 0.22);
    --btn-shadow-hover: 0 5px 10px rgba(220, 38, 38, 0.19), 0 20px 42px rgba(220, 38, 38, 0.26);
    --btn-ring: rgba(220, 38, 38, 0.23);
}

.btn-warning {
    --btn-bg: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --btn-bg-hover: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    --btn-fg: #111827;
    --btn-border: rgba(255, 255, 255, 0.22);
    --btn-shadow: 0 2px 4px rgba(217, 119, 6, 0.15), 0 14px 30px rgba(217, 119, 6, 0.22);
    --btn-shadow-hover: 0 5px 10px rgba(217, 119, 6, 0.18), 0 20px 42px rgba(217, 119, 6, 0.26);
    --btn-ring: rgba(217, 119, 6, 0.24);
}

.btn-outline {
    --btn-bg: #ffffff;
    --btn-bg-hover: #f8fafc;
    --btn-fg: #1f2937;
    --btn-border: rgba(37, 99, 235, 0.18);
    --btn-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --btn-shadow-hover: 0 3px 8px rgba(15, 23, 42, 0.08), 0 12px 26px rgba(37, 99, 235, 0.08);
}

.btn-outline::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(37, 99, 235, 0.02),
        rgba(37, 99, 235, 0.14),
        rgba(37, 99, 235, 0.02),
        transparent
    );
    opacity: 0.62;
    animation-duration: 5.2s;
}

.btn-light {
    --btn-bg: #ffffff;
    --btn-bg-hover: #eef6ff;
    --btn-fg: var(--aw-primary);
    --btn-border: rgba(255, 255, 255, 0.72);
    --btn-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), 0 14px 30px rgba(15, 23, 42, 0.14);
    --btn-shadow-hover: 0 5px 10px rgba(15, 23, 42, 0.1), 0 20px 42px rgba(15, 23, 42, 0.18);
}

.btn-outline-light {
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-bg-hover: rgba(255, 255, 255, 0.18);
    --btn-fg: #ffffff;
    --btn-border: rgba(255, 255, 255, 0.54);
    --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px rgba(15, 23, 42, 0.12);
    --btn-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 14px 30px rgba(15, 23, 42, 0.18);
}

@keyframes button-bg-shine {
    0% { background-position: -160% 0, 0 0, 0 0; }
    28%, 100% { background-position: 160% 0, 0 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }

    .btn,
    .btn::after {
        animation: none !important;
    }
}

.form-group label {
    color: #475569;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    min-height: 2.65rem;
    border-color: #dbe4ef;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--aw-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.2), transparent 30%),
        #0f172a;
}

.auth-card {
    max-width: 430px;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.auth-card h1 {
    color: #0f172a;
    font-weight: 850;
}

.auth-card .text-muted,
.auth-footer,
.remember-row {
    color: #64748b;
}

.admin-layout {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 280px),
        #f6f8fb;
    color: #111827;
}

.admin-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.14);
}

.admin-sidebar a {
    border-radius: 8px;
    color: rgba(226, 232, 240, 0.78);
    font-weight: 650;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #fff;
    color: #111827;
}

.admin-content {
    color: #111827;
}

.admin-table {
    min-width: 720px;
}

.card:has(.admin-table) {
    overflow-x: auto;
}

.admin-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.admin-table td {
    color: #1f2937;
}

/* Admin contrast guard */
.admin-layout {
    --bg: #f6f8fb;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text: #0f172a;
    --text-muted: #475569;
    --border: #dbe4ef;
}

.admin-layout .card,
.admin-layout .stat-box,
.admin-layout .ref-package-card,
.admin-layout .ref-team-member {
    background: #ffffff;
    color: #0f172a;
    border-color: #dbe4ef;
}

.admin-layout .card h1,
.admin-layout .card h2,
.admin-layout .card h3,
.admin-layout .page-title,
.admin-layout .stat-box .value,
.admin-layout strong,
.admin-layout label {
    color: #0f172a;
}

.admin-layout p,
.admin-layout .text-muted,
.admin-layout .stat-box .label,
.admin-layout .form-group label,
.admin-layout small {
    color: #475569;
}

.admin-layout .form-group input,
.admin-layout .form-group select,
.admin-layout .form-group textarea,
.admin-layout input,
.admin-layout select,
.admin-layout textarea {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.admin-layout .form-group input::placeholder,
.admin-layout .form-group textarea::placeholder,
.admin-layout input::placeholder,
.admin-layout textarea::placeholder {
    color: #94a3b8;
}

.admin-layout .admin-table {
    background: #ffffff;
    color: #0f172a;
}

.admin-layout .admin-table th {
    background: #eef2f7;
    color: #334155;
}

.admin-layout .admin-table td {
    color: #111827;
    border-bottom-color: #e2e8f0;
}

.admin-layout .list-row {
    border-bottom-color: #e2e8f0;
}

.admin-layout code {
    background: #eef2f7;
    color: #0f172a;
}

.admin-layout .log-viewer {
    background: #0f172a;
    color: #dbeafe;
}

.admin-layout .log-line {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.admin-layout .log-info {
    color: #bfdbfe;
}

.admin-layout .log-user {
    color: #dbeafe;
}

.admin-layout .admin-task-form-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.06), transparent 34%),
        #ffffff;
    color: #0f172a;
    border-color: #dbe4ef;
}

.admin-layout .admin-task-form-card h3 {
    color: #0f172a;
}

.admin-layout .admin-task-form-card .form-group label {
    color: #334155;
    font-weight: 800;
}

.admin-layout .admin-task-form-card input,
.admin-layout .admin-task-form-card select,
.admin-layout .admin-task-form-card textarea {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.admin-layout .admin-task-form-card input:focus,
.admin-layout .admin-task-form-card select:focus,
.admin-layout .admin-task-form-card textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.admin-check-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.35rem 0;
    color: #1f2937;
    font-weight: 650;
}

.admin-check-row input {
    width: auto;
}

.app-footer {
    height: 70px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.08);
}

.app-footer a {
    min-width: 58px;
    font-weight: 700;
}

.app-footer a.active .nav-icon {
    background: var(--aw-primary);
    color: #fff;
}

@media (min-width: 992px) {
    .app-main {
        padding: 1.5rem 1.75rem 2.25rem;
    }

    .card {
        padding: 1.25rem;
    }
}

@media (max-width: 540px) {
    .stats-grid,
    .stats-grid--4 {
        grid-template-columns: 1fr;
    }

    .topbar-user-meta {
        display: none;
    }

    .auth-card {
        padding: 1.35rem;
    }
}

/* Mobile app experience */
@media (max-width: 991px) {
    :root {
        --topbar-h: 58px;
        --footer-h: 74px;
    }

    body:has(.app-shell) {
        background: #f6f8fb;
        overflow-x: hidden;
    }

    .app-shell,
    .app-body {
        min-height: 100dvh;
    }

    .app-topbar {
        height: var(--topbar-h);
        padding: 0 0.8rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    }

    .topbar-logo {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.98rem;
        font-weight: 850;
        color: #0f172a;
    }

    .topbar-actions {
        gap: 0.45rem;
    }

    .topbar-balance {
        max-width: 31vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.74rem;
        padding: 0.35rem 0.5rem;
        border-radius: 999px;
        background: #ecfdf5;
        color: #047857;
    }

    .topbar-icon-btn,
    .topbar-avatar,
    .topbar-toggle {
        width: 2.1rem;
        height: 2.1rem;
        flex: 0 0 2.1rem;
    }

    .app-main {
        padding: 0.85rem 0.75rem calc(var(--footer-h) + 4.25rem);
        margin-bottom: 0;
    }

    .dash-top-grid,
    .dash-two-col {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card {
        margin-bottom: 0.75rem;
        padding: 0.9rem;
    }

    .card h1 {
        font-size: 1.18rem;
    }

    .card h2,
    .dash-hero h2 {
        font-size: 1.12rem;
        line-height: 1.25;
    }

    .card h3,
    .dash-panel-title {
        font-size: 0.98rem;
        line-height: 1.3;
    }

    .card p,
    .form-group input,
    .form-group select,
    .form-group textarea,
    .btn,
    .alert,
    .task-item-body > strong {
        font-size: 0.88rem;
    }

    .dash-hero {
        padding: 1rem;
    }

    .dash-hero p {
        font-size: 0.84rem;
        line-height: 1.45;
        margin-bottom: 0.75rem;
    }

    .dash-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .dash-hero-actions .btn {
        width: 100%;
        min-width: 0;
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .dash-balance-card {
        align-items: flex-start;
        text-align: left;
    }

    .dash-balance-card .value {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    .stats-grid,
    .stats-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        margin-bottom: 0.75rem;
    }

    .stat-box {
        min-height: 98px;
        padding: 0.78rem;
    }

    .stat-box .value {
        font-size: 1.05rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .stat-box .label {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .dash-stat-icon {
        width: 1.85rem;
        height: 1.85rem;
    }

    .quick-actions-stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

.quick-actions-stack .btn {
        min-height: 2.55rem;
        white-space: normal;
        line-height: 1.2;
    }

    .app-footer {
        left: 0.55rem;
        right: 0.55rem;
        bottom: 0.55rem;
        width: auto;
        height: 64px;
        border: 1px solid rgba(226, 232, 240, 0.96);
        border-radius: 18px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
        overflow: visible;
    }

    .app-footer a {
        flex: 1 1 20%;
        min-width: 0;
        height: 100%;
        justify-content: center;
        gap: 0.18rem;
        padding: 0.35rem 0.1rem;
        font-size: 0.62rem;
        line-height: 1.1;
    }

    .app-footer .nav-icon {
        width: 1.65rem;
        height: 1.65rem;
        border-radius: 8px;
        background: #f1f5f9;
    }

    .app-sidebar {
        width: min(86vw, 300px);
        border-top-right-radius: 18px;
        border-bottom-right-radius: 18px;
    }

    .sidebar-link {
        min-height: 2.85rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 360px) {
    .stats-grid,
    .stats-grid--4,
    .quick-actions-stack,
    .dash-hero-actions {
        grid-template-columns: 1fr;
    }

    .topbar-balance {
        display: none;
    }
}

/* Advanced header and bottom navigation */
.app-topbar {
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.app-topbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 34%, rgba(20, 184, 166, 0.08)),
        rgba(255, 255, 255, 0.78);
    pointer-events: none;
    z-index: -1;
}

.topbar-toggle,
.topbar-icon-btn {
    color: #334155;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(203, 213, 225, 0.88);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.topbar-toggle:hover,
.topbar-icon-btn:hover {
    color: var(--aw-primary);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08), 0 14px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.topbar-toggle:active,
.topbar-icon-btn:active {
    transform: translateY(0);
}

.topbar-toggle .app-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.topbar-badge {
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.08rem;
    height: 1.08rem;
    border: 2px solid #fff;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.28);
}

.topbar-user {
    padding: 0.22rem 0.35rem 0.22rem 0.22rem;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.topbar-user:hover {
    background: rgba(248, 250, 252, 0.88);
    border-color: rgba(203, 213, 225, 0.8);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.topbar-avatar {
    border: 2px solid #fff;
}

.app-footer {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.55rem;
    height: 4rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78)),
        rgba(255, 255, 255, 0.78);
    box-shadow:
        0 18px 46px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(22px);
    overflow: visible;
}

.app-footer::before {
    content: '';
    position: absolute;
    inset: 0.25rem;
    border-radius: 15px;
    border: 1px solid rgba(226, 232, 240, 0.65);
    pointer-events: none;
}

.app-footer a {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    height: 100%;
    justify-content: center;
    border-radius: 14px;
    color: #64748b;
    font-weight: 800;
    transition: color 0.18s ease, transform 0.18s ease;
}

.app-footer a::before {
    content: '';
    position: absolute;
    top: 0.36rem;
    left: 50%;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.45), transparent 35%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(20, 184, 166, 0.14));
    opacity: 0;
    transform: translateX(-50%) scale(0.72);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-footer a:hover,
.app-footer a.active {
    transform: translateY(-1px);
    color: #0f172a;
}

.app-footer a.active::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.app-footer a.active::after {
    display: none;
}

.app-footer .nav-icon {
    position: relative;
    z-index: 1;
    width: 1.8rem;
    height: 1.8rem;
    margin-bottom: 0.03rem;
    background: rgba(239, 246, 255, 0.85);
    color: #64748b;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.app-footer a.active .nav-icon {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4), transparent 35%),
        linear-gradient(135deg, var(--aw-primary), #0f766e);
    color: #fff;
    width: 2.65rem !important;
    height: 2.65rem !important;
    min-width: 2.65rem;
    min-height: 2.65rem;
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.38);
    transform: translateY(-6px) scale(1.05);
}

.app-footer a.active .nav-icon .app-icon {
    width: 1.28rem;
    height: 1.28rem;
}

.app-footer a:hover .nav-icon {
    color: #2563eb;
    background: #eff6ff;
}

@supports (padding: max(0px)) {
    @media (max-width: 991px) {
        .app-main {
            padding-bottom: calc(var(--footer-h) + max(1.35rem, env(safe-area-inset-bottom)));
        }

        .app-footer {
            bottom: max(0.65rem, env(safe-area-inset-bottom));
        }
    }
}

/* Referral progress premium track */
.ref-progress-card {
    position: relative;
    overflow: hidden;
    padding: 1.2rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(125, 211, 252, 0.34), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(45, 212, 191, 0.3), transparent 30%),
        linear-gradient(145deg, #172554 0%, #1d4ed8 48%, #0f766e 100%);
    border: 1px solid rgba(191, 219, 254, 0.42);
    box-shadow: 0 22px 52px rgba(30, 64, 175, 0.22);
}

.ref-progress-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 30%, transparent 72%, rgba(255, 255, 255, 0.08)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 42px);
    pointer-events: none;
}

.ref-progress-card > * {
    position: relative;
    z-index: 1;
}

.ref-progress-head {
    margin-bottom: 0.85rem;
}

.ref-progress-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.32rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(96, 165, 250, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ecfeff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
}

.ref-progress-kicker .app-icon {
    width: 0.82rem;
    height: 0.82rem;
}

.ref-progress-head h3 {
    color: #fff;
    font-size: 1.12rem;
    letter-spacing: 0;
    text-transform: none;
}

.ref-progress-count {
    min-width: 4.4rem;
    padding: 0.42rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    text-align: center;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ref-progress-track-wrap {
    margin-top: 1.05rem;
    padding: 0.35rem 0.2rem 0.1rem;
}

.ref-progress-track {
    min-width: 560px;
    padding: 0.7rem 0 0.35rem;
}

.ref-progress-line,
.ref-progress-line-fill {
    top: 2.45rem;
    left: 9%;
    right: 9%;
    height: 8px;
    border-radius: 999px;
}

.ref-progress-line {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
        rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ref-progress-line-fill {
    right: auto;
    max-width: 82%;
    background: linear-gradient(90deg, #60a5fa 0%, #14b8a6 55%, #facc15 100%);
    box-shadow: 0 0 22px rgba(20, 184, 166, 0.36);
}

.ref-progress-line-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: referral-track-shine 2.6s ease-in-out infinite;
}

.ref-progress-steps {
    gap: 0.65rem;
}

.ref-progress-step {
    gap: 0.45rem;
}

.ref-progress-chest {
    width: 4.75rem;
    height: 4.75rem;
    padding: 0.2rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ref-chest-img--locked {
    filter: grayscale(1) brightness(0.92) contrast(1.05);
    opacity: 0.82;
}

.ref-progress-reward--claimable {
    font-size: 0.76rem;
    color: #fde047;
    text-shadow: 0 1px 10px rgba(253, 224, 71, 0.4);
}

.ref-progress-step--ready .ref-progress-chest {
    border-color: rgba(250, 204, 21, 0.62);
    box-shadow: 0 18px 40px rgba(250, 204, 21, 0.16), 0 0 0 4px rgba(250, 204, 21, 0.08);
}

.ref-progress-step--collected .ref-progress-chest {
    border-color: rgba(167, 243, 208, 0.72);
    background: rgba(20, 184, 166, 0.16);
}

.ref-progress-reward {
    font-size: 0.68rem;
    font-weight: 850;
    color: #fef08a;
    letter-spacing: 0.01em;
}

.ref-chest-icon {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.95), rgba(219, 234, 254, 0.92));
    color: #1d4ed8;
    filter: none;
}

.ref-chest-icon .app-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.ref-progress-step--locked .ref-chest-icon {
    color: #64748b;
    opacity: 0.88;
    filter: none;
}

.ref-progress-step--ready .ref-progress-chest {
    border-color: rgba(250, 204, 21, 0.62);
    box-shadow: 0 18px 40px rgba(250, 204, 21, 0.16), 0 0 0 4px rgba(250, 204, 21, 0.08);
}

.ref-progress-step--ready .ref-chest-icon {
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #111827;
    filter: none;
    animation: ref-node-pulse 1.8s ease-in-out infinite;
}

.ref-progress-step--collected .ref-progress-chest {
    border-color: rgba(167, 243, 208, 0.72);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
        rgba(20, 184, 166, 0.2);
}

.ref-progress-step--collected .ref-chest-icon--open {
    background: linear-gradient(135deg, #34d399, #0d9488);
    color: #fff;
    filter: none;
}

.ref-chest-lock {
    right: -0.15rem;
    bottom: -0.15rem;
    width: 1.45rem;
    height: 1.45rem;
    background: #1e293b;
    color: #cbd5e1;
    border: 2px solid #0f172a;
}

.ref-chest-lock .app-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.ref-chest-lock--done {
    background: #14b8a6;
    color: #fff;
}

.ref-progress-num {
    width: auto;
    min-width: 2rem;
    height: 1.55rem;
    padding: 0 0.52rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #f8fafc;
    font-weight: 850;
}

.ref-progress-step--ready .ref-progress-num,
.ref-progress-step--collected .ref-progress-num {
    border-color: rgba(253, 230, 138, 0.78);
    color: #ffffff;
    background: rgba(17, 24, 39, 0.2);
}

.ref-progress-label {
    min-height: 1.65rem;
    padding: 0.32rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-size: 0.68rem;
    font-weight: 750;
    max-width: none;
}

.ref-progress-label--done {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.28);
}

.ref-progress-label--done .app-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.ref-progress-collect-btn {
    max-width: 7rem;
    min-height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 42%),
        linear-gradient(135deg, #facc15, #f59e0b);
    color: #111827;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.ref-progress-collect-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.34);
}

@keyframes referral-track-shine {
    0% { transform: translateX(-80%); opacity: 0; }
    35% { opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

@keyframes ref-node-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

@media (max-width: 991px) {
    .ref-progress-card {
        padding: 0.9rem 0.65rem;
    }

    .ref-progress-head {
        align-items: flex-start;
    }

    .ref-progress-track-wrap {
        margin-left: -0.15rem;
        margin-right: -0.15rem;
        padding-bottom: 0.25rem;
    }

    .ref-progress-track {
        min-width: 500px;
    }
}

@media (max-width: 540px) {
    .ref-progress-card {
        padding: 0.72rem 0.55rem;
        background:
            radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
            linear-gradient(180deg, #f8fbff 0%, #eef7f6 100%);
        border-color: rgba(148, 163, 184, 0.32);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    }

    .ref-progress-card::before {
        background: linear-gradient(120deg, rgba(255, 255, 255, 0.72), transparent 36%, rgba(255, 255, 255, 0.45));
    }

    .ref-progress-kicker {
        background: #e0f2fe;
        border-color: #bae6fd;
        color: #0369a1;
    }

    .ref-progress-head h3 {
        color: #0f172a;
        font-size: 0.94rem;
    }

    .ref-progress-count {
        min-width: 3.8rem;
        padding: 0.28rem 0.48rem;
        background: #ffffff;
        border-color: #cbd5e1;
        color: #0f766e;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    .ref-progress-track {
        min-width: 0;
        padding: 0;
    }

    .ref-progress-chest {
        width: 3.65rem;
        height: 3.65rem;
        padding: 0.12rem;
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff, #eef6ff);
        border-color: rgba(203, 213, 225, 0.9);
        box-shadow: inset 0 1px 0 #fff, 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .ref-chest-img--locked {
        filter: grayscale(1) brightness(0.92) contrast(1.05);
        opacity: 0.82;
    }

    .ref-chest-img--claimable {
        filter: drop-shadow(0 8px 14px rgba(245, 158, 11, 0.35));
        opacity: 1;
    }

    .ref-chest-img--collected {
        filter: drop-shadow(0 8px 16px rgba(20, 184, 166, 0.35));
    }

    .ref-progress-step--collected .ref-progress-chest {
        background: linear-gradient(180deg, #f0fdfa, #ccfbf1);
        border-color: rgba(45, 212, 191, 0.72);
    }

    .ref-progress-step--ready .ref-progress-chest {
        background: linear-gradient(180deg, #fffbeb, #fed7aa);
        border-color: rgba(251, 146, 60, 0.7);
        box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12), 0 10px 20px rgba(251, 146, 60, 0.16);
    }

    .ref-progress-step--locked .ref-progress-chest {
        background: linear-gradient(180deg, #f8fafc, #e2e8f0);
        border-color: rgba(203, 213, 225, 0.85);
    }

    .ref-progress-reward--claimable {
        font-size: 0.64rem;
        color: #d97706;
        font-weight: 900;
    }

    .ref-progress-reward--locked {
        color: #94a3b8;
    }

    .ref-progress-reward--done {
        color: #059669;
    }

    .ref-chest-icon {
        width: 1.08rem;
        height: 1.08rem;
        border-radius: 7px;
    }

    .ref-chest-icon .app-icon {
        width: 0.66rem;
        height: 0.66rem;
    }

    .ref-progress-line,
    .ref-progress-line-fill {
        display: none;
    }

    .ref-progress-track-wrap {
        overflow: visible;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }

    .ref-progress-steps {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(4.35rem, 1fr));
        gap: 0.45rem;
    }

    .ref-progress-step {
        position: relative;
        padding: 0.45rem 0.28rem 0.38rem;
        border: 1px solid rgba(203, 213, 225, 0.86);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.92);
        min-width: 0;
        gap: 0.22rem;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    }

    .ref-progress-step--collected {
        border-color: rgba(94, 234, 212, 0.7);
        background: #ecfdf5;
    }

    .ref-progress-step--ready {
        border-color: rgba(253, 186, 116, 0.7);
        background: #fff7ed;
    }

    .ref-progress-num {
        min-width: 1.45rem;
        height: 0.9rem;
        padding: 0 0.28rem;
        font-size: 0.55rem;
        background: #ffffff;
        border-color: #cbd5e1;
        color: #334155;
    }

    .ref-progress-step--ready .ref-progress-num,
    .ref-progress-step--collected .ref-progress-num {
        background: #ffffff;
        border-color: #5eead4;
        color: #0f766e;
    }

    .ref-progress-label,
    .ref-progress-collect-btn {
        max-width: 100%;
        min-height: 1.55rem;
        padding: 0.28rem 0.35rem;
        font-size: 0.54rem;
        line-height: 1.15;
        white-space: normal;
    }

    .ref-progress-label {
        background: #f1f5f9;
        color: #475569;
    }

    .ref-progress-label--done {
        background: #d1fae5;
        color: #047857;
    }

    .ref-chest-lock {
        width: 0.72rem;
        height: 0.72rem;
        right: -0.05rem;
        bottom: -0.05rem;
        border-width: 1px;
    }

    .action-tile-grid,
    .action-tile-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .action-tile {
        min-height: 6.1rem;
        flex-direction: column;
        justify-content: center;
        gap: 0.45rem;
        padding: 0.62rem 0.42rem;
        text-align: center;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    }

    .action-tile-art {
        width: 2.45rem;
        height: 2.45rem;
        flex-basis: 2.45rem;
        border-radius: 8px;
    }

    .action-tile-art .app-icon {
        width: 1.22rem;
        height: 1.22rem;
    }

    .action-tile-text {
        align-items: center;
        gap: 0.12rem;
        width: 100%;
    }

    .action-tile-text strong {
        width: 100%;
        font-size: 0.72rem;
        line-height: 1.15;
        white-space: normal;
    }

    .action-tile-text small {
        display: none;
    }
}

/* Final admin contrast override */
.admin-layout .admin-task-form-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #dbe4ef !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07) !important;
}

.admin-layout .admin-task-form-card h3,
.admin-layout .admin-task-form-card label,
.admin-layout .admin-task-form-card .admin-check-row {
    color: #0f172a !important;
}

.admin-layout .admin-task-form-card .form-group label {
    color: #334155 !important;
}

.admin-layout .admin-task-form-card input,
.admin-layout .admin-task-form-card select,
.admin-layout .admin-task-form-card textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.admin-layout .admin-task-form-card input::placeholder,
.admin-layout .admin-task-form-card textarea::placeholder {
    color: #64748b !important;
}

.admin-banner-preview {
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.admin-banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-banner-item {
    padding: 0.75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.referral-admin-info,
.referral-admin-card {
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.06)),
        #ffffff;
}

.referral-admin-info {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.referral-admin-info h2,
.referral-admin-head h2 {
    margin: 0.25rem 0 0;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1.2;
}

.referral-admin-info p {
    margin: 0.55rem 0 0;
    color: #475569;
    line-height: 1.6;
}

.referral-admin-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.referral-plan-preview {
    display: grid;
    gap: 0.55rem;
}

.referral-plan-preview span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #0f172a;
    font-weight: 800;
}

.referral-plan-preview strong {
    color: #475569;
    font-weight: 750;
}

.referral-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.referral-admin-head p {
    max-width: 44rem;
    margin: 0.45rem 0 0;
    color: #64748b;
    line-height: 1.55;
}

.referral-admin-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-shrink: 0;
}

.referral-milestone-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.referral-milestone-admin {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
}

.referral-milestone-badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.28rem 0.52rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 850;
}

.referral-milestone-title {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.referral-milestone-note {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

.referral-milestone-admin--auto {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        #ffffff;
    border-color: #bfdbfe;
}

.admin-user-control-head,
.admin-reward-collect-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-user-control-head h2 {
    margin: 0.35rem 0 0;
    color: #0f172a;
}

.admin-user-balances {
    display: grid;
    gap: 0.45rem;
    min-width: 180px;
}

.admin-user-balances span {
    padding: 0.55rem 0.7rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 850;
    text-align: right;
}

.admin-user-control-grid,
.admin-user-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-control-box {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-control-box h3 {
    margin: 0 0 0.25rem;
}

.admin-reward-collect-panel {
    margin-bottom: 1rem;
}

.admin-reward-collect-list {
    display: grid;
    gap: 0.7rem;
}

.admin-reward-collect-item {
    padding: 0.85rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        #fff;
}

.admin-reward-collect-item p {
    margin: 0.25rem 0;
    color: #64748b;
}

.admin-reward-collect-item span {
    color: #0f172a;
    font-weight: 850;
}

.notifications-hero-actions form,
.notification-delete-form {
    margin: 0;
}

.notifications-hero-actions form .btn {
    width: 100%;
}

.notification-delete-form {
    margin-top: 0.55rem;
}

.support-hero {
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.1), transparent 34%),
        #ffffff;
}

.support-hero h2 {
    margin: 0.35rem 0;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1rem;
    margin-top: 1rem;
}

.support-form,
.support-list,
.support-admin-ticket {
    border-radius: 8px;
}

.support-ticket-item,
.support-admin-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.support-ticket-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.support-ticket-item:last-child {
    border-bottom: 0;
}

.support-ticket-item p {
    margin: 0.25rem 0;
    color: #64748b;
}

.support-admin-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0;
}

.support-admin-counts span {
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    font-size: 0.78rem;
}

.support-admin-list {
    display: grid;
    gap: 1rem;
}

.support-admin-ticket h3 {
    margin: 0.45rem 0 0.25rem;
}

.support-admin-reply {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

.support-ticket-actions {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.support-chat {
    margin-top: 1rem;
}

.support-chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.support-chat-head h3 {
    margin: 0.35rem 0 0;
}

.support-chat-thread {
    display: grid;
    gap: 0.75rem;
    max-height: 420px;
    overflow-y: auto;
    padding: 1rem 0;
}

.support-chat-thread--admin {
    max-height: 320px;
}

.support-chat-message {
    max-width: min(78%, 620px);
    padding: 0.72rem 0.82rem;
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
}

.support-chat-message--admin {
    justify-self: end;
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.support-chat-message--user {
    justify-self: start;
}

.support-chat-message p {
    margin: 0.25rem 0;
    line-height: 1.45;
}

.support-chat-message time {
    display: block;
    font-size: 0.72rem;
    opacity: 0.72;
}

.support-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.85rem;
}

.support-chat-closed {
    display: flex;
    justify-content: center;
    padding: 1.25rem;
    margin-top: 0.9rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

@media (max-width: 860px) {
    .admin-user-control-head,
    .admin-reward-collect-item {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-balances,
    .admin-user-control-grid,
    .admin-user-history-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-balances span {
        text-align: left;
    }

    .admin-reward-collect-item .btn {
        width: 100%;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .support-ticket-item,
    .support-admin-ticket-head {
        flex-direction: column;
    }

    .support-ticket-actions {
        justify-items: stretch;
        width: 100%;
    }

.support-chat-form {
        grid-template-columns: 1fr;
    }

    .support-chat-message {
        max-width: 92%;
    }
}

/* Landing page */
.home-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.24), transparent 24%),
        radial-gradient(circle at 100% 100%, rgba(20, 184, 166, 0.22), transparent 28%),
        radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.85), transparent 28%),
        linear-gradient(135deg, #f7fafc 0%, #edf5ff 52%, #eefbf7 100%);
    color: #0f172a;
    overflow-x: hidden;
}

.home-shell {
    width: min(1720px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 56px;
}

.home-topbar,
.home-window-bar,
.home-desktop-grid,
.home-mini-grid,
.home-feature-band,
.home-cta-row,
.home-stats,
.home-phone-task,
.home-bottom-cta {
    display: flex;
}

.home-topbar,
.home-bottom-cta,
.home-hero {
    align-items: flex-start;
    justify-content: space-between;
}

.home-topbar {
    gap: 1rem;
    margin-bottom: 18px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.07);
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 850;
    text-decoration: none;
}

.home-brand:hover {
    text-decoration: none;
}

.home-brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.2);
}

.home-nav {
    display: inline-flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.home-nav a {
    padding: 0.58rem 0.9rem;
    border-radius: 999px;
    color: #334155;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.95);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-nav a:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}

.home-main {
    display: grid;
    gap: 1.4rem;
}

.home-hero,
.home-mobile-section,
.home-partner-band,
.home-bottom-cta {
    gap: 1.5rem;
    padding: 1.7rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.08);
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    align-items: stretch;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 24%),
        radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.1), transparent 26%),
        rgba(255, 255, 255, 0.9);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: auto -8% -25% auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 72%);
    pointer-events: none;
}

.home-copy {
    flex: 1 1 48%;
    max-width: 620px;
}

.home-kicker,
.home-section-label {
    display: inline-flex;
    width: fit-content;
    padding: 0.34rem 0.6rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 850;
}

.home-copy h1,
.home-mobile-section h2,
.home-partner-band h2,
.home-bottom-cta h2 {
    margin: 0.9rem 0 0.65rem;
    color: #0f172a;
    line-height: 1.04;
}

.home-copy h1 {
    font-size: clamp(2.6rem, 4vw, 4.5rem);
    max-width: 8.8ch;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0;
    text-wrap: balance;
    line-height: 0.96;
}

.home-copy p,
.home-mobile-section p,
.home-partner-band p {
    max-width: 54ch;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.home-highlight-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.1rem;
}

.home-highlight-strip article,
.home-panel-header,
.home-activity-list article,
.home-phone-progress,
.home-mobile-badges span {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
}

.home-highlight-strip article {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.home-highlight-strip span {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(240, 253, 250, 0.95));
}

.home-highlight-strip strong,
.home-panel-header strong,
.home-activity-list strong,
.home-phone-progress strong {
    display: block;
    color: #0f172a;
}

.home-highlight-strip small,
.home-panel-header small,
.home-activity-list small,
.home-phone-progress small {
    color: #64748b;
    font-size: 0.8rem;
}

.home-cta-row {
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.home-proof-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.home-proof-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: #475569;
    font-size: 0.8rem;
}

.home-proof-row b {
    color: #0f172a;
}

.home-stats {
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.home-stats article,
.home-feature-card {
    min-width: 0;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #fff;
}

.home-stats article {
    flex: 1 1 180px;
}

.home-stats strong,
.home-feature-card strong,
.home-phone-task strong,
.home-ticket-preview strong {
    display: block;
    color: #0f172a;
}

.home-stats span,
.home-feature-card p,
.home-phone-task p,
.home-ticket-preview small,
.home-balance-hero span {
    color: #64748b;
    font-size: 0.84rem;
}

.home-showcase {
    flex: 1 1 44%;
    min-width: 0;
}

.home-desktop-card {
    position: relative;
    margin-top: 0.15rem;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #0f172a;
    box-shadow: 0 36px 90px rgba(15, 23, 42, 0.22);
}

.home-desktop-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.26));
    pointer-events: none;
}

.home-desktop-glow {
    position: absolute;
    inset: -20% auto auto 55%;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.32), transparent 70%);
    pointer-events: none;
}

.home-window-bar {
    gap: 0.35rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-window-bar i {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.home-desktop-grid {
    min-height: 610px;
}

.home-sidebar-preview {
    width: 210px;
    padding: 1.3rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    align-content: start;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.72);
}

.home-sidebar-logo,
.home-sidebar-preview span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.home-sidebar-logo {
    color: #fff;
    margin-bottom: 0.5rem;
}

.home-sidebar-preview .is-active {
    padding: 0.82rem 0.9rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    color: #fff;
}

.home-panel-preview {
    flex: 1;
    padding: 1.45rem;
    display: grid;
    align-content: start;
    gap: 1.1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
}

.home-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
}

.home-balance-hero {
    padding: 1.35rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #fff;
}

.home-balance-hero small,
.home-balance-hero span {
    color: rgba(255, 255, 255, 0.78);
}

.home-balance-hero strong {
    display: block;
    margin: 0.25rem 0;
    font-size: 2rem;
}

.home-balance-hero span {
    display: block;
    max-width: 34ch;
    line-height: 1.5;
}

.home-mini-grid {
    gap: 0.8rem;
}

.home-mini-grid article {
    flex: 1;
    padding: 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.home-mini-grid strong {
    display: block;
    color: #0f172a;
    font-size: 1.35rem;
}

.home-mini-grid span {
    color: #64748b;
    font-size: 0.78rem;
}

.home-ticket-preview {
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.home-activity-list {
    display: grid;
    gap: 0.8rem;
}

.home-activity-list article {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
}

.home-activity-list article > span {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(240, 253, 250, 0.92));
}

.home-pulse-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.home-pulse-row article {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.78), rgba(240, 253, 250, 0.95));
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.home-pulse-row small {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
}

.home-pulse-row strong {
    display: block;
    margin-top: 0.18rem;
    color: #0f172a;
    font-size: 1.08rem;
}

.home-mobile-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.95fr);
    align-items: center;
}

.home-section-copy {
    flex: 1 1 46%;
}

.home-mobile-showcase {
    flex: 1 1 38%;
    display: flex;
    justify-content: center;
}

.home-partner-band {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    align-items: center;
}

.home-partner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-partner-card {
    padding: 1.15rem;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.home-partner-card strong {
    display: block;
    margin-bottom: 0.85rem;
    color: #0f172a;
}

.home-logo-cloud,
.home-flag-cloud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.brand-chip,
.flag-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.brand-mark,
.flag-mark {
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.brand-mark span {
    position: relative;
    z-index: 1;
    color: #fff;
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-label {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.brand-label b {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.1;
}

.brand-label small {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.2;
}

.brand-chip--easypaisa .brand-mark {
    border-radius: 999px;
    background: linear-gradient(135deg, #0f8f47, #62cc5b);
}

.brand-chip--easypaisa .brand-mark span {
    font-size: 1.2rem;
    font-style: italic;
}

.brand-chip--jazzcash .brand-mark {
    background: linear-gradient(135deg, #d81f26, #f97316);
}

.brand-chip--jazzcash .brand-mark::after {
    content: "";
    position: absolute;
    inset: auto -18% -22% auto;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.brand-chip--ubl .brand-mark {
    background:
        linear-gradient(180deg, #0d4f9a 0 75%, #d8262d 75% 100%);
    border-radius: 12px;
}

.brand-chip--ubl .brand-mark span {
    font-size: 0.72rem;
}

.brand-chip--meezan .brand-mark {
    background: linear-gradient(135deg, #0f7a43, #17a34a);
}

.brand-chip--meezan .brand-mark::before {
    content: "";
    position: absolute;
    width: 1.6rem;
    height: 1.6rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.brand-chip--binance .brand-mark {
    background: linear-gradient(135deg, #111827, #1f2937);
}

.brand-chip--binance .brand-mark span {
    color: #facc15;
    font-size: 1.05rem;
}

.flag-mark {
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flag-chip--pk .flag-mark {
    background:
        radial-gradient(circle at 63% 48%, #fff 0 10%, transparent 11%),
        linear-gradient(90deg, #fff 0 24%, #0b7a3d 24% 100%);
}

.flag-chip--ae .flag-mark {
    background:
        linear-gradient(90deg, #dc2626 0 24%, transparent 24% 100%),
        linear-gradient(180deg, #16a34a 0 33.33%, #fff 33.33% 66.66%, #111827 66.66% 100%);
}

.flag-chip--sa .flag-mark {
    background: linear-gradient(180deg, #0f8f47, #117f42);
}

.flag-chip--sa .flag-mark::after {
    content: "";
    position: absolute;
    width: 1.2rem;
    height: 0.12rem;
    background: #fff;
    border-radius: 999px;
}

.flag-chip--qa .flag-mark {
    background:
        linear-gradient(90deg, #fff 0 34%, #7c1d46 34% 100%);
}

.flag-chip--om .flag-mark {
    background:
        linear-gradient(90deg, #dc2626 0 28%, transparent 28% 100%),
        linear-gradient(180deg, #fff 0 33.33%, #dc2626 33.33% 66.66%, #16a34a 66.66% 100%);
}

.home-logo-cloud .brand-chip:last-child,
.home-flag-cloud .flag-chip:last-child {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .home-logo-cloud,
    .home-flag-cloud {
        grid-template-columns: 1fr;
    }

    .home-logo-cloud .brand-chip:last-child,
    .home-flag-cloud .flag-chip:last-child {
        grid-column: auto;
    }
}

.home-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.home-mobile-badges span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
}

.home-mobile-stack {
    position: relative;
    width: min(100%, 380px);
    min-height: 520px;
}

.home-phone {
    position: relative;
    z-index: 2;
    width: min(100%, 320px);
    padding: 0.95rem;
    border-radius: 32px;
    background: linear-gradient(180deg, #0f172a, #111827);
    box-shadow: 0 34px 72px rgba(15, 23, 42, 0.24);
    color: #fff;
}

.home-phone--back {
    position: absolute;
    top: 46px;
    left: 0;
    z-index: 1;
    width: 250px;
    transform: rotate(-8deg);
    opacity: 0.92;
    background: linear-gradient(180deg, #12304f, #0f172a);
}

.home-phone-top,
.home-phone-balance,
.home-phone-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-phone-top {
    padding: 0.3rem 0.2rem 0.9rem;
    color: rgba(255, 255, 255, 0.78);
}

.home-phone-balance {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 1.1rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
}

.home-phone-balance strong {
    font-size: 1.9rem;
}

.home-phone-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.home-phone-progress span,
.home-phone-progress strong,
.home-phone-progress small {
    color: #fff;
}

.home-phone-progress span {
    display: block;
    opacity: 0.72;
    font-size: 0.75rem;
}

.home-phone-progress small {
    max-width: 110px;
    text-align: right;
    opacity: 0.72;
}

.home-phone-task {
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.8rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.home-phone-task.is-locked {
    background: rgba(148, 163, 184, 0.16);
}

.home-phone-task strong,
.home-phone-task p {
    color: #fff;
}

.home-phone-task p {
    opacity: 0.72;
}

.home-phone-nav {
    gap: 0.6rem;
    justify-content: space-around;
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.home-phone-nav span {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
}

.home-phone-nav .is-active {
    color: #fff;
    background: rgba(37, 99, 235, 0.45);
}

.home-feature-band {
    gap: 1rem;
}

.home-feature-card {
    flex: 1;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.home-feature-card span {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    border-radius: 14px;
    background: #dbeafe;
    color: #1d4ed8;
}

.home-bottom-cta {
    background: linear-gradient(135deg, #0f172a 0%, #111827 48%, #0f766e 100%);
    color: #fff;
    align-items: center;
}

.home-bottom-cta h2,
.home-bottom-cta .home-section-label {
    color: #fff;
}

.home-bottom-cta .home-section-label {
    background: rgba(255, 255, 255, 0.12);
}

.home-journey-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-journey-card {
    padding: 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

@media (min-width: 1280px) {
    .home-feature-band {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.1rem;
    }

    .home-journey-band {
        gap: 1.1rem;
    }
}

.home-journey-card small {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.28rem 0.48rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 850;
}

.home-journey-card strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}

.home-journey-card p {
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.88rem;
}

@media (max-width: 991px) {
    .home-shell {
        width: min(100% - 18px, 100%);
        padding: 14px 0 28px;
    }

    .home-topbar {
        flex-wrap: wrap;
        align-items: flex-start;
        margin-bottom: 18px;
        padding: 0.85rem;
    }

    .home-nav {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.45rem;
    }

    .home-nav a {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
        padding: 0.68rem 0.3rem;
        font-size: 0.8rem;
    }

    .home-hero,
    .home-mobile-section,
    .home-partner-band,
    .home-feature-band,
    .home-bottom-cta {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .home-hero,
    .home-mobile-section,
    .home-partner-band,
    .home-bottom-cta {
        padding: 1rem;
        border-radius: 20px;
    }

    .home-copy h1 {
        max-width: none;
        font-size: 2.45rem;
        line-height: 1;
    }

    .home-highlight-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .home-highlight-strip article {
        min-width: 0;
    }

    .home-highlight-strip article strong,
    .home-highlight-strip article small {
        display: block;
    }

    .home-highlight-strip article strong {
        font-size: 0.9rem;
        line-height: 1.15;
    }

    .home-highlight-strip article small {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .home-cta-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .home-cta-row .btn {
        width: 100%;
        min-width: 0;
    }

    .home-proof-row {
        gap: 0.45rem;
    }

    .home-desktop-grid {
        min-height: 0;
        flex-direction: column;
    }

    .home-sidebar-preview {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .home-sidebar-logo {
        grid-column: 1 / -1;
    }

    .home-panel-preview {
        padding: 0.9rem;
    }

    .home-mini-grid,
    .home-feature-band {
        flex-direction: column;
    }

    .home-partner-band,
    .home-partner-grid {
        grid-template-columns: 1fr;
    }

    .home-mobile-stack {
        min-height: 0;
        width: min(100%, 360px);
    }

    .home-phone--back {
        position: relative;
        top: 0;
        width: min(100%, 300px);
        margin: 0 auto -54px;
        left: auto;
    }

    .home-phone {
        width: min(100%, 360px);
        margin: 0 auto;
    }

    .home-journey-band {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .home-brand {
        width: 100%;
    }

    .home-nav a {
        font-size: 0.74rem;
        padding: 0.62rem 0.2rem;
    }

    .home-highlight-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-highlight-strip article {
        padding: 0.8rem;
    }

    .home-highlight-strip article strong {
        font-size: 0.82rem;
    }

    .home-highlight-strip article small {
        font-size: 0.72rem;
    }

    .home-cta-row .btn {
        font-size: 0.78rem;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .home-copy h1 {
        font-size: 1.95rem;
    }

    .home-copy p,
    .home-mobile-section p,
    .home-partner-band p {
        font-size: 0.92rem;
    }

    .home-cta-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-cta-row .btn {
        width: 100%;
    }

    .home-proof-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .home-highlight-strip article,
    .home-panel-header,
    .home-activity-list article {
        padding: 0.85rem;
    }

    .home-mobile-badges {
        display: grid;
        grid-template-columns: 1fr;
    }

    .home-logo-cloud,
    .home-flag-cloud {
        display: grid;
        grid-template-columns: 1fr;
    }

    .home-phone-progress {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-phone-progress small {
        max-width: none;
        text-align: left;
    }

    .home-pulse-row {
        grid-template-columns: 1fr;
    }
}

.referral-milestone-control {
    display: grid;
    gap: 0.45rem;
}

.referral-milestone-control input {
    width: 100%;
    min-height: 46px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 850;
    text-align: center;
}

.referral-milestone-control small {
    color: #64748b;
    line-height: 1.35;
}

@media (max-width: 1100px) {
    .referral-milestone-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .referral-admin-info,
    .referral-admin-card {
        padding: 1rem;
    }

    .referral-admin-info {
        grid-template-columns: 1fr;
    }

    .referral-admin-info h2,
    .referral-admin-head h2 {
        font-size: 1.08rem;
    }

    .referral-admin-head {
        align-items: stretch;
        flex-direction: column;
    }

    .referral-admin-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .referral-admin-head .btn {
        width: 100%;
    }

    .referral-milestone-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .task-item--summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 0.75rem;
    }

    .task-item--summary .task-item-body > strong {
        font-size: 0.95rem;
        line-height: 1.15;
    }

    .task-item--summary .task-item-body > p {
        max-width: none;
        margin-top: 0.22rem;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .task-item--summary .daily-progress {
        max-width: none;
        width: 100%;
    }

    .task-item--summary .task-item-meta {
        display: grid;
        grid-template-columns: max-content 1fr;
        gap: 0.38rem;
        align-items: center;
    }

    .task-item--summary .task-item-action {
        min-width: 0;
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        justify-content: stretch;
    }

    .task-item--summary .task-item-action .badge {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
        padding: 0.45rem 0.6rem;
    }

    .task-item:not(.task-item--daily-ad):not(.task-item--summary) {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 0;
    }

    .task-item:not(.task-item--daily-ad):not(.task-item--summary) .task-item-body > p {
        margin-bottom: 0;
        line-height: 1.45;
    }

    .task-item:not(.task-item--daily-ad):not(.task-item--summary) .task-item-action {
        flex-shrink: 0;
        min-width: 6.5rem;
        width: auto;
        margin-left: auto;
        padding-left: 0.65rem;
        justify-content: flex-end;
    }
}

@media (max-width: 540px) {
    .tasks-daily-grid {
        grid-template-columns: 1fr;
        gap: 0.48rem;
        margin-bottom: 0.6rem;
    }

    .task-item--daily-ad {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        min-width: 0;
        min-height: 0;
        padding: 0.62rem;
        margin-bottom: 0;
        background:
            linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(20, 184, 166, 0.05)),
            #ffffff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
    }

    .task-item--daily-ad-watchable {
        border-color: rgba(37, 99, 235, 0.18);
    }

    .task-item--daily-ad-completed {
        border-color: rgba(20, 184, 166, 0.24);
        background:
            linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(236, 253, 245, 0.7)),
            #ffffff;
    }

    .task-item--daily-ad-locked {
        border-color: rgba(148, 163, 184, 0.45);
        background:
            linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(248, 250, 252, 0.9)),
            #ffffff;
    }

    .task-item--daily-ad .task-item-body > strong {
        font-size: 0.78rem;
        line-height: 1.16;
        color: #0f172a;
    }

    .task-item--daily-ad .task-item-body > p {
        display: block;
        margin: 0.12rem 0 0;
        color: #64748b;
        font-size: 0.62rem;
        line-height: 1.12;
    }

    .task-item--daily-ad .task-item-meta {
        gap: 0.25rem;
        margin-top: 0.3rem;
        font-size: 0.6rem;
        line-height: 1.1;
    }

    .task-item--daily-ad .task-item-meta > span:not(.badge) {
        display: none;
    }

    .task-item--daily-ad .badge {
        padding: 0.2rem 0.38rem;
        border-radius: 6px;
        font-size: 0.58rem;
        line-height: 1.08;
        white-space: normal;
    }

    .task-item--daily-ad .task-item-action {
        min-width: 6.5rem;
        width: auto;
        margin-left: 0;
        padding-left: 0;
    }

    .tasks-section-title {
        margin: 0.55rem 0 0.4rem;
        padding-top: 0.55rem;
        font-size: 0.66rem;
    }
}

.mobile-page-banner {
    display: none;
}

/* Auth experience */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.24), transparent 24%),
        radial-gradient(circle at 100% 100%, rgba(20, 184, 166, 0.2), transparent 28%),
        linear-gradient(135deg, #f7fafc 0%, #edf5ff 52%, #eefbf7 100%);
}

.auth-shell {
    width: min(1380px, 100%);
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
        align-items: center;
    }
}

.auth-hero-panel,
.auth-card--form {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.08);
}

.auth-hero-panel {
    padding: 1.15rem;
    display: grid;
    align-content: start;
    gap: 0.7rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 24%),
        radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.1), transparent 26%),
        rgba(255, 255, 255, 0.9);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #0f172a;
    font-size: 1.12rem;
    font-weight: 900;
    text-decoration: none;
}

.auth-brand:hover {
    text-decoration: none;
}

.auth-brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.2);
}

.auth-kicker,
.auth-card-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 850;
}

.auth-hero-panel h1,
.auth-card-head h2 {
    margin: 0.85rem 0 0.55rem;
    color: #0f172a;
}

.auth-hero-panel h1 {
    max-width: 6.2ch;
    font-size: clamp(1.7rem, 2vw, 2.55rem);
    line-height: 0.98;
    font-weight: 900;
}

.auth-hero-panel p,
.auth-card-head p {
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.7;
}

.auth-feature-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.15rem;
}

.auth-feature-list article {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.auth-feature-list article > span {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(240, 253, 250, 0.95));
}

.auth-feature-list strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
}

.auth-feature-list small {
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.25;
}

.auth-card--form {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    align-self: stretch;
    box-sizing: border-box;
}

.auth-card--wide {
    max-width: min(760px, 100%);
}

.auth-captcha-block {
    width: 100%;
    margin-bottom: 0;
}

.auth-captcha-inline {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.auth-captcha-inline .auth-captcha-box {
    flex: 0 0 auto;
    margin: 0;
    min-height: 0;
    padding: 0.45rem 0.55rem;
    gap: 0.28rem;
}

.auth-captcha-inline .auth-captcha-box span {
    min-width: 1.55rem;
    height: 1.55rem;
    font-size: 0.88rem;
}

.auth-captcha-inline input {
    flex: 1 1 6rem;
    min-width: 0;
    width: auto;
    margin: 0;
    align-self: stretch;
}

.auth-form--register .auth-captcha-block {
    margin-top: 0.35rem;
    margin-bottom: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e2e8f0;
}

.auth-step-short {
    display: none;
}

.auth-step-full {
    display: inline;
}

html:has(body.auth-page),
body.auth-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body.auth-page .auth-shell,
body.auth-page .auth-card--form,
body.auth-page .auth-form,
body.auth-page .auth-form-grid,
body.auth-page .auth-form-grid > *,
body.auth-page .form-group,
body.auth-page input,
body.auth-page select,
body.auth-page .password-field {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    body.auth-page .notif-toast-stack {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-width: none;
        transform: none;
    }
}

@media (min-width: 992px) {
    body.auth-page .notif-toast-stack {
        left: auto;
        right: 1rem;
        width: min(360px, calc(100vw - 2rem));
        max-width: 360px;
        transform: none;
    }
}

.auth-card-head {
    margin-bottom: 0.85rem;
}

.auth-form {
    display: grid;
    gap: 0.95rem;
}

.auth-inline-points,
.auth-step-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.auth-inline-points span,
.auth-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-step.is-active {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(240, 253, 250, 0.95));
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.18);
}

.auth-card--form .form-group label {
    color: #334155;
    font-weight: 800;
}

.auth-input-hint {
    display: block;
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}

.auth-card--form input:not([type="checkbox"]),
.auth-card--form select {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.96);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.auth-card--form input:not([type="checkbox"]):focus,
.auth-card--form select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-card--form .password-field input {
    padding-right: 3.2rem;
}

.auth-card--form .password-eye {
    right: 0.75rem;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.auth-form-grid-span {
    grid-column: 1 / -1;
}

.auth-captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-height: 54px;
    padding: 0.7rem 0.85rem;
    border-radius: 16px;
    border: 1px dashed rgba(37, 99, 235, 0.22);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
}

.auth-captcha-inline input {
    border-radius: 16px;
}

.auth-captcha-box span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.95);
    color: #1e3a8a;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.auth-bot-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.2rem 0 1rem;
    color: #64748b;
    font-weight: 700;
    line-height: 1.2;
}

.auth-form-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.auth-support-link {
    color: #2563eb;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-support-link:hover {
    text-decoration: underline;
}

.remember-row input {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
    border-radius: 4px;
    border: 1.5px solid #94a3b8;
    background: #ffffff;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.remember-row input::after {
    content: "";
    width: 0.34rem;
    height: 0.62rem;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 0.14s ease;
}

.remember-row input:checked {
    background: #2563eb;
    border-color: #2563eb;
}

.remember-row input:checked::after {
    transform: rotate(45deg) scale(1);
}

.auth-card--form .btn-block {
    min-height: 56px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 850;
}

.auth-footer {
    margin-top: 1rem;
    color: #64748b;
    text-align: center;
}

.auth-footer a {
    font-weight: 800;
}

@media (max-width: 991px) {
    .whatsapp-float {
        right: 0.75rem;
        bottom: 0.85rem;
        min-height: 3rem;
        padding: 0.48rem 0.72rem 0.48rem 0.5rem;
        gap: 0.55rem;
    }

    .whatsapp-float--user {
        bottom: calc(var(--footer-h) + 0.95rem);
    }

    .whatsapp-float-copy strong {
        font-size: 0.8rem;
    }

    .whatsapp-float-copy small {
        font-size: 0.64rem;
    }
}

@media (max-width: 640px) {
    .whatsapp-float {
        min-width: 0;
        padding-right: 0.68rem;
    }

    .whatsapp-float-copy small {
        display: none;
    }
}

@media (max-width: 420px) {
    .whatsapp-float {
        right: 0.7rem;
        border-radius: 18px;
    }

    .whatsapp-float-copy strong {
        max-width: 8.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 360px) {
    .whatsapp-float-copy {
        display: none;
    }

    .whatsapp-float {
        padding-right: 0.5rem;
    }

    .whatsapp-float-icon {
        width: 2.1rem;
        height: 2.1rem;
        flex-basis: 2.1rem;
    }
}

@media (min-width: 992px) {
    .whatsapp-float--user {
        bottom: 1rem;
    }
}

@media (max-width: 991px) {
    body.auth-page--register {
        padding: 0.7rem 0.6rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        background:
            radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18), transparent 38%),
            radial-gradient(circle at 100% 100%, rgba(20, 184, 166, 0.12), transparent 30%),
            linear-gradient(180deg, #e8f1ff 0%, #f4f8ff 100%);
    }

    body.auth-page--register .auth-shell {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    body.auth-page--register .auth-card.auth-card--form {
        width: 100%;
        max-width: 100% !important;
        margin: 0;
        border-radius: 20px;
        border: 1.5px solid #b8cbe2;
        box-shadow:
            0 18px 44px rgba(15, 23, 42, 0.12),
            0 2px 0 rgba(255, 255, 255, 0.85) inset;
        background: #ffffff;
        padding: 1rem 0.9rem calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    body.auth-page--register .auth-card-head {
        margin-bottom: 0.85rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #dbe4f0;
    }

    body.auth-page--register .auth-card-head h2 {
        color: #0f172a;
    }

    body.auth-page--register .auth-card-head p,
    body.auth-page--register .auth-step-row {
        display: none;
    }

    body.auth-page--register .auth-form--register .form-group {
        padding: 0;
        margin-bottom: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body.auth-page--register .auth-form--register .form-group label {
        text-transform: none;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0;
        color: #334155;
        overflow-wrap: anywhere;
    }

    body.auth-page--register .auth-form--register input:not([type="checkbox"]),
    body.auth-page--register .auth-form--register select {
        border: 1.5px solid #b8c9e0;
        background: #ffffff;
        color: #0f172a;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }

    body.auth-page--register .auth-form--register input:not([type="checkbox"]):focus,
    body.auth-page--register .auth-form--register select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    }

    body.auth-page--register .auth-captcha-inline .auth-captcha-box {
        border: 1.5px dashed #7fa8e8;
        background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
    }

    body.auth-page--register .auth-captcha-inline .auth-captcha-box span {
        border: 1px solid #bfdbfe;
        background: #ffffff;
        color: #1e3a8a;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
    }

    body.auth-page--register .auth-captcha-block label {
        color: #334155;
        font-weight: 700;
    }

    body.auth-page--register .auth-card--form .btn-block {
        box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
    }

    .auth-page {
        padding: 0.5rem 0.45rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
        background:
            radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.14), transparent 32%),
            radial-gradient(circle at 100% 100%, rgba(20, 184, 166, 0.1), transparent 24%),
            linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
    }

    .auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .auth-card--form {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
        background:
            radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.06), transparent 22%),
            radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.05), transparent 24%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
        border: 1px solid rgba(214, 227, 243, 0.98);
    }

    .auth-card--wide {
        max-width: 100%;
    }

    .auth-hero-panel {
        display: none !important;
    }

    .auth-hero-panel,
    .auth-card--form {
        border-radius: 24px;
        padding: 0.95rem;
    }

    .auth-card-head {
        margin-bottom: 0.7rem;
        padding-bottom: 0.7rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    }

    .auth-card-head h2 {
        font-size: clamp(1.25rem, 5.5vw, 1.5rem);
        line-height: 1.12;
        margin-bottom: 0.2rem;
        color: #0f172a;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .auth-form--register .auth-form-grid {
        gap: 0.45rem;
    }

    .auth-captcha-inline {
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .auth-captcha-inline .auth-captcha-box {
        padding: 0.4rem 0.45rem;
    }

    .auth-captcha-inline .auth-captcha-box span {
        min-width: 1.4rem;
        height: 1.4rem;
        font-size: 0.82rem;
    }

    .auth-card-head p {
        font-size: 0.84rem;
        line-height: 1.38;
        color: #475569;
    }

    .auth-step-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.28rem;
        padding: 0.28rem;
        border-radius: 16px;
        background: #f4f8ff;
        border: 1px solid rgba(226, 232, 240, 0.9);
    }

    .auth-step {
        padding: 0.56rem 0.25rem;
        border-radius: 12px;
        font-size: 0.72rem;
        text-align: center;
        background: transparent;
        border: 0;
        color: #475569;
    }

    .auth-step.is-active {
        color: #1d4ed8;
        background: linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(240, 253, 250, 0.96));
        box-shadow: none;
    }

    .auth-form {
        gap: 0.65rem;
    }

    .auth-card--form .form-group {
        margin-bottom: 0;
        padding: 0.55rem 0.55rem 0.48rem;
        border-radius: 14px;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        min-width: 0;
    }

    .auth-form--register .auth-input-hint--soft {
        display: none;
    }

    .auth-card--form .form-group label {
        display: block;
        margin-bottom: 0.42rem;
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: #334155;
    }

    .auth-card--form input:not([type="checkbox"]),
    .auth-card--form select {
        min-height: 44px;
        border-radius: 12px;
        background: #f8fbff;
        border: 1.5px solid #d6e3f3;
        color: #0f172a;
        font-size: 16px;
        padding-left: 0.75rem;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }

    .auth-card--form input:not([type="checkbox"])::placeholder {
        color: #6b7280;
    }

    .auth-card--form select {
        color: #0f172a;
    }

    .auth-card--form .password-eye {
        color: #94a3b8;
    }

    .auth-input-hint {
        font-size: 0.72rem;
        line-height: 1.22;
        margin-top: 0.24rem;
        color: #64748b;
    }

    .auth-captcha-box {
        min-height: 44px;
        padding: 0.5rem 0.55rem;
        gap: 0.32rem;
    }

    .auth-captcha-box span {
        min-width: 1.65rem;
        height: 1.65rem;
        border-radius: 9px;
        font-size: 0.86rem;
    }

    .auth-card--form .btn-block {
        min-height: 48px;
        border-radius: 14px;
        font-size: 0.95rem;
        box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
        animation: none !important;
        background-image: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 46%), linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #155e75 100%) !important;
        border-color: rgba(255, 255, 255, 0.18);
    }

    .auth-footer {
        margin-top: 0.75rem;
        padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
        font-size: 0.84rem;
        color: #64748b;
    }

    .auth-form-tools {
        align-items: center;
        gap: 0.7rem;
    }

    .remember-row {
        font-size: 0.88rem;
        white-space: normal;
    }

    .auth-footer a,
    .auth-card-kicker {
        color: #2563eb;
    }

    .btn-primary,
    .btn-success,
    .btn-danger,
    .btn-warning,
    .btn-light,
    .btn-outline,
    .btn-outline-light {
        animation: none !important;
    }
}

@media (max-width: 540px) {
    .auth-page {
        padding: 0.35rem 0.3rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }

    body.auth-page--register {
        padding: 0.55rem 0.5rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    body.auth-page--register .auth-card.auth-card--form {
        border-radius: 18px;
        padding: 0.9rem 0.8rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
    }

    .auth-shell {
        width: 100%;
        max-width: 100%;
    }

    .auth-hero-panel,
    .auth-card--form {
        padding: 0.72rem 0.68rem;
        border-radius: 18px;
    }

    .auth-step-short {
        display: inline;
    }

    .auth-step-full {
        display: none;
    }

    .auth-kicker,
    .auth-card-kicker {
        margin-top: 0;
        font-size: 0.68rem;
    }

    .auth-card-head {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .auth-card-head h2 {
        font-size: 1.22rem;
    }

    .auth-card-head p {
        font-size: 0.78rem;
        line-height: 1.32;
    }

    .auth-card--form .form-group {
        padding: 0.48rem 0.48rem 0.42rem;
        border-radius: 12px;
    }

    .auth-card--form .form-group label {
        margin-bottom: 0.32rem;
        font-size: 0.68rem;
    }

    .auth-step {
        font-size: clamp(0.58rem, 2.6vw, 0.66rem);
        line-height: 1.08;
        padding: 0.48rem 0.15rem;
    }

    .auth-step-row {
        gap: 0.2rem;
        padding: 0.22rem;
        margin-bottom: 0.65rem;
    }

    .auth-card--form input:not([type="checkbox"]),
    .auth-card--form select {
        min-height: 42px;
        font-size: 16px;
        padding-left: 0.72rem;
    }

    .auth-step-row,
    .auth-card--form .form-group,
    .auth-card--form,
    .auth-card--form .btn-block {
        width: 100%;
        max-width: 100%;
    }

    .auth-card--form .btn-block {
        min-height: 50px;
        font-size: 0.96rem;
    }

    .auth-captcha-box {
        min-height: 46px;
        padding: 0.52rem 0.6rem;
        gap: 0.32rem;
    }

    .auth-captcha-box span {
        min-width: 1.72rem;
        height: 1.72rem;
        border-radius: 9px;
        font-size: 0.84rem;
    }

    .auth-form-tools {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .remember-row {
        gap: 0.5rem;
        font-size: 0.82rem;
    }
}

.reward-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
}

.reward-modal.hidden {
    display: none;
}

.reward-modal-card {
    width: min(92vw, 360px);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.16), transparent 34%),
        #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    animation: reward-pop 0.22s ease-out;
}

.reward-modal-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0 auto 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.reward-modal-icon .app-icon {
    width: 1.55rem;
    height: 1.55rem;
}

.reward-modal h3 {
    margin: 0 0 0.3rem;
    color: #0f172a;
}

.reward-modal p {
    margin: 0;
    color: #475569;
    font-weight: 800;
}

.reward-modal-bar {
    height: 0.35rem;
    margin-top: 1rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.reward-modal-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #2563eb);
    animation: reward-bar 1.2s linear forwards;
}

.reward-modal.is-error .reward-modal-icon,
.reward-modal.is-error .reward-modal-bar span {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes reward-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reward-bar {
    from { width: 100%; }
    to { width: 0; }
}

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.payment-method-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    background: #f8fbff;
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.payment-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-option:has(input:checked) {
    border-color: rgba(37, 99, 235, 0.55);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

@media (max-width: 991px) {
    .payment-method-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .mobile-page-banner {
        position: relative;
        display: none;
        margin: 0.15rem 0 0.75rem;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    }

    .mobile-page-banner.is-ready {
        display: block;
    }

    .mobile-banner-track {
        display: flex;
        transition: transform 0.45s ease;
    }

    .mobile-banner-slide {
        min-width: 100%;
        display: block;
    }

    .mobile-banner-slide img {
        width: 100%;
        aspect-ratio: 3 / 1;
        object-fit: cover;
        display: block;
    }

    .mobile-banner-dots {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0.35rem;
        display: flex;
        justify-content: center;
        gap: 0.28rem;
        pointer-events: none;
    }

    .mobile-banner-dots span {
        width: 0.42rem;
        height: 0.42rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.55);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    }

    .mobile-banner-dots span.active {
        width: 1rem;
        background: #fff;
    }
}
