:root {
    --xylop-bg: #070b17;
    --xylop-surface: rgba(14, 20, 39, 0.78);
    --xylop-surface-strong: rgba(10, 15, 31, 0.92);
    --xylop-border: rgba(129, 150, 255, 0.18);
    --xylop-border-strong: rgba(122, 147, 255, 0.32);
    --xylop-text: #edf2ff;
    --xylop-muted: #98a4d3;
    --xylop-primary: #7c8cff;
    --xylop-primary-strong: #9f74ff;
    --xylop-cyan: #65d8ff;
    --xylop-success: #37d39a;
    --xylop-warning: #ffcf68;
    --xylop-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

    body.xylop-shell {
        margin: 0;
        font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        color: var(--xylop-text);
        background: radial-gradient(circle at top left, rgba(124, 140, 255, 0.17), transparent 30%), radial-gradient(circle at top right, rgba(101, 216, 255, 0.14), transparent 25%), linear-gradient(180deg, #050814 0%, #080d1b 32%, #0a1020 100%);
    }

.xylop-bg-orb {
    position: fixed;
    z-index: 0;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.45;
    pointer-events: none;
}

.xylop-bg-orb-left {
    top: -80px;
    left: -70px;
    width: 280px;
    height: 280px;
    background: rgba(124, 140, 255, 0.24);
}

.xylop-bg-orb-right {
    right: 0;
    top: 80px;
    width: 320px;
    height: 320px;
    background: rgba(101, 216, 255, 0.14);
}

.admin-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
    gap: 24px;
    padding: 24px;
}

.sidebar-glass,
.topbar-glass,
.card-glass,
.hero-card,
.module-card {
    background: var(--xylop-surface);
    border: 1px solid var(--xylop-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--xylop-shadow);
}

.sidebar-glass {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 28px;
}

.sidebar-footer {
    display: grid;
    gap: 0.85rem;
}

.customer-legal-note {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    color: var(--xylop-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.14);
    font-size: 0.78rem;
    line-height: 1.45;
}

.customer-legal-footer {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem 1.5rem;
    color: var(--xylop-muted);
}

.customer-legal-footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: center;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--xylop-primary), var(--xylop-primary-strong));
    box-shadow: 0 18px 30px rgba(124, 140, 255, 0.28);
}

    .brand-icon.large {
        width: 72px;
        height: 72px;
        font-size: 2.2rem;
        border-radius: 22px;
    }

.brand-title,
.auth-title,
.page-title,
.hero-title,
.section-title,
.module-title {
    color: var(--xylop-text);
}

.brand-title {
    font-weight: 800;
    font-size: 1.1rem;
}

.brand-subtitle,
.auth-kicker,
.eyebrow,
.auth-subtitle,
.hero-subtitle,
.module-text,
.stat-label,
.feature-text,
.auth-note,
.sidebar-user {
    color: var(--xylop-muted);
}

.brand-subtitle,
.eyebrow,
.auth-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-nav .nav-link {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    color: #d7ddff;
    font-weight: 600;
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
}

    .admin-nav .nav-link:hover,
    .admin-nav .nav-link.active {
        color: white;
        background: rgba(124, 140, 255, 0.12);
        border-color: rgba(124, 140, 255, 0.18);
    }

    .admin-nav .nav-link.disabled {
        opacity: 0.45;
    }

.content-panel {
    min-width: 0;
}

.topbar-glass {
    border-radius: 24px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.65rem;
    font-weight: 800;
}

.page-body {
    min-width: 0;
}

.portal-page-shell.d-flex > .section-header {
    margin-bottom: 0 !important;
}

.auth-page {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-card {
    width: min(1120px, 100%);
    border-radius: 32px;
    padding: 32px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.auth-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 800;
    margin: 0.25rem 0;
}

.auth-subtitle {
    max-width: 760px;
    font-size: 1.02rem;
}

.error-card {
    width: min(720px, 100%);
    padding: clamp(28px, 5vw, 48px);
    border-radius: 30px;
    text-align: center;
}

.error-mark {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    color: white;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.32), transparent 28%),
        linear-gradient(135deg, var(--xylop-primary), var(--xylop-primary-strong));
    box-shadow: 0 24px 48px rgba(124, 140, 255, 0.26);
}

.error-mark span {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.error-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    color: #dfe6ff;
    background: rgba(124, 140, 255, 0.12);
    border: 1px solid rgba(124, 140, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.error-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
}

.error-subtitle {
    max-width: 560px;
}

.error-meta {
    display: grid;
    gap: 0.45rem;
    width: min(560px, 100%);
    margin-inline: auto;
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(137, 152, 214, 0.14);
    text-align: left;
}

.error-meta-label {
    color: var(--xylop-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    font-weight: 900;
}

.error-meta-value,
.error-request-id {
    color: var(--xylop-text);
    font-weight: 750;
    overflow-wrap: anywhere;
}

.error-request-id {
    display: inline;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    background: transparent;
}

.error-actions {
    display: flex;
    justify-content: center;
}

.auth-panel {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(129, 150, 255, 0.12);
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.7), rgba(10, 14, 27, 0.94));
}

.auth-feature-list {
    display: grid;
    gap: 16px;
}

.auth-feature-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.feature-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(124, 140, 255, 0.14);
    color: #dfe4ff;
    font-weight: 800;
}

.feature-title {
    font-weight: 700;
    color: var(--xylop-text);
}

.xylop-input {
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(137, 152, 214, 0.22);
    background: rgba(6, 10, 20, 0.88);
    color: white;
}

    .xylop-input:focus {
        background: rgba(6, 10, 20, 0.95);
        color: white;
        border-color: rgba(124, 140, 255, 0.56);
        box-shadow: 0 0 0 0.2rem rgba(124, 140, 255, 0.18);
    }

.btn-xylop-primary,
.btn-xylop-secondary,
.btn-xylop-danger {
    border-radius: 16px;
    font-weight: 700;
    padding: 0.9rem 1.15rem;
}

.btn-xylop-primary {
    border: none;
    color: white;
    background: linear-gradient(135deg, var(--xylop-primary), var(--xylop-primary-strong));
    box-shadow: 0 18px 30px rgba(124, 140, 255, 0.22);
}

    .btn-xylop-primary:hover {
        color: white;
        opacity: 0.96;
    }

.btn-xylop-secondary {
    border: 1px solid rgba(137, 152, 214, 0.22);
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

    .btn-xylop-secondary:hover {
        color: white;
        background: rgba(255, 255, 255, 0.07);
    }


.btn-xylop-danger {
    border: 1px solid rgba(255, 83, 115, 0.32);
    color: #ffe1e8;
    background: rgba(255, 83, 115, 0.10);
}

    .btn-xylop-danger:hover {
        color: #fff2f5;
        background: rgba(255, 83, 115, 0.16);
        border-color: rgba(255, 83, 115, 0.42);
    }

.hero-card {
    border-radius: 28px;
    padding: 28px;
}

.hero-title {
    font-weight: 800;
    font-size: clamp(1.9rem, 2.5vw, 2.4rem);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    border-radius: 20px;
    padding: 18px;
    border: 1px solid rgba(137, 152, 214, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
    word-break: break-word;
}

.module-card {
    border-radius: 24px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

    .module-card::after {
        content: "";
        position: absolute;
        inset: auto -30px -30px auto;
        width: 110px;
        height: 110px;
        border-radius: 999px;
        opacity: 0.18;
        filter: blur(28px);
    }

.module-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.module-badge,
.module-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.module-badge {
    background: rgba(255, 255, 255, 0.06);
    color: #d8deff;
}

.module-status.planned {
    background: rgba(255, 207, 104, 0.12);
    color: var(--xylop-warning);
}

.module-status.ready {
    background: rgba(55, 211, 154, 0.12);
    color: var(--xylop-success);
}

.module-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.accent-cyan::after {
    background: var(--xylop-cyan);
}

.accent-indigo::after {
    background: var(--xylop-primary);
}

.accent-violet::after {
    background: var(--xylop-primary-strong);
}

.accent-emerald::after {
    background: var(--xylop-success);
}

.accent-amber::after {
    background: var(--xylop-warning);
}

.form-check-input {
    background-color: rgba(9, 14, 27, 0.92);
    border-color: rgba(137, 152, 214, 0.22);
}

    .form-check-input:checked {
        background-color: var(--xylop-primary);
        border-color: var(--xylop-primary);
    }

a {
    color: #adc4ff;
}

code {
    color: #e9e5ff;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.1rem 0.35rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

@media (max-width: 991.98px) {
    .admin-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .sidebar-glass {
        gap: 24px;
    }

    .topbar-glass {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-card {
        padding: 22px;
    }

    .auth-brand {
        align-items: flex-start;
        flex-direction: column;
    }
}


.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #dfe6ff;
    background: rgba(124, 140, 255, 0.12);
    border: 1px solid rgba(124, 140, 255, 0.18);
}

.role-chip-active {
    color: white;
    background: linear-gradient(135deg, rgba(124, 140, 255, 0.2), rgba(159, 116, 255, 0.22));
    border-color: rgba(159, 116, 255, 0.35);
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.policy-card {
    padding: 24px;
    border-radius: 24px;
}

.policy-count {
    min-width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--xylop-text);
    background: rgba(101, 216, 255, 0.12);
    border: 1px solid rgba(101, 216, 255, 0.18);
}

@media (max-width: 1199.98px) {
    .policy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .topbar-glass {
        flex-direction: column;
        align-items: flex-start;
    }
}

.section-card {
    border-radius: 28px;
}

.xylop-textarea {
    min-height: 160px;
    resize: vertical;
}

.xylop-alert {
    border-radius: 20px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(137, 152, 214, 0.18);
    color: var(--xylop-text);
    background: rgba(255, 255, 255, 0.04);
}

.xylop-alert-success {
    border-color: rgba(55, 211, 154, 0.25);
    background: rgba(55, 211, 154, 0.08);
}

.xylop-alert-danger,
.xylop-alert-danger.validation-summary-errors {
    border-color: rgba(255, 100, 124, 0.28);
    background: rgba(255, 100, 124, 0.08);
    color: #ffe2e8;
}

.role-selection-grid {
    display: grid;
    gap: 12px;
}

.role-choice {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 20px;
    border: 1px solid rgba(137, 152, 214, 0.14);
    background: rgba(255, 255, 255, 0.03);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
    overflow: hidden;
}

    .role-choice:hover {
        transform: translateY(-1px);
        border-color: rgba(124, 140, 255, 0.3);
        background: rgba(255, 255, 255, 0.05);
    }

    .role-choice input {
        position: absolute;
        inset: 16px 16px auto auto;
        width: 18px;
        height: 18px;
    }

.role-choice-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    padding-right: 44px;
}

.role-choice-title {
    font-weight: 800;
    color: var(--xylop-text);
}

.role-choice-name {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #cbd5ff;
}

.role-choice-text {
    color: var(--xylop-muted);
    font-size: .92rem;
    line-height: 1.45;
}

.role-choice:has(input:checked) {
    border-color: rgba(124, 140, 255, 0.38);
    background: linear-gradient(180deg, rgba(124, 140, 255, 0.12), rgba(255,255,255,0.03));
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
}

.password-panel {
    border-top: 1px solid rgba(137, 152, 214, 0.14);
    padding-top: 20px;
}

.password-panel-title {
    font-weight: 800;
    color: var(--xylop-text);
    margin-bottom: 10px;
}

.xylop-table-wrap {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.xylop-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--xylop-text);
    --bs-table-border-color: rgba(137, 152, 214, 0.12);
    margin-bottom: 0;
}

    .xylop-table thead th {
        color: #c7d2ff;
        font-size: .82rem;
        text-transform: uppercase;
        letter-spacing: .08em;
        font-weight: 800;
        border-bottom-width: 1px;
        background: rgba(255, 255, 255, 0.02);
    }

    .xylop-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.03);
    }

    .xylop-table td,
    .xylop-table th {
        padding: 18px 16px;
        vertical-align: top;
    }

.table-primary-line {
    font-weight: 800;
    color: var(--xylop-text);
}

.table-secondary-line,
.table-tertiary-line,
.table-note {
    color: var(--xylop-muted);
}

.table-secondary-line {
    margin-top: 3px;
}

.table-tertiary-line {
    margin-top: 4px;
    font-size: .88rem;
}

.table-note {
    margin-top: 10px;
    font-size: .92rem;
    line-height: 1.5;
}

.key-preview-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(124, 140, 255, 0.22);
    background: rgba(124, 140, 255, 0.10);
    color: #eef2ff;
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.status-pill-success {
    color: var(--xylop-success);
    background: rgba(55, 211, 154, 0.12);
    border: 1px solid rgba(55, 211, 154, 0.22);
}

.status-pill-muted {
    color: #cbd4f7;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(137, 152, 214, 0.16);
}

.status-pill-warning {
    color: var(--xylop-warning);
    background: rgba(255, 207, 104, 0.12);
    border: 1px solid rgba(255, 207, 104, 0.22);
}

.action-stack {
    display: grid;
    gap: 8px;
    width: min(220px, 100%);
}

.empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--xylop-primary), var(--xylop-primary-strong));
    color: white;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 18px 30px rgba(124, 140, 255, 0.22);
}

.identity-line {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.identity-label {
    color: var(--xylop-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .76rem;
    font-weight: 800;
}

.identity-value {
    color: var(--xylop-text);
    font-weight: 700;
}

.summary-stack {
    display: grid;
    gap: 10px;
}

@media (max-width: 991.98px) {
    .action-stack {
        width: 100%;
    }
}

.json-snippet {
    max-width: 520px;
    color: #dfe6ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.pagination-glass {
    border-top: 1px solid rgba(137, 152, 214, 0.14);
    padding-top: 1rem;
}

.pagination-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(137, 152, 214, 0.16);
    color: var(--xylop-text);
    font-weight: 700;
}

.detail-stack {
    display: grid;
    gap: 1.25rem;
}

.detail-label {
    color: var(--xylop-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.detail-value {
    color: var(--xylop-text);
    font-size: 1.02rem;
    font-weight: 700;
}

.json-viewer {
    margin: 0;
    min-height: 420px;
    max-height: 900px;
    overflow: auto;
    border-radius: 24px;
    padding: 1.25rem;
    background: rgba(4, 8, 18, 0.92);
    border: 1px solid rgba(137, 152, 214, 0.16);
    color: #dce4ff;
    font-size: 0.92rem;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.serp-api-key-input,
.key-preview-pill.key-preview-full {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.02em;
}

.serp-inspector-status .xylop-alert {
    display: flex;
    align-items: center;
    min-height: 56px;
}


.sidebar-glass {
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
}

.sidebar-section-label {
    color: rgba(152, 164, 211, 0.72);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .68rem;
    font-weight: 800;
    margin-bottom: .45rem;
}

.admin-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-link-meta,
.topbar-meta-text {
    color: var(--xylop-muted);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.topbar-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .45rem;
    color: var(--xylop-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .68rem;
    font-weight: 800;
}

.topbar-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .85rem;
}

.min-w-0 {
    min-width: 0;
}

.page-intro-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.74), rgba(8, 12, 24, 0.94));
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.page-intro-content {
    min-width: 0;
}

.page-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: flex-end;
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.overview-card {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.overview-card-value {
    color: var(--xylop-text);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: .25rem;
}

.overview-card-label {
    color: var(--xylop-muted);
    font-size: .85rem;
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.1rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.14);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

    .quick-link-card:hover {
        transform: translateY(-2px);
        border-color: rgba(124, 140, 255, 0.24);
        background: rgba(124, 140, 255, 0.06);
    }

.quick-link-caption {
    color: var(--xylop-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
    font-weight: 800;
}

.quick-link-title {
    color: var(--xylop-text);
    font-size: 1rem;
    font-weight: 800;
}

.quick-link-text {
    color: var(--xylop-muted);
    font-size: .92rem;
    line-height: 1.55;
}

.quick-link-meta {
    color: #dfe6ff;
    font-size: .85rem;
    font-weight: 700;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.xylop-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    backdrop-filter: blur(14px);
}

.xylop-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.key-preview-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
}

.xylop-code-panel {
    margin: 0;
    min-height: 260px;
    max-height: 900px;
    overflow: auto;
    border-radius: 24px;
    padding: 1.25rem;
    background: rgba(4, 8, 18, 0.92);
    border: 1px solid rgba(137, 152, 214, 0.16);
    color: #dce4ff;
    font-size: 0.92rem;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.xylop-inline-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.copy-badge {
    border: 1px dashed rgba(124, 140, 255, 0.32);
    background: rgba(124, 140, 255, 0.08);
    color: #e7ebff;
}

    .copy-badge.copied {
        border-style: solid;
        border-color: rgba(55, 211, 154, 0.35);
        background: rgba(55, 211, 154, 0.12);
        color: #d9fff1;
    }

.form-hint-panel {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.form-hint-list {
    display: grid;
    gap: .85rem;
    margin: 0;
    padding-left: 1rem;
    color: var(--xylop-muted);
}

@media (max-width: 1199.98px) {
    .sidebar-glass {
        position: static;
        min-height: auto;
    }
}

@media (max-width: 991.98px) {
    .page-intro-card,
    .table-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-intro-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .admin-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .topbar-glass,
    .sidebar-glass {
        border-radius: 22px;
    }
}


.status-pill-danger {
    color: #ffe1e8;
    background: rgba(255, 83, 115, 0.14);
    border: 1px solid rgba(255, 83, 115, 0.26);
}


.json-viewer {
    border: 1px solid rgba(129, 150, 255, 0.14);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(8, 12, 24, 0.82);
}

.json-viewer-head {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(129, 150, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.json-viewer-body {
    margin: 0;
    padding: 18px;
    max-height: 70vh;
    overflow: auto;
    color: #dfe6ff;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}


.stat-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chart-block,
.mini-chart-card {
    border: 1px solid rgba(129, 150, 255, 0.12);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.55), rgba(10, 14, 27, 0.82));
}

.chart-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chart-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.chart-row + .chart-row,
.capacity-row + .capacity-row {
    margin-top: 14px;
}

.chart-row-top,
.capacity-row-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 0.92rem;
    color: var(--xylop-text);
}

.chart-bar-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(129, 150, 255, 0.12);
    overflow: hidden;
    border: 1px solid rgba(129, 150, 255, 0.08);
}

.chart-bar-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 4px;
}

.chart-tone-primary {
    background: linear-gradient(90deg, var(--xylop-primary), var(--xylop-primary-strong));
}

.chart-tone-success {
    background: linear-gradient(90deg, #2ccf95, #37d39a);
}

.chart-tone-warning {
    background: linear-gradient(90deg, #ffbe4d, #ffcf68);
}

.chart-tone-danger {
    background: linear-gradient(90deg, #ff6d7c, #ff8e7b);
}

.chart-tone-info {
    background: linear-gradient(90deg, #54c7ff, #65d8ff);
}

.chart-tone-neutral {
    background: linear-gradient(90deg, rgba(152, 164, 211, 0.75), rgba(129, 150, 255, 0.55));
}

.capacity-row {
    padding-top: 2px;
}

.empty-state.compact {
    padding: 28px 18px;
    min-height: auto;
}

@media (max-width: 1399.98px) {
    .stat-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stat-grid-compact {
        grid-template-columns: 1fr;
    }

    .chart-title-row,
    .chart-row-top,
    .capacity-row-top {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Customer.Web: make Bootstrap cards/tables match the dark admin console.
   This block intentionally overrides Bootstrap's default white `.card` and `.table`
   surfaces used by customer dashboard, API keys, usage and profile pages. */
.customer-card.card,
.card.customer-card {
    --bs-card-bg: transparent;
    --bs-card-color: var(--xylop-text);
    color: var(--xylop-text) !important;
    background:
        linear-gradient(180deg, rgba(14, 20, 39, 0.86), rgba(9, 14, 28, 0.96)) !important;
    border: 1px solid rgba(129, 150, 255, 0.16) !important;
    border-radius: 24px;
    backdrop-filter: blur(18px);
    box-shadow: var(--xylop-shadow) !important;
    overflow: hidden;
}

.customer-card .card-body {
    color: var(--xylop-text);
}

.customer-card h1,
.customer-card h2,
.customer-card h3,
.customer-card h4,
.customer-card h5,
.customer-card h6,
.customer-card .metric-title,
.customer-card .dashboard-health-title,
.customer-card .table-primary-line,
.customer-card dt {
    color: var(--xylop-text) !important;
}

.customer-card p,
.customer-card dd,
.customer-card .metric-description,
.customer-card .metric-footer,
.customer-card .dashboard-section-text,
.customer-card .dashboard-muted,
.customer-card .table-secondary-line,
.customer-card .table-tertiary-line,
.customer-card .table-note,
.customer-card .identity-label,
.customer-card .portal-definition-list dt {
    color: var(--xylop-muted) !important;
}

.metric-card {
    min-height: 168px;
}

.metric-card .metric-title {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.metric-card .metric-value {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    word-break: break-word;
}

.metric-card .metric-description,
.metric-card .metric-footer {
    font-size: 0.92rem;
    line-height: 1.5;
}

.dashboard-panel {
    min-height: 100%;
}

.dashboard-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-counter-pill,
.dashboard-key-badge,
.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-counter-pill {
    color: #dfe6ff;
    background: rgba(124, 140, 255, 0.12);
    border: 1px solid rgba(124, 140, 255, 0.20);
}

.dashboard-key-badge {
    color: #eef2ff;
    background: rgba(124, 140, 255, 0.10);
    border: 1px solid rgba(124, 140, 255, 0.22);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    text-transform: none;
}

.dashboard-status-badge.is-active {
    color: var(--xylop-success);
    background: rgba(55, 211, 154, 0.12);
    border: 1px solid rgba(55, 211, 154, 0.24);
}

.dashboard-status-badge.is-inactive {
    color: #cbd4f7;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(137, 152, 214, 0.16);
}

.dashboard-activity-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-activity-item,
.dashboard-health-card,
.dashboard-inline-empty,
.issuance-note-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(137, 152, 214, 0.14);
}

.dashboard-activity-item {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.dashboard-activity-key-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.dashboard-activity-snippet {
    color: #dfe6ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.dashboard-inline-empty {
    color: var(--xylop-muted);
    padding: 1rem 1.1rem;
}

.dashboard-health-card {
    padding: 1.1rem;
}

.dashboard-health-title {
    font-weight: 800;
    margin-bottom: 0.85rem;
}

.dashboard-summary-stack {
    display: grid;
    gap: 0.7rem;
}

.dashboard-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(137, 152, 214, 0.10);
    color: var(--xylop-muted);
}

.dashboard-summary-line:first-child {
    padding-top: 0;
    border-top: 0;
}

.dashboard-summary-line strong {
    color: var(--xylop-text);
}

.dashboard-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.portal-definition-list {
    display: grid;
    gap: 0.85rem;
}

.portal-definition-list div {
    display: grid;
    gap: 0.2rem;
}

.portal-definition-list dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.portal-definition-list dd {
    margin: 0;
    font-weight: 700;
    word-break: break-word;
}

.customer-card .table,
.customer-card .api-key-table,
.customer-card .usage-table,
.customer-card .dashboard-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--xylop-text);
    --bs-table-border-color: rgba(137, 152, 214, 0.12);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.025);
    --bs-table-striped-color: var(--xylop-text);
    --bs-table-hover-bg: rgba(124, 140, 255, 0.06);
    --bs-table-hover-color: var(--xylop-text);
    color: var(--xylop-text) !important;
    margin-bottom: 0;
}

.customer-card .table thead th,
.customer-card .api-key-table thead th,
.customer-card .usage-table thead th,
.customer-card .dashboard-table thead th {
    color: #c7d2ff !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    border-bottom-color: rgba(137, 152, 214, 0.18);
    background: rgba(255, 255, 255, 0.025);
}

.customer-card .table td,
.customer-card .table th {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(137, 152, 214, 0.12) !important;
    color: var(--xylop-text) !important;
}

.customer-card .btn-primary {
    border: none;
    color: white;
    background: linear-gradient(135deg, var(--xylop-primary), var(--xylop-primary-strong));
    box-shadow: 0 16px 26px rgba(124, 140, 255, 0.20);
}

.customer-card .btn-outline-primary {
    color: #dfe6ff;
    border-color: rgba(124, 140, 255, 0.32);
    background: rgba(255, 255, 255, 0.03);
}

.customer-card .btn-outline-primary:hover {
    color: white;
    border-color: rgba(124, 140, 255, 0.48);
    background: rgba(124, 140, 255, 0.12);
}

.customer-card .form-control.customer-input,
.customer-card .customer-input,
.customer-input.form-control {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(137, 152, 214, 0.24);
    background: rgba(7, 12, 24, 0.92);
    color: #f3f6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.customer-card .form-control.customer-input::placeholder,
.customer-card .customer-input::placeholder,
.customer-input.form-control::placeholder {
    color: rgba(199, 210, 255, 0.62);
}

.customer-card .form-control.customer-input:focus,
.customer-card .customer-input:focus,
.customer-input.form-control:focus {
    background: rgba(8, 13, 27, 0.98);
    color: #ffffff;
    border-color: rgba(124, 140, 255, 0.56);
    box-shadow: 0 0 0 0.18rem rgba(124, 140, 255, 0.18);
}

.customer-card .form-control.customer-input:disabled,
.customer-card .form-control.customer-input[readonly] {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(230, 236, 255, 0.72);
    border-color: rgba(137, 152, 214, 0.18);
}

.empty-state-card {
    min-height: 280px;
}

.profile-form-card,
.customer-profile-card,
.issuance-card {
    background:
        linear-gradient(180deg, rgba(14, 20, 39, 0.88), rgba(9, 14, 28, 0.97)) !important;
}

.issuance-note-grid {
    display: grid;
    gap: 0.75rem;
}

.issuance-note-card {
    padding: 0.95rem 1.1rem;
}

.issuance-note-title {
    margin-bottom: 0.35rem;
    color: #e9eeff;
    font-weight: 700;
    line-height: 1.35;
}

.issuance-note-text {
    color: #cbd4f7;
    line-height: 1.45;
}

.security-checklist {
    border-radius: 18px;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(137, 152, 214, 0.16);
}

.security-checklist-title {
    margin-bottom: 0.45rem;
    color: #e9eeff;
    font-weight: 700;
    line-height: 1.35;
}

.security-checklist ul {
    padding-left: 1.2rem;
}

.security-checklist li {
    margin-bottom: 0.2rem;
    color: #d7dfff;
    line-height: 1.5;
}

.security-checklist li:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .dashboard-section-head,
    .dashboard-activity-item,
    .dashboard-summary-line {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Futuristic portal scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 255, .82) rgba(5, 10, 24, .72);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.portal-shell::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.dashboard-activity-list::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.portal-shell::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.dashboard-activity-list::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(5, 10, 24, .96), rgba(10, 18, 42, .88));
    border-left: 1px solid rgba(93, 130, 255, .14);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.portal-shell::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.dashboard-activity-list::-webkit-scrollbar-thumb {
    min-height: 48px;
    border: 3px solid rgba(5, 10, 24, .94);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(141, 113, 255, .98), rgba(49, 224, 198, .86));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 18px rgba(124, 92, 255, .34), 0 0 26px rgba(49, 224, 198, .2);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.portal-shell::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
.dashboard-activity-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(174, 151, 255, 1), rgba(64, 244, 216, .95));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 26px rgba(124, 92, 255, .52), 0 0 36px rgba(49, 224, 198, .34);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.portal-shell::-webkit-scrollbar-corner,
.table-responsive::-webkit-scrollbar-corner,
.dashboard-activity-list::-webkit-scrollbar-corner {
    background: rgba(5, 10, 24, .96);
}

.profile-page-shell .profile-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.profile-page-shell .profile-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-side-card,
.profile-security-card {
    background: linear-gradient(180deg, rgba(16, 24, 47, 0.9), rgba(10, 15, 30, 0.96)) !important;
}

.profile-checklist {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.1rem;
    color: #dce5ff;
}

.profile-checklist li {
    line-height: 1.5;
}

.profile-security-note {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(124, 140, 255, 0.24);
    background: rgba(124, 140, 255, 0.08);
    color: #dce5ff;
}

@media (max-width: 767.98px) {
    .profile-page-shell .profile-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-page-shell .profile-action-row {
        flex-direction: column;
    }

    .profile-page-shell .profile-action-row .btn {
        width: 100%;
    }
}
