:root {
    --admin-bg: #f5f7fa;
    --admin-surface: #ffffff;
    --admin-soft: #eef4f8;
    --admin-border: #d8e0e8;
    --admin-text: #1f2933;
    --admin-muted: #667085;
    --admin-sidebar: #111827;
    --admin-sidebar-soft: #1f2937;
    --admin-sidebar-text: #d7dee8;
    --admin-primary: #185abc;
    --admin-primary-dark: #123f86;
    --admin-accent: #15805f;
    --admin-danger: #b42318;
    --sidebar-width: 268px;
}

body.socios-shell {
    --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;
    background: var(--ds-bg);
    color: var(--ds-text);
}

.socios-bg {
    background:
        radial-gradient(circle at 15% 8%, rgba(49, 234, 223, .16), transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(255, 199, 44, .12), transparent 30%),
        linear-gradient(135deg, #05070d 0%, #090d18 50%, #15110a 100%);
    inset: 0;
    position: fixed;
    z-index: -1;
}

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

.socios-sidebar {
    background: rgba(6, 8, 14, .78);
    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,
.muted {
    color: var(--ds-muted);
}

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

.socios-nav-title,
.socios-kicker {
    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 {
    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,
.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.socios-content {
    padding: 28px;
}

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

.btn-neon:hover,
.btn-neon:focus {
    color: #1a1201;
    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, .13);
    color: #ffffff;
}

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

.login-panel {
    background: rgba(10, 12, 20, .84);
    border: 1px solid var(--ds-line);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 28px 90px rgba(0, 0, 0, .38);
    max-width: 460px;
    padding: 28px;
    width: 100%;
    backdrop-filter: blur(18px);
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.login-copy h1 {
    font-size: 34px;
    font-weight: 900;
    margin: 8px 0;
}

.login-copy p {
    color: var(--ds-muted);
}

.login-panel .form-label,
.login-panel .form-check-label,
.form-card .form-label {
    color: var(--ds-text);
    font-weight: 700;
}

.login-panel .form-control,
.form-card .form-control,
.form-card .form-select {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .14);
    color: var(--ds-text);
}

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

.client-hero {
    align-items: center;
    border-radius: 24px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 28px;
}

.client-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    line-height: 1;
    margin: 8px 0;
}

.client-hero p {
    color: var(--ds-muted);
    margin: 0;
}

.client-id-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 18px;
    min-width: 230px;
    padding: 18px;
}

.client-id-card span,
.client-id-card small,
.metric-card span,
.data-list span,
.data-list small {
    color: var(--ds-muted);
    display: block;
}

.client-id-card strong {
    color: var(--ds-gold);
    display: block;
    font-size: 30px;
}

.dashboard-filter {
    border-radius: 20px;
    margin-bottom: 24px;
    padding: 18px;
}

.dashboard-summary-alert {
    border-color: rgba(255, 179, 49, .42);
    border-radius: 18px;
    color: var(--ds-gold);
    font-weight: 800;
    margin-bottom: 20px;
    padding: 16px 18px;
}

.dashboard-filter-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-filter-form label {
    color: var(--ds-muted);
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.dashboard-filter-form .form-control,
.dashboard-filter-form .form-select {
    background-color: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 12px;
    color: var(--ds-text);
    min-height: 44px;
}

.dashboard-filter-form .form-control:focus,
.dashboard-filter-form .form-select:focus {
    background-color: rgba(255, 255, 255, .11);
    border-color: rgba(49, 234, 223, .75);
    box-shadow: 0 0 0 .2rem rgba(49, 234, 223, .14);
    color: var(--ds-text);
}

.dashboard-filter-form .form-select option {
    background: #10131c;
    color: var(--ds-text);
}

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

.metric-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.metric-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ds-line);
    border-radius: 18px;
    container-type: inline-size;
    min-width: 0;
    padding: 20px;
}

.metric-card strong {
    display: block;
    font-size: clamp(18px, 2vw, 34px);
    font-size: clamp(18px, 6cqw, 34px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-top: 9px;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.tone-cyan strong { color: var(--ds-cyan); }
.tone-gold strong { color: var(--ds-gold); }
.tone-green strong { color: var(--ds-green); }
.tone-red strong { color: var(--ds-red); }
.tone-blue strong { color: #75b7ff; }

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

.dashboard-columns .glass-card,
.table-card,
.form-card {
    border-radius: 22px;
    padding: 22px;
}

.table-card,
.form-card {
    margin-bottom: 24px;
}

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

.table-card > h2,
.form-card > h1,
.form-card > h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 16px;
}

.table-card .table {
    margin-bottom: 0;
}

.partner-avatar,
.partner-avatar-lg {
    background: rgba(49, 234, 223, .12);
    border: 1px solid rgba(49, 234, 223, .32);
    border-radius: 999px;
    color: var(--ds-cyan);
    display: inline-flex;
    font-weight: 950;
    object-fit: cover;
}

.partner-avatar {
    align-items: center;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.partner-avatar-lg {
    height: 96px;
    width: 96px;
}

.partner-image-preview {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.partner-image-preview span {
    color: var(--ds-muted);
    font-weight: 800;
}

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

.card-heading h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 4px 0 0;
}

.data-list {
    display: grid;
    gap: 12px;
}

.data-list > div {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    padding: 14px;
}

.data-list strong {
    display: block;
    margin: 4px 0;
}

.async-data-list .loading-row {
    align-items: center;
    display: grid;
    gap: 4px 12px;
    grid-template-columns: auto 1fr;
}

.async-data-list .loading-row strong,
.async-data-list .loading-row small {
    grid-column: 2;
}

.loading-dot {
    animation: pulse-loading 1s ease-in-out infinite;
    background: var(--ds-cyan);
    border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(49, 234, 223, .4);
    grid-row: 1 / span 2;
    height: 12px;
    width: 12px;
}

@keyframes pulse-loading {
    0% {
        box-shadow: 0 0 0 0 rgba(49, 234, 223, .42);
        opacity: .72;
    }

    70% {
        box-shadow: 0 0 0 10px rgba(49, 234, 223, 0);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(49, 234, 223, 0);
        opacity: .72;
    }
}

.table-dark-ish {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ds-text);
    --bs-table-border-color: var(--ds-line);
    color: var(--ds-text);
}

.table-dark-ish a {
    color: var(--ds-cyan);
}

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

body.admin-shell {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 15px;
    margin: 0;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--admin-sidebar);
    bottom: 0;
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    left: 0;
    padding: 18px 16px;
    position: fixed;
    top: 0;
    width: var(--sidebar-width);
    z-index: 40;
}

.sidebar-brand {
    align-items: center;
    color: #ffffff;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 6px 8px;
    text-decoration: none;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: #ffffff;
}

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

.sidebar-brand small {
    color: #9ca8b8;
    font-size: 12px;
    margin-top: 3px;
}

.brand-mark {
    align-items: center;
    background: var(--admin-accent);
    border-radius: 7px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    padding-right: 2px;
}

.sidebar-group-label {
    color: #8fa0b6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 8px 7px;
    text-transform: uppercase;
}

.sidebar-link {
    align-items: center;
    border-radius: 7px;
    color: var(--admin-sidebar-text);
    display: flex;
    font-weight: 600;
    min-height: 40px;
    padding: 9px 12px;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: var(--admin-sidebar-soft);
    color: #ffffff;
}

.sidebar-link.active {
    background: #ffffff;
    color: var(--admin-sidebar);
}

.sidebar-footer {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #aab6c6;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    gap: 2px;
    margin-top: 18px;
    padding: 12px;
}

.sidebar-footer strong {
    color: #ffffff;
    font-size: 14px;
}

.admin-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
}

.admin-topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 68px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}

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

.topbar-title span {
    color: var(--admin-muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.topbar-title strong {
    color: var(--admin-text);
    display: block;
    font-size: 20px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions,
.admin-actions,
.quick-actions,
.entity-actions,
.form-submit-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-content {
    flex: 1;
    padding: 26px 28px 34px;
}

.breadcrumb {
    background: transparent;
    margin-bottom: 16px;
    padding: 0;
}

.admin-page-heading,
.dashboard-hero,
.quick-start {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.admin-page-heading,
.quick-start {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 18px 20px;
}

.dashboard-hero {
    border-bottom: 1px solid var(--admin-border);
    padding: 2px 0 20px;
}

.admin-page-heading h1,
.dashboard-hero h1,
.quick-start h2,
.entity-card h2,
.form-section h2 {
    letter-spacing: 0;
    margin: 0;
}

.admin-page-heading h1,
.dashboard-hero h1 {
    font-size: 28px;
    font-weight: 750;
}

.admin-page-heading p,
.dashboard-hero p,
.quick-start p,
.entity-card p {
    color: var(--admin-muted);
    margin: 7px 0 0;
}

.section-kicker {
    color: var(--admin-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.hero-stat {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    min-width: 170px;
    padding: 16px 18px;
    text-align: right;
}

.hero-stat span {
    display: block;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.hero-stat small {
    color: var(--admin-muted);
}

.entity-card,
.form-section,
.kv-grid-container,
.table-detail {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.entity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    min-height: 190px;
    padding: 18px;
}

.entity-count {
    color: var(--admin-primary-dark);
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
}

.entity-card h2,
.quick-start h2 {
    font-size: 19px;
    font-weight: 750;
}

.form-section {
    margin-bottom: 18px;
    padding: 18px;
}

.form-section-heading {
    border-bottom: 1px solid var(--admin-border);
    margin-bottom: 16px;
    padding-bottom: 10px;
}

.form-section h2 {
    font-size: 18px;
    font-weight: 750;
}

.form-submit-bar {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    bottom: 0;
    margin-top: 18px;
    padding: 14px 18px;
    position: sticky;
    z-index: 10;
}

.btn-primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--admin-primary-dark);
    border-color: var(--admin-primary-dark);
}

.btn-outline-secondary {
    border-color: #bdc7d3;
    color: #344054;
}

.grid-view th {
    white-space: nowrap;
}

.kv-grid-container {
    overflow-x: auto;
}

.kv-panel-before {
    color: var(--admin-muted);
}

.table-detail th {
    width: 260px;
}

.table > :not(caption) > * > * {
    padding: .75rem .85rem;
}

.select2-container--krajee-bs5 .select2-selection {
    border-color: #cfd8e3;
}

.not-set {
    color: #c55;
    font-style: italic;
}

.hint-block {
    color: var(--admin-muted);
    display: block;
    margin-top: 5px;
}

.error-summary {
    background: #fff5f5;
    border-left: 3px solid var(--admin-danger);
    color: var(--admin-danger);
    margin: 0 0 15px;
    padding: 10px 20px;
}

#footer {
    align-items: center;
    background: #eef2f6;
    border-top: 1px solid var(--admin-border);
    color: var(--admin-muted);
    display: flex;
    font-size: .9em;
    justify-content: space-between;
    min-height: 52px;
    padding: 12px 28px;
}

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

body.socios-shell {
    --admin-bg: var(--ds-bg);
    --admin-surface: rgba(16, 19, 28, .9);
    --admin-soft: rgba(255, 255, 255, .06);
    --admin-border: var(--ds-line);
    --admin-text: var(--ds-text);
    --admin-muted: var(--ds-muted);
    --admin-primary: var(--ds-gold);
    --admin-primary-dark: var(--ds-gold-2);
    --admin-accent: var(--ds-cyan);
    --admin-danger: var(--ds-red);
}

body.socios-shell .admin-page-heading,
body.socios-shell .quick-start,
body.socios-shell .form-section,
body.socios-shell .form-submit-bar,
body.socios-shell .table-detail {
    background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
    border: 1px solid var(--ds-line);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .26);
    color: var(--ds-text);
}

body.socios-shell .admin-page-heading {
    padding: 24px;
}

body.socios-shell .admin-page-heading h1,
body.socios-shell .dashboard-hero h1,
body.socios-shell .quick-start h2,
body.socios-shell .form-section h2 {
    color: var(--ds-text);
    font-weight: 900;
}

body.socios-shell .admin-page-heading p,
body.socios-shell .dashboard-hero p,
body.socios-shell .quick-start p,
body.socios-shell .form-section .form-text {
    color: var(--ds-muted);
}

body.socios-shell .section-kicker {
    color: var(--ds-cyan);
    letter-spacing: .08em;
}

body.socios-shell .btn-primary {
    background: linear-gradient(145deg, var(--ds-gold), var(--ds-gold-2));
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(255, 159, 28, .18);
    color: #1a1201;
    font-weight: 900;
}

body.socios-shell .btn-primary:hover,
body.socios-shell .btn-primary:focus {
    color: #1a1201;
    filter: brightness(1.05);
}

body.socios-shell .btn-outline-secondary,
body.socios-shell .btn-outline-danger {
    background: rgba(255, 255, 255, .05);
    border-color: var(--ds-line);
    border-radius: 10px;
    color: var(--ds-text);
    font-weight: 800;
}

body.socios-shell .kv-grid-panel .card,
body.socios-shell .grid-view .card,
body.socios-shell .kv-grid-container {
    background: rgba(11, 14, 22, .78);
    border: 1px solid var(--ds-line);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .32);
    color: var(--ds-text);
    overflow: hidden;
}

body.socios-shell .kv-grid-panel .card-header,
body.socios-shell .kv-grid-panel .card-footer,
body.socios-shell .grid-view .card-header,
body.socios-shell .grid-view .card-footer {
    background: rgba(255, 255, 255, .055) !important;
    border-color: var(--ds-line);
    color: var(--ds-text) !important;
    padding: 15px 18px;
}

body.socios-shell .kv-grid-panel .card-header {
    font-size: 18px;
    font-weight: 900;
}

body.socios-shell .summary,
body.socios-shell .kv-panel-before,
body.socios-shell .kv-panel-after,
body.socios-shell .kv-panel-pager {
    color: var(--ds-muted);
}

body.socios-shell .kv-panel-before {
    background: rgba(255, 255, 255, .035);
    border-bottom: 1px solid var(--ds-line);
    padding: 14px 18px;
}

body.socios-shell .table-responsive {
    border-radius: 0;
}

body.socios-shell .kv-grid-table,
body.socios-shell .table-detail {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ds-text);
    --bs-table-border-color: var(--ds-line);
    background: rgba(8, 11, 18, .96) !important;
    color: var(--ds-text);
    margin-bottom: 0;
}

body.socios-shell .kv-grid-table thead,
body.socios-shell .kv-grid-table thead.kv-table-header,
body.socios-shell .kv-grid-table .kv-table-header,
body.socios-shell .kv-grid-table thead tr,
body.socios-shell .kv-grid-table thead tr.w0 {
    background: rgba(8, 11, 18, .96) !important;
    background-color: rgba(8, 11, 18, .96) !important;
    background-image: none !important;
    color: var(--ds-text) !important;
}

body.socios-shell .kv-grid-table > :not(caption) > * > *,
body.socios-shell .table-detail > :not(caption) > * > * {
    background: transparent !important;
    border-color: var(--ds-line);
    color: var(--ds-text);
    padding: 14px 16px;
    vertical-align: middle;
}

body.socios-shell .kv-grid-table thead th,
body.socios-shell .table-detail th {
    background: rgba(8, 11, 18, .96) !important;
    background-color: rgba(8, 11, 18, .96) !important;
    background-image: none !important;
    color: var(--ds-text);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.socios-shell .kv-grid-table thead tr:first-child th {
    background: rgba(10, 14, 22, .98) !important;
    border-bottom: 1px solid rgba(49, 234, 223, .18) !important;
}

body.socios-shell .kv-grid-table thead th a,
body.socios-shell .kv-grid-table tbody td a,
body.socios-shell .table-detail a {
    color: var(--ds-cyan);
    font-weight: 800;
    text-decoration: none;
}

body.socios-shell .kv-grid-table thead th a:hover,
body.socios-shell .kv-grid-table tbody td a:hover,
body.socios-shell .table-detail a:hover {
    color: #94fff8;
}

body.socios-shell .kv-grid-table tbody tr {
    transition: background .18s ease, transform .18s ease;
}

body.socios-shell .kv-grid-table tbody tr:hover > td {
    background: rgba(49, 234, 223, .065);
}

body.socios-shell .grid-view .filters td {
    background: rgba(8, 11, 18, .96) !important;
    background-color: rgba(8, 11, 18, .96) !important;
    background-image: none !important;
    border-color: var(--ds-line) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--ds-text) !important;
}

body.socios-shell .kv-grid-table thead tr.filters,
body.socios-shell .kv-grid-table thead tr.filters > td,
body.socios-shell .kv-grid-table thead tr.filters > th,
body.socios-shell .kv-grid-table thead tr.skip-export > td,
body.socios-shell .kv-grid-table thead tr.skip-export > th {
    background: rgba(8, 11, 18, .96) !important;
    background-color: rgba(8, 11, 18, .96) !important;
    background-image: none !important;
}

body.socios-shell .grid-view .form-control,
body.socios-shell .grid-view .form-select,
body.socios-shell .admin-form .form-control,
body.socios-shell .admin-form .form-select,
body.socios-shell .select2-container--krajee-bs5 .select2-selection {
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: 10px;
    color: var(--ds-text) !important;
    min-height: 42px;
}

body.socios-shell .grid-view .form-control:focus,
body.socios-shell .grid-view .form-select:focus,
body.socios-shell .admin-form .form-control:focus,
body.socios-shell .admin-form .form-select:focus {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(49, 234, 223, .75);
    box-shadow: 0 0 0 .2rem rgba(49, 234, 223, .14);
    color: var(--ds-text);
}

body.socios-shell .grid-view .form-control::placeholder,
body.socios-shell .admin-form .form-control::placeholder {
    color: rgba(245, 247, 251, .45);
}

body.socios-shell .grid-view .form-select option,
body.socios-shell .admin-form .form-select option {
    background: #10131c;
    color: var(--ds-text);
}

body.socios-shell .grid-view .skip-export a,
body.socios-shell .grid-action {
    align-items: center;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ds-line);
    border-radius: 10px;
    color: var(--ds-text);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    margin: 0 2px;
    text-decoration: none;
    width: 34px;
}

body.socios-shell .grid-actions-cell {
    min-width: 230px;
    white-space: nowrap;
}

body.socios-shell .grid-actions-header {
    min-width: 230px;
}

body.socios-shell .grid-view .skip-export a.grid-action,
body.socios-shell .grid-action {
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    line-height: 1;
    min-width: 58px;
    padding: 0 10px;
    width: auto !important;
}

body.socios-shell .grid-view .skip-export a.grid-action-delete,
body.socios-shell .grid-action-delete {
    min-width: 68px;
}

body.socios-shell .grid-action-delete {
    color: #ffb3b3;
}

body.socios-shell .grid-view .skip-export a:hover,
body.socios-shell .grid-action:hover {
    background: rgba(49, 234, 223, .12);
    border-color: rgba(49, 234, 223, .35);
    color: var(--ds-cyan);
}

body.socios-shell .grid-action-delete:hover {
    background: rgba(255, 107, 107, .12);
    border-color: rgba(255, 107, 107, .35);
    color: #ffd1d1;
}

body.socios-shell .badge.text-bg-light {
    background: rgba(255, 255, 255, .12) !important;
    color: var(--ds-text) !important;
}

body.socios-shell .pagination {
    gap: 6px;
    margin: 0;
}

body.socios-shell .page-link {
    background: rgba(255, 255, 255, .06);
    border-color: var(--ds-line);
    border-radius: 10px;
    color: var(--ds-text);
}

body.socios-shell .page-item.active .page-link,
body.socios-shell .page-link:hover {
    background: var(--ds-cyan);
    border-color: var(--ds-cyan);
    color: #031112;
}

body.socios-shell .not-set {
    color: rgba(245, 247, 251, .42);
}

body.socios-shell .debug-box {
    background: rgba(49, 234, 223, .08);
    border: 1px solid rgba(49, 234, 223, .22);
    border-radius: 14px;
    color: var(--ds-text);
    margin: 0;
    overflow-x: auto;
    padding: 14px;
    white-space: pre-wrap;
}

.club-hero {
    background: linear-gradient(115deg, rgba(243, 254, 255, .98) 0%, rgba(232, 253, 250, .98) 46%, rgba(16, 185, 170, .88) 100%);
    border: 1px solid rgba(255, 255, 255, .44);
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, .34);
    color: #071529;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
    margin-bottom: 22px;
    min-height: 390px;
    overflow: hidden;
    padding: 34px;
    position: relative;
}

.club-hero::after {
    background: linear-gradient(90deg, rgba(92, 139, 197, .18), rgba(12, 184, 159, .2));
    bottom: 0;
    content: "";
    height: 10px;
    left: 0;
    position: absolute;
    right: 0;
}

.club-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.club-logo {
    height: auto;
    margin-bottom: 22px;
    max-width: 310px;
    width: 52%;
}

.club-kicker,
.club-reward-type {
    color: #0a7f84;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.club-hero h1 {
    color: #071529;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 950;
    line-height: .96;
    margin: 0;
    max-width: 680px;
}

.club-lead {
    color: #31546b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    margin: 20px 0 0;
    max-width: 690px;
}

.club-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.club-hero-actions .btn {
    border-radius: 14px;
    padding: 12px 18px;
}

.club-wallet {
    align-items: end;
    display: flex;
    justify-content: center;
    min-height: 320px;
    position: relative;
    z-index: 1;
}

.club-wallet-card {
    background: rgba(7, 14, 28, .9);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 24px;
    bottom: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    color: #ffffff;
    left: 0;
    min-width: 250px;
    padding: 22px;
    position: absolute;
    z-index: 2;
}

.club-wallet-card span,
.club-wallet-card small {
    color: rgba(255, 255, 255, .72);
    display: block;
    font-weight: 800;
}

.club-wallet-card strong {
    color: var(--ds-cyan);
    display: block;
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 950;
    line-height: 1;
    margin: 8px 0;
}

.club-member-art {
    align-self: end;
    height: auto;
    max-height: 360px;
    max-width: 100%;
    object-fit: contain;
    object-position: center bottom;
    position: relative;
    right: -8px;
}

.club-summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.club-summary-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 20px;
    padding: 20px;
}

.club-summary-card span {
    color: var(--ds-muted);
    display: block;
    font-weight: 800;
}

.club-summary-card strong {
    color: #ffffff;
    display: block;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 950;
    line-height: 1;
    margin-top: 10px;
}

.club-section,
.club-panel {
    margin-bottom: 28px;
}

.club-section-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.club-section-heading.compact {
    align-items: flex-start;
    margin-bottom: 14px;
}

.club-section-heading h2 {
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 950;
    line-height: 1;
    margin: 0;
}

.club-section-heading p:not(.club-kicker) {
    color: var(--ds-muted);
    font-weight: 700;
    margin: 0;
    max-width: 520px;
}

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

.club-reward-card {
    background: linear-gradient(145deg, rgba(20, 24, 34, .96), rgba(11, 14, 23, .96));
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 24px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    min-height: 320px;
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.club-reward-card::before {
    background: linear-gradient(90deg, rgba(49, 234, 223, .8), rgba(92, 139, 197, .78));
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.club-reward-card.tone-bonus::before { background: linear-gradient(90deg, #ffc72c, #ff9f1c); }
.club-reward-card.tone-spins::before { background: linear-gradient(90deg, #31eadf, #2fe28b); }
.club-reward-card.tone-experience::before { background: linear-gradient(90deg, #8b5cf6, #31eadf); }

.club-reward-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.club-reward-mark {
    align-items: center;
    background: rgba(49, 234, 223, .12);
    border: 1px solid rgba(49, 234, 223, .32);
    border-radius: 18px;
    color: var(--ds-cyan);
    display: inline-flex;
    font-size: 18px;
    font-weight: 950;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.tone-bonus .club-reward-mark {
    background: rgba(255, 199, 44, .12);
    border-color: rgba(255, 199, 44, .34);
    color: var(--ds-gold);
}

.tone-experience .club-reward-mark {
    background: rgba(139, 92, 246, .14);
    border-color: rgba(139, 92, 246, .42);
    color: #b79cff;
}

.club-reward-pill {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 999px;
    color: var(--ds-muted);
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
}

.club-reward-card h3 {
    color: #ffffff;
    font-size: 25px;
    font-weight: 950;
    line-height: 1.08;
    margin: 0 0 10px;
}

.club-reward-card p {
    color: var(--ds-muted);
    flex: 1;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
    margin: 0 0 22px;
}

.club-reward-footer {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.club-reward-footer span {
    color: var(--ds-muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.club-reward-footer strong {
    color: var(--ds-cyan);
    display: block;
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
    margin-top: 4px;
}

.club-reward-footer form {
    margin: 0;
}

.club-missing {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 999px;
    color: var(--ds-muted) !important;
    padding: 9px 12px;
    text-transform: none !important;
}

.club-panel-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

.club-panel {
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ds-line);
    border-radius: 24px;
    padding: 22px;
}

.club-list {
    display: grid;
    gap: 12px;
}

.club-list-item {
    align-items: center;
    background: rgba(7, 10, 18, .56);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 18px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 16px;
}

.club-list-item span,
.club-list-item small {
    color: var(--ds-muted);
    display: block;
    font-weight: 750;
}

.club-list-item strong {
    color: #ffffff;
    display: block;
    font-size: 18px;
    font-weight: 900;
    margin: 3px 0;
}

.club-code-box {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    min-width: 170px;
    padding: 12px;
}

.club-code-box.has-code {
    background: rgba(49, 234, 223, .12);
    border-color: rgba(49, 234, 223, .35);
}

.club-code-box strong {
    color: var(--ds-cyan);
    font-size: 16px;
    overflow-wrap: anywhere;
}

.club-points-delta {
    border-radius: 999px;
    font-size: 18px;
    font-weight: 950;
    min-width: 110px;
    padding: 10px 12px;
    text-align: center;
}

.club-points-delta.positive {
    background: rgba(47, 226, 139, .12);
    color: var(--ds-green);
}

.club-points-delta.negative {
    background: rgba(255, 107, 107, .12);
    color: var(--ds-red);
}

.club-empty {
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 18px;
    padding: 18px;
}

.club-empty strong,
.club-empty span {
    display: block;
}

.club-empty span {
    color: var(--ds-muted);
    margin-top: 4px;
}

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

body.socios-shell .reward-tile {
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
}

body.socios-shell .reward-tile img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
}

body.socios-shell .reward-tile h3 {
    color: var(--ds-text);
    font-size: 20px;
    font-weight: 900;
    margin: 0;
}

body.socios-shell .reward-tile p {
    color: var(--ds-muted);
    flex: 1;
    margin: 0;
}

body.socios-shell .reward-tile strong {
    color: var(--ds-cyan);
    font-size: 18px;
}

body.socios-shell .error-summary,
body.socios-shell .alert-danger {
    background: rgba(255, 107, 107, .12);
    border-color: rgba(255, 107, 107, .3);
    color: #ffb3b3;
}

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

    .socios-sidebar {
        bottom: auto;
        position: static;
        width: 100%;
    }

    .socios-nav {
        flex-direction: row;
        gap: 12px;
        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%;
    }

    .socios-topbar,
    .client-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .club-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .club-wallet {
        min-height: 300px;
    }

    .club-member-art {
        margin-left: auto;
        max-height: 300px;
        right: 0;
    }

    .metric-grid,
    .dashboard-columns,
    .dashboard-filter-form,
    .club-summary-grid,
    .club-reward-grid,
    .club-panel-grid,
    body.socios-shell .reward-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        bottom: auto;
        min-height: 0;
        padding: 14px;
        position: static;
        width: 100%;
    }

    .sidebar-brand {
        margin-bottom: 12px;
    }

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

    .sidebar-group {
        flex: 0 0 auto;
        min-width: 190px;
    }

    .sidebar-footer {
        display: none;
    }

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

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }

    .admin-content {
        padding: 20px 16px 28px;
    }

    #footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 12px 16px;
    }
}

@media (max-width: 767px) {
    .metric-grid,
    .dashboard-columns,
    .dashboard-filter-form,
    .club-summary-grid,
    .club-reward-grid,
    .club-panel-grid,
    body.socios-shell .reward-grid {
        grid-template-columns: 1fr;
    }

    .socios-content {
        padding: 18px;
    }

    .club-hero {
        border-radius: 22px;
        padding: 24px;
    }

    .club-logo {
        width: min(260px, 86%);
    }

    .club-lead {
        font-size: 17px;
    }

    .club-wallet {
        align-items: flex-end;
        min-height: 240px;
    }

    .club-wallet-card {
        bottom: 0;
        left: 0;
        min-width: 0;
        position: relative;
        width: 100%;
    }

    .club-member-art {
        display: none;
    }

    .club-section-heading,
    .club-list-item,
    .club-reward-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .club-code-box,
    .club-points-delta,
    .club-reward-footer .btn,
    .club-reward-footer form {
        width: 100%;
    }

    .client-id-card,
    .socios-top-actions {
        width: 100%;
    }

    .admin-page-heading,
    .dashboard-hero,
    .quick-start {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-stat {
        text-align: left;
        width: 100%;
    }

    .topbar-actions,
    .admin-actions,
    .quick-actions,
    .entity-actions {
        width: 100%;
    }
}
