:root {
    --ds-bg: #05070d;
    --ds-panel: rgba(22, 25, 34, .74);
    --ds-panel-strong: rgba(31, 35, 47, .9);
    --ds-line: rgba(255, 255, 255, .11);
    --ds-text: #f5f7fb;
    --ds-muted: #aeb5c2;
    --ds-gold: #ffc72c;
    --ds-gold-2: #ff9f1c;
    --ds-cyan: #31eadf;
    --ds-green: #2fe28b;
    --ds-red: #ff6b6b;
    --sidebar-width: 268px;
}

html,
body {
    min-height: 100%;
}

body.socios-shell,
body.public-shell {
    background: var(--ds-bg);
    color: var(--ds-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    margin: 0;
}

.socios-bg,
.public-shell::before {
    background:
        radial-gradient(circle at 24% 6%, rgba(203, 255, 55, .22), transparent 28%),
        radial-gradient(circle at 78% 92%, rgba(255, 159, 28, .22), transparent 32%),
        radial-gradient(circle at 42% 78%, rgba(49, 234, 223, .15), transparent 26%),
        linear-gradient(135deg, #090719 0%, #121017 46%, #07090e 100%);
    inset: 0;
    position: fixed;
    z-index: -2;
}

.socios-bg::after,
.public-shell::after {
    background-image: linear-gradient(130deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 46px 46px;
    content: "";
    inset: 0;
    opacity: .25;
    position: fixed;
    z-index: -1;
}

.socios-app {
    display: flex;
    min-height: 100vh;
}

.socios-sidebar {
    background: rgba(6, 8, 14, .76);
    border-right: 1px solid var(--ds-line);
    bottom: 0;
    display: flex;
    flex-direction: column;
    left: 0;
    padding: 20px 16px;
    position: fixed;
    top: 0;
    width: var(--sidebar-width);
    z-index: 20;
}

.socios-brand {
    align-items: center;
    color: var(--ds-text);
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    text-decoration: none;
}

.socios-brand:hover {
    color: var(--ds-text);
}

.socios-brand-mark {
    align-items: center;
    background: linear-gradient(145deg, var(--ds-gold), var(--ds-gold-2));
    border-radius: 14px;
    color: #1a1201;
    display: inline-flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.socios-brand strong,
.socios-brand small {
    display: block;
    line-height: 1.1;
}

.socios-brand small {
    color: var(--ds-muted);
    font-size: 12px;
    margin-top: 4px;
}

.socios-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.socios-nav-title,
.socios-kicker,
.metric-label {
    color: var(--ds-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.socios-nav-title {
    margin: 0 10px 8px;
}

.socios-nav-link {
    border: 1px solid transparent;
    border-radius: 11px;
    color: #d9dee8;
    display: block;
    font-weight: 700;
    padding: 10px 12px;
    text-decoration: none;
}

.socios-nav-link:hover,
.socios-nav-link.active {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .12);
    color: #ffffff;
}

.socios-nav-link.active {
    box-shadow: inset 0 0 0 1px rgba(255, 199, 44, .22);
}

.socios-sidebar-card,
.glass-card,
.gold-hero,
.level-table-card,
.page-heading,
.public-card {
    background: var(--ds-panel);
    border: 1px solid var(--ds-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 80px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
}

.socios-sidebar-card {
    border-radius: 14px;
    color: var(--ds-muted);
    font-size: 12px;
    margin-top: 18px;
    padding: 14px;
}

.socios-sidebar-card strong {
    color: var(--ds-text);
    display: block;
    font-size: 14px;
}

.socios-main {
    margin-left: var(--sidebar-width);
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
}

.socios-topbar {
    align-items: center;
    background: rgba(7, 9, 15, .72);
    border-bottom: 1px solid var(--ds-line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: 74px;
    padding: 16px 28px;
    position: sticky;
    top: 0;
    z-index: 15;
    backdrop-filter: blur(18px);
}

.socios-topbar strong {
    display: block;
    font-size: 22px;
}

.socios-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.socios-content {
    padding: 28px;
}

.gold-hero {
    border-radius: 24px;
    margin: 0 auto 24px;
    max-width: 1120px;
    overflow: hidden;
    padding: 44px;
    position: relative;
    text-align: center;
}

.gold-hero::before {
    background: radial-gradient(circle, rgba(255, 199, 44, .24), transparent 62%);
    content: "";
    height: 520px;
    left: 50%;
    position: absolute;
    top: -270px;
    transform: translateX(-50%);
    width: 520px;
}

.gold-badge {
    border: 1px solid rgba(255, 199, 44, .35);
    border-radius: 999px;
    color: var(--ds-gold);
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    padding: 8px 14px;
    position: relative;
    text-transform: uppercase;
}

.level-orb {
    align-items: center;
    background: linear-gradient(145deg, #ffe47a, #f7a900);
    border-radius: 24px;
    box-shadow: 0 0 54px rgba(255, 199, 44, .34);
    color: #231400;
    display: flex;
    font-size: 54px;
    font-weight: 950;
    height: 150px;
    justify-content: center;
    margin: 24px auto 22px;
    position: relative;
    width: 150px;
}

.gold-hero h1 {
    font-size: clamp(44px, 7vw, 74px);
    font-weight: 900;
    line-height: .95;
    margin: 0;
    position: relative;
}

.gold-hero h1 strong {
    color: var(--ds-gold-2);
}

.gold-hero p {
    color: var(--ds-muted);
    font-size: 18px;
    margin: 18px auto 0;
    max-width: 720px;
    position: relative;
}

.gold-metrics {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 34px auto 24px;
    max-width: 820px;
    position: relative;
}

.gold-metrics article,
.reward-mini,
.stack-item,
.level-table article {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
}

.gold-metrics article {
    padding: 18px 20px;
    text-align: left;
}

.gold-metrics span,
.reward-card span,
.muted {
    color: var(--ds-muted);
}

.gold-metrics strong {
    color: var(--ds-gold);
    display: block;
    font-size: 34px;
    line-height: 1;
    margin-top: 6px;
}

.level-progress-card {
    background: rgba(7, 8, 12, .48);
    border: 1px solid rgba(255, 199, 44, .24);
    border-radius: 18px;
    margin: 0 auto;
    max-width: 820px;
    padding: 20px;
    position: relative;
    text-align: left;
}

.progress-heading,
.card-heading,
.ledger-list > div,
.stat-list > div {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.progress-heading span {
    color: var(--ds-muted);
    font-weight: 800;
    text-transform: uppercase;
}

.progress-heading strong {
    color: var(--ds-gold);
}

.level-progress-track {
    background: rgba(255, 255, 255, .09);
    border-radius: 999px;
    height: 14px;
    margin: 18px 0 10px;
    overflow: hidden;
}

.level-progress-track span {
    background: linear-gradient(90deg, var(--ds-gold), var(--ds-gold-2));
    border-radius: inherit;
    display: block;
    height: 100%;
}

.progress-scale {
    color: var(--ds-muted);
    display: flex;
    font-size: 13px;
    justify-content: space-between;
}

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

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

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

.glass-card,
.page-heading,
.level-table-card {
    border-radius: 22px;
    padding: 22px;
}

.wide-card {
    grid-column: span 2;
}

.qr-card,
.activity-card {
    grid-column: span 2;
}

.qr-card {
    text-align: center;
}

.qr-card.xl {
    grid-column: auto;
}

.qr-image {
    background: #ffffff;
    border-radius: 18px;
    display: block;
    margin: 18px auto;
    max-width: 230px;
    padding: 12px;
    width: 100%;
}

.qr-image.large {
    max-width: 360px;
}

.card-heading {
    margin-bottom: 16px;
}

.card-heading h2,
.page-heading h1,
.level-table-card h2,
.reward-card h2,
.public-card h1 {
    font-weight: 850;
    letter-spacing: 0;
    margin: 0;
}

.card-heading h2 {
    font-size: 22px;
}

.page-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-heading p {
    color: var(--ds-muted);
    margin: 8px 0 0;
}

.activity-bars {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, 1fr);
    min-height: 180px;
}

.activity-bar {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.activity-bar span {
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.14));
    border-radius: 999px;
    display: block;
    min-height: 34px;
    width: 100%;
}

.activity-bar span.active {
    background: linear-gradient(180deg, var(--ds-gold), rgba(255, 199, 44, .22));
}

.activity-bar small {
    color: var(--ds-muted);
    margin-top: 10px;
}

.benefit-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefit-list li {
    background: rgba(47, 226, 139, .09);
    border: 1px solid rgba(47, 226, 139, .18);
    border-radius: 12px;
    padding: 12px;
}

.stack-list,
.ledger-list,
.stat-list {
    display: grid;
    gap: 10px;
}

.stack-item,
.reward-mini {
    padding: 13px;
}

.stack-item strong,
.stack-item span,
.reward-mini strong,
.reward-mini span {
    display: block;
}

.stack-item span,
.reward-mini span {
    color: var(--ds-muted);
    margin-top: 5px;
}

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

.ledger-list > div,
.stat-list > div {
    border-bottom: 1px solid var(--ds-line);
    padding: 10px 0;
}

.positive {
    color: var(--ds-green);
}

.negative {
    color: var(--ds-red);
}

.level-table-card {
    margin-top: 18px;
}

.level-table {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.level-table article {
    min-height: 130px;
    padding: 18px;
}

.level-table article.current {
    border-color: rgba(255, 199, 44, .44);
    box-shadow: inset 0 0 40px rgba(255, 199, 44, .13);
}

.level-table span,
.level-table strong,
.level-table small {
    display: block;
}

.level-table span {
    color: var(--ds-gold);
    font-weight: 900;
}

.level-table strong {
    font-size: 22px;
    margin: 12px 0 4px;
}

.level-table small {
    color: var(--ds-muted);
}

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

.reward-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-card p {
    color: var(--ds-muted);
    flex: 1;
}

.metric-big {
    display: block;
    font-size: 38px;
    line-height: 1;
    margin-top: 10px;
}

.socios-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 7px 10px;
}

.badge-good {
    background: rgba(47, 226, 139, .14);
    color: var(--ds-green);
}

.badge-warn {
    background: rgba(255, 199, 44, .14);
    color: var(--ds-gold);
}

.badge-danger {
    background: rgba(255, 107, 107, .14);
    color: var(--ds-red);
}

.badge-neutral {
    background: rgba(255, 255, 255, .1);
    color: var(--ds-muted);
}

.btn-neon {
    background: linear-gradient(135deg, var(--ds-gold), var(--ds-gold-2));
    border: 0;
    color: #1b1200;
    font-weight: 900;
}

.btn-neon:hover,
.btn-neon:focus {
    color: #1b1200;
    filter: brightness(1.05);
}

.btn-glass {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    color: var(--ds-text);
    font-weight: 800;
}

.btn-glass:hover,
.btn-glass:focus {
    background: rgba(255, 255, 255, .14);
    color: var(--ds-text);
}

.text-link {
    color: var(--ds-cyan);
    font-weight: 800;
    text-decoration: none;
}

.table-card {
    overflow-x: auto;
}

.socios-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.socios-table th,
.socios-table td {
    border-bottom: 1px solid var(--ds-line);
    padding: 13px 12px;
    vertical-align: middle;
}

.socios-table th {
    color: var(--ds-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.api-card code,
.api-card pre {
    background: rgba(0, 0, 0, .34);
    border: 1px solid var(--ds-line);
    border-radius: 12px;
    color: #d6fff9;
    display: block;
    padding: 14px;
    white-space: pre-wrap;
}

.public-landing {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.public-card {
    border-radius: 28px;
    max-width: 560px;
    padding: 34px;
    text-align: center;
}

.public-card h1 {
    font-size: clamp(38px, 7vw, 64px);
    margin-top: 22px;
}

.public-card p {
    color: var(--ds-muted);
    font-size: 18px;
    margin: 16px 0 24px;
}

.public-meta {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    margin-bottom: 18px;
    padding: 16px;
}

.public-meta span,
.public-meta strong {
    display: block;
}

.public-meta span {
    color: var(--ds-muted);
}

.public-card small {
    color: var(--ds-muted);
    display: block;
    margin-top: 14px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-card .form-label {
    color: var(--ds-muted);
    font-weight: 800;
}

.form-card .form-control {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    color: var(--ds-text);
}

.form-card .form-control:focus {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 199, 44, .54);
    box-shadow: 0 0 0 .2rem rgba(255, 199, 44, .12);
    color: var(--ds-text);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 1180px) {
    .socios-grid,
    .stats-grid,
    .reward-catalog,
    .level-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .socios-app {
        display: block;
    }

    .socios-sidebar {
        border-bottom: 1px solid var(--ds-line);
        border-right: 0;
        position: static;
        width: 100%;
    }

    .socios-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .socios-nav-group {
        flex: 0 0 190px;
    }

    .socios-sidebar-card {
        display: none;
    }

    .socios-main {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .socios-content,
    .socios-topbar {
        padding: 18px;
    }

    .socios-topbar,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gold-hero {
        padding: 30px 18px;
    }

    .gold-metrics,
    .socios-grid,
    .two-cols,
    .stats-grid,
    .reward-catalog,
    .level-table,
    .reward-row {
        grid-template-columns: 1fr;
    }

    .wide-card,
    .qr-card,
    .activity-card {
        grid-column: auto;
    }

    .level-orb {
        height: 118px;
        width: 118px;
    }
}
