/* ==========================================================================
V-Profit · Design system
   ========================================================================== */

:root {
    color-scheme: light;
    --bg: #f4f7fc;
    --bg-soft: #e9eff8;
    --panel: #ffffff;
    --surface-3: #f1f5fb;
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --topbar-bg: rgba(255, 255, 255, 0.85);
    --hover: rgba(16, 38, 76, 0.05);
    --line: rgba(16, 38, 76, 0.1);
    --line-strong: rgba(16, 38, 76, 0.18);
    --text: #0b1830;
    --text-soft: #33465f;
    --muted: #6a7c93;
    --brand: #155dff;
    --brand-2: #1152d4;
    --brand-soft: rgba(21, 93, 255, 0.08);
    --brand-line: rgba(21, 93, 255, 0.2);
    --brand-ink: #0b4bd1;
    --on-brand: #ffffff;
    --accent: #00a3ff;
    --accent-soft: rgba(0, 163, 255, 0.1);
    --success: #0f9d76;
    --success-soft: rgba(15, 157, 118, 0.1);
    --success-ink: #047857;
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.09);
    --danger-ink: #be123c;
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.1);
    --warning-ink: #b45309;
    --violet: #7c3aed;
    --violet-soft: rgba(124, 58, 237, 0.09);
    --violet-ink: #6d28d9;
    --info-ink: #0369a1;
    --radius: 10px;
    --radius-sm: 7px;
    --radius-xs: 5px;
    --shadow: 0 10px 30px rgba(15, 40, 90, 0.07);
    --font-body:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Sora", "Inter", sans-serif;
    --sidebar: 248px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a111f;
    --bg-soft: #0d1626;
    --panel: #111b2e;
    --surface-3: rgba(148, 163, 184, 0.07);
    --input-bg: #0b1322;
    --sidebar-bg: #0d1626;
    --topbar-bg: rgba(10, 17, 31, 0.82);
    --hover: rgba(148, 163, 184, 0.08);
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.24);
    --text: #e8eefb;
    --text-soft: #c2cde1;
    --muted: #8fa0b8;
    --brand: #4c8dff;
    --brand-2: #7ab0ff;
    --brand-soft: rgba(76, 141, 255, 0.14);
    --brand-line: rgba(76, 141, 255, 0.3);
    --brand-ink: #9cc3ff;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --success-ink: #6ee7b7;
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.12);
    --danger-ink: #fda4af;
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --warning-ink: #fcd34d;
    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, 0.12);
    --violet-ink: #c4b5fd;
    --info-ink: #7dd3fc;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            900px 520px at 12% -8%,
            rgba(21, 93, 255, 0.09),
            transparent 60%
        ),
        radial-gradient(
            800px 500px at 92% 6%,
            rgba(0, 163, 255, 0.06),
            transparent 60%
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, transparent 38%);
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    line-height: 1.18;
    margin: 0;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

::selection {
    background: rgba(21, 93, 255, 0.18);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(16, 38, 76, 0.22);
    border-radius: 20px;
    border: 2px solid var(--bg);
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.display-xl {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.7rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.display-md {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-2);
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--brand), transparent);
}

.lead {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.muted {
    color: var(--muted);
}

.text-sm {
    font-size: 0.86rem;
}

.text-xs {
    font-size: 0.76rem;
}

.strong {
    font-weight: 650;
}

.mono {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.gold {
    color: var(--brand-2);
}

/* ==========================================================================
   Layout · backoffice
   ========================================================================== */

.shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 18px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);
    z-index: 60;
    transform: translateX(0);
    transition: transform 0.28s ease;
    overflow-y: auto;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 6px 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 750;
    letter-spacing: -0.03em;
    font-size: 1.18rem;
}

.brand .mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    border: 1px solid var(--line);
    color: #ffffff;
    overflow: hidden;
}

.brand .mark svg {
    width: 21px;
    height: 21px;
}

.brand small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: -2px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    padding: 14px 12px 6px;
    font-weight: 650;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.side-link .icon {
    width: 19px;
    height: 19px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.side-link:hover {
    background: var(--hover);
    color: var(--text);
}

.side-link.active {
    background: linear-gradient(
        90deg,
        rgba(21, 93, 255, 0.16),
        rgba(21, 93, 255, 0.03)
    );
    border-color: rgba(21, 93, 255, 0.24);
    color: var(--brand-ink);
    font-weight: 600;
    box-shadow:
        inset 3px 0 0 var(--brand),
        0 6px 18px rgba(21, 93, 255, 0.08);
}

.side-link.active .icon {
    color: var(--brand);
}

.side-link .pill {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(225, 29, 72, 0.16);
    color: var(--danger);
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-mini {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(160deg, var(--brand-soft), var(--surface-3));
}

.referral-mini .label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 650;
}

.ref-link {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 8px;
}

.ref-link code {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    color: var(--brand-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: 0.2s ease;
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--hover);
}

.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 30px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar-bg);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 30px rgba(15, 40, 90, 0.04);
}

.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--hover);
    color: var(--text);
    cursor: pointer;
}

.top-title {
    min-width: 0;
}

.top-title h1 {
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-title p {
    font-size: 0.76rem;
    color: var(--muted);
}

.top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--hover);
    font-size: 0.76rem;
    color: var(--text-soft);
    white-space: nowrap;
}

.chip .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.chip.brand-chip {
    border-color: rgba(21, 93, 255, 0.3);
    background: rgba(21, 93, 255, 0.08);
    color: var(--brand-ink);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 6px 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--hover);
}

.user-chip .who {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.user-chip .who strong {
    font-size: 0.78rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip .who span {
    font-size: 0.65rem;
    color: var(--muted);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.76rem;
    color: #ffffff;
    background: linear-gradient(145deg, #2f6dff, #155dff);
    border: 2px solid #ffffff;
    box-shadow: 0 4px 14px rgba(21, 93, 255, 0.25);
    flex: 0 0 36px;
}

.avatar.sm {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0.66rem;
}

.avatar.lg {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 1.05rem;
}

.avatar.alt {
    background: linear-gradient(145deg, #4aa8ff, #0091ff);
}

.content {
    padding: 30px;
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-head h1 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 750;
}

.page-head p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
    max-width: 640px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 29, 58, 0.35);
    backdrop-filter: blur(4px);
    z-index: 55;
}

.sidebar-close {
    display: none;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
}

body.sidebar-open .sidebar-overlay {
    display: block;
}

@media (max-width: 1080px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main {
        margin-left: 0;
    }
    .menu-btn {
        display: inline-grid;
        place-items: center;
    }
    .sidebar-close {
        display: inline-grid;
    }
    .content {
        padding: 22px 18px 40px;
    }
    .topbar {
        padding: 12px 16px;
    }
    .user-chip .who {
        display: none;
    }
}

@media (max-width: 640px) {
    .top-actions .chip.brand-chip {
        display: none;
    }
    .page-head {
        align-items: flex-start;
    }
}

/* ==========================================================================
   Cards, grids, stats
   ========================================================================== */

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: minmax(0, 1fr);
    }
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(21, 93, 255, 0.035),
        transparent 30%
    );
}

.card.pad {
    padding: 22px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.card-head h3 {
    font-size: 0.98rem;
    font-weight: 700;
}

.card-head p {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 2px;
}

.card-body {
    padding: 20px 22px;
}

.card-body.tight {
    padding: 14px 18px;
}

.card-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--surface-3);
}

.stat {
    position: relative;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 40, 90, 0.05);
    overflow: hidden;
}

.stat::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(21, 93, 255, 0.14),
        transparent 70%
    );
}

.stat .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--brand);
    background: rgba(21, 93, 255, 0.1);
    border: 1px solid rgba(21, 93, 255, 0.2);
    box-shadow: 0 6px 16px rgba(21, 93, 255, 0.12);
}

.stat-icon .icon {
    width: 20px;
    height: 20px;
}

.stat-icon.accent {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(0, 163, 255, 0.2);
}
.stat-icon.success {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(15, 157, 118, 0.2);
}
.stat-icon.violet {
    color: var(--violet);
    background: var(--violet-soft);
    border-color: rgba(124, 58, 237, 0.2);
}
.stat-icon.danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(225, 29, 72, 0.2);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.72rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-top: 16px;
    line-height: 1.1;
    position: relative;
}

.stat-label {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 4px;
    position: relative;
}

.stat-trend {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--success);
    background: var(--success-soft);
    padding: 3px 8px;
    border-radius: 999px;
}

.stat-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    color: var(--muted);
}

/* ==========================================================================
   Buttons, badges, alerts
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
    font-family: var(--font-body);
}

.btn .icon {
    width: 17px;
    height: 17px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #2f6dff, #155dff 55%, #0b47d6);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 26px rgba(21, 93, 255, 0.28);
}

.btn-primary:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 14px 34px rgba(21, 93, 255, 0.4);
}

.btn-outline {
    border-color: var(--line-strong);
    background: var(--hover);
    color: var(--text);
}

.btn-outline:hover {
    border-color: rgba(21, 93, 255, 0.4);
    background: rgba(21, 93, 255, 0.07);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--hover);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.2);
}

.btn-danger {
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.32);
    color: var(--danger-ink);
}

.btn-danger:hover {
    background: rgba(225, 29, 72, 0.2);
}

.btn-sm {
    padding: 7px 11px;
    font-size: 0.76rem;
    border-radius: 9px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 7px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge.success {
    color: var(--success-ink);
    background: var(--success-soft);
    border-color: rgba(15, 157, 118, 0.22);
}
.badge.danger {
    color: var(--danger-ink);
    background: var(--danger-soft);
    border-color: rgba(225, 29, 72, 0.22);
}
.badge.warning {
    color: var(--warning-ink);
    background: var(--warning-soft);
    border-color: rgba(217, 119, 6, 0.22);
}
.badge.muted {
    color: var(--muted);
    background: var(--hover);
    border-color: var(--line);
}
.badge.brand {
    color: var(--brand-ink);
    background: rgba(21, 93, 255, 0.12);
    border-color: rgba(21, 93, 255, 0.24);
}
.badge.info {
    color: var(--info-ink);
    background: var(--accent-soft);
    border-color: rgba(0, 163, 255, 0.22);
}
.badge.violet {
    color: var(--violet-ink);
    background: var(--violet-soft);
    border-color: rgba(124, 58, 237, 0.22);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--hover);
    color: var(--text-soft);
    font-size: 0.84rem;
    margin-bottom: 18px;
}

.alert .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
}

.alert.success {
    border-color: rgba(15, 157, 118, 0.28);
    background: var(--success-soft);
    color: var(--success-ink);
}
.alert.danger {
    border-color: rgba(225, 29, 72, 0.28);
    background: var(--danger-soft);
    color: var(--danger-ink);
}
.alert.info {
    border-color: rgba(0, 163, 255, 0.24);
    background: var(--accent-soft);
    color: var(--info-ink);
}
.alert.warning {
    border-color: rgba(217, 119, 6, 0.26);
    background: var(--warning-soft);
    color: var(--warning-ink);
}

.alert ul {
    margin: 0;
    padding-left: 16px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.label {
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}

.field .help {
    font-size: 0.71rem;
    color: var(--muted);
    line-height: 1.5;
}

.field .error {
    font-size: 0.72rem;
    color: var(--danger);
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(21, 93, 255, 0.55);
    box-shadow:
        0 0 0 4px rgba(21, 93, 255, 0.1),
        0 0 18px rgba(0, 163, 255, 0.12);
    background: var(--input-bg);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6f8c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

select[multiple] {
    background-image: none;
    padding-right: 12px;
    min-height: 130px;
}

textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.6;
}

input[type="file"] {
    padding: 8px;
    font-size: 0.78rem;
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 6px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--hover);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 0.74rem;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.83rem;
    color: var(--text-soft);
    cursor: pointer;
}

.check input[type="checkbox"],
.check input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
    margin-top: 2px;
    flex: 0 0 17px;
}

.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--input-bg);
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-group:focus-within {
    border-color: rgba(21, 93, 255, 0.55);
    box-shadow:
        0 0 0 4px rgba(21, 93, 255, 0.1),
        0 0 18px rgba(0, 163, 255, 0.12);
}

.input-group .prefix,
.input-group .suffix {
    display: grid;
    place-items: center;
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.82rem;
    background: var(--hover);
}

.input-group input {
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.input-group input:focus {
    box-shadow: none;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
    overflow-x: auto;
    border-radius: 0 0 var(--radius) var(--radius);
}

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
    min-width: 640px;
}

table.table th {
    text-align: left;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 650;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-3);
    white-space: nowrap;
}

table.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    vertical-align: middle;
}

table.table tr:last-child td {
    border-bottom: 0;
}

table.table tbody tr {
    transition: background 0.15s ease;
}

table.table tbody tr:hover {
    background: var(--hover);
}

table.table .strong {
    color: var(--text);
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cell-user .meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cell-user .meta span {
    font-size: 0.7rem;
    color: var(--muted);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.table-empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
}

.table-empty .icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    color: var(--muted);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-3);
}

.toolbar .search {
    flex: 1;
    min-width: 180px;
    max-width: 340px;
}

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-3);
    flex-wrap: wrap;
}

.tab {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
    transition: 0.18s ease;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: rgba(21, 93, 255, 0.15);
    color: var(--brand-ink);
    box-shadow:
        inset 0 0 0 1px rgba(21, 93, 255, 0.22),
        0 4px 14px rgba(21, 93, 255, 0.12);
}

/* ==========================================================================
   Pagination (custom view)
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
}

.pagination .page-link,
.pagination span,
.pagination a {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    color: var(--muted);
    transition: 0.18s ease;
}

.pagination a:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--hover);
}

.pagination .active span,
.pagination .active > span {
    background: rgba(21, 93, 255, 0.16);
    border-color: rgba(21, 93, 255, 0.3);
    color: var(--brand-ink);
    font-weight: 650;
    box-shadow: 0 4px 14px rgba(21, 93, 255, 0.14);
}

.pagination .disabled span {
    opacity: 0.4;
}

.pagination .info {
    border: 0;
    color: var(--muted);
    min-width: auto;
    margin-right: auto;
    padding-left: 0;
}

/* ==========================================================================
   Landing page
   ========================================================================== */

.landing {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.landing-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.38;
    animation: float 16s ease-in-out infinite;
}

.orb.one {
    width: 520px;
    height: 520px;
    background: radial-gradient(
        circle,
        rgba(21, 93, 255, 0.34),
        transparent 65%
    );
    top: -180px;
    left: -120px;
}

.orb.two {
    width: 460px;
    height: 460px;
    background: radial-gradient(
        circle,
        rgba(0, 163, 255, 0.22),
        transparent 65%
    );
    top: 120px;
    right: -160px;
    animation-delay: -6s;
}

.orb.three {
    width: 420px;
    height: 420px;
    background: radial-gradient(
        circle,
        rgba(124, 58, 237, 0.16),
        transparent 65%
    );
    bottom: 200px;
    left: 30%;
    animation-delay: -11s;
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -26px, 0) scale(1.04);
    }
}

.land-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 20px clamp(18px, 5vw, 60px);
    max-width: 1320px;
    margin: 0 auto;
}

.land-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: 18px;
}

.land-nav .nav-links a {
    font-size: 0.84rem;
    color: var(--text-soft);
    transition: color 0.2s ease;
}

.land-nav .nav-links a:hover {
    color: var(--brand-2);
}

.land-nav .nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.land-nav .nav-actions .btn {
    padding: 9px 15px;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .land-nav .nav-links {
        display: none;
    }
}

.hero {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 90px) clamp(18px, 5vw, 60px) 70px;
}

@media (max-width: 1020px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 34px;
    }
}

.hero-copy h1 {
    margin: 18px 0 20px;
}

.hero-copy h1 .grad {
    background: linear-gradient(100deg, #2f6dff 0%, #155dff 45%, #0a6cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy .lead {
    max-width: 540px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.hero-actions .btn {
    padding: 13px 22px;
    font-size: 0.9rem;
    border-radius: 13px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.hero-trust .trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: var(--muted);
}

.hero-trust .icon {
    width: 15px;
    height: 15px;
    color: var(--success);
}

.hero-visual {
    position: relative;
    perspective: 1200px;
}

.hero-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 18px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 27px;
    padding: 1px;
    background: linear-gradient(
        140deg,
        rgba(21, 93, 255, 0.5),
        transparent 35%,
        transparent 70%,
        rgba(0, 163, 255, 0.35)
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.panel-top .who {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-top .who .name {
    font-size: 0.82rem;
    font-weight: 600;
}

.panel-top .who .role {
    font-size: 0.66rem;
    color: var(--muted);
}

.panel-balance {
    margin: 18px 0;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(21, 93, 255, 0.14),
        rgba(21, 93, 255, 0.03)
    );
    border: 1px solid rgba(21, 93, 255, 0.2);
}

.panel-balance .label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-2);
    font-weight: 650;
}

.panel-balance .amount {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -0.04em;
    margin-top: 4px;
}

.panel-balance .sub {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 2px;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.panel-stat {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: var(--surface-3);
}

.panel-stat .k {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.panel-stat .v {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 2px;
}

.panel-legs {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    align-items: flex-end;
    height: 64px;
}

.panel-legs .bar {
    flex: 1;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(
        180deg,
        rgba(21, 93, 255, 0.9),
        rgba(21, 93, 255, 0.2)
    );
    animation: grow 1.2s ease both;
    transform-origin: bottom;
}

.panel-legs .bar.alt {
    background: linear-gradient(
        180deg,
        rgba(0, 163, 255, 0.8),
        rgba(0, 163, 255, 0.15)
    );
}

.panel-legs .bar.alt2 {
    background: linear-gradient(
        180deg,
        rgba(124, 58, 237, 0.8),
        rgba(124, 58, 237, 0.15)
    );
}

@keyframes grow {
    from {
        transform: scaleY(0.15);
        opacity: 0.2;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

.hero-float {
    position: absolute;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--panel);
    backdrop-filter: blur(12px);
    padding: 10px 14px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.72rem;
    z-index: 3;
}
.hero-float strong {
    display: block;
    font-size: 0.78rem;
}
.hero-float span {
    color: var(--muted);
    font-size: 0.66rem;
}
.hero-float .icon {
    width: 17px;
    height: 17px;
    color: var(--success);
}
.hero-float.one {
    top: -22px;
    right: 8%;
    animation: float 9s ease-in-out infinite;
}
.hero-float.two {
    bottom: -24px;
    left: -4%;
    animation: float 11s ease-in-out infinite reverse;
}

@media (max-width: 640px) {
    .hero-float {
        display: none;
    }
    .hero-panel {
        transform: none;
    }
}

.section {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: 64px clamp(18px, 5vw, 60px);
}

.section-head {
    max-width: 720px;
    margin-bottom: 38px;
}

.section-head h2 {
    margin: 14px 0 12px;
}

.section-head.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-head.center .eyebrow {
    justify-content: center;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    background: var(--line);
}

.metric-strip .metric {
    padding: 22px;
    background: var(--panel);
    text-align: center;
}

.metric .v {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--brand-2);
}

.metric .k {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 2px;
}

@media (max-width: 780px) {
    .metric-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 980px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature {
    position: relative;
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 93, 255, 0.28);
    box-shadow: 0 18px 40px rgba(21, 93, 255, 0.1);
}

.feature .f-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(21, 93, 255, 0.1);
    border: 1px solid rgba(21, 93, 255, 0.2);
    color: var(--brand);
    margin-bottom: 18px;
}

.feature .f-icon .icon {
    width: 22px;
    height: 22px;
}

.feature h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.feature p {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.7;
}

.feature .f-num {
    position: absolute;
    right: 20px;
    top: 14px;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--hover);
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 980px) {
    .bonus-grid {
        grid-template-columns: 1fr;
    }
}

.bonus-card {
    position: relative;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        radial-gradient(
            500px 200px at 100% 0%,
            rgba(21, 93, 255, 0.08),
            transparent 70%
        ),
        var(--panel);
    overflow: hidden;
}

.bonus-card .bonus-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-2);
    background: rgba(21, 93, 255, 0.1);
    border: 1px solid rgba(21, 93, 255, 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 18px;
}

.bonus-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.bonus-card p {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.7;
}

.bonus-card .pct {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(120deg, #0b4bd1, #155dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-top: 18px;
    line-height: 1;
}

.bonus-card .pct small {
    font-size: 0.9rem;
    color: var(--muted);
    -webkit-text-fill-color: var(--muted);
    letter-spacing: 0;
}

.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 980px) {
    .plans {
        grid-template-columns: 1fr;
    }
}

.plan {
    position: relative;
    padding: 26px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan.hot {
    border-color: rgba(21, 93, 255, 0.35);
    box-shadow: 0 30px 70px rgba(21, 93, 255, 0.09);
}

.plan .plan-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.plan .plan-price {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.plan .plan-price small {
    font-size: 0.78rem;
    color: var(--muted);
    font-family: var(--font-body);
    font-weight: 500;
}

.plan ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 0.83rem;
}

.plan li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.plan li .icon {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex: 0 0 16px;
    margin-top: 3px;
}

.plan .btn {
    margin-top: auto;
}

.cta-band {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: clamp(32px, 6vw, 64px);
    border-radius: 28px;
    border: 1px solid rgba(21, 93, 255, 0.25);
    background:
        radial-gradient(
            700px 300px at 10% 0%,
            rgba(21, 93, 255, 0.18),
            transparent 65%
        ),
        radial-gradient(
            600px 300px at 90% 100%,
            rgba(0, 163, 255, 0.1),
            transparent 65%
        ),
        linear-gradient(150deg, var(--brand-soft), var(--panel));
    text-align: center;
    overflow: hidden;
}

.cta-band h2 {
    margin: 12px 0 12px;
}

.cta-band .lead {
    max-width: 620px;
    margin: 0 auto;
}

.cta-band .hero-actions {
    justify-content: center;
}

.land-footer {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: 54px clamp(18px, 5vw, 60px) 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    border-top: 1px solid var(--line);
    margin-top: 70px;
    color: var(--muted);
    font-size: 0.82rem;
}

.land-footer h4 {
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.land-footer a {
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.land-footer a:hover {
    color: var(--brand-2);
}

.land-footer .brand {
    margin-bottom: 12px;
    color: var(--text);
}

.footer-note {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(18px, 5vw, 60px) 34px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.72rem;
}

@media (max-width: 860px) {
    .land-footer {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-panel {
        display: none;
    }
}

.auth-panel {
    position: relative;
    padding: 50px clamp(30px, 5vw, 70px);
    border-right: 1px solid var(--line);
    background:
        radial-gradient(
            700px 400px at 10% 10%,
            rgba(21, 93, 255, 0.15),
            transparent 60%
        ),
        radial-gradient(
            600px 400px at 90% 90%,
            rgba(0, 163, 255, 0.08),
            transparent 60%
        ),
        linear-gradient(160deg, var(--bg-soft), var(--bg));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-panel .brand {
    margin-bottom: auto;
    position: relative;
    z-index: 2;
}

.auth-panel .panel-copy {
    position: relative;
    z-index: 2;
    max-width: 460px;
    margin-bottom: auto;
    padding-top: 60px;
}

.auth-panel .panel-copy h2 {
    margin: 16px 0 14px;
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.auth-panel .panel-copy p {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

.auth-panel .auth-stats {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 26px;
    padding-top: 34px;
    margin-top: 34px;
    border-top: 1px solid var(--line);
}

.auth-panel .auth-stats .v {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 750;
    color: var(--brand-2);
}

.auth-panel .auth-stats .k {
    font-size: 0.7rem;
    color: var(--muted);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 22px;
    position: relative;
    z-index: 2;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-card .brand {
    display: none;
    margin-bottom: 26px;
}

@media (max-width: 980px) {
    .auth-card .brand {
        display: inline-flex;
    }
}

.auth-head {
    margin-bottom: 24px;
}

.auth-head h1 {
    font-size: 1.7rem;
    font-weight: 750;
}

.auth-head p {
    color: var(--muted);
    font-size: 0.86rem;
    margin-top: 6px;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 6px;
}

.auth-links a {
    color: var(--brand-2);
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.sponsor-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 163, 255, 0.2);
    background: var(--accent-soft);
    font-size: 0.8rem;
    color: var(--info-ink);
}

.auth-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 18px;
}

.auth-note a {
    color: var(--brand-2);
    font-weight: 600;
}

/* ==========================================================================
   Network tree
   ========================================================================== */

.network-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.network-scroll {
    overflow: auto;
    padding: 26px 22px 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(
            700px 300px at 50% 0%,
            rgba(0, 163, 255, 0.045),
            transparent 70%
        ),
        var(--panel);
    min-height: 360px;
    max-height: 640px;
}

.tree {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 100%;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.tree-children {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    margin-top: 18px;
    padding-top: 26px;
}

.tree-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 26px;
    border-left: 1px solid var(--line-strong);
}

.tree-node > .tree-children::before {
    top: -18px;
    height: 18px;
}

.tree-children > .tree-node {
    padding: 26px 9px 0;
}

.tree-children > .tree-node::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid var(--line-strong);
}

.tree-children > .tree-node::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 26px;
    border-left: 1px solid var(--line-strong);
}

.tree-children > .tree-node:first-child::before {
    left: 50%;
    width: 50%;
}

.tree-children > .tree-node:last-child::before {
    left: 0;
    width: 50%;
}

.tree-children > .tree-node:only-child::before {
    display: none;
}

.node-card {
    min-width: 196px;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    background: var(--panel);
    padding: 12px;
    position: relative;
    box-shadow: 0 12px 26px rgba(15, 40, 90, 0.1);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.node-card:hover {
    border-color: rgba(21, 93, 255, 0.4);
    transform: translateY(-2px);
}

.node-card.is-root {
    border-color: rgba(21, 93, 255, 0.45);
    background: linear-gradient(165deg, var(--brand-soft), var(--panel));
    box-shadow: 0 16px 34px rgba(21, 93, 255, 0.12);
}

.node-card.inactive {
    opacity: 0.62;
    filter: grayscale(0.3);
}

.node-top {
    display: flex;
    align-items: center;
    gap: 9px;
}

.node-top .who {
    min-width: 0;
    flex: 1;
}

.node-top .who .name {
    font-size: 0.8rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.node-top .who .user {
    font-size: 0.66rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    flex: 0 0 8px;
}

.node-status.on {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.13);
}

.node-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.node-metric {
    min-width: 0;
    border: 1px solid rgba(16, 38, 76, 0.1);
    background: var(--surface-3);
    border-radius: 8px;
    padding: 5px 7px;
}

.node-metric .k {
    font-size: 0.55rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.node-metric .v {
    font-size: 0.62rem;
    font-weight: 650;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.node-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 9px;
}

.node-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    background: var(--hover);
    color: var(--text-soft);
    border-radius: 7px;
    padding: 3px 7px;
    font-size: 0.63rem;
    cursor: pointer;
    transition: 0.18s ease;
}

.node-toggle:hover {
    border-color: rgba(21, 93, 255, 0.4);
    color: var(--brand-2);
}

.node-badge {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(16, 38, 76, 0.09);
    color: var(--muted);
}

.node-badge.root {
    background: rgba(21, 93, 255, 0.15);
    color: var(--brand-ink);
}

/* Árbol compacto del widget Livewire. El mockup de la landing queda intacto. */
.network-tree-widget .network-scroll {
    padding: 18px 14px 24px;
    min-height: 280px;
    max-height: 660px;
}

.network-tree-widget .tree-children {
    margin-top: 12px;
    padding-top: 18px;
}

.network-tree-widget .tree-children::before {
    height: 18px;
}

.network-tree-widget .tree-node > .tree-children::before {
    top: -12px;
    height: 12px;
}

.network-tree-widget .tree-children > .tree-node {
    padding: 18px 6px 0;
}

.network-tree-widget .tree-children > .tree-node::after {
    height: 18px;
}

.network-tree-widget .node-card {
    min-width: 200px;
    padding: 9px 10px;
    border-radius: 8px;
}

.network-tree-widget .node-metric {
    padding: 5px 5px;
}

.network-tree-widget .node-top {
    gap: 7px;
}

.network-tree-widget .node-top .who .name {
    font-size: 0.75rem;
}

.network-tree-widget .node-top .who .user {
    font-size: 0.62rem;
}

.network-tree-widget .node-status {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
}

.network-tree-widget .node-metrics {
    gap: 4px;
    margin-top: 7px;
}

.network-tree-widget .node-metric {
    padding: 4px 6px;
    border-radius: 6px;
}

.network-tree-widget .node-metric .k {
    font-size: 0.51rem;
}

.network-tree-widget .node-metric .v {
    font-size: 0.66rem;
}

.node-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.node-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.node-toggle-icon:hover {
    color: var(--brand-2);
    background: var(--hover);
    border-color: var(--line);
}

.node-toggle-icon .icon {
    width: 13px;
    height: 13px;
    transition: transform 0.18s ease;
}

.node-toggle-icon .icon.collapsed {
    transform: rotate(-90deg);
}

.node-toggle-icon:disabled {
    opacity: 0.55;
    cursor: default;
}

.legs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 1100px) {
    .legs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .legs-grid {
        grid-template-columns: 1fr;
    }
}

.leg-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 16px;
    background: var(--panel);
}

.leg-card .leg-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leg-card .leg-name {
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.25;
}

.leg-card .leg-user {
    font-size: 0.66rem;
    color: var(--muted);
}

.leg-card .leg-volume {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-top: 12px;
}

.leg-card .leg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 4px;
}

.leg-table-wrap {
    max-height: 460px;
    overflow: auto;
}

.leg-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-3);
}

.leg-table-wrap tbody tr[hidden] {
    display: none;
}

.leg-share {
    min-width: 136px;
}

.leg-share .progress {
    margin-top: 0;
    margin-bottom: 4px;
}

.cpa-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cpa-rule {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--surface-3);
}

.cpa-rule.ok {
    border-color: rgba(15, 157, 118, 0.45);
}

.cpa-rule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cpa-rule-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}

.cpa-rule-state {
    display: inline-flex;
    color: var(--danger);
}

.cpa-rule-state.ok {
    color: var(--success);
}

.cpa-rule-state .icon {
    width: 16px;
    height: 16px;
}

.cpa-rule-value {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cpa-rule-value small {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--muted);
}

.cpa-rule .progress {
    margin-top: 8px;
}

.cpa-rule-foot {
    margin-top: 7px;
    font-size: 0.69rem;
    line-height: 1.45;
    color: var(--muted);
}

.cpa-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cpa-summary > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--panel);
}

.cpa-summary span {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.cpa-summary strong {
    display: block;
    margin-top: 3px;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.cpa-summary small {
    display: block;
    margin-top: 2px;
    font-size: 0.64rem;
    color: var(--muted);
}

@media (max-width: 980px) {
    .cpa-grid {
        grid-template-columns: 1fr;
    }

    .cpa-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cpa-summary {
        grid-template-columns: 1fr;
    }

    .leg-share {
        min-width: 100px;
    }
}

.progress {
    height: 6px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
    margin-top: 10px;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #155dff, #4d90ff);
}

.progress.alt > span {
    background: linear-gradient(90deg, #0091ff, #4aa8ff);
}

.progress.violet > span {
    background: linear-gradient(90deg, #7c3aed, #6d28d9);
}

.rule-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px dashed rgba(0, 163, 255, 0.3);
    background: rgba(0, 163, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-soft);
}

.rule-box .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex: 0 0 20px;
}

.rule-box strong {
    color: var(--info-ink);
}

/* ==========================================================================
   Deposit / payment / misc
   ========================================================================== */

.split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 960px) {
    .split {
        grid-template-columns: 1fr;
    }
}

.pay-box {
    text-align: center;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(21, 93, 255, 0.22);
    background:
        radial-gradient(
            400px 200px at 50% 0%,
            rgba(21, 93, 255, 0.12),
            transparent 70%
        ),
        var(--panel);
}

.pay-qr {
    width: 200px;
    height: 200px;
    margin: 14px auto 12px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 40, 90, 0.08);
    display: grid;
    place-items: center;
}

.pay-qr img,
.pay-qr svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pay-address {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    margin-top: 10px;
}

.pay-address code {
    flex: 1;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--brand-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: left;
}

.fee-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fee-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.83rem;
    color: var(--muted);
    padding: 9px 0;
    border-bottom: 1px dashed var(--surface-3);
}

.fee-row:last-child {
    border-bottom: 0;
}

.fee-row strong {
    color: var(--text);
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.fee-row.total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-weight: 650;
}

.fee-row.total strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--brand-2);
}

.proof-preview {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-3);
    max-height: 320px;
}

.proof-preview img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.proof-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--muted);
    font-size: 0.82rem;
}

.banner-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(21, 93, 255, 0.24);
    background:
        radial-gradient(
            500px 200px at 0% 0%,
            rgba(21, 93, 255, 0.16),
            transparent 70%
        ),
        var(--panel);
    margin-bottom: 18px;
    overflow: hidden;
}

.banner-strip img {
    width: 118px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    flex: 0 0 118px;
}

.banner-strip .b-title {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
}

.banner-strip .b-text {
    font-size: 0.79rem;
    color: var(--muted);
    margin-top: 2px;
}

.banner-strip .b-link {
    margin-left: auto;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .banner-strip img {
        display: none;
    }
    .banner-strip {
        flex-wrap: wrap;
    }
    .banner-strip .b-link {
        margin-left: 0;
    }
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 27px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(21, 93, 255, 0.1);
    border: 1px solid rgba(21, 93, 255, 0.25);
    color: var(--brand);
    flex: 0 0 27px;
    position: relative;
    z-index: 1;
}

.timeline-dot .icon {
    width: 13px;
    height: 13px;
}

.timeline-body {
    min-width: 0;
    flex: 1;
}

.timeline-body .t-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-soft);
}

.timeline-body .t-meta {
    font-size: 0.7rem;
    color: var(--muted);
}

.timeline-amount {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--success);
    white-space: nowrap;
}

.timeline-amount.neg {
    color: var(--danger);
}

.empty {
    text-align: center;
    padding: 40px 18px;
    color: var(--muted);
    font-size: 0.85rem;
}

.empty .icon {
    width: 38px;
    height: 38px;
    margin: 0 auto 10px;
    color: var(--muted);
}

.product-tile {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
    display: flex;
    flex-direction: column;
}

.product-tile .img {
    height: 130px;
    background:
        radial-gradient(
            300px 150px at 70% 20%,
            rgba(21, 93, 255, 0.25),
            transparent 70%
        ),
        var(--surface-3);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.product-tile .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tile .img .icon {
    width: 38px;
    height: 38px;
    color: rgba(21, 93, 255, 0.6);
}

.product-tile .body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-tile h3 {
    font-size: 1rem;
}

.product-tile .tagline {
    font-size: 0.74rem;
    color: var(--brand-2);
}

.product-tile p {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.65;
}

.product-tile .price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-top: auto;
}

.product-tile form {
    margin-top: 8px;
}

/* Utility */
.mt-0 {
    margin-top: 0 !important;
}
.mt-1 {
    margin-top: 6px;
}
.mt-2 {
    margin-top: 12px;
}
.mt-3 {
    margin-top: 18px;
}
.mt-4 {
    margin-top: 26px;
}
.mb-0 {
    margin-bottom: 0 !important;
}
.mb-2 {
    margin-bottom: 12px;
}
.mb-3 {
    margin-bottom: 18px;
}
.w-full {
    width: 100%;
}
.hidden {
    display: none !important;
}
.nowrap {
    white-space: nowrap;
}
.right {
    text-align: right;
}
.center {
    text-align: center;
}
.flex-1 {
    flex: 1;
    min-width: 0;
}
.divider {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 16px 0;
}

.copy-toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(15, 157, 118, 0.16);
    border: 1px solid rgba(15, 157, 118, 0.35);
    color: var(--success-ink);
    font-size: 0.78rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.flash-wrap {
    position: relative;
    z-index: 2;
}

.note {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.6;
}

.kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--surface-3);
    font-size: 0.82rem;
}

.kv:last-child {
    border-bottom: 0;
}
.kv .k {
    color: var(--muted);
}
.kv .v {
    color: var(--text-soft);
    font-weight: 600;
    text-align: right;
}

.hr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 22px 0 12px;
}

.hr-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.info-tile {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface-3);
}

.info-tile .k {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 650;
}

.info-tile .v {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
    padding: 10px 4px 0;
}

.mini-chart .col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.mini-chart .col .bar {
    width: 100%;
    max-width: 46px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(
        180deg,
        rgba(21, 93, 255, 0.95),
        rgba(21, 93, 255, 0.14)
    );
    min-height: 4px;
    transition: height 0.4s ease;
}

.mini-chart .col .lab {
    font-size: 0.62rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.referral-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(21, 93, 255, 0.22);
    background:
        radial-gradient(
            500px 200px at 100% 0%,
            rgba(21, 93, 255, 0.1),
            transparent 70%
        ),
        var(--panel);
}

.referral-hero .big {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-2);
    letter-spacing: 0.02em;
}

.referral-hero .link-pill {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-3);
    padding: 8px 10px;
}

.referral-hero .link-pill code {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.74rem;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Livewire loading */
[x-cloak] {
    display: none !important;
}

/* FAQ (landing) */
.faq {
    display: grid;
    gap: 10px;
    max-width: 860px;
    margin: 0 auto;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    overflow: hidden;
}

.faq summary {
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-size: 1.15rem;
    color: var(--brand);
    line-height: 1;
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.65;
}

/* Alinear CTA de los planes */
.plan form {
    margin-top: auto;
}

.timeline-dot.neg {
    color: var(--danger);
}

.livewire-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   Refinamiento visual · geometría sobria
   ========================================================================== */

:root {
    --btn-brand: #155dff;
}

:root[data-theme="dark"] {
    --btn-brand: #2f6dff;
}

/* Fuera adornos de fondo y brillos decorativos */
body::before,
.landing-bg,
.hero-float,
.card::after,
.stat::before,
.hero-panel::before {
    display: none;
}

.card,
.stat {
    box-shadow: 0 1px 2px rgba(15, 40, 90, 0.04);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat {
    box-shadow: none;
}

/* Barra lateral */
.sidebar {
    gap: 14px;
    padding: 20px 14px;
}

.sidebar-head {
    padding: 0 4px 8px;
}

.side-link {
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.87rem;
}

.side-link.active {
    background: var(--brand-soft);
    border-color: var(--brand-line);
    box-shadow: inset 2px 0 0 var(--brand);
}

.side-link .pill {
    border-radius: 5px;
}

.referral-mini {
    border-radius: 10px;
    padding: 12px;
    background: var(--surface-3);
}

.ref-link {
    border-radius: 6px;
}

.brand .mark {
    border-radius: 8px;
}

/* Barra superior */
.topbar {
    gap: 12px;
    padding: 10px 24px;
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.top-title h1 {
    font-size: 1.05rem;
}

.top-title p {
    font-size: 0.72rem;
}

.top-actions {
    gap: 8px;
}

.chip {
    gap: 6px;
    padding: 5px 9px;
    border-radius: 6px;
    background: transparent;
    font-size: 0.72rem;
}

.chip.brand-chip {
    background: var(--brand-soft);
    border-color: var(--brand-line);
}

.user-chip {
    gap: 8px;
    padding: 3px 8px 3px 10px;
    border-radius: 8px;
    background: transparent;
}

.avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--btn-brand);
    box-shadow: none;
}

.avatar.sm {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

.avatar.lg {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 10px;
}

.avatar.alt {
    background: var(--accent);
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.menu-btn {
    width: 34px;
    height: 34px;
    border-radius: 7px;
}

.content {
    padding: 24px 28px 36px;
}

.page-head {
    margin-bottom: 18px;
}

.page-head h1 {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

/* Tarjetas y métricas */
.card.pad {
    padding: 18px;
}

.card-head {
    padding: 13px 18px;
}

.card-body {
    padding: 16px 18px;
}

.card-body.tight {
    padding: 12px 16px;
}

.card-foot {
    padding: 12px 18px;
}

.stat {
    padding: 16px;
}

.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    box-shadow: none;
}

.stat-icon .icon {
    width: 18px;
    height: 18px;
}

.stat-value {
    font-size: 1.5rem;
    margin-top: 12px;
}

.stat-foot {
    margin-top: 12px;
    padding-top: 10px;
}

.stat-trend {
    border-radius: 5px;
}

/* Botones */
.btn {
    padding: 8px 14px;
    border-radius: 7px;
}

.btn:hover,
.feature:hover,
.node-card:hover {
    transform: none;
}

.btn-primary {
    background: var(--btn-brand);
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--btn-brand);
    filter: brightness(1.07);
    box-shadow: none;
}

.btn-success {
    background: #047857;
    box-shadow: none;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 6px;
}

.btn-xs {
    border-radius: 5px;
}

.hero-actions .btn {
    padding: 10px 18px;
    border-radius: 8px;
}

.badge {
    padding: 2px 7px;
    border-radius: 5px;
}

.side-link .pill,
.stat-trend {
    border-radius: 5px;
}

/* Formularios */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="file"],
select,
textarea {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.86rem;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.input-group {
    border-radius: 7px;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Tablas, filtros y paginación */
table.table th {
    padding: 9px 14px;
}

table.table td {
    padding: 10px 14px;
}

.toolbar {
    padding: 11px 16px;
}

.tabs {
    padding: 3px;
    border-radius: 8px;
}

.tab {
    padding: 5px 10px;
    border-radius: 6px;
}

.tab.active {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: none;
}

.pagination .page-link,
.pagination span,
.pagination a {
    min-width: 32px;
    height: 32px;
    border-radius: 6px;
}

.pagination .active span,
.pagination .active > span {
    background: var(--brand-soft);
    box-shadow: none;
}

/* Landing */
.land-nav {
    padding-top: 16px;
    padding-bottom: 16px;
}

.land-nav .nav-actions .btn {
    padding: 8px 13px;
}

.land-nav .nav-actions .theme-toggle {
    width: 32px;
    height: 32px;
}

.hero {
    padding-top: clamp(32px, 5vw, 64px);
    padding-bottom: 56px;
}

.panel-legs .bar {
    border-radius: 3px 3px 0 0;
    animation: none;
}

.hero-copy h1 .grad {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--brand);
    -webkit-text-fill-color: var(--brand);
}

.eyebrow::before {
    background: var(--brand);
}

.section {
    padding-top: 52px;
    padding-bottom: 52px;
}

.section-head {
    margin-bottom: 28px;
}

.metric-strip {
    border-radius: var(--radius);
}

.metric-strip .metric {
    padding: 18px;
}

.feature {
    padding: 20px;
}

.feature:hover {
    border-color: var(--line-strong);
    box-shadow: none;
}

.feature .f-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.feature .f-icon .icon {
    width: 19px;
    height: 19px;
}

.bonus-card {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--panel);
}

.bonus-card .bonus-tag {
    border-radius: 5px;
    padding: 3px 8px;
}

.bonus-card .pct {
    background: none;
    color: var(--brand);
    -webkit-text-fill-color: var(--brand);
}

.plans {
    gap: 14px;
}

.plan {
    padding: 20px;
    border-radius: var(--radius);
    gap: 10px;
}

.plan.hot {
    box-shadow: none;
}

.plan .plan-price {
    font-size: 2rem;
}

.cta-band {
    padding: clamp(24px, 5vw, 44px);
    border-radius: var(--radius);
    border-color: var(--line-strong);
    background: var(--panel);
}

.land-footer {
    margin-top: 56px;
    padding-top: 40px;
}

/* Autenticación */
.auth-panel {
    background: var(--bg-soft);
}

.auth-panel .panel-copy {
    padding-top: 40px;
}

.auth-panel .auth-stats {
    padding-top: 26px;
    margin-top: 26px;
}

/* Red, retiros y pagos */
.node-card {
    border-radius: 8px;
    box-shadow: none;
}

.node-card.is-root {
    background: var(--brand-soft);
    box-shadow: none;
}

.leg-card {
    border-radius: 9px;
    padding: 14px;
}

.progress {
    height: 5px;
    border-radius: 3px;
}

.progress > span {
    background: var(--brand);
}

.progress.alt > span {
    background: var(--accent);
}

.progress.violet > span {
    background: var(--violet);
}

.rule-box {
    border-radius: 8px;
}

.pay-box {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--panel);
}

.pay-qr {
    border-radius: 6px;
    box-shadow: none;
}

.pay-address {
    border-radius: 6px;
}

.banner-strip {
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--panel);
}

.banner-strip img {
    border-radius: 6px;
}

.product-tile {
    border-radius: var(--radius);
}

.product-tile .img {
    height: 112px;
    background: var(--surface-3);
}

.product-tile .body {
    padding: 14px;
}

.info-tile {
    border-radius: 8px;
}

.referral-hero {
    border-radius: var(--radius);
    background: var(--panel);
}

.referral-hero .link-pill {
    border-radius: 6px;
}

.proof-preview {
    border-radius: 8px;
}

.faq details {
    border-radius: 8px;
}

.faq summary {
    padding: 13px 16px;
}

.faq details p {
    padding: 0 16px 16px;
}

.copy-toast {
    border-radius: 6px;
}

/* Botón de tema */
.theme-toggle {
    padding: 0;
}

.theme-toggle .icon {
    width: 16px;
    height: 16px;
}

.theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

.auth-theme {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 30;
    width: 32px;
    height: 32px;
    background: var(--panel);
}

/* Modo oscuro · detalles dependientes de color literal */
:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
}

:root[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238fa0b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

:root[data-theme="dark"] .pay-qr {
    border-color: rgba(255, 255, 255, 0.16);
}

:root[data-theme="dark"] body {
    background: var(--bg);
}

/* Accesibilidad */
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

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