/* SNDK UI v3 · authentication and user workspace */

body.ui-v3 .v3-kicker {
    display: block;
    color: var(--v3-gold-bright);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .16em;
    text-transform: uppercase;
}

body.ui-v3 .v3-brand-lockup,
body.ui-v3 .v3-profile-identity,
body.ui-v3 .v3-panel-heading,
body.ui-v3 .v3-section-head > div,
body.ui-v3 .v3-page-command,
body.ui-v3 .v3-auth-compact-head {
    display: flex;
    align-items: center;
    min-width: 0;
}

body.ui-v3 .v3-brand-lockup { gap: 10px; }
body.ui-v3 .v3-brand-lockup img { flex: 0 0 auto; border-radius: 12px; }
body.ui-v3 .v3-brand-lockup div { min-width: 0; }
body.ui-v3 .v3-brand-lockup strong,
body.ui-v3 .v3-brand-lockup span { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-brand-lockup strong { color: var(--v3-text); font-size: 15px; font-weight: 900; letter-spacing: .02em; }
body.ui-v3 .v3-brand-lockup span { margin-top: 1px; color: var(--v3-muted); font-size: 10px; font-weight: 700; }

body.ui-v3 .v3-back-button,
body.ui-v3 .v3-icon-button,
body.ui-v3 .v3-sheet-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    color: var(--v3-text);
    background: var(--v3-surface);
    border: 1px solid var(--v3-line-strong);
    border-radius: 13px;
    box-shadow: var(--v3-shadow-soft);
}

body.ui-v3 .v3-back-button svg,
body.ui-v3 .v3-icon-button svg,
body.ui-v3 .v3-command-icon svg,
body.ui-v3 .v3-action-icon svg,
body.ui-v3 .v3-row-arrow,
body.ui-v3 .v3-primary-action > svg,
body.ui-v3 .v3-team-invite button svg,
body.ui-v3 .v3-share-link button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.ui-v3 .v3-page-command,
body.ui-v3 .v3-auth-compact-head {
    position: relative;
    width: min(100%, var(--v3-content));
    margin-inline: auto;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top)) var(--v3-space) 14px;
}

body.ui-v3 .v3-page-command::after,
body.ui-v3 .v3-auth-compact-head::after {
    content: "";
    position: absolute;
    inset: auto var(--v3-space) 0;
    height: 1px;
    background: linear-gradient(90deg, var(--v3-gold), rgba(139,92,246,.68), transparent 82%);
}

body.ui-v3 .v3-page-command > div:not(.v3-brand-lockup) { min-width: 0; flex: 1; }
body.ui-v3 .v3-page-command h1,
body.ui-v3 .v3-auth-compact-head h1 {
    margin: 3px 0 0;
    color: var(--v3-text);
    font-size: clamp(19px, 5.5vw, 25px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

body.ui-v3 .v3-command-icon,
body.ui-v3 .v3-action-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, var(--v3-purple), #6d3ce7);
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 9px 22px rgba(109,60,231,.25);
}

body.ui-v3 .v3-command-icon { width: 46px; height: 46px; border-radius: 14px; }
body.ui-v3 .v3-command-icon.is-gold,
body.ui-v3 .v3-action-icon.is-gold { color: #2f2100; background: linear-gradient(135deg, #ffd66b, #f6a928); box-shadow: 0 9px 22px rgba(246,183,60,.22); }
body.ui-v3 .v3-action-icon.is-blue { background: linear-gradient(135deg, #5aa5ff, #346de1); }
body.ui-v3 .v3-action-icon.is-pink { background: linear-gradient(135deg, #fb71b5, #d93f91); }
body.ui-v3 .v3-action-icon.is-red { background: linear-gradient(135deg, #fb7185, #d8415a); }

/* Authentication command center */
body.ui-v3.ui-v2-login { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
body.ui-v3 .v3-auth {
    width: min(100%, 600px);
    min-height: 100dvh;
    padding: 0 var(--v3-space) calc(20px + env(safe-area-inset-bottom));
}

body.ui-v3 .v3-auth-command {
    position: relative;
    min-height: 278px;
    margin-inline: calc(var(--v3-space) * -1);
    padding: calc(12px + env(safe-area-inset-top)) var(--v3-space) 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 35%, rgba(246,183,60,.2), transparent 10rem),
        linear-gradient(145deg, #111a2d 0%, #171a36 58%, #392173 100%);
    border-bottom: 1px solid rgba(246,183,60,.28);
}

body.ui-v3 .v3-auth-command::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(135deg, #000, transparent 78%);
}

body.ui-v3 .v3-auth-command-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.ui-v3 .v3-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    max-width: 48%;
    padding: 7px 10px;
    color: #dce5f4;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    background: rgba(8,13,25,.45);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    overflow-wrap: anywhere;
}
body.ui-v3 .v3-status-pill i { width: 7px; height: 7px; margin-right: 7px; flex: 0 0 auto; background: var(--v3-green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(56,217,150,.13); }

body.ui-v3 .v3-auth-command-copy { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: end; gap: 8px; min-height: 145px; padding-top: 22px; }
body.ui-v3 .v3-auth-command-copy > div { min-width: 0; position: relative; z-index: 2; }
body.ui-v3 .v3-auth-command-copy h1,
body.ui-v3 .v3-auth-banner h1 {
    margin: 6px 0 6px;
    color: #fff;
    font-size: clamp(28px, 8.6vw, 42px);
    font-weight: 950;
    line-height: .98;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}
body.ui-v3 .v3-auth-command-copy p,
body.ui-v3 .v3-auth-banner p { margin: 0; color: #bdc9db; font-size: 12px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }

body.ui-v3 .v3-auth-art { position: relative; align-self: stretch; min-width: 0; margin: 0; }
body.ui-v3 .v3-auth-art img { position: absolute; right: -50px; bottom: -24px; width: 220px; max-width: none; height: 178px; object-fit: cover; object-position: 63% center; filter: saturate(1.08) contrast(1.02); }
body.ui-v3 .v3-art-glow { position: absolute; right: -20px; bottom: -18px; width: 150px; height: 150px; background: radial-gradient(circle, rgba(246,183,60,.32), transparent 64%); }

body.ui-v3 .v3-auth-metrics { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 8px; border-top: 1px solid rgba(255,255,255,.1); }
body.ui-v3 .v3-auth-metrics span { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 10px 6px 0; color: #9eabc0; font-size: 10px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
body.ui-v3 .v3-auth-metrics i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--v3-gold); }

body.ui-v3 .v3-auth-panel,
body.ui-v3 .v3-settings-panel,
body.ui-v3 .v3-payout-panel,
body.ui-v3 .v3-account-panel,
body.ui-v3 .v3-qr-panel,
body.ui-v3 .v3-share-panel,
body.ui-v3 .v3-invite-stats,
body.ui-v3 .v3-team-finance,
body.ui-v3 .v3-team-members,
body.ui-v3 .v3-team-rewards {
    background: linear-gradient(145deg, rgba(25,35,55,.96), rgba(14,21,37,.98));
    border: 1px solid var(--v3-line);
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow-soft);
}

body.ui-v3 .v3-auth-login > .v3-auth-panel { position: relative; z-index: 3; margin-top: -18px; }
body.ui-v3 .v3-auth-panel { padding: 18px; }
body.ui-v3 .v3-panel-heading { gap: 12px; margin-bottom: 18px; }
body.ui-v3 .v3-panel-number,
body.ui-v3 .v3-section-index {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #2e2104;
    font-size: 10px;
    font-weight: 950;
    background: var(--v3-gold);
    border-radius: 9px;
}
body.ui-v3 .v3-panel-number { width: 38px; height: 38px; }
body.ui-v3 .v3-section-index { width: 34px; height: 34px; }
body.ui-v3 .v3-panel-heading > div,
body.ui-v3 .v3-section-head > div > div { min-width: 0; }
body.ui-v3 .v3-panel-heading h2,
body.ui-v3 .v3-section-head h2 { margin: 0; color: var(--v3-text); font-size: 16px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
body.ui-v3 .v3-panel-heading p,
body.ui-v3 .v3-section-head p { margin: 3px 0 0; color: var(--v3-muted); font-size: 11px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }

body.ui-v3 .v3-form { display: grid; gap: 10px; }
body.ui-v3 .v3-registration-form { margin: 0; }
body.ui-v3 .v3-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
body.ui-v3 .v3-field { display: grid; min-width: 0; gap: 6px; }
body.ui-v3 .v3-field-wide { grid-column: 1 / -1; }
body.ui-v3 .v3-form label,
body.ui-v3 .v3-label-row label {
    min-width: 0;
    margin: 0;
    color: var(--v3-muted-strong);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
body.ui-v3 .v3-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
body.ui-v3 .v3-inline-action {
    min-height: 44px;
    max-width: 55%;
    padding: 8px 0 8px 10px;
    color: var(--v3-gold-bright);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
    line-height: 1.2;
    background: transparent;
    border: 0;
    overflow-wrap: anywhere;
}

body.ui-v3 .v3-input,
body.ui-v3 .v3-select {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 52px;
    background: rgba(8,13,25,.64);
    border: 1px solid var(--v3-line-strong);
    border-radius: 13px;
}
body.ui-v3 .v3-input:focus-within,
body.ui-v3 .v3-select:focus-within { border-color: rgba(246,183,60,.72); box-shadow: 0 0 0 3px rgba(246,183,60,.1); }
body.ui-v3 .v3-input.is-invalid { border-color: rgba(251,113,133,.85); box-shadow: 0 0 0 3px rgba(251,113,133,.1); }
body.ui-v3 .v3-input svg { width: 20px; height: 20px; margin-left: 14px; flex: 0 0 auto; fill: none; stroke: var(--v3-purple); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.ui-v3 .v3-input input,
body.ui-v3 .v3-share-link input,
body.ui-v3 .v3-team-invite input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 10px 13px;
    color: var(--v3-text);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.2;
    background: transparent;
    border: 0;
    outline: 0;
}
body.ui-v3 .v3-input input::placeholder { color: #68758b; opacity: 1; }
body.ui-v3 .v3-select::after { content: ""; position: absolute; right: 12px; width: 7px; height: 7px; pointer-events: none; border-right: 2px solid var(--v3-muted); border-bottom: 2px solid var(--v3-muted); transform: rotate(45deg) translateY(-2px); }
body.ui-v3 .v3-select select {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 8px 32px 8px 12px;
    color: var(--v3-text);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    outline: 0;
}
body.ui-v3 .v3-select option,
body.ui-v3 .v3-select optgroup { color: #e8edf5; background: #101827; }
body.ui-v3 .v3-select[hidden],
body.ui-v3 .v3-select:has(select:empty) { display: none; }

body.ui-v3 .v3-phone-row,
body.ui-v3 .v3-code-row { display: grid; grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
body.ui-v3 .v3-code-row { grid-template-columns: minmax(0, 1fr) minmax(104px, .42fr); }
body.ui-v3 .v3-code-action {
    min-width: 0;
    min-height: 52px;
    padding: 8px 10px;
    color: #2e2104;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.18;
    background: linear-gradient(135deg, var(--v3-gold-bright), var(--v3-gold));
    border: 0;
    border-radius: 13px;
    overflow-wrap: anywhere;
}
body.ui-v3 .v3-code-action:disabled { color: var(--v3-muted); background: var(--v3-surface-soft); opacity: .78; }

body.ui-v3 .v3-primary-action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 11px 16px;
    color: #261a03;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffd66b, #f5a928);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 11px 25px rgba(246,183,60,.2);
    overflow-wrap: anywhere;
}
body.ui-v3 .v3-primary-action > svg { position: absolute; right: 15px; }
body.ui-v3 .v3-primary-action:disabled { opacity: .68; cursor: wait; }
body.ui-v3 .v3-primary-action .button-loader { display: none; width: 16px; height: 16px; border: 2px solid rgba(38,26,3,.25); border-top-color: #261a03; border-radius: 50%; animation: v3-spin .7s linear infinite; }
body.ui-v3 .v3-primary-action.is-loading .button-loader { display: block; }
body.ui-v3 .v3-primary-action.is-loading > svg { display: none; }
body.ui-v3 .v3-form-error { margin: 0; padding: 10px 12px; color: #ffd2da; font-size: 12px; font-weight: 700; line-height: 1.4; background: rgba(251,113,133,.11); border: 1px solid rgba(251,113,133,.3); border-radius: 11px; overflow-wrap: anywhere; }
body.ui-v3 .v3-form-error[hidden] { display: none; }

body.ui-v3 .v3-auth-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 15px; }
body.ui-v3 .v3-auth-shortcuts a { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px; min-height: 64px; padding: 10px; color: var(--v3-muted-strong); font-size: 11px; font-weight: 800; line-height: 1.2; background: rgba(8,13,25,.45); border: 1px solid var(--v3-line); border-radius: 13px; overflow-wrap: anywhere; }
body.ui-v3 .v3-shortcut-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--v3-gold-bright); background: var(--v3-gold-soft); border-radius: 11px; }
body.ui-v3 .v3-shortcut-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.ui-v3 .v3-auth-shortcuts small { position: absolute; top: 6px; right: 7px; color: #566176; font-size: 10px; font-weight: 900; }

body.ui-v3 .v3-auth-compact-head { justify-content: flex-start; }
body.ui-v3 .v3-auth-compact-head .v3-brand-lockup { min-width: 0; flex: 1; }
body.ui-v3 .v3-step-badge { display: grid; place-items: center; min-width: 44px; min-height: 30px; padding: 6px 8px; color: var(--v3-gold-bright); font-size: 9px; font-weight: 950; background: var(--v3-gold-soft); border: 1px solid rgba(246,183,60,.25); border-radius: 999px; }
body.ui-v3 .v3-auth-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) 115px;
    align-items: center;
    min-height: 142px;
    margin-top: 14px;
    padding: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #34216d, #171a32 66%);
    border: 1px solid rgba(139,92,246,.35);
    border-radius: var(--v3-radius-lg);
}
body.ui-v3 .v3-auth-banner > div { min-width: 0; position: relative; z-index: 2; }
body.ui-v3 .v3-auth-banner h1 { font-size: clamp(23px, 7vw, 34px); }
body.ui-v3 .v3-auth-banner figure { position: relative; align-self: stretch; margin: 0; }
body.ui-v3 .v3-auth-banner figure img { position: absolute; width: 190px; max-width: none; height: 145px; right: -50px; bottom: -20px; object-fit: cover; object-position: 62% center; }
body.ui-v3 .v3-auth-banner-sms { background: linear-gradient(135deg, #152849, #171a32 66%); border-color: rgba(79,140,255,.34); }
body.ui-v3 .v3-register-panel,
body.ui-v3 .v3-sms-panel { margin-top: 12px; }
body.ui-v3 .v3-form-section { padding: 13px 0; border-bottom: 1px solid var(--v3-line); }
body.ui-v3 .v3-form-section:first-child { padding-top: 0; }
body.ui-v3 .v3-form-section header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
body.ui-v3 .v3-form-section header > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; color: var(--v3-gold-bright); font-size: 9px; font-weight: 950; background: var(--v3-gold-soft); border-radius: 9px; }
body.ui-v3 .v3-form-section header div { min-width: 0; }
body.ui-v3 .v3-form-section header strong,
body.ui-v3 .v3-form-section header small { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-form-section header strong { color: var(--v3-text); font-size: 12px; font-weight: 900; }
body.ui-v3 .v3-form-section header small { color: var(--v3-muted); font-size: 10px; }
body.ui-v3 .v3-form-section-accent { border-bottom: 0; }
body.ui-v3 .v3-text-link { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; padding: 8px; color: var(--v3-muted-strong); font-size: 12px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
body.ui-v3 .v3-process-rail { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 0; margin: 0 0 18px; list-style: none; }
body.ui-v3 .v3-process-rail li { position: relative; display: flex; align-items: center; }
body.ui-v3 .v3-process-rail li::after { content: ""; flex: 1; height: 2px; background: var(--v3-line-strong); }
body.ui-v3 .v3-process-rail li:last-child::after { display: none; }
body.ui-v3 .v3-process-rail span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--v3-muted); font-size: 9px; font-weight: 900; border: 1px solid var(--v3-line-strong); border-radius: 50%; }
body.ui-v3 .v3-process-rail .active span { color: #2e2104; background: var(--v3-gold); border-color: var(--v3-gold); }
body.ui-v3 .v3-auth-note,
body.ui-v3 .v3-security-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px; color: var(--v3-muted); background: rgba(56,217,150,.08); border: 1px solid rgba(56,217,150,.18); border-radius: 12px; }
body.ui-v3 .v3-auth-note > span,
body.ui-v3 .v3-security-note > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; color: var(--v3-green); background: var(--v3-green-soft); border-radius: 9px; }
body.ui-v3 .v3-auth-note svg,
body.ui-v3 .v3-security-note svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v3 .v3-auth-note p,
body.ui-v3 .v3-security-note p { margin: 0; min-width: 0; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }

/* Reset password bottom sheet */
body.ui-v3.v3-sheet-open { overflow: hidden; }
body.ui-v3 .v3-sheet[hidden] { display: none !important; }
body.ui-v3 .v3-sheet { position: fixed; inset: 0; z-index: 1200; display: grid; align-items: end; }
body.ui-v3 .v3-sheet-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(1,4,10,.76); border: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.ui-v3 .v3-sheet-panel { position: relative; z-index: 1; width: min(100%, 600px); max-height: min(88dvh, 760px); margin-inline: auto; padding: 8px var(--v3-space) calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; color: var(--v3-text); background: var(--v3-bg-elevated); border: 1px solid var(--v3-line-strong); border-bottom: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.48); }
body.ui-v3 .v3-sheet-handle { width: 42px; height: 4px; margin: 2px auto 12px; background: var(--v3-line-strong); border-radius: 999px; }
body.ui-v3 .v3-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
body.ui-v3 .v3-sheet-heading h2 { margin: 4px 0 0; color: var(--v3-text); font-size: 20px; font-weight: 900; overflow-wrap: anywhere; }
body.ui-v3 .v3-sheet-close { font-size: 25px; line-height: 1; }

/* Profile workspace */
body.ui-v3 .v3-profile,
body.ui-v3 .v3-invite,
body.ui-v3 .v3-settings,
body.ui-v3 .v3-team-shell { padding-inline: var(--v3-space); }
body.ui-v3 .v3-profile { padding-top: calc(12px + env(safe-area-inset-top)); }
body.ui-v3 .v3-profile-command {
    position: relative;
    padding: 15px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 0, rgba(246,183,60,.2), transparent 9rem),
        linear-gradient(145deg, #171f35, #12192a 60%, #2a1c55);
    border: 1px solid rgba(139,92,246,.28);
    border-radius: var(--v3-radius-xl);
    box-shadow: var(--v3-shadow);
}
body.ui-v3 .v3-profile-command::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 24px 24px; }
body.ui-v3 .v3-profile-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.ui-v3 .v3-profile-identity { position: relative; z-index: 1; gap: 11px; margin-top: 12px; }
body.ui-v3 .v3-profile-avatar { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, var(--v3-purple), #d945a4); border: 2px solid rgba(255,255,255,.22); border-radius: 17px; box-shadow: 0 10px 24px rgba(139,92,246,.28); }
body.ui-v3 .v3-profile-avatar svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v3 .v3-profile-identity > div { min-width: 0; flex: 1; }
body.ui-v3 .v3-profile-identity h1 { margin: 0; color: #fff; font-size: 22px; font-weight: 950; line-height: 1.05; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-identity p { margin: 5px 0 0; color: #aab8ce; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-rank { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 38%; min-height: 34px; padding: 7px 9px; color: #2e2104; font-size: 10px; font-weight: 900; line-height: 1.15; background: var(--v3-gold); border-radius: 999px; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-rank svg { width: 15px; height: 15px; flex: 0 0 auto; fill: currentColor; }
body.ui-v3 .v3-profile-rank.is-regular { color: #eef2f8; background: rgba(148,163,184,.22); }
body.ui-v3 .v3-profile-ledger { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
body.ui-v3 .v3-profile-ledger a { display: grid; min-width: 0; min-height: 104px; padding: 12px; background: rgba(8,13,25,.56); border: 1px solid rgba(255,255,255,.11); border-radius: 15px; }
body.ui-v3 .v3-profile-ledger a:first-child { background: linear-gradient(145deg, rgba(139,92,246,.26), rgba(8,13,25,.55)); }
body.ui-v3 .v3-profile-ledger a:last-child { background: linear-gradient(145deg, rgba(246,183,60,.18), rgba(8,13,25,.55)); }
body.ui-v3 .v3-profile-ledger span { color: #a9b6ca; font-size: 10px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-ledger strong { align-self: center; color: #fff; font-size: clamp(19px, 6vw, 27px); font-weight: 950; line-height: 1; letter-spacing: -.035em; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-ledger small { display: flex; align-items: center; gap: 2px; color: var(--v3-gold-bright); font-size: 10px; font-weight: 850; line-height: 1.2; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-ledger small svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
body.ui-v3 .v3-profile-mini-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 9px; border-top: 1px solid rgba(255,255,255,.1); }
body.ui-v3 .v3-profile-mini-stats span { min-width: 0; padding: 10px 9px 0; }
body.ui-v3 .v3-profile-mini-stats span + span { border-left: 1px solid rgba(255,255,255,.1); }
body.ui-v3 .v3-profile-mini-stats strong,
body.ui-v3 .v3-profile-mini-stats small { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-mini-stats strong { color: #fff; font-size: 13px; font-weight: 900; }
body.ui-v3 .v3-profile-mini-stats small { margin-top: 2px; color: #8d9bb1; font-size: 10px; }

body.ui-v3 .v3-profile-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-top: 12px; }
body.ui-v3 .v3-profile-actions a { position: relative; display: grid; justify-items: center; align-content: start; min-width: 0; min-height: 94px; padding: 9px 4px; color: var(--v3-muted-strong); text-align: center; background: var(--v3-surface); border: 1px solid var(--v3-line); border-radius: 14px; }
body.ui-v3 .v3-action-icon { width: 39px; height: 39px; border-radius: 12px; }
body.ui-v3 .v3-profile-actions strong { margin-top: 7px; min-width: 0; font-size: 10px; font-weight: 850; line-height: 1.18; overflow-wrap: anywhere; }
body.ui-v3 .v3-profile-actions small { position: absolute; top: 6px; right: 6px; color: #556176; font-size: 10px; font-weight: 900; }

body.ui-v3 .v3-payout-panel,
body.ui-v3 .v3-account-panel { margin-top: 12px; }
body.ui-v3 .v3-payout-panel { padding: 14px; }
body.ui-v3 .v3-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
body.ui-v3 .v3-section-head > div { gap: 9px; min-width: 0; }
body.ui-v3 .v3-panel-toggle { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; max-width: 44%; padding: 7px 9px; color: var(--v3-gold-bright); font-size: 10px; font-weight: 850; line-height: 1.15; background: var(--v3-gold-soft); border: 1px solid rgba(246,183,60,.25); border-radius: 11px; overflow-wrap: anywhere; }
body.ui-v3 .v3-panel-toggle svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
body.ui-v3 .v3-panel-toggle.is-open svg { transform: rotate(180deg); }
body.ui-v3 .v3-payout-preview { display: flex; align-items: center; gap: 9px; min-height: 48px; margin-top: 12px; padding: 9px 11px; color: var(--v3-muted); background: rgba(8,13,25,.42); border: 1px dashed var(--v3-line-strong); border-radius: 12px; }
body.ui-v3 .v3-payout-preview span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; color: var(--v3-purple); background: rgba(139,92,246,.13); border-radius: 8px; }
body.ui-v3 .v3-payout-preview svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v3 .v3-payout-preview p { margin: 0; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
body.ui-v3 .v3-payout-body { padding-top: 12px; }
body.ui-v3 .v3-payout-content { display: grid; gap: 12px; }
body.ui-v3 .v3-payout-list { display: grid; gap: 7px; }
body.ui-v3 .v3-payout-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 9px; background: rgba(8,13,25,.55); border: 1px solid var(--v3-line); border-radius: 12px; }
body.ui-v3 .v3-payout-item-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--v3-gold); background: var(--v3-gold-soft); border-radius: 10px; }
body.ui-v3 .v3-payout-item-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v3 .v3-payout-item > div { min-width: 0; }
body.ui-v3 .v3-payout-item strong,
body.ui-v3 .v3-payout-item small { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-payout-item strong { color: var(--v3-text); font-size: 12px; font-weight: 900; }
body.ui-v3 .v3-payout-item small { margin-top: 3px; color: var(--v3-muted); font-size: 10px; }
body.ui-v3 .v3-payout-item button { min-width: 44px; min-height: 44px; padding: 7px; color: #ffb3bf; font-size: 10px; font-weight: 850; background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.22); border-radius: 10px; overflow-wrap: anywhere; }
body.ui-v3 .v3-payout-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--v3-line); }
body.ui-v3 .v3-payout-form .v3-field { display: grid; min-width: 0; gap: 6px; }
body.ui-v3 .v3-payout-form .v3-field > label { min-width: 0; margin: 0; color: var(--v3-muted-strong); font-size: 11px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
body.ui-v3 .v3-payout-form .v3-select-wide,
body.ui-v3 .v3-payout-add { grid-column: 1 / -1; }
body.ui-v3 .v3-payout-form .v3-input input { padding-left: 13px; }
body.ui-v3 .v3-payout-add { margin-top: 0; }
body.ui-v3 .v3-payout-form .v3-form-error { grid-column: 1 / -1; }

body.ui-v3 .v3-account-panel { overflow: hidden; }
body.ui-v3 .v3-account-panel > a,
body.ui-v3 .v3-account-panel > button { display: grid; grid-template-columns: 39px minmax(0,1fr) 24px; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 10px 12px; color: var(--v3-text); font-size: 12px; font-weight: 850; text-align: left; background: transparent; border: 0; }
body.ui-v3 .v3-account-panel > * + * { border-top: 1px solid var(--v3-line); }
body.ui-v3 .v3-account-panel .v3-row-arrow { width: 18px; color: var(--v3-muted); }

/* Settings */
body.ui-v3 .v3-settings { padding-bottom: 20px; }
body.ui-v3 .v3-security-score { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 14px 2px; }
body.ui-v3 .v3-security-score div { display: flex; align-items: center; }
body.ui-v3 .v3-security-score span { display: grid; place-items: center; width: 31px; height: 31px; color: #302100; font-size: 9px; font-weight: 950; background: var(--v3-gold); border-radius: 50%; }
body.ui-v3 .v3-security-score i { flex: 1; height: 2px; background: linear-gradient(90deg, var(--v3-gold), var(--v3-line-strong)); }
body.ui-v3 .v3-security-score div:last-child i { display: none; }
body.ui-v3 .v3-settings-panel { padding: 16px; }
body.ui-v3 .v3-security-note { margin-bottom: 8px; }

/* Invitation */
body.ui-v3 .v3-invite { padding-bottom: 20px; }
body.ui-v3 .v3-invite-code {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) 78px;
    align-items: center;
    min-height: 142px;
    margin-top: 14px;
    padding: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #3a256f, #18203a 62%, #332313);
    border: 1px solid rgba(246,183,60,.3);
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow);
}
body.ui-v3 .v3-invite-code::after { content: ""; position: absolute; width: 150px; height: 150px; right: -58px; top: -58px; border: 24px solid rgba(246,183,60,.08); border-radius: 50%; }
body.ui-v3 .v3-invite-code > div { position: relative; z-index: 1; min-width: 0; }
body.ui-v3 .v3-invite-code strong { display: block; margin-top: 8px; color: #fff; font-size: clamp(27px,8vw,40px); font-weight: 950; line-height: 1; letter-spacing: .08em; overflow-wrap: anywhere; }
body.ui-v3 .v3-invite-code p { margin: 8px 0 0; color: #b7c3d6; font-size: 11px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
body.ui-v3 .v3-ticket-mark { display: grid; place-items: center; width: 64px; height: 64px; position: relative; z-index: 1; color: #312100; background: var(--v3-gold); border-radius: 18px; transform: rotate(-7deg); box-shadow: 0 14px 30px rgba(246,183,60,.25); }
body.ui-v3 .v3-ticket-mark svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v3 .v3-invite-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 10px; margin-top: 10px; }
body.ui-v3 .v3-qr-panel,
body.ui-v3 .v3-share-panel,
body.ui-v3 .v3-invite-stats { padding: 13px; min-width: 0; }
body.ui-v3 .v3-qr-frame { display: grid; place-items: center; aspect-ratio: 1; margin-top: 12px; padding: 9px; background: #fff; border: 3px solid rgba(246,183,60,.7); border-radius: 14px; }
body.ui-v3 .v3-qr-frame img { width: 100%; height: 100%; object-fit: contain; }
body.ui-v3 .v3-qr-error { color: #8a2536; font-size: 10px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
body.ui-v3 .v3-share-panel { display: flex; flex-direction: column; }
body.ui-v3 .v3-share-link { display: grid; gap: 8px; margin-top: auto; padding-top: 13px; }
body.ui-v3 .v3-share-link input { min-height: 52px; color: var(--v3-muted-strong); background: rgba(8,13,25,.58); border: 1px solid var(--v3-line-strong); border-radius: 12px; text-overflow: ellipsis; }
body.ui-v3 .v3-share-link button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 9px; color: #2f2100; font-size: 11px; font-weight: 900; background: var(--v3-gold); border: 0; border-radius: 12px; overflow-wrap: anywhere; }
body.ui-v3 .v3-invite-stats { margin-top: 10px; }
body.ui-v3 .v3-invite-stats > div:last-child { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 12px; }
body.ui-v3 .v3-invite-stats article { position: relative; min-width: 0; min-height: 82px; padding: 12px 8px 8px; background: rgba(8,13,25,.48); border: 1px solid var(--v3-line); border-radius: 12px; }
body.ui-v3 .v3-invite-stats article > span { position: absolute; top: 6px; right: 7px; color: #4f5d72; font-size: 8px; font-weight: 950; }
body.ui-v3 .v3-invite-stats strong,
body.ui-v3 .v3-invite-stats small { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-invite-stats strong { color: var(--v3-gold-bright); font-size: 17px; font-weight: 950; line-height: 1.1; }
body.ui-v3 .v3-invite-stats small { margin-top: 7px; color: var(--v3-muted); font-size: 10px; font-weight: 700; line-height: 1.2; }

/* Team dashboard */
body.ui-v3 .v3-team-shell { padding-bottom: 24px; }
body.ui-v3 .v3-team-overview { display: grid; grid-template-columns: .85fr 1.15fr; gap: 9px; margin-top: 14px; }
body.ui-v3 .v3-team-total { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; min-height: 158px; padding: 15px; overflow: hidden; background: linear-gradient(145deg, #35206f, #161d33 70%); border: 1px solid rgba(139,92,246,.35); border-radius: var(--v3-radius-lg); }
body.ui-v3 .v3-team-total i { position: absolute; width: 100px; height: 100px; right: -35px; top: -35px; border: 19px solid rgba(255,255,255,.05); border-radius: 50%; }
body.ui-v3 .v3-team-total strong { margin-top: auto; color: #fff; font-size: clamp(42px,13vw,66px); font-weight: 950; line-height: .88; letter-spacing: -.055em; }
body.ui-v3 .v3-team-total small { margin-top: 8px; color: #aab7cb; font-size: 10px; font-weight: 800; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-level-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
body.ui-v3 .v3-team-level-grid article { position: relative; display: grid; align-content: end; min-width: 0; min-height: 74px; padding: 9px; background: var(--v3-surface); border: 1px solid var(--v3-line); border-radius: 13px; }
body.ui-v3 .v3-team-level-grid article:last-child { grid-column: 1 / -1; }
body.ui-v3 .v3-team-level-grid article > span { position: absolute; top: 6px; right: 7px; color: #536176; font-size: 8px; font-weight: 950; }
body.ui-v3 .v3-team-level-grid strong { color: var(--v3-text); font-size: 23px; font-weight: 950; line-height: 1; }
body.ui-v3 .v3-team-level-grid small { margin-top: 4px; color: var(--v3-muted); font-size: 10px; font-weight: 750; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-level-grid .is-purple { border-bottom: 3px solid var(--v3-purple); }
body.ui-v3 .v3-team-level-grid .is-blue { border-bottom: 3px solid var(--v3-blue); }
body.ui-v3 .v3-team-level-grid .is-gold { border-bottom: 3px solid var(--v3-gold); }
body.ui-v3 .v3-team-invite { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 70px; margin-top: 9px; padding: 10px; background: linear-gradient(135deg, rgba(246,183,60,.12), rgba(20,28,46,.97)); border: 1px solid rgba(246,183,60,.22); border-radius: 14px; }
body.ui-v3 .v3-team-invite > div { min-width: 0; }
body.ui-v3 .v3-team-invite strong { display: block; color: var(--v3-text); font-size: 11px; font-weight: 900; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-invite input { min-height: 34px; padding: 5px 0; color: var(--v3-muted); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
body.ui-v3 .v3-team-invite button { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; max-width: 92px; padding: 7px 9px; color: #2f2100; font-size: 10px; font-weight: 900; line-height: 1.15; background: var(--v3-gold); border: 0; border-radius: 11px; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-invite button:disabled { opacity: .5; }
body.ui-v3 .v3-team-finance,
body.ui-v3 .v3-team-members,
body.ui-v3 .v3-team-rewards { margin-top: 10px; padding: 13px; }
body.ui-v3 .v3-team-finance .v3-section-head > strong { min-width: 0; max-width: 42%; color: var(--v3-gold-bright); font-size: 16px; font-weight: 950; text-align: right; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-finance-bars { display: grid; gap: 7px; margin-top: 12px; }
body.ui-v3 .v3-team-finance-bars > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 10px; background: rgba(8,13,25,.5); border: 1px solid var(--v3-line); border-radius: 11px; }
body.ui-v3 .v3-team-finance-bars span { display: flex; align-items: center; min-width: 0; color: var(--v3-muted-strong); font-size: 10px; font-weight: 800; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-finance-bars i { width: 7px; height: 7px; margin-right: 7px; flex: 0 0 auto; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px currentColor; opacity: .7; }
body.ui-v3 .v3-team-finance-bars strong { min-width: 0; color: var(--v3-text); font-size: 12px; font-weight: 900; text-align: right; overflow-wrap: anywhere; }
body.ui-v3 .v3-team-finance-bars .is-purple span { color: #a98dff; }
body.ui-v3 .v3-team-finance-bars .is-blue span { color: #77a7ff; }
body.ui-v3 .v3-team-finance-bars .is-gold span { color: var(--v3-gold-bright); }
body.ui-v3 .v3-segmented { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; margin-top: 12px; padding: 4px; background: rgba(8,13,25,.64); border: 1px solid var(--v3-line); border-radius: 12px; }
body.ui-v3 .v3-segmented button { min-width: 0; min-height: 44px; padding: 7px 4px; color: var(--v3-muted); font-size: 10px; font-weight: 850; line-height: 1.15; background: transparent; border: 0; border-radius: 9px; overflow-wrap: anywhere; }
body.ui-v3 .v3-segmented button.active { color: #2f2100; background: var(--v3-gold); box-shadow: 0 6px 14px rgba(246,183,60,.16); }
body.ui-v3 .v3-member-list,
body.ui-v3 .v3-reward-list { display: grid; gap: 6px; margin-top: 10px; }
body.ui-v3 .v3-member-row,
body.ui-v3 .v3-reward-list article { display: grid; grid-template-columns: 40px minmax(0,1fr) minmax(68px,auto); align-items: center; gap: 9px; min-width: 0; padding: 9px; background: rgba(8,13,25,.46); border: 1px solid var(--v3-line); border-radius: 11px; }
body.ui-v3 .v3-member-avatar { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; font-size: 14px; font-weight: 950; background: linear-gradient(145deg, var(--v3-purple), #5d78e9); border-radius: 11px; }
body.ui-v3 .v3-member-row > div,
body.ui-v3 .v3-reward-list article > div { min-width: 0; }
body.ui-v3 .v3-member-row strong,
body.ui-v3 .v3-member-row small,
body.ui-v3 .v3-reward-list strong,
body.ui-v3 .v3-reward-list small { display: block; overflow-wrap: anywhere; }
body.ui-v3 .v3-member-row strong,
body.ui-v3 .v3-reward-list strong { color: var(--v3-text); font-size: 11px; font-weight: 900; }
body.ui-v3 .v3-member-row small,
body.ui-v3 .v3-reward-list small { margin-top: 3px; color: var(--v3-muted); font-size: 10px; line-height: 1.25; }
body.ui-v3 .v3-member-row > b,
body.ui-v3 .v3-reward-list article > b { min-width: 0; color: var(--v3-gold-bright); font-size: 11px; font-weight: 950; text-align: right; overflow-wrap: anywhere; }
body.ui-v3 .v3-reward-dot { width: 10px; height: 10px; margin-left: 15px; background: var(--v3-green); border-radius: 50%; box-shadow: 0 0 0 7px var(--v3-green-soft); }

/* Shared loading, empty and error states */
body.ui-v3 .v3-page-loading,
body.ui-v3 .v3-inline-loading { display: grid; place-items: center; min-height: 140px; }
body.ui-v3 .v3-inline-loading { min-height: 88px; }
body.ui-v3 .v3-empty-state,
body.ui-v3 .v3-sub-empty,
body.ui-v3 .v3-sub-error { display: grid; place-items: center; min-height: 118px; padding: 18px; color: var(--v3-muted); text-align: center; background: var(--v3-surface); border: 1px dashed var(--v3-line-strong); border-radius: 14px; }
body.ui-v3 .v3-empty-state { margin: calc(86px + env(safe-area-inset-top)) var(--v3-space) 0; }
body.ui-v3 .v3-sub-empty,
body.ui-v3 .v3-sub-error { min-height: 88px; }
body.ui-v3 .v3-empty-state p,
body.ui-v3 .v3-sub-empty p,
body.ui-v3 .v3-sub-error p { margin: 7px 0 0; max-width: 100%; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
body.ui-v3 .v3-sub-empty > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--v3-gold); font-size: 19px; background: var(--v3-gold-soft); border-radius: 50%; }
body.ui-v3 .v3-sub-error { color: #ffb7c2; background: rgba(251,113,133,.06); border-color: rgba(251,113,133,.24); }
body.ui-v3 .v3-sub-error button { min-height: 44px; margin-top: 8px; padding: 8px 14px; color: #2f2100; font-size: 10px; font-weight: 900; background: var(--v3-gold); border: 0; border-radius: 10px; }
body.ui-v3 .v3-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Light mode retains hierarchy without turning command cards flat. */
body.ui-v3:not(.dark) .v3-auth-panel,
body.ui-v3:not(.dark) .v3-settings-panel,
body.ui-v3:not(.dark) .v3-payout-panel,
body.ui-v3:not(.dark) .v3-account-panel,
body.ui-v3:not(.dark) .v3-qr-panel,
body.ui-v3:not(.dark) .v3-share-panel,
body.ui-v3:not(.dark) .v3-invite-stats,
body.ui-v3:not(.dark) .v3-team-finance,
body.ui-v3:not(.dark) .v3-team-members,
body.ui-v3:not(.dark) .v3-team-rewards,
body.ui-v3:not(.dark) .v3-profile-actions a,
body.ui-v3:not(.dark) .v3-team-level-grid article {
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 28px rgba(41,51,76,.09);
}
body.ui-v3:not(.dark) .v3-input,
body.ui-v3:not(.dark) .v3-select,
body.ui-v3:not(.dark) .v3-profile-actions a,
body.ui-v3:not(.dark) .v3-payout-preview,
body.ui-v3:not(.dark) .v3-payout-item,
body.ui-v3:not(.dark) .v3-invite-stats article,
body.ui-v3:not(.dark) .v3-team-finance-bars > div,
body.ui-v3:not(.dark) .v3-member-row,
body.ui-v3:not(.dark) .v3-reward-list article,
body.ui-v3:not(.dark) .v3-segmented,
body.ui-v3:not(.dark) .v3-share-link input {
    background: #f6f8fc;
}
body.ui-v3:not(.dark) .v3-input input,
body.ui-v3:not(.dark) .v3-select select,
body.ui-v3:not(.dark) .v3-share-link input,
body.ui-v3:not(.dark) .v3-team-invite input { color: #172033; }
body.ui-v3:not(.dark) .v3-select option,
body.ui-v3:not(.dark) .v3-select optgroup { color: #172033; background: #fff; }
body.ui-v3:not(.dark) .v3-sheet-panel { color: var(--v3-text); background: #f6f8fc; }

@keyframes v3-spin { to { transform: rotate(360deg); } }

@media (max-width: 360px) {
    body.ui-v3 .v3-auth,
    body.ui-v3 .v3-profile,
    body.ui-v3 .v3-invite,
    body.ui-v3 .v3-settings,
    body.ui-v3 .v3-team-shell { --v3-space: 12px; }
    body.ui-v3 .v3-auth-panel { padding: 14px; }
    body.ui-v3 .v3-auth-command-copy { grid-template-columns: minmax(0,1fr) 100px; }
    body.ui-v3 .v3-auth-art img { right: -68px; }
    body.ui-v3 .v3-auth-banner { grid-template-columns: minmax(0,1fr) 82px; padding: 14px; }
    body.ui-v3 .v3-auth-banner figure img { right: -74px; }
    body.ui-v3 .v3-form-grid { grid-template-columns: 1fr; }
    body.ui-v3 .v3-field-wide { grid-column: auto; }
    body.ui-v3 .v3-phone-row { grid-template-columns: 88px minmax(0,1fr); }
    body.ui-v3 .v3-code-row { grid-template-columns: minmax(0,1fr) 98px; }
    body.ui-v3 .v3-payout-form { grid-template-columns: 1fr; }
    body.ui-v3 .v3-profile-rank { max-width: 40%; padding-inline: 7px; }
    body.ui-v3 .v3-profile-actions { gap: 5px; }
    body.ui-v3 .v3-profile-actions a { padding-inline: 2px; }
    body.ui-v3 .v3-invite-grid { grid-template-columns: 1fr; }
    body.ui-v3 .v3-qr-frame { max-width: 190px; margin-inline: auto; }
    body.ui-v3 .v3-team-overview { grid-template-columns: 1fr; }
    body.ui-v3 .v3-team-total { min-height: 126px; }
    body.ui-v3 .v3-team-level-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    body.ui-v3 .v3-team-level-grid article:last-child { grid-column: auto; }
    body.ui-v3 .v3-team-invite { grid-template-columns: 38px minmax(0,1fr); }
    body.ui-v3 .v3-team-invite > button { grid-column: 1 / -1; width: 100%; max-width: none; }
}

@media (max-width: 340px) {
    body.ui-v3 .v3-profile-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body.ui-v3 .v3-profile-actions a { min-height: 88px; }
}

@media (min-width: 680px) {
    body.ui-v3 .v3-auth { padding-top: 18px; }
    body.ui-v3 .v3-auth-command { border-radius: var(--v3-radius-xl); }
    body.ui-v3 .v3-auth-login > .v3-auth-panel { margin-inline: 20px; }
    body.ui-v3 .v3-profile { padding-top: calc(18px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
    body.ui-v3 .v3-panel-toggle svg,
    body.ui-v3 .v3-primary-action .button-loader { transition: none; animation: none; }
}

/* V4 profile: account station, deliberately separate from the legacy profile-card stack. */
body.ui-v4-account .account-station { width: min(100% - 28px, 640px); margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(102px + env(safe-area-inset-bottom, 0px)); }
body.ui-v4-account .account-identity-board { padding: 0 0 18px; border-bottom: 2px solid var(--v3-text); }
body.ui-v4-account .account-identity-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
body.ui-v4-account .account-identity-topline > span { color: var(--v3-purple); font-size: 10px; font-weight: 950; letter-spacing: .18em; text-transform: uppercase; }
body.ui-v4-account .account-settings-link { display: grid; width: 44px; height: 44px; place-items: center; color: var(--v3-text); border: 1px solid var(--v3-line); border-radius: 50%; background: var(--v3-surface); }
body.ui-v4-account .account-settings-link svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-identity-main { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding-top: 15px; }
body.ui-v4-account .account-profile-mark { display: grid; width: 56px; height: 56px; place-items: center; color: var(--v3-surface); background: var(--v3-text); border-radius: 50% 50% 4px 50%; }
body.ui-v4-account .account-profile-mark svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-identity-main h1 { margin: 0; color: var(--v3-text); font-size: 22px; font-weight: 950; letter-spacing: -.05em; overflow-wrap: anywhere; }
body.ui-v4-account .account-identity-main p { margin: 4px 0 0; color: var(--v3-muted); font-size: 11px; overflow-wrap: anywhere; }
body.ui-v4-account .account-rank { display: inline-flex; align-items: center; gap: 4px; max-width: 130px; min-height: 31px; padding: 6px 9px; color: var(--v3-gold); font-size: 10px; font-weight: 900; overflow-wrap: anywhere; border: 1px solid currentColor; border-radius: 99px; }
body.ui-v4-account .account-rank.is-regular { color: var(--v3-muted); }
body.ui-v4-account .account-rank svg { flex: 0 0 auto; width: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-balance-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 19px; overflow: hidden; background: var(--v3-line-strong); border: 1px solid var(--v3-line-strong); border-radius: 3px 18px 3px 18px; }
body.ui-v4-account .account-balance-board a { display: grid; gap: 6px; min-width: 0; padding: 14px 12px; background: var(--v3-surface); }
body.ui-v4-account .account-balance-board span { color: var(--v3-muted); font-size: 10px; font-weight: 800; overflow-wrap: anywhere; }
body.ui-v4-account .account-balance-board strong { color: var(--v3-text); font-size: 17px; font-weight: 950; letter-spacing: -.04em; overflow-wrap: anywhere; }
body.ui-v4-account .account-balance-board small { display: inline-flex; align-items: center; gap: 3px; color: var(--v3-purple); font-size: 10px; font-weight: 900; overflow-wrap: anywhere; }
body.ui-v4-account .account-balance-board svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
body.ui-v4-account .account-signal-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
body.ui-v4-account .account-signal-strip span { min-width: 0; padding-left: 10px; border-left: 2px solid var(--v3-purple); }
body.ui-v4-account .account-signal-strip strong { display: block; color: var(--v3-text); font-size: 13px; font-weight: 950; overflow-wrap: anywhere; }
body.ui-v4-account .account-signal-strip small { display: block; margin-top: 3px; color: var(--v3-muted); font-size: 10px; overflow-wrap: anywhere; }
body.ui-v4-account .account-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 20px; border-top: 1px solid var(--v3-line-strong); border-left: 1px solid var(--v3-line-strong); }
body.ui-v4-account .account-route-grid a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 72px; padding: 11px; color: var(--v3-text); border-right: 1px solid var(--v3-line-strong); border-bottom: 1px solid var(--v3-line-strong); background: transparent; }
body.ui-v4-account .account-route-grid .v3-action-icon { display: grid; width: 35px; height: 35px; place-items: center; color: var(--v3-purple); border: 1px solid currentColor; border-radius: 50%; background: transparent; }
body.ui-v4-account .account-route-grid .v3-action-icon.is-blue { color: var(--v3-blue); }
body.ui-v4-account .account-route-grid .v3-action-icon.is-gold { color: var(--v3-gold); }
body.ui-v4-account .account-route-grid .v3-action-icon.is-pink { color: var(--v3-pink); }
body.ui-v4-account .account-route-grid .v3-action-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-route-grid strong { min-width: 0; font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
body.ui-v4-account .account-route-grid small { color: var(--v3-muted); font-size: 9px; font-weight: 900; }
body.ui-v4-account .account-payout-station { margin-top: 22px; padding-top: 15px; border-top: 2px solid var(--v3-text); }
body.ui-v4-account .account-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.ui-v4-account .account-section-head > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
body.ui-v4-account .account-section-head > div > span { color: var(--v3-purple); font-size: 11px; font-weight: 950; letter-spacing: .12em; }
body.ui-v4-account .account-section-head h2 { margin: 0; color: var(--v3-text); font-size: 15px; font-weight: 950; overflow-wrap: anywhere; }
body.ui-v4-account .account-section-head p { margin: 2px 0 0; color: var(--v3-muted); font-size: 10px; overflow-wrap: anywhere; }
body.ui-v4-account .account-panel-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 44px; padding: 7px 10px; color: var(--v3-text); font-size: 10px; font-weight: 900; border: 1px solid var(--v3-line-strong); border-radius: 99px; background: transparent; }
body.ui-v4-account .account-panel-toggle svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
body.ui-v4-account .account-panel-toggle.is-open svg { transform: rotate(180deg); }
body.ui-v4-account .account-payout-preview { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 0; color: var(--v3-muted); border-bottom: 1px solid var(--v3-line); }
body.ui-v4-account .account-payout-preview > span { display: grid; width: 32px; height: 32px; place-items: center; color: var(--v3-blue); border: 1px solid currentColor; border-radius: 50%; }
body.ui-v4-account .account-payout-preview svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-payout-preview p { margin: 0; font-size: 11px; overflow-wrap: anywhere; }
body.ui-v4-account .account-payout-body { margin-top: 12px; }
body.ui-v4-account .account-payout-body .v3-payout-content { display: grid; gap: 12px; }
body.ui-v4-account .account-payout-body .v3-payout-item { border-radius: 2px 13px 2px 13px; }
body.ui-v4-account .account-payout-body .v3-payout-form { border-radius: 2px 13px 2px 13px; }
body.ui-v4-account .account-control-list { display: grid; margin-top: 22px; border-top: 1px solid var(--v3-line-strong); }
body.ui-v4-account .account-control-list > a,
body.ui-v4-account .account-control-list > button { display: grid; grid-template-columns: 36px minmax(0, 1fr) 24px; gap: 9px; align-items: center; min-height: 59px; padding: 9px 0; color: var(--v3-text); text-align: left; border: 0; border-bottom: 1px solid var(--v3-line-strong); background: transparent; }
body.ui-v4-account .account-control-list .v3-action-icon { display: grid; width: 33px; height: 33px; place-items: center; color: var(--v3-purple); border: 1px solid currentColor; border-radius: 50%; background: transparent; }
body.ui-v4-account .account-control-list .v3-action-icon.is-red { color: var(--v3-red); }
body.ui-v4-account .account-control-list .v3-action-icon svg,
body.ui-v4-account .account-control-list .v3-row-arrow { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.ui-v4-account .account-control-list > a > span:nth-child(2),
body.ui-v4-account .account-control-list > button > span:nth-child(2) { font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
body.ui-v4-account:not(.dark) .account-balance-board a { background: #fff; }

@media (max-width: 350px) {
    body.ui-v4-account .account-station { width: calc(100% - 18px); }
    body.ui-v4-account .account-identity-main { grid-template-columns: 48px minmax(0, 1fr); }
    body.ui-v4-account .account-profile-mark { width: 48px; height: 48px; }
    body.ui-v4-account .account-rank { grid-column: 2; justify-self: start; }
    body.ui-v4-account .account-balance-board { grid-template-columns: 1fr; }
    body.ui-v4-account .account-route-grid { grid-template-columns: 1fr; }
    body.ui-v4-account .account-section-head { align-items: flex-start; }
    body.ui-v4-account .account-panel-toggle { max-width: 120px; }
}
