:root {
    --n222-primary: #2563eb;
    --n222-primary-dark: #1d4ed8;
    --n222-primary-soft: #eff6ff;

    --n222-success: #16a34a;
    --n222-warning: #f59e0b;
    --n222-violet: #7c3aed;

    --n222-text: #0f172a;
    --n222-text-muted: #64748b;

    --n222-surface: #ffffff;
    --n222-surface-soft: #f8fafc;
    --n222-border: #e2e8f0;

    --n222-radius-sm: 12px;
    --n222-radius-md: 18px;
    --n222-radius-lg: 24px;

    --n222-shadow-sm:
        0 4px 14px rgba(15, 23, 42, 0.05);

    --n222-shadow-md:
        0 14px 40px rgba(15, 23, 42, 0.09);

    --n222-shadow-hover:
        0 20px 50px rgba(37, 99, 235, 0.16);

    --n222-transition:
        180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.naturals-dashboard {
    display: flex;
    flex-direction: column;
    gap: 40px;

    max-width: 1280px;
    margin: 0 auto;

    padding: 8px 6px 40px;
}

.naturals-dashboard__hero{
    position:relative;
    overflow:hidden;

    background:
        linear-gradient(
            135deg,
            var(--n222-primary-dark) 0%,
            var(--n222-primary) 100%
        );

    color:#fff;

    padding:48px;

    border-radius:var(--n222-radius-lg);

    box-shadow:var(--n222-shadow-md);
}

.naturals-dashboard__eyebrow{

    display:inline-flex;

    align-items:center;

    padding:8px 14px;

    border-radius:999px;

    background:rgba(255,255,255,.12);

    color:#fff;

    font-size:13px;

    font-weight:700;

    letter-spacing:.08em;

    text-transform:uppercase;

    backdrop-filter:blur(8px);
}

.naturals-dashboard__title{

    margin:14px 0 18px;

    font-size:48px;

    line-height:1.1;

    font-weight:800;

    letter-spacing:-.04em;

    color:#ffffff;
}

.naturals-dashboard__description{

    margin:0;

    max-width:620px;

    color:rgba(255,255,255,.92);

    font-size:19px;

    line-height:1.8;
}

.naturals-dashboard-section h3 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

.naturals-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.naturals-dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transition: .25s ease;
}

.naturals-dashboard-card:hover {
    transform: translateY(-4px);
}

.naturals-dashboard-card__label {
    display: block;
    color: #6b7280;
    margin-bottom: 10px;
}

.naturals-dashboard-card__value {
    font-size: 28px;
    font-weight: 700;
}
.naturals-dashboard-actions{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.naturals-dashboard-action-card{
    background:#fff;
    border-radius:18px;
    padding:28px 24px;
    text-decoration:none;
    color:#1f2937;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:all .25s ease;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}

.naturals-dashboard-action-card:hover{
    transform:translateY(-6px);
    box-shadow:0 18px 40px rgba(37,99,235,.18);
}

.naturals-dashboard-action-card__icon{
    font-size:42px;
    margin-bottom:18px;
}

.naturals-dashboard-action-card__title{
    margin:0;
    font-size:20px;
    font-weight:700;
}

.naturals-dashboard-action-card__text{
    margin-top:10px;
    color:#6b7280;
    font-size:15px;
    line-height:1.6;
}
/* ==========================
   Section Layout
========================== */

.naturals-dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.naturals-dashboard-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.naturals-dashboard-section__header h3 {
    margin: 0;

    font-size: 34px;
    font-weight: 700;

    color: var(--n222-text);

    letter-spacing: -.03em;
}
.naturals-dashboard__hero::before{
    content:"";

    position:absolute;

    top:-120px;
    right:-80px;

    width:260px;
    height:260px;

    border-radius:50%;

    background:rgba(255,255,255,.08);

    filter:blur(8px);
}

.naturals-dashboard__hero::after{
    content:"";

    position:absolute;

    bottom:-120px;
    left:-80px;

    width:220px;
    height:220px;

    border-radius:50%;

    background:rgba(47,143,70,.15);

    filter:blur(18px);
}
/* ==========================
   Business Snapshot Cards
========================== */

.naturals-dashboard-card{

    background:var(--n222-surface);

    border-radius:var(--n222-radius-md);

    padding:28px;

    box-shadow:var(--n222-shadow-sm);

    transition:all var(--n222-transition);

    border:1px solid transparent;
}

.naturals-dashboard-card:hover{

    transform:translateY(-6px);

    box-shadow:var(--n222-shadow-hover);

    border-color:var(--n222-primary-soft);
}

.naturals-dashboard-card h4{

    margin:0 0 18px;

    font-size:20px;

    font-weight:600;

    color:var(--n222-text);
}

.naturals-dashboard-card strong{

    display:block;

    margin-bottom:8px;

    font-size:44px;

    font-weight:800;

    line-height:1;

    color:var(--n222-primary-dark);
}

.naturals-dashboard-card p{

    margin:0;

    color:var(--n222-text-muted);

    font-size:15px;
}
/* ==========================
   Snapshot Icon
========================== */

.naturals-dashboard-card__icon{

    width:56px;
    height:56px;

    display:flex;

    align-items:center;
    justify-content:center;

    margin-bottom:20px;

    border-radius:16px;

    font-size:28px;
}

.naturals-dashboard-card__icon--blue{

    background:var(--n222-primary-soft);

    color:var(--n222-primary-dark);
}
/* Keep snapshot cards in one row on desktop */
.naturals-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.naturals-dashboard-card {
    width: auto;
    min-width: 0;
}
.naturals-dashboard-card__icon--green {
    background: var(--n222-nature-soft);
    color: var(--n222-nature-dark);
}

.naturals-dashboard-card__icon--gold {
    background: #fff7e6;
    color: #d97706;
}

.naturals-dashboard-card__icon--violet {
    background: #f5f3ff;
    color: var(--n222-violet);
}

.naturals-dashboard-card__value--green {
    color: var(--n222-nature-dark);
}

.naturals-dashboard-card__value--gold {
    color: #d97706;
}

.naturals-dashboard-card__value--violet {
    color: var(--n222-violet);
}

.naturals-dashboard-card__description {
    margin: 0;
    color: var(--n222-text-muted);
    font-size: 14px;
    line-height: 1.5;
}
.naturals-dashboard-action-card:focus-visible {
    outline: 3px solid var(--n222-primary);
    outline-offset: 5px;
    border-color: var(--n222-primary);

    box-shadow:
        0 0 0 5px rgba(37, 99, 235, 0.14),
        0 16px 40px rgba(15, 23, 42, 0.10);
}
@media (prefers-reduced-motion: reduce) {
    .naturals-dashboard-action-card,
    .naturals-dashboard-action-card::before,
    .naturals-dashboard-action-card__icon {
        transition: none;
    }

    .naturals-dashboard-action-card:hover,
    .naturals-dashboard-action-card:focus-visible,
    .naturals-dashboard-action-card:active {
        transform: none;
    }

    .naturals-dashboard-action-card:hover
    .naturals-dashboard-action-card__icon,
    .naturals-dashboard-action-card:focus-visible
    .naturals-dashboard-action-card__icon {
        transform: none;
    }
}
/* ---------------------------------------------------------
 * P05.6 — Professional Spacing Polish
 * Section vertical rhythm
 * --------------------------------------------------------- */

.naturals-dashboard__hero {
    margin-bottom: 48px;
}

.naturals-dashboard-section {
    margin: 0;
}

.naturals-dashboard-section
+ .naturals-dashboard-section {
    margin-top: 48px;
}

.naturals-dashboard-section__header {
    margin: 0 0 24px;
}

.naturals-dashboard-section__header h3 {
    margin: 0;
}

/* =========================================================
 * PW06 — Product Wallet Production UI
 * ========================================================= */

/* ---------------------------------------------------------
 * Product Wallet page layout
 * --------------------------------------------------------- */

.naturals-wallet {
    display: flex;
    flex-direction: column;
    gap: 48px;

    width: 100%;
    max-width: 1280px;

    margin: 0 auto;
    padding: 8px 6px 40px;

    color: var(--n222-text);
}

/* ---------------------------------------------------------
 * Product Wallet header
 * --------------------------------------------------------- */

.naturals-wallet__header {
    position: relative;

    display: flex;
    align-items: center;
    gap: 28px;

    overflow: hidden;

    padding: 42px 46px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--n222-primary-dark) 0%,
            var(--n222-primary) 65%,
            #3b82f6 100%
        );

    border-radius: var(--n222-radius-lg);
    box-shadow: var(--n222-shadow-md);
}

.naturals-wallet__header::before {
    content: "";

    position: absolute;
    top: -110px;
    right: -70px;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.10);

    filter: blur(6px);
    pointer-events: none;
}

.naturals-wallet__header::after {
    content: "";

    position: absolute;
    bottom: -130px;
    left: 30%;

    width: 230px;
    height: 230px;

    border-radius: 50%;

    background: rgba(124, 58, 237, 0.20);

    filter: blur(18px);
    pointer-events: none;
}

.naturals-wallet__header-icon {
    position: relative;
    z-index: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 82px;
    height: 82px;

    font-size: 40px;
    line-height: 1;

    background: rgba(255, 255, 255, 0.14);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 14px 30px rgba(15, 23, 42, 0.16);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.naturals-wallet__header-content {
    position: relative;
    z-index: 1;

    min-width: 0;
}

.naturals-wallet__eyebrow {
    display: inline-flex;
    align-items: center;

    margin: 0 0 12px;
    padding: 7px 13px;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    background: rgba(255, 255, 255, 0.13);
    border-radius: 999px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.naturals-wallet__title {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: clamp(34px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.naturals-wallet__description {
    max-width: 680px;
    margin: 0;

    color: rgba(255, 255, 255, 0.92);

    font-size: 17px;
    line-height: 1.75;
}

/* ---------------------------------------------------------
 * Wallet sections
 * --------------------------------------------------------- */

.naturals-wallet-section {
    display: flex;
    flex-direction: column;
    gap: 22px;

    margin: 0;
}

.naturals-wallet-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.naturals-wallet-section__header h3 {
    margin: 0;

    color: var(--n222-text);

    font-size: clamp(25px, 3vw, 34px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.naturals-wallet-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 7px 13px;

    color: var(--n222-text-muted);

    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    background: var(--n222-surface-soft);

    border: 1px solid var(--n222-border);
    border-radius: 999px;
}

/* ---------------------------------------------------------
 * Current balance card
 * --------------------------------------------------------- */

.naturals-wallet-balance-card {
    position: relative;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 36px;

    overflow: hidden;

    padding: 34px 36px;

    background:
        linear-gradient(
            135deg,
            var(--n222-surface) 0%,
            var(--n222-primary-soft) 100%
        );

    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--n222-radius-lg);

    box-shadow: var(--n222-shadow-sm);

    transition:
        transform var(--n222-transition),
        box-shadow var(--n222-transition),
        border-color var(--n222-transition);
}

.naturals-wallet-balance-card::after {
    content: "";

    position: absolute;
    top: -70px;
    right: -55px;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.07);

    pointer-events: none;
}

.naturals-wallet-balance-card:hover {
    transform: translateY(-3px);

    border-color: rgba(37, 99, 235, 0.22);

    box-shadow:
        0 18px 46px rgba(15, 23, 42, 0.10);
}

.naturals-wallet-balance-card__main,
.naturals-wallet-balance-card__status {
    position: relative;
    z-index: 1;
}

.naturals-wallet-balance-card__label {
    display: block;

    margin: 0 0 13px;

    color: var(--n222-text-muted);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.naturals-wallet-balance-card__amount {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 17px;
}

.naturals-wallet-balance-card__amount strong {
    color: var(--n222-primary-dark);

    font-size: clamp(40px, 6vw, 58px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.05em;
}

.naturals-wallet-balance-card__amount span {
    color: var(--n222-text-muted);

    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.naturals-wallet-balance-card__description {
    max-width: 620px;
    margin: 0;

    color: var(--n222-text-muted);

    font-size: 15px;
    line-height: 1.7;
}

.naturals-wallet-balance-card__status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;

    min-width: 150px;
}

.naturals-wallet-balance-card__status-label {
    color: var(--n222-text-muted);

    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* ---------------------------------------------------------
 * Wallet status badge
 * --------------------------------------------------------- */

.naturals-wallet-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    min-height: 38px;
    padding: 9px 14px;

    font-size: 14px;
    font-weight: 800;
    line-height: 1;

    border: 1px solid transparent;
    border-radius: 999px;
}

.naturals-wallet-status__indicator {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: currentColor;
    box-shadow: 0 0 0 4px currentColor;

    opacity: 0.82;
}

.naturals-wallet-status--active {
    color: #15803d;

    background: #f0fdf4;
    border-color: #bbf7d0;
}

.naturals-wallet-status--inactive {
    color: #b45309;

    background: #fffbeb;
    border-color: #fde68a;
}

/* ---------------------------------------------------------
 * Transactions card
 * --------------------------------------------------------- */

.naturals-wallet-transactions {
    overflow: hidden;

    min-height: 250px;

    background: var(--n222-surface);

    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-lg);

    box-shadow: var(--n222-shadow-sm);
}

/* ---------------------------------------------------------
 * Empty transaction state
 * --------------------------------------------------------- */

.naturals-wallet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 250px;
    padding: 44px 28px;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(37, 99, 235, 0.055) 0%,
            rgba(255, 255, 255, 0) 62%
        );
}

.naturals-wallet-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    margin-bottom: 22px;

    font-size: 34px;
    line-height: 1;

    background: var(--n222-primary-soft);

    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 22px;

    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.10);
}

.naturals-wallet-empty__title {
    margin: 0 0 10px;

    color: var(--n222-text);

    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.naturals-wallet-empty__text {
    max-width: 540px;
    margin: 0;

    color: var(--n222-text-muted);

    font-size: 15px;
    line-height: 1.7;
}

/* ---------------------------------------------------------
 * WooCommerce theme compatibility
 * --------------------------------------------------------- */

.woocommerce-MyAccount-content .naturals-wallet h2,
.woocommerce-MyAccount-content .naturals-wallet h3,
.woocommerce-MyAccount-content .naturals-wallet h4,
.woocommerce-MyAccount-content .naturals-wallet p {
    clear: none;
}

.woocommerce-MyAccount-content .naturals-wallet__title {
    color: #ffffff;
}

.woocommerce-MyAccount-content
.naturals-wallet-balance-card__amount strong {
    color: var(--n222-primary-dark);
}

/* ---------------------------------------------------------
 * Tablet
 * --------------------------------------------------------- */

@media (max-width: 900px) {
    .naturals-wallet {
        gap: 38px;
    }

    .naturals-wallet__header {
        padding: 36px 32px;
    }

    .naturals-wallet-balance-card {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .naturals-wallet-balance-card__status {
        align-items: flex-start;

        min-width: 0;
        padding-top: 24px;

        border-top: 1px solid var(--n222-border);
    }
}

/* ---------------------------------------------------------
 * Mobile
 * --------------------------------------------------------- */

@media (max-width: 600px) {
    .naturals-wallet {
        gap: 32px;

        padding: 4px 0 32px;
    }

    .naturals-wallet__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;

        padding: 30px 24px;

        border-radius: var(--n222-radius-md);
    }

    .naturals-wallet__header-icon {
        width: 66px;
        height: 66px;

        font-size: 32px;

        border-radius: 18px;
    }

    .naturals-wallet__title {
        margin-bottom: 10px;
    }

    .naturals-wallet__description {
        font-size: 15px;
        line-height: 1.65;
    }

    .naturals-wallet-section {
        gap: 18px;
    }

    .naturals-wallet-section__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .naturals-wallet-balance-card {
        gap: 24px;

        padding: 28px 22px;

        border-radius: var(--n222-radius-md);
    }

    .naturals-wallet-balance-card__amount {
        gap: 8px;
    }

    .naturals-wallet-balance-card__amount span {
        font-size: 14px;
    }

    .naturals-wallet-transactions {
        min-height: 230px;

        border-radius: var(--n222-radius-md);
    }

    .naturals-wallet-empty {
        min-height: 230px;
        padding: 36px 20px;
    }
}

/* ---------------------------------------------------------
 * Reduced motion accessibility
 * --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .naturals-wallet-balance-card {
        transition: none;
    }

    .naturals-wallet-balance-card:hover {
        transform: none;
    }
}

/* ==========================================================================
   Bonus Wallet — Production MVP
   ========================================================================== */

.n222-bonus-wallet {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    color: var(--n222-text);
}

.n222-bonus-wallet *,
.n222-bonus-wallet *::before,
.n222-bonus-wallet *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.n222-bonus-wallet .n222-wallet-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    overflow: hidden;
    padding: 32px;
    border: 1px solid #ddd6fe;
    border-radius: var(--n222-radius-lg);
    background:
        radial-gradient(
            circle at 92% 14%,
            rgba(124, 58, 237, 0.18),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #faf5ff 0%,
            #ffffff 52%,
            #f5f3ff 100%
        );
    box-shadow: var(--n222-shadow-sm);
}

.n222-bonus-wallet .n222-wallet-hero::after {
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.06);
    content: "";
    pointer-events: none;
}

.n222-bonus-wallet .n222-wallet-hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.n222-bonus-wallet .n222-wallet-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--n222-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.n222-bonus-wallet .n222-wallet-back-link:hover {
    color: var(--n222-primary-dark);
    transform: translateX(-2px);
}

.n222-bonus-wallet .n222-wallet-back-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 4px;
    border-radius: 6px;
}

.n222-bonus-wallet .n222-wallet-hero__eyebrow {
    margin-bottom: 10px;
    color: var(--n222-violet);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.n222-bonus-wallet .n222-wallet-hero__title {
    margin: 0;
    color: var(--n222-text);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.n222-bonus-wallet .n222-wallet-hero__description {
    max-width: 690px;
    margin: 18px 0 0;
    color: var(--n222-text-muted);
    font-size: 16px;
    line-height: 1.75;
}

.n222-bonus-wallet .n222-wallet-hero__icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--n222-violet);
    box-shadow:
        0 16px 34px rgba(124, 58, 237, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   Summary cards
   -------------------------------------------------------------------------- */

.n222-bonus-wallet .n222-wallet-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 22px;
}

.n222-bonus-wallet .n222-wallet-balance-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid #ddd6fe;
    border-radius: var(--n222-radius-lg);
    background:
        linear-gradient(
            145deg,
            #6d28d9 0%,
            #7c3aed 52%,
            #8b5cf6 100%
        );
    color: #ffffff;
    box-shadow:
        0 22px 52px rgba(109, 40, 217, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.n222-bonus-wallet .n222-wallet-balance-card__header,
.n222-bonus-wallet .n222-wallet-balance-card__footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.n222-bonus-wallet .n222-wallet-balance-card .n222-wallet-card__label {
    display: block;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.n222-bonus-wallet .n222-wallet-balance-card .n222-wallet-card__hint {
    max-width: 470px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.6;
}

.n222-bonus-wallet .n222-wallet-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.n222-bonus-wallet .n222-wallet-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.16);
}

.n222-bonus-wallet .n222-wallet-balance-card__amount {
    margin: 28px 0;
    color: #ffffff;
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}

.n222-bonus-wallet .n222-wallet-balance-card__footer {
    align-items: flex-end;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    line-height: 1.55;
}

.n222-bonus-wallet .n222-wallet-balance-card__currency {
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.n222-bonus-wallet .n222-wallet-metrics {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.n222-bonus-wallet .n222-wallet-metric-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-md);
    background: var(--n222-surface);
    box-shadow: var(--n222-shadow-sm);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.n222-bonus-wallet .n222-wallet-metric-card:hover {
    border-color: #ddd6fe;
    box-shadow: var(--n222-shadow-hover);
    transform: translateY(-2px);
}

.n222-bonus-wallet .n222-wallet-metric-card__icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
}

.n222-bonus-wallet .n222-wallet-metric-card__icon--success {
    background: #ecfdf5;
    color: var(--n222-success);
}

.n222-bonus-wallet .n222-wallet-metric-card__icon--warning {
    background: #fff7ed;
    color: var(--n222-warning);
}

.n222-bonus-wallet .n222-wallet-metric-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.n222-bonus-wallet .n222-wallet-metric-card .n222-wallet-card__label {
    color: var(--n222-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.n222-bonus-wallet .n222-wallet-metric-card__value {
    color: var(--n222-text);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.n222-bonus-wallet .n222-wallet-metric-card .n222-wallet-card__hint {
    color: var(--n222-text-muted);
    font-size: 13px;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */

.n222-bonus-wallet .n222-wallet-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 22px;
}

.n222-bonus-wallet .n222-wallet-panel {
    padding: 28px;
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-lg);
    background: var(--n222-surface);
    box-shadow: var(--n222-shadow-sm);
}

.n222-bonus-wallet .n222-wallet-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.n222-bonus-wallet .n222-wallet-panel__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--n222-violet);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.n222-bonus-wallet .n222-wallet-panel__title {
    margin: 0;
    color: var(--n222-text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.n222-bonus-wallet .n222-wallet-steps {
    display: flex;
    flex-direction: column;
}

.n222-bonus-wallet .n222-wallet-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--n222-border);
}

.n222-bonus-wallet .n222-wallet-step:first-child {
    padding-top: 0;
}

.n222-bonus-wallet .n222-wallet-step:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.n222-bonus-wallet .n222-wallet-step__number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #f5f3ff;
    color: var(--n222-violet);
    font-size: 14px;
    font-weight: 800;
}

.n222-bonus-wallet .n222-wallet-step h3 {
    margin: 0 0 6px;
    color: var(--n222-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.n222-bonus-wallet .n222-wallet-step p {
    margin: 0;
    color: var(--n222-text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.n222-bonus-wallet .n222-wallet-panel--notice {
    border-color: #fde68a;
    background:
        linear-gradient(
            180deg,
            #fffbeb 0%,
            #ffffff 100%
        );
}

.n222-bonus-wallet .n222-wallet-panel__notice-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 14px;
    background: #fef3c7;
    color: #b45309;
    font-size: 18px;
    font-weight: 900;
}

.n222-bonus-wallet .n222-wallet-panel--notice > p {
    margin: 14px 0 20px;
    color: var(--n222-text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.n222-bonus-wallet .n222-wallet-notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.n222-bonus-wallet .n222-wallet-notice-list li {
    position: relative;
    padding-left: 24px;
    color: var(--n222-text);
    font-size: 14px;
    line-height: 1.55;
}

.n222-bonus-wallet .n222-wallet-notice-list li::before {
    position: absolute;
    top: 0.55em;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--n222-warning);
    content: "";
}

/* --------------------------------------------------------------------------
   Empty history
   -------------------------------------------------------------------------- */

.n222-bonus-wallet .n222-wallet-history {
    padding: 28px;
}

.n222-bonus-wallet .n222-wallet-empty-state {
    display: flex;
    min-height: 230px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 36px 24px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--n222-radius-md);
    background: var(--n222-surface-soft);
    text-align: center;
}

.n222-bonus-wallet .n222-wallet-empty-state__icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 18px;
    background: #f5f3ff;
    color: var(--n222-violet);
}

.n222-bonus-wallet .n222-wallet-empty-state h3 {
    margin: 0 0 8px;
    color: var(--n222-text);
    font-size: 18px;
    font-weight: 800;
}

.n222-bonus-wallet .n222-wallet-empty-state p {
    max-width: 540px;
    margin: 0;
    color: var(--n222-text-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .n222-bonus-wallet .n222-wallet-summary,
    .n222-bonus-wallet .n222-wallet-content-grid {
        grid-template-columns: 1fr;
    }

    .n222-bonus-wallet .n222-wallet-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }
}

@media (max-width: 720px) {
    .n222-bonus-wallet {
        gap: 20px;
    }

    .n222-bonus-wallet .n222-wallet-hero,
    .n222-bonus-wallet .n222-wallet-panel,
    .n222-bonus-wallet .n222-wallet-history,
    .n222-bonus-wallet .n222-wallet-balance-card {
        padding: 22px;
        border-radius: var(--n222-radius-md);
    }

    .n222-bonus-wallet .n222-wallet-hero {
        flex-direction: column-reverse;
        gap: 18px;
    }

    .n222-bonus-wallet .n222-wallet-hero__icon {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 18px;
    }

    .n222-bonus-wallet .n222-wallet-back-link {
        margin-bottom: 18px;
    }

    .n222-bonus-wallet .n222-wallet-summary,
    .n222-bonus-wallet .n222-wallet-content-grid,
    .n222-bonus-wallet .n222-wallet-metrics {
        grid-template-columns: 1fr;
    }

    .n222-bonus-wallet .n222-wallet-balance-card__header,
    .n222-bonus-wallet .n222-wallet-balance-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .n222-bonus-wallet .n222-wallet-balance-card__amount {
        margin: 26px 0;
        font-size: 40px;
    }

    .n222-bonus-wallet .n222-wallet-metric-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .n222-bonus-wallet .n222-wallet-hero,
    .n222-bonus-wallet .n222-wallet-panel,
    .n222-bonus-wallet .n222-wallet-history,
    .n222-bonus-wallet .n222-wallet-balance-card {
        padding: 18px;
    }

    .n222-bonus-wallet .n222-wallet-hero__title {
        font-size: 32px;
    }

    .n222-bonus-wallet .n222-wallet-hero__description {
        font-size: 14px;
    }

    .n222-bonus-wallet .n222-wallet-step {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 13px;
    }

    .n222-bonus-wallet .n222-wallet-step__number {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .n222-bonus-wallet .n222-wallet-back-link,
    .n222-bonus-wallet .n222-wallet-metric-card {
        transition: none;
    }

    .n222-bonus-wallet .n222-wallet-back-link:hover,
    .n222-bonus-wallet .n222-wallet-metric-card:hover {
        transform: none;
    }
}

/* =========================================================
 * 222 Naturals — XP Center
 * Sprint S02 Production MVP
 * ========================================================= */

.n222-xp-center {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    color: var(--n222-text, #0f172a);
}

/* ---------------------------------------------------------
 * Hero
 * --------------------------------------------------------- */

.n222-xp-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 240px;
    padding: 42px;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: var(--n222-radius-lg, 24px);
    background:
        radial-gradient(
            circle at 85% 18%,
            rgba(255, 255, 255, 0.22),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #4c1d95 0%,
            #6d28d9 48%,
            #8b5cf6 100%
        );
    box-shadow:
        0 22px 55px rgba(76, 29, 149, 0.22);
    isolation: isolate;
}

.n222-xp-hero::before,
.n222-xp-hero::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
}

.n222-xp-hero::before {
    top: -80px;
    right: 130px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.n222-xp-hero::after {
    right: -90px;
    bottom: -130px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
}

.n222-xp-hero__content {
    position: relative;
    max-width: 680px;
    z-index: 1;
}

.n222-xp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ede9fe;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.n222-xp-hero__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.n222-xp-hero__description {
    max-width: 620px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.7;
}

.n222-xp-hero__badge {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 138px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 18px 40px rgba(46, 16, 101, 0.26);
    transform: rotate(4deg);
    backdrop-filter: blur(14px);
}

.n222-xp-hero__badge-icon {
    font-size: 38px;
    line-height: 1;
}

.n222-xp-hero__badge-text {
    margin-top: 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

/* ---------------------------------------------------------
 * Overview
 * --------------------------------------------------------- */

.n222-xp-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 24px;
}

.n222-xp-primary-card {
    position: relative;
    padding: 30px;
    overflow: hidden;
    border: 1px solid #ddd6fe;
    border-radius: var(--n222-radius-lg, 24px);
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #faf5ff 100%
        );
    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );
}

.n222-xp-primary-card::after {
    position: absolute;
    top: -54px;
    right: -54px;
    width: 145px;
    height: 145px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.07);
    content: "";
}

.n222-xp-primary-card__header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    z-index: 1;
}

.n222-xp-card__label {
    display: block;
    margin-bottom: 10px;
    color: var(--n222-text-muted, #64748b);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.n222-xp-primary-card__value {
    display: flex;
    align-items: baseline;
    gap: 9px;
    color: #4c1d95;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.n222-xp-primary-card__value span {
    color: #7c3aed;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.n222-xp-primary-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 27px;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.1);
}

.n222-xp-level {
    position: relative;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid #e9d5ff;
    z-index: 1;
}

.n222-xp-level__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.n222-xp-level__caption {
    display: block;
    margin-bottom: 4px;
    color: var(--n222-text-muted, #64748b);
    font-size: 13px;
}

.n222-xp-level__name {
    display: block;
    color: var(--n222-text, #0f172a);
    font-size: 20px;
    font-weight: 750;
}

.n222-xp-level__percentage {
    color: #6d28d9;
    font-size: 17px;
    font-weight: 800;
}

.n222-xp-progress {
    width: 100%;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #ede9fe;
    box-shadow: inset 0 1px 2px rgba(76, 29, 149, 0.08);
}

.n222-xp-progress__bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #7c3aed 0%,
            #a78bfa 100%
        );
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.34);
    transition: width 600ms ease;
}

.n222-xp-level__description {
    margin: 12px 0 0;
    color: var(--n222-text-muted, #64748b);
    font-size: 14px;
    line-height: 1.6;
}

/* ---------------------------------------------------------
 * Statistics
 * --------------------------------------------------------- */

.n222-xp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.n222-xp-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 126px;
    padding: 22px;
    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: var(--n222-radius-md, 18px);
    background: var(--n222-surface, #ffffff);
    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.n222-xp-stat-card:hover {
    border-color: #c4b5fd;
    box-shadow:
        0 16px 32px rgba(15, 23, 42, 0.09);
    transform: translateY(-3px);
}

.n222-xp-stat-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 22px;
}

.n222-xp-stat-card__label {
    display: block;
    margin-bottom: 7px;
    color: var(--n222-text-muted, #64748b);
    font-size: 13px;
    font-weight: 650;
}

.n222-xp-stat-card__value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--n222-text, #0f172a);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
}

.n222-xp-stat-card__value span {
    color: var(--n222-text-muted, #64748b);
    font-size: 11px;
    font-weight: 750;
}

.n222-xp-stat-card--blue .n222-xp-stat-card__icon {
    background: #eff6ff;
    color: #2563eb;
}

.n222-xp-stat-card--green .n222-xp-stat-card__icon {
    background: #ecfdf5;
    color: #16a34a;
}

.n222-xp-stat-card--violet .n222-xp-stat-card__icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.n222-xp-stat-card--amber .n222-xp-stat-card__icon {
    background: #fffbeb;
    color: #d97706;
}

/* ---------------------------------------------------------
 * Content panels
 * --------------------------------------------------------- */

.n222-xp-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    gap: 24px;
}

.n222-xp-panel {
    padding: 28px;
    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: var(--n222-radius-lg, 24px);
    background: var(--n222-surface, #ffffff);
    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );
}

.n222-xp-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.n222-xp-panel__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #7c3aed;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.n222-xp-panel__title {
    margin: 0;
    color: var(--n222-text, #0f172a);
    font-size: 22px;
    font-weight: 780;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.n222-xp-panel__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f5f3ff;
    color: #7c3aed;
    font-size: 20px;
}

/* ---------------------------------------------------------
 * Empty state
 * --------------------------------------------------------- */

.n222-xp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 32px;
    border: 1px dashed #d8b4fe;
    border-radius: var(--n222-radius-md, 18px);
    background:
        linear-gradient(
            180deg,
            #fdfcff 0%,
            #faf5ff 100%
        );
    text-align: center;
}

.n222-xp-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 30px;
}

.n222-xp-empty-state__title {
    margin: 0;
    color: var(--n222-text, #0f172a);
    font-size: 18px;
    font-weight: 750;
}

.n222-xp-empty-state__text {
    max-width: 520px;
    margin: 9px 0 0;
    color: var(--n222-text-muted, #64748b);
    font-size: 14px;
    line-height: 1.65;
}

.n222-xp-empty-state--compact {
    flex-direction: row;
    justify-content: flex-start;
    min-height: auto;
    padding: 24px;
    text-align: left;
}

.n222-xp-empty-state--compact .n222-xp-empty-state__icon {
    flex: 0 0 auto;
    margin: 0 18px 0 0;
}

/* ---------------------------------------------------------
 * XP guide
 * --------------------------------------------------------- */

.n222-xp-how-it-works {
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #faf5ff 100%
        );
}

.n222-xp-guide-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.n222-xp-guide-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: flex-start;
    gap: 15px;
}

.n222-xp-guide-item__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #7c3aed;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow:
        0 8px 18px rgba(124, 58, 237, 0.2);
}

.n222-xp-guide-item__title {
    margin: 1px 0 5px;
    color: var(--n222-text, #0f172a);
    font-size: 15px;
    font-weight: 750;
}

.n222-xp-guide-item__text {
    margin: 0;
    color: var(--n222-text-muted, #64748b);
    font-size: 13px;
    line-height: 1.62;
}

/* ---------------------------------------------------------
 * Activity and notice
 * --------------------------------------------------------- */

.n222-xp-activity {
    width: 100%;
}

.n222-xp-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid #ddd6fe;
    border-radius: var(--n222-radius-md, 18px);
    background: #f5f3ff;
}

.n222-xp-notice__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 18px;
}

.n222-xp-notice__title {
    display: block;
    margin: 0;
    color: #4c1d95;
    font-size: 15px;
    font-weight: 750;
}

.n222-xp-notice__text {
    margin: 5px 0 0;
    color: #6b21a8;
    font-size: 13px;
    line-height: 1.6;
}

/* ---------------------------------------------------------
 * WooCommerce layout compatibility
 * --------------------------------------------------------- */

.woocommerce-account
.woocommerce-MyAccount-content
.n222-xp-center {
    float: none;
    width: 100%;
    max-width: 100%;
}

.woocommerce-account
.woocommerce-MyAccount-content
.n222-xp-center *,
.woocommerce-account
.woocommerce-MyAccount-content
.n222-xp-center *::before,
.woocommerce-account
.woocommerce-MyAccount-content
.n222-xp-center *::after {
    box-sizing: border-box;
}

/* ---------------------------------------------------------
 * Responsive
 * --------------------------------------------------------- */

@media (max-width: 1080px) {
    .n222-xp-overview,
    .n222-xp-content-grid {
        grid-template-columns: 1fr;
    }

    .n222-xp-content-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .n222-xp-center {
        gap: 20px;
    }

    .n222-xp-hero {
        align-items: flex-start;
        min-height: auto;
        padding: 30px;
    }

    .n222-xp-hero__badge {
        width: 104px;
        height: 104px;
        border-radius: 28px;
    }

    .n222-xp-hero__badge-icon {
        font-size: 29px;
    }

    .n222-xp-hero__badge-text {
        font-size: 15px;
    }

    .n222-xp-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .n222-xp-panel,
    .n222-xp-primary-card {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .n222-xp-hero {
        flex-direction: column;
        gap: 28px;
        padding: 26px 22px;
        border-radius: 20px;
    }

    .n222-xp-hero__title {
        font-size: 36px;
    }

    .n222-xp-hero__description {
        font-size: 15px;
    }

    .n222-xp-hero__badge {
        width: 86px;
        height: 86px;
        border-radius: 24px;
        transform: none;
    }

    .n222-xp-hero__badge-icon {
        font-size: 24px;
    }

    .n222-xp-hero__badge-text {
        margin-top: 7px;
        font-size: 13px;
    }

    .n222-xp-stats-grid {
        grid-template-columns: 1fr;
    }

    .n222-xp-primary-card,
    .n222-xp-panel {
        padding: 21px;
        border-radius: 20px;
    }

    .n222-xp-primary-card__value {
        font-size: 39px;
    }

    .n222-xp-primary-card__icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        font-size: 23px;
    }

    .n222-xp-panel__header {
        margin-bottom: 21px;
    }

    .n222-xp-empty-state {
        min-height: 210px;
        padding: 24px 18px;
    }

    .n222-xp-empty-state--compact {
        flex-direction: column;
        align-items: flex-start;
        padding: 21px;
    }

    .n222-xp-empty-state--compact
    .n222-xp-empty-state__icon {
        margin: 0 0 15px;
    }

    .n222-xp-notice {
        padding: 20px;
    }
}

/* ---------------------------------------------------------
 * Accessibility
 * --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .n222-xp-progress__bar,
    .n222-xp-stat-card {
        transition: none;
    }

    .n222-xp-stat-card:hover {
        transform: none;
    }
}

/* =========================================================
 * Sprint S03 — Referral Network Production MVP
 * RN07.1 — Layout, Hero and Summary Cards
 * ========================================================= */

/* ---------------------------------------------------------
 * Referral Network root
 * --------------------------------------------------------- */

.n222-referral {
    display: flex;
    flex-direction: column;
    gap: 28px;

    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 40px;

    color: var(--n222-text, #0f172a);
}

/* ---------------------------------------------------------
 * Hero
 * --------------------------------------------------------- */

.n222-referral-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;

    min-height: 300px;
    padding: 44px 46px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--n222-radius-lg, 24px);

    background:
        radial-gradient(
            circle at 85% 18%,
            rgba(255, 255, 255, 0.18) 0,
            rgba(255, 255, 255, 0) 34%
        ),
        linear-gradient(
            135deg,
            #1e3a8a 0%,
            var(--n222-primary-dark, #1d4ed8) 42%,
            var(--n222-primary, #2563eb) 100%
        );

    box-shadow: var(
        --n222-shadow-md,
        0 14px 40px rgba(15, 23, 42, 0.09)
    );
}

.n222-referral-hero::before,
.n222-referral-hero::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
    border-radius: 999px;
}

.n222-referral-hero::before {
    top: -130px;
    right: -90px;

    width: 360px;
    height: 360px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.n222-referral-hero::after {
    right: 190px;
    bottom: -170px;

    width: 290px;
    height: 290px;

    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.n222-referral-hero__content {
    position: relative;
    z-index: 2;

    max-width: 670px;
}

.n222-referral-hero__eyebrow {
    display: inline-flex;
    align-items: center;

    margin: 0 0 16px;
    padding: 8px 13px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #ffffff;

    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.n222-referral-hero__title {
    margin: 0;

    color: #ffffff;

    font-size: clamp(38px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.n222-referral-hero__description {
    max-width: 620px;
    margin: 20px 0 0;

    color: rgba(255, 255, 255, 0.88);

    font-size: 17px;
    line-height: 1.72;
}

.n222-referral-hero__badge {
    position: relative;
    z-index: 2;

    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 142px;
    height: 142px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 38px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.2),
            rgba(255, 255, 255, 0.08)
        );

    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    color: #ffffff;

    transform: rotate(3deg);
}

.n222-referral-hero__badge-icon {
    font-size: 40px;
    line-height: 1;
}

.n222-referral-hero__badge-text {
    margin-top: 11px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------
 * Section structure
 * --------------------------------------------------------- */

.n222-referral-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.n222-referral-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.n222-referral-section__eyebrow {
    display: block;
    margin: 0 0 7px;

    color: var(--n222-primary, #2563eb);

    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.n222-referral-section__title {
    margin: 0;

    color: var(--n222-text, #0f172a);

    font-size: 29px;
    font-weight: 780;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.n222-referral-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    min-height: 40px;
    padding: 7px 12px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: 999px;

    background: var(--n222-surface, #ffffff);
    color: var(--n222-text, #0f172a);

    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );

    font-size: 14px;
    font-weight: 750;
    line-height: 1;
}

/* ---------------------------------------------------------
 * Summary statistics
 * --------------------------------------------------------- */

.n222-referral-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.n222-referral-stat-card {
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: flex-start;
    gap: 17px;

    min-width: 0;
    min-height: 188px;
    padding: 24px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: var(--n222-radius-md, 18px);

    background: var(--n222-surface, #ffffff);

    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );

    transition:
        transform var(
            --n222-transition,
            180ms cubic-bezier(0.2, 0.8, 0.2, 1)
        ),
        border-color var(
            --n222-transition,
            180ms cubic-bezier(0.2, 0.8, 0.2, 1)
        ),
        box-shadow var(
            --n222-transition,
            180ms cubic-bezier(0.2, 0.8, 0.2, 1)
        );
}

.n222-referral-stat-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 3px;

    content: "";
}

.n222-referral-stat-card:hover {
    transform: translateY(-4px);

    border-color: rgba(37, 99, 235, 0.2);

    box-shadow: var(
        --n222-shadow-hover,
        0 20px 50px rgba(37, 99, 235, 0.16)
    );
}

.n222-referral-stat-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 15px;

    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.n222-referral-stat-card__label {
    display: block;

    margin: 1px 0 10px;

    color: var(--n222-text-muted, #64748b);

    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.n222-referral-stat-card__value {
    display: block;

    overflow-wrap: anywhere;

    color: var(--n222-text, #0f172a);

    font-size: clamp(25px, 2.6vw, 34px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.n222-referral-stat-card__description {
    margin: 11px 0 0;

    color: var(--n222-text-muted, #64748b);

    font-size: 13px;
    line-height: 1.58;
}

/* Blue */

.n222-referral-stat-card--blue::before {
    background: var(--n222-primary, #2563eb);
}

.n222-referral-stat-card--blue
.n222-referral-stat-card__icon {
    background: var(--n222-primary-soft, #eff6ff);
    color: var(--n222-primary-dark, #1d4ed8);
}

/* Violet */

.n222-referral-stat-card--violet::before {
    background: var(--n222-violet, #7c3aed);
}

.n222-referral-stat-card--violet
.n222-referral-stat-card__icon {
    background: #f5f3ff;
    color: #6d28d9;
}

/* Green */

.n222-referral-stat-card--green::before {
    background: var(--n222-success, #16a34a);
}

.n222-referral-stat-card--green
.n222-referral-stat-card__icon {
    background: #f0fdf4;
    color: #15803d;
}

/* Amber */

.n222-referral-stat-card--amber::before {
    background: var(--n222-warning, #f59e0b);
}

.n222-referral-stat-card--amber
.n222-referral-stat-card__icon {
    background: #fffbeb;
    color: #b45309;
}

/* =========================================================
 * Sprint S03 — Referral Network Production MVP
 * RN07.2–RN07.4
 * Referral Link, Members, Responsive and Accessibility
 * ========================================================= */

/* ---------------------------------------------------------
 * Universal Referral Link card
 * --------------------------------------------------------- */

.n222-referral-link-card {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 24px;

    padding: 30px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: var(--n222-radius-lg, 24px);

    background:
        linear-gradient(
            135deg,
            var(--n222-surface, #ffffff) 0%,
            var(--n222-surface-soft, #f8fafc) 100%
        );

    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );
}

.n222-referral-link-card::after {
    position: absolute;
    top: -90px;
    right: -80px;

    width: 220px;
    height: 220px;

    border-radius: 999px;

    background: rgba(37, 99, 235, 0.06);

    content: "";
    pointer-events: none;
}

.n222-referral-link-card__content {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.n222-referral-link-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 16px;

    background: var(--n222-primary-soft, #eff6ff);
    color: var(--n222-primary-dark, #1d4ed8);

    font-size: 22px;
    line-height: 1;
}

.n222-referral-link-card__eyebrow {
    display: block;

    margin: 0 0 6px;

    color: var(--n222-primary, #2563eb);

    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.n222-referral-link-card__title {
    margin: 0;

    color: var(--n222-text, #0f172a);

    font-size: 28px;
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.n222-referral-link-card__description {
    margin: 10px 0 0;

    color: var(--n222-text-muted, #64748b);

    font-size: 15px;
    line-height: 1.65;
}

.n222-referral-link {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.n222-referral-link__input {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 13px 16px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: 13px;

    background: var(--n222-surface, #ffffff);
    color: var(--n222-text, #0f172a);

    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.03);

    font-size: 15px;
    line-height: 1.4;

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.n222-referral-link__input:hover {
    border-color: #cbd5e1;
}

.n222-referral-link__input:focus {
    outline: none;

    border-color: var(--n222-primary, #2563eb);

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.12),
        inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.n222-referral-link__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 52px;
    margin: 0;
    padding: 13px 21px;

    border: 1px solid var(--n222-primary, #2563eb);
    border-radius: 13px;

    background: var(--n222-primary, #2563eb);
    color: #ffffff;

    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.2);

    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;

    cursor: pointer;

    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.n222-referral-link__button:hover {
    border-color: var(--n222-primary-dark, #1d4ed8);
    background: var(--n222-primary-dark, #1d4ed8);

    box-shadow:
        0 14px 30px rgba(37, 99, 235, 0.26);

    transform: translateY(-2px);
}

.n222-referral-link__button:active {
    transform: translateY(0);
}

.n222-referral-link__button.is-copied {
    border-color: var(--n222-success, #16a34a);
    background: var(--n222-success, #16a34a);

    box-shadow:
        0 12px 26px rgba(22, 163, 74, 0.2);
}

.n222-referral-link__status {
    position: relative;
    z-index: 1;

    min-height: 20px;
    margin: -12px 0 0;

    color: var(--n222-success, #16a34a);

    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.n222-referral-link__fallback {
    position: relative;
    z-index: 1;

    margin: 0;

    color: var(--n222-text-muted, #64748b);

    font-size: 13px;
    line-height: 1.5;
}

.n222-referral-inline-notice {
    position: relative;
    z-index: 1;

    padding: 15px 17px;

    border: 1px solid #fde68a;
    border-radius: 13px;

    background: #fffbeb;
    color: #92400e;

    font-size: 14px;
    line-height: 1.55;
}

/* ---------------------------------------------------------
 * Direct referral members section
 * --------------------------------------------------------- */

.n222-referral-members {
    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 30px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: var(--n222-radius-lg, 24px);

    background: var(--n222-surface, #ffffff);

    box-shadow: var(
        --n222-shadow-sm,
        0 4px 14px rgba(15, 23, 42, 0.05)
    );
}

/* ---------------------------------------------------------
 * Referral members table
 * --------------------------------------------------------- */

.n222-referral-table-wrap {
    overflow-x: auto;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: 16px;

    background: var(--n222-surface, #ffffff);
}

.n222-referral-table {
    width: 100%;
    min-width: 720px;
    margin: 0;

    border: 0;
    border-collapse: collapse;

    background: transparent;
}

.n222-referral-table thead {
    background: var(--n222-surface-soft, #f8fafc);
}

.n222-referral-table th,
.n222-referral-table td {
    padding: 17px 19px;

    border: 0;
    border-bottom: 1px solid var(--n222-border, #e2e8f0);

    text-align: left;
    vertical-align: middle;
}

.n222-referral-table th {
    color: var(--n222-text-muted, #64748b);

    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.n222-referral-table td {
    color: var(--n222-text, #0f172a);

    font-size: 14px;
    line-height: 1.5;
}

.n222-referral-table tbody tr:last-child td {
    border-bottom: 0;
}

.n222-referral-table tbody tr {
    transition:
        background-color 160ms ease;
}

.n222-referral-table tbody tr:hover {
    background: #f8fbff;
}

/* ---------------------------------------------------------
 * Member identity
 * --------------------------------------------------------- */

.n222-referral-member {
    display: flex;
    align-items: center;
    gap: 13px;
}

.n222-referral-member__avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid #dbeafe;
    border-radius: 13px;

    background: var(--n222-primary-soft, #eff6ff);
    color: var(--n222-primary-dark, #1d4ed8);

    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.n222-referral-member__name {
    display: block;

    color: var(--n222-text, #0f172a);

    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
}

.n222-referral-member__id {
    display: block;

    margin-top: 3px;

    color: var(--n222-text-muted, #64748b);

    font-size: 12px;
    line-height: 1.35;
}

.n222-referral-member__network {
    color: var(--n222-text, #0f172a);

    font-size: 15px;
    font-weight: 800;
}

/* ---------------------------------------------------------
 * Member status
 * --------------------------------------------------------- */

.n222-referral-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 29px;
    padding: 6px 10px;

    border: 1px solid var(--n222-border, #e2e8f0);
    border-radius: 999px;

    background: var(--n222-surface-soft, #f8fafc);
    color: var(--n222-text-muted, #64748b);

    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}

.n222-referral-status--active {
    border-color: #bbf7d0;

    background: #f0fdf4;
    color: #15803d;
}

.n222-referral-status--inactive {
    border-color: #e2e8f0;

    background: #f8fafc;
    color: #64748b;
}

.n222-referral-status--customer {
    border-color: #bfdbfe;

    background: #eff6ff;
    color: #1d4ed8;
}

.n222-referral-status--partner,
.n222-referral-status--sales-partner,
.n222-referral-status--content-partner {
    border-color: #ddd6fe;

    background: #f5f3ff;
    color: #6d28d9;
}

.n222-referral-status--leader {
    border-color: #fde68a;

    background: #fffbeb;
    color: #b45309;
}

/* ---------------------------------------------------------
 * Empty state
 * --------------------------------------------------------- */

.n222-referral-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 270px;
    padding: 42px 28px;

    border: 1px dashed #cbd5e1;
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            var(--n222-surface-soft, #f8fafc) 100%
        );

    text-align: center;
}

.n222-referral-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin-bottom: 19px;

    border: 1px solid #dbeafe;
    border-radius: 21px;

    background: var(--n222-primary-soft, #eff6ff);
    color: var(--n222-primary-dark, #1d4ed8);

    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.1);

    font-size: 28px;
    line-height: 1;
}

.n222-referral-empty__title {
    margin: 0;

    color: var(--n222-text, #0f172a);

    font-size: 23px;
    font-weight: 780;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.n222-referral-empty__text {
    max-width: 560px;
    margin: 12px 0 0;

    color: var(--n222-text-muted, #64748b);

    font-size: 15px;
    line-height: 1.65;
}

/* ---------------------------------------------------------
 * Focus and keyboard accessibility
 * --------------------------------------------------------- */

.n222-referral-link__button:focus {
    outline: none;
}

.n222-referral-link__button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 3px;

    box-shadow:
        0 0 0 5px rgba(37, 99, 235, 0.1),
        0 12px 28px rgba(37, 99, 235, 0.2);
}

.n222-referral-link__input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

/* ---------------------------------------------------------
 * Large tablet
 * --------------------------------------------------------- */

@media (max-width: 1180px) {
    .n222-referral-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .n222-referral-stat-card {
        min-height: 166px;
    }
}

/* ---------------------------------------------------------
 * Tablet
 * --------------------------------------------------------- */

@media (max-width: 900px) {
    .n222-referral {
        gap: 24px;
    }

    .n222-referral-hero {
        min-height: auto;
        padding: 38px 34px;
    }

    .n222-referral-hero__badge {
        width: 116px;
        height: 116px;

        border-radius: 31px;
    }

    .n222-referral-hero__badge-icon {
        font-size: 32px;
    }

    .n222-referral-hero__title {
        font-size: clamp(35px, 7vw, 48px);
    }

    .n222-referral-link-card,
    .n222-referral-members {
        padding: 26px;
    }
}

/* ---------------------------------------------------------
 * Mobile
 * --------------------------------------------------------- */

@media (max-width: 680px) {
    .n222-referral {
        gap: 20px;
        padding-bottom: 28px;
    }

    .n222-referral-hero {
        align-items: flex-start;

        padding: 30px 24px;

        border-radius: 20px;
    }

    .n222-referral-hero__badge {
        display: none;
    }

    .n222-referral-hero__eyebrow {
        margin-bottom: 13px;
    }

    .n222-referral-hero__title {
        font-size: 36px;
        line-height: 1.08;
    }

    .n222-referral-hero__description {
        margin-top: 16px;

        font-size: 15px;
        line-height: 1.65;
    }

    .n222-referral-section__header {
        align-items: center;
    }

    .n222-referral-section__title,
    .n222-referral-link-card__title {
        font-size: 24px;
    }

    .n222-referral-stats {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .n222-referral-stat-card {
        min-height: auto;
        padding: 21px;
    }

    .n222-referral-stat-card__value {
        font-size: 29px;
    }

    .n222-referral-link-card,
    .n222-referral-members {
        padding: 22px;

        border-radius: 20px;
    }

    .n222-referral-link-card__content {
        gap: 14px;
    }

    .n222-referral-link-card__icon {
        width: 46px;
        height: 46px;

        border-radius: 14px;
    }

    .n222-referral-link {
        grid-template-columns: 1fr;
    }

    .n222-referral-link__button {
        width: 100%;
    }

    .n222-referral-empty {
        min-height: 240px;
        padding: 34px 20px;
    }

    .n222-referral-empty__title {
        font-size: 21px;
    }
}

/* ---------------------------------------------------------
 * Compact mobile
 * --------------------------------------------------------- */

@media (max-width: 420px) {
    .n222-referral-hero {
        padding: 26px 20px;
    }

    .n222-referral-hero__title {
        font-size: 32px;
    }

    .n222-referral-section__header {
        align-items: flex-start;
    }

    .n222-referral-section__count {
        min-width: 36px;
        min-height: 36px;
    }

    .n222-referral-stat-card {
        gap: 14px;
        padding: 19px;
    }

    .n222-referral-stat-card__icon {
        width: 44px;
        height: 44px;

        border-radius: 13px;
    }

    .n222-referral-link-card,
    .n222-referral-members {
        padding: 19px;
    }
}

/* ---------------------------------------------------------
 * Mobile table cards
 * --------------------------------------------------------- */

@media (max-width: 760px) {
    .n222-referral-table-wrap {
        overflow: visible;

        border: 0;
        border-radius: 0;
    }

    .n222-referral-table {
        min-width: 0;
    }

    .n222-referral-table thead {
        display: none;
    }

    .n222-referral-table,
    .n222-referral-table tbody,
    .n222-referral-table tr,
    .n222-referral-table td {
        display: block;
        width: 100%;
    }

    .n222-referral-table tbody {
        display: grid;
        gap: 14px;
    }

    .n222-referral-table tbody tr {
        overflow: hidden;

        padding: 6px 18px;

        border: 1px solid var(--n222-border, #e2e8f0);
        border-radius: 16px;

        background: var(--n222-surface, #ffffff);

        box-shadow:
            0 4px 14px rgba(15, 23, 42, 0.04);
    }

    .n222-referral-table tbody tr:hover {
        background: var(--n222-surface, #ffffff);
    }

    .n222-referral-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;

        padding: 14px 0;

        border-bottom: 1px solid var(--n222-border, #e2e8f0);

        text-align: right;
    }

    .n222-referral-table td:last-child {
        border-bottom: 0;
    }

    .n222-referral-table td::before {
        flex: 0 0 42%;

        color: var(--n222-text-muted, #64748b);

        content: attr(data-label);

        font-size: 12px;
        font-weight: 750;
        line-height: 1.35;
        letter-spacing: 0.035em;
        text-align: left;
        text-transform: uppercase;
    }

    .n222-referral-table td:first-child {
        display: block;

        text-align: left;
    }

    .n222-referral-table td:first-child::before {
        display: none;
    }
}

/* ---------------------------------------------------------
 * Reduced motion
 * --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .n222-referral-stat-card,
    .n222-referral-link__button,
    .n222-referral-table tbody tr,
    .n222-referral-link__input {
        scroll-behavior: auto;
        transition: none;
    }

    .n222-referral-stat-card:hover,
    .n222-referral-link__button:hover {
        transform: none;
    }
}

/* ---------------------------------------------------------
 * High contrast and forced colors
 * --------------------------------------------------------- */

@media (forced-colors: active) {
    .n222-referral-hero,
    .n222-referral-stat-card,
    .n222-referral-link-card,
    .n222-referral-members,
    .n222-referral-empty,
    .n222-referral-link__input,
    .n222-referral-link__button {
        border: 1px solid CanvasText;
    }

    .n222-referral-link__button {
        background: ButtonFace;
        color: ButtonText;
    }
}

/* ==========================================================
 * RR05.9 — Referral Tree
 * ========================================================== */

.n222-referral-tree {
    margin-top: 32px;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(37, 99, 235, 0.1),
            transparent 34%
        ),
        var(--n222-surface);
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-lg);
    box-shadow: var(--n222-shadow-sm);
}

.n222-referral-tree__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.n222-referral-tree__eyebrow {
    margin: 0 0 8px;
    color: var(--n222-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.n222-referral-tree__header h2 {
    margin: 0;
    color: var(--n222-text);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.n222-referral-tree__description {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--n222-text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.n222-referral-tree__summary {
    min-width: 130px;
    padding: 16px 18px;
    text-align: center;
    background: var(--n222-primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--n222-radius-md);
}

.n222-referral-tree__summary span {
    display: block;
    margin-bottom: 4px;
    color: var(--n222-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.n222-referral-tree__summary strong {
    color: var(--n222-primary-dark);
    font-size: 28px;
    line-height: 1;
}

.n222-referral-tree__content {
    overflow-x: auto;
    padding: 8px 4px 14px;
    scrollbar-width: thin;
}

.n222-referral-tree__node {
    position: relative;
    min-width: 230px;
}

.n222-referral-tree__card {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(100%, 340px);
    min-height: 88px;
    margin: 0 auto;
    padding: 16px;
    background: var(--n222-surface);
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-md);
    box-shadow: var(--n222-shadow-sm);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.n222-referral-tree__card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: var(--n222-shadow-hover);
}

.n222-referral-tree__node--root > .n222-referral-tree__card {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--n222-primary-dark),
        var(--n222-primary)
    );
    border-color: transparent;
}

.n222-referral-tree__avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--n222-primary-dark);
    font-size: 18px;
    font-weight: 900;
    background: var(--n222-primary-soft);
    border-radius: 16px;
}

.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__avatar {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.n222-referral-tree__identity {
    min-width: 0;
}

.n222-referral-tree__identity strong {
    display: block;
    overflow: hidden;
    color: var(--n222-text);
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.n222-referral-tree__identity span {
    display: block;
    margin-top: 4px;
    color: var(--n222-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__identity strong,
.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__identity span {
    color: #ffffff;
}

.n222-referral-tree__count {
    min-width: 54px;
    padding: 8px 10px;
    text-align: center;
    background: var(--n222-surface-soft);
    border-radius: 12px;
}

.n222-referral-tree__count span {
    display: block;
    color: var(--n222-text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.n222-referral-tree__count strong {
    display: block;
    margin-top: 2px;
    color: var(--n222-text);
    font-size: 18px;
}

.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__count {
    background: rgba(255, 255, 255, 0.14);
}

.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__count span,
.n222-referral-tree__node--root
    > .n222-referral-tree__card
    .n222-referral-tree__count strong {
    color: #ffffff;
}

.n222-referral-tree__children {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    min-width: max-content;
    padding: 54px 12px 0;
}

.n222-referral-tree__children::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 28px;
    background: var(--n222-border);
    content: "";
    transform: translateX(-50%);
}

.n222-referral-tree__children > .n222-referral-tree__node::before {
    position: absolute;
    top: -26px;
    left: 50%;
    width: 2px;
    height: 26px;
    background: var(--n222-border);
    content: "";
    transform: translateX(-50%);
}

.n222-referral-tree__children > .n222-referral-tree__node::after {
    position: absolute;
    top: -26px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--n222-border);
    content: "";
}

.n222-referral-tree__children
    > .n222-referral-tree__node:first-child::after {
    left: 50%;
    width: 50%;
}

.n222-referral-tree__children
    > .n222-referral-tree__node:last-child::after {
    width: 50%;
}

.n222-referral-tree__children
    > .n222-referral-tree__node:only-child::after {
    display: none;
}

@media (max-width: 767px) {
    .n222-referral-tree {
        padding: 22px 18px;
    }

    .n222-referral-tree__header {
        flex-direction: column;
    }

    .n222-referral-tree__summary {
        width: 100%;
    }

    .n222-referral-tree__children {
        justify-content: flex-start;
        gap: 18px;
    }

    .n222-referral-tree__card {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        min-width: 260px;
    }

    .n222-referral-tree__avatar {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .n222-referral-tree__card {
        transition: none;
    }

    .n222-referral-tree__card:hover {
        transform: none;
    }
}

.n222-commission {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.n222-section-title {
    margin: 0 0 20px;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--n222-text);
}

.n222-empty-state {
    padding: 32px;
    border: 1px dashed var(--n222-border);
    border-radius: var(--n222-radius-md);
    background: var(--n222-surface-soft);
    color: var(--n222-text-muted);
    text-align: center;
}

/* ==========================================================
   COMMISSION HERO
   ========================================================== */

.n222-commission-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 36px;
    border-radius: var(--n222-radius-lg);
    background: linear-gradient(
        135deg,
        var(--n222-primary-soft),
        #ffffff
    );
    border: 1px solid var(--n222-border);
    box-shadow: var(--n222-shadow-sm);
}

.n222-commission-hero__content {
    flex: 1;
}

.n222-commission-hero__eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--n222-primary);
}

.n222-commission-hero__title {
    margin: 0 0 14px;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--n222-text);
}

.n222-commission-hero__description {
    margin: 0;
    max-width: 640px;
    color: var(--n222-text-muted);
    line-height: 1.7;
}

.n222-commission-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--n222-border);
    box-shadow: var(--n222-shadow-sm);
    font-weight: 700;
}

.n222-commission-hero__badge-icon {
    font-size: 1.2rem;
}

.n222-commission-hero__badge-text {
    color: var(--n222-text);
}

/* ==========================================================
   COMMISSION SUMMARY
   ========================================================== */

.n222-commission-summary-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );
    gap: 20px;
}

.n222-commission-stat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--n222-surface);
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-md);
    box-shadow: var(--n222-shadow-sm);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.n222-commission-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--n222-shadow-md);
}

.n222-commission-stat-card__icon {
    font-size: 1.4rem;
}

.n222-commission-stat-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--n222-text);
    line-height: 1;
}

.n222-commission-stat-card__label {
    color: var(--n222-text-muted);
    font-size: .95rem;
}

/* ==========================================================
   COMMISSION HISTORY
   ========================================================== */

.n222-commission-history {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.n222-commission-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--n222-surface);
    border: 1px solid var(--n222-border);
    border-radius: var(--n222-radius-md);
    overflow: hidden;
    box-shadow: var(--n222-shadow-sm);
}

.n222-commission-table th,
.n222-commission-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--n222-border);
}

.n222-commission-table th {
    background: var(--n222-surface-soft);
    font-weight: 700;
    color: var(--n222-text);
}

.n222-commission-table td {
    color: var(--n222-text-muted);
}

.n222-commission-table tbody tr:hover {
    background: var(--n222-primary-soft);
}

.n222-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.n222-status--pending {
    background: #fef3c7;
    color: #92400e;
}

.n222-status--approved {
    background: #dcfce7;
    color: #166534;
}

.n222-status--paid {
    background: #dbeafe;
    color: #1d4ed8;
}

.n222-status--cancelled {
    background: #fee2e2;
    color: #991b1b;
}