:root {
    --bg: #0a0a0c;
    --sidebar: #111116;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.075);
    --text: #f5f5f7;
    --muted: #8d8d98;
    --accent: #ff2d78;
    --accent-soft: rgba(255, 45, 120, 0.12);
    --success: #57d68d;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 70% -10%,
            rgba(255, 45, 120, 0.08),
            transparent 35%
        ),
        var(--bg);
    color: var(--text);
    font-family:
        "Montserrat",
        "Roboto",
        "Segoe UI",
        Arial,
        sans-serif;
}

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

button,
input {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    background: rgba(17, 17, 22, 0.94);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 8px 28px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--accent);
    color: white;
    font-weight: 800;
    box-shadow:
        0 0 28px rgba(255, 45, 120, 0.28);
}

.brand-title {
    font-size: 16px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-item {
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface-hover);
    transform: translateX(2px);
}

.nav-item.active {
    color: white;
    background: var(--accent-soft);
    border-color: rgba(255, 45, 120, 0.18);
    box-shadow:
        inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 8px 0;
    border-top: 1px solid var(--border);
}

.status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--success);
    box-shadow:
        0 0 12px rgba(87, 214, 141, 0.55);
}

.logout-button {
    width: 100%;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease;
}

.logout-button:hover {
    color: white;
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.13);
}

.content {
    width: 100%;
    max-width: 1500px;
    padding: 42px 46px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.eyebrow,
.card-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1 {
    margin: 8px 0 7px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1;
    letter-spacing: -0.04em;
}

h2 {
    margin: 6px 0 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.page-description,
.panel-copy {
    color: var(--muted);
    line-height: 1.7;
}

.page-description {
    margin: 0;
    font-size: 13px;
}

.live-badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.live-badge {
    padding: 9px 12px;
    color: #b9f3d1;
    background: rgba(87, 214, 141, 0.07);
    border: 1px solid rgba(87, 214, 141, 0.16);
    font-size: 9px;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px);
}

.stat-card {
    min-height: 150px;
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.stat-value {
    margin-top: 18px;
    font-size: 30px;
    font-weight: 780;
    letter-spacing: -0.04em;
}

.status-good {
    color: var(--success);
    font-size: 21px;
}

.card-note {
    margin-top: auto;
    padding-top: 12px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
}

.panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.pill {
    padding: 7px 10px;
    font-size: 9px;
}

.pill.success {
    color: #b9f3d1;
    background: rgba(87, 214, 141, 0.08);
    border: 1px solid rgba(87, 214, 141, 0.15);
}

.status-list {
    margin-top: 24px;
}

.status-row,
.mini-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.status-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

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

.status-row strong,
.mini-metric strong {
    color: var(--text);
    font-weight: 650;
}

.panel-copy {
    margin: 22px 0;
    font-size: 12px;
}

.mini-metric {
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: 11px;
}

.text-link {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.text-link:hover {
    text-decoration: underline;
}

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

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

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-footer {
        margin-top: 22px;
    }

    .content {
        padding: 28px 20px;
    }

    .topbar {
        display: block;
    }

    .live-badge {
        margin-top: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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

@media (prefers-reduced-transparency: reduce) {
    .sidebar,
    .card {
        backdrop-filter: none;
    }

    .sidebar {
        background: var(--sidebar);
    }

    .card {
        background: #111116;
    }
}

/* ---------- BOB AI LOGIN ---------- */

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 45, 120, 0.13),
            transparent 38%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(255, 45, 120, 0.04),
            transparent 30%
        ),
        var(--bg);
}

.login-shell {
    width: 100%;
    max-width: 440px;
}

.login-card {
    padding: 34px;
    background: rgba(17, 17, 22, 0.88);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.38),
        0 0 70px rgba(255, 45, 120, 0.045);
    backdrop-filter: blur(20px);
}

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

.login-heading {
    margin-bottom: 25px;
}

.login-heading h1 {
    margin-top: 9px;
    font-size: 34px;
}

.login-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field > span {
    color: #b7b7c0;
    font-size: 11px;
    font-weight: 650;
}

.field input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 11px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.field input:hover {
    background: rgba(255, 255, 255, 0.045);
}

.field input:focus {
    border-color: rgba(255, 45, 120, 0.65);
    box-shadow:
        0 0 0 3px rgba(255, 45, 120, 0.10);
}

.login-button {
    min-height: 48px;
    margin-top: 5px;
    cursor: pointer;
    color: white;
    background: var(--accent);
    border: 0;
    border-radius: 11px;
    font-weight: 750;
    box-shadow:
        0 10px 28px rgba(255, 45, 120, 0.20);
    transition:
        transform 160ms ease,
        filter 160ms ease,
        box-shadow 160ms ease;
}

.login-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 13px 34px rgba(255, 45, 120, 0.28);
}

.login-button:active {
    transform: translateY(0);
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    color: #ffb1c8;
    background: rgba(255, 45, 120, 0.08);
    border: 1px solid rgba(255, 45, 120, 0.22);
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
}

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 520px) {
    .login-card {
        padding: 26px 22px;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .login-card {
        background: #111116;
        backdrop-filter: none;
    }
}

/* ---------- BOB AI DEVELOPERS ---------- */

.developers-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(300px, 0.85fr);
    gap: 20px;
    align-items: start;
}

.developers-card {
    padding: 26px;
}

.developers-card h2 {
    margin: 7px 0 7px;
    font-size: 20px;
}

.developer-form {
    display: grid;
    gap: 17px;
    max-width: 620px;
    margin-top: 24px;
}

.developer-form .login-button {
    width: fit-content;
    min-width: 210px;
    padding: 0 24px;
}

.developer-info {
    position: relative;
    overflow: hidden;
}

.developer-info::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -70px;
    top: -70px;
    pointer-events: none;
    border-radius: 50%;
    background:
        rgba(255, 45, 120, 0.08);
    filter: blur(12px);
}

.developer-info-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.developer-info-item {
    padding: 14px 15px;
    background:
        rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.developer-info-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.developer-info-item span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.developers-list-card {
    margin-top: 20px;
    padding: 26px;
}

.developers-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.developers-list-header h2 {
    margin: 7px 0 0;
    font-size: 20px;
}

.developer-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 1fr)
        130px
        180px;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.developer-row:first-child {
    border-top: 0;
}

.developer-name {
    font-size: 14px;
    font-weight: 700;
}

.developer-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.developer-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.developer-status.active {
    color: #8dffc0;
    background: rgba(70, 220, 130, 0.08);
    border: 1px solid rgba(70, 220, 130, 0.18);
}

.developer-status.disabled {
    color: #ff9fbd;
    background: rgba(255, 45, 120, 0.07);
    border: 1px solid rgba(255, 45, 120, 0.18);
}

.developer-action {
    display: flex;
    justify-content: flex-end;
}

.developer-action .logout-button {
    min-width: 120px;
}

.developer-empty {
    padding: 28px 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.totp-created {
    margin-top: 20px;
    padding: 18px;
    background:
        rgba(255, 45, 120, 0.055);
    border:
        1px solid rgba(255, 45, 120, 0.20);
    border-radius: 14px;
}

.totp-created code {
    display: block;
    margin-top: 12px;
    padding: 13px 14px;
    overflow-wrap: anywhere;
    color: #ffd0df;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    user-select: all;
}

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

@media (max-width: 760px) {
    .developers-card,
    .developers-list-card {
        padding: 20px;
    }

    .developer-form {
        max-width: none;
    }

    .developer-form .login-button {
        width: 100%;
    }

    .developer-row {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .developer-action {
        justify-content: flex-start;
    }
}

/* ---------- BOB AI SERVERS / RAG ---------- */

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

.server-card {
    display: block;
    padding: 22px;
    color: inherit;
    text-decoration: none;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.server-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 45, 120, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.server-card-head,
.rag-result-head,
.rag-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.server-card h2 {
    margin: 7px 0 0;
    font-size: 21px;
}

.rag-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.rag-status.ready {
    color: #8dffc0;
    background: rgba(70, 220, 130, .08);
    border: 1px solid rgba(70, 220, 130, .18);
}

.rag-status.empty {
    color: #ffd38d;
    background: rgba(255, 180, 70, .08);
    border: 1px solid rgba(255, 180, 70, .18);
}

.rag-status.error {
    color: #ff9fbd;
    background: rgba(255, 45, 120, .08);
    border: 1px solid rgba(255, 45, 120, .20);
}

.server-address {
    margin-top: 20px;
    color: var(--muted);
    font-size: 11px;
}

.server-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.server-stats > div,
.server-info-list > div {
    padding: 12px 13px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.server-stats span,
.server-info-list span,
.server-version span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.server-stats strong {
    font-size: 18px;
}

.server-version {
    margin-top: 16px;
}

.server-version code {
    display: block;
    overflow: hidden;
    color: #b9b9c4;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-version.detail code {
    padding: 10px 12px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid var(--border);
    border-radius: 9px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
}

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

.server-detail-grid {
    display: grid;
    grid-template-columns:
        minmax(280px, .75fr)
        minmax(0, 1.25fr);
    gap: 20px;
    align-items: start;
}

.server-info-card,
.rag-test-card {
    padding: 26px;
}

.server-info-card h2,
.rag-test-card h2 {
    margin: 7px 0 18px;
    font-size: 20px;
}

.server-info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.server-info-list strong {
    font-size: 13px;
}

.rag-test-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.field textarea {
    width: 100%;
    padding: 13px 14px;
    resize: vertical;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 11px;
    font: inherit;
    line-height: 1.55;
}

.field textarea:focus {
    border-color: rgba(255, 45, 120, .65);
    box-shadow:
        0 0 0 3px rgba(255, 45, 120, .10);
}

.rag-test-form .login-button {
    width: fit-content;
    min-width: 160px;
    padding: 0 22px;
}

.rag-error {
    margin-top: 18px;
    margin-bottom: 0;
}

.rag-results {
    margin-top: 26px;
}

.rag-results-header {
    align-items: flex-end;
    margin-bottom: 15px;
}

.rag-results-header h2 {
    margin: 7px 0 0;
    font-size: 20px;
}

.rag-server-lock {
    padding: 7px 10px;
    color: #ff9fbd;
    background: rgba(255, 45, 120, .06);
    border: 1px solid rgba(255, 45, 120, .16);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.rag-result-card {
    margin-bottom: 12px;
    padding: 22px;
}

.rag-rank {
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
}

.rag-result-card h3 {
    margin: 6px 0 0;
    font-size: 15px;
}

.rag-score {
    color: var(--muted);
    font-size: 8px;
    text-align: right;
}

.rag-score strong {
    display: block;
    margin-top: 3px;
    color: #ff9fbd;
    font-size: 15px;
}

.rag-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 15px;
    color: var(--muted);
    font-size: 9px;
}

.rag-meta code {
    color: #c8c8d0;
}

.rag-text {
    margin-top: 16px;
    padding: 16px;
    max-height: 360px;
    overflow: auto;
    color: #c9c9d1;
    background: rgba(0, 0, 0, .16);
    border: 1px solid var(--border);
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.rag-empty {
    margin-top: 22px;
    padding: 24px;
    color: var(--muted);
    font-size: 12px;
}

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

@media (max-width: 900px) {
    .server-detail-grid {
        grid-template-columns: 1fr;
    }
}

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

    .server-info-list {
        grid-template-columns: 1fr;
    }

    .rag-test-form .login-button {
        width: 100%;
    }
}

/* =========================================================
   BOB AI — AI Test
   ========================================================= */

.ai-test-card {
    margin-bottom: 22px;
}

.ai-test-form {
    display: grid;
    gap: 20px;
    margin-top: 22px;
}

.ai-test-form .form-group {
    display: grid;
    gap: 9px;
}

.ai-test-form label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.ai-test-form select,
.ai-test-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    color: inherit;
    padding: 13px 14px;
    font: inherit;
    outline: none;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.ai-test-form select:focus,
.ai-test-form textarea:focus {
    border-color: rgba(255, 45, 120, .65);
    background: rgba(255, 255, 255, .05);
    box-shadow:
        0 0 0 3px rgba(255, 45, 120, .09);
}

.ai-test-form textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.55;
}

.ai-test-form select option {
    background: #111116;
}

.field-hint {
    font-size: 12px;
    opacity: .58;
}

.ai-submit-button {
    justify-self: start;
    min-width: 210px;
}

.ai-alert {
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 13px;
}

.ai-alert-error {
    border: 1px solid rgba(255, 45, 120, .25);
    background: rgba(255, 45, 120, .08);
}

.ai-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.ai-metric-card {
    display: grid;
    gap: 8px;
}

.ai-metric-card span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .55;
}

.ai-metric-card strong {
    font-size: 16px;
    overflow-wrap: anywhere;
}

.ai-answer-card {
    margin-bottom: 26px;
}

.ai-answer {
    margin-top: 18px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.7;
    font-size: 15px;
}

.ai-corpus-version {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    align-items: center;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    font-size: 12px;
}

.ai-corpus-version span {
    opacity: .55;
}

.ai-corpus-version code {
    overflow-wrap: anywhere;
}

.ai-sources-section {
    margin-top: 8px;
}

.ai-source-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.ai-source-card {
    overflow: hidden;
}

.ai-source-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.ai-source-header h3 {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.45;
}

.ai-source-number {
    font-size: 11px;
    font-weight: 800;
    color: #ff2d78;
}

.ai-score {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid rgba(255, 45, 120, .18);
    border-radius: 8px;
    background: rgba(255, 45, 120, .06);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}

.ai-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
    font-size: 11px;
    opacity: .52;
}

.ai-source-text {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
    font-size: 13px;
    opacity: .82;
}

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

@media (max-width: 650px) {
    .ai-metrics-grid {
        grid-template-columns: 1fr;
    }

    .ai-source-header {
        display: grid;
    }

    .ai-score {
        justify-self: start;
    }

    .ai-submit-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-test-form select,
    .ai-test-form textarea {
        transition: none;
    }
}

/* === BOB AI: AI TEST VISUAL FIX === */

.ai-test-card,
.ai-metrics-grid,
.ai-answer-card,
.ai-sources-section {
    width: 100%;
    max-width: 1180px;
    box-sizing: border-box;
}

.ai-test-card {
    padding: 26px;
}

.ai-test-form {
    max-width: 920px;
}

.ai-test-form select {
    min-height: 48px;
    cursor: pointer;
}

.ai-test-form textarea {
    min-height: 150px;
    max-height: 420px;
}

.ai-test-form .primary-button,
.ai-submit-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;

    width: auto;
    min-width: 210px;
    min-height: 46px;

    margin: 2px 0 0;
    padding: 0 22px;

    border: 1px solid rgba(255, 72, 137, .55);
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #ff2d78,
            #e91e63
        );

    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .01em;

    cursor: pointer;

    box-shadow:
        0 8px 24px rgba(255, 45, 120, .16);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease,
        filter .16s ease;
}

.ai-test-form .primary-button:hover,
.ai-submit-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    border-color: rgba(255, 105, 160, .8);

    box-shadow:
        0 10px 30px rgba(255, 45, 120, .24);
}

.ai-test-form .primary-button:active,
.ai-submit-button:active {
    transform: translateY(0);
}

.ai-test-form .primary-button:focus-visible,
.ai-submit-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 45, 120, .18),
        0 8px 24px rgba(255, 45, 120, .18);
}

.ai-metric-card,
.ai-answer-card,
.ai-source-card {
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .ai-test-card {
        padding: 20px;
    }

    .ai-test-form {
        max-width: none;
    }
}

@media (max-width: 650px) {
    .ai-test-form .primary-button,
    .ai-submit-button {
        width: 100%;
    }
}

/* === END AI TEST VISUAL FIX === */

/* === BOB AI: SIDEBAR UNIFIED === */

.sidebar-nav {
    display: grid;
    gap: 6px;
    width: 100%;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 42px;
    box-sizing: border-box;

    margin: 0;
    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: 11px;

    color: rgba(255, 255, 255, .58);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    transition:
        color .16s ease,
        background .16s ease,
        border-color .16s ease;
}

.sidebar-nav .nav-item:hover {
    color: rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .035);
}

.sidebar-nav .nav-item.active {
    color: #ffffff;
    background: rgba(255, 45, 120, .12);
    border-color: rgba(255, 45, 120, .28);
}

.sidebar-footer {
    display: grid;
    gap: 10px;
}

.sidebar-login {
    width: 100%;
    box-sizing: border-box;

    padding: 0 4px;

    color: rgba(255, 255, 255, .92);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer form {
    width: 100%;
}

.sidebar-footer .logout-button {
    width: 100%;
}

/* === END SIDEBAR UNIFIED === */

/* === BOB AI: DEVELOPER ACTIONS + LOGIN ALIGN === */

.sidebar-login {
    text-align: center;
}

.developer-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.developer-action form {
    margin: 0;
}

.developer-delete-button {
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 16px;

    border: 1px solid rgba(255, 74, 112, .38);
    border-radius: 10px;

    background: rgba(255, 74, 112, .09);
    color: #ff6685;

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .16s ease,
        border-color .16s ease,
        color .16s ease;
}

.developer-delete-button:hover {
    background: rgba(255, 74, 112, .17);
    border-color: rgba(255, 74, 112, .62);
    color: #ff8ba2;
}

/* === END DEVELOPER ACTIONS + LOGIN ALIGN === */

/* === BOB AI: SERVER PICKER === */

.server-picker {
    position: relative;
    width: 100%;
}

.server-picker-trigger {
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 9px 15px;

    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;

    background: rgba(255,255,255,.035);
    color: #fff;

    font: inherit;
    text-align: left;
    cursor: pointer;

    transition:
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}

.server-picker-trigger:hover {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.18);
}

.server-picker.open .server-picker-trigger {
    border-color: rgba(255,45,120,.72);

    box-shadow:
        0 0 0 1px rgba(255,45,120,.12),
        0 0 24px rgba(255,45,120,.08);
}

.server-picker-current {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.server-picker-current strong,
.server-option-copy strong {
    display: block;

    color: rgba(255,255,255,.94);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.server-picker-current small,
.server-option-copy small {
    display: block;
    margin-top: 3px;

    color: rgba(255,255,255,.40);
    font-size: 11px;
    line-height: 1.2;
}

.server-color-dot {
    flex: 0 0 auto;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: rgba(255,255,255,.22);

    box-shadow:
        0 0 0 4px rgba(255,255,255,.035);
}

.server-picker-chevron {
    margin-left: 15px;

    color: rgba(255,255,255,.42);
    font-size: 15px;

    transition: transform .16s ease;
}

.server-picker.open .server-picker-chevron {
    transform: rotate(180deg);
}

.server-picker-menu {
    position: absolute;
    z-index: 100;

    top: calc(100% + 8px);
    left: 0;
    right: 0;

    display: none;

    max-height: 390px;
    overflow-y: auto;

    box-sizing: border-box;
    padding: 7px;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 13px;

    background: rgba(18,18,22,.985);

    box-shadow:
        0 22px 60px rgba(0,0,0,.48),
        0 0 0 1px rgba(255,255,255,.018);
}

.server-picker.open .server-picker-menu {
    display: block;
}

.server-picker-option {
    --server-color: rgba(255,255,255,.45);

    width: 100%;
    min-height: 49px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: 10px 1fr 24px;
    align-items: center;
    gap: 12px;

    padding: 7px 11px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;
    color: #fff;

    font: inherit;
    text-align: left;
    cursor: pointer;

    transition:
        background .14s ease,
        border-color .14s ease;
}

.server-picker-option:hover {
    background: color-mix(
        in srgb,
        var(--server-color) 10%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--server-color) 22%,
        transparent
    );
}

.server-picker-option .server-color-dot {
    background: var(--server-color);

    box-shadow:
        0 0 0 4px color-mix(
            in srgb,
            var(--server-color) 10%,
            transparent
        ),
        0 0 13px color-mix(
            in srgb,
            var(--server-color) 45%,
            transparent
        );
}

.server-picker-option.selected {
    background: color-mix(
        in srgb,
        var(--server-color) 12%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--server-color) 30%,
        transparent
    );
}

.server-option-copy {
    min-width: 0;
}

.server-option-check {
    opacity: 0;

    color: var(--server-color);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.server-picker-option.selected
.server-option-check {
    opacity: 1;
}


/* Цвета серверов */

.server-picker-option[data-server-key="red"] {
    --server-color: #ff3f5f;
}

.server-picker-option[data-server-key="yellow"] {
    --server-color: #ffd43b;
}

.server-picker-option[data-server-key="green"] {
    --server-color: #43dc82;
}

.server-picker-option[data-server-key="azure"] {
    --server-color: #39bfff;
}

.server-picker-option[data-server-key="silver"] {
    --server-color: #b9c0cb;
}

.server-picker-option[data-server-key="rose"] {
    --server-color: #ff69a6;
}

.server-picker-option[data-server-key="black"] {
    --server-color: #737783;
}

.server-picker-option[data-server-key="sky"] {
    --server-color: #65d8ff;
}

/* TITAN — фиолетовый */
.server-picker-option[data-server-key="titan"] {
    --server-color: #9b6cff;
}

/* X — бордовый */
.server-picker-option[data-server-key="x"] {
    --server-color: #9e294b;
}

.server-picker-option[data-server-key="fire"] {
    --server-color: #ff6538;
}

.server-picker-option[data-server-key="lime"] {
    --server-color: #9bea45;
}


/* Scrollbar */

.server-picker-menu {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(255,255,255,.16)
        transparent;
}

/* === END BOB AI: SERVER PICKER === */

/* === BOB AI: SERVER COLORS FINAL === */

.server-picker-option {
    --server-color: #ffffff;
}

.server-picker-option[data-server-key="red"] {
    --server-color: #ff3b4f;
}

.server-picker-option[data-server-key="yellow"] {
    --server-color: #ffd83d;
}

.server-picker-option[data-server-key="green"] {
    --server-color: #42d978;
}

.server-picker-option[data-server-key="azure"] {
    --server-color: #25b8f4;
}

.server-picker-option[data-server-key="silver"] {
    --server-color: #c4c9d2;
}

.server-picker-option[data-server-key="rose"] {
    --server-color: #ff66a3;
}

.server-picker-option[data-server-key="black"] {
    --server-color: #777b86;
}

.server-picker-option[data-server-key="sky"] {
    --server-color: #63d4ff;
}

/* TITAN */
.server-picker-option[data-server-key="titan"] {
    --server-color: #945cff;
}

/* X */
.server-picker-option[data-server-key="x"] {
    --server-color: #8f2948;
}

.server-picker-option[data-server-key="fire"] {
    --server-color: #ff5b32;
}

.server-picker-option[data-server-key="lime"] {
    --server-color: #9bea3f;
}


/* Название сервера окрашивается его цветом */

.server-picker-option
.server-option-copy strong {
    color: var(--server-color);
}


/* Более выраженная цветная точка */

.server-picker-option
.server-color-dot {
    background-color: var(--server-color);

    box-shadow:
        0 0 0 4px rgba(255,255,255,.025),
        0 0 12px var(--server-color);
}


/* Выбранный сервер */

.server-picker-option.selected {
    border-color: var(--server-color);
}


/* Галочка */

.server-picker-option.selected
.server-option-check {
    color: var(--server-color);
    opacity: 1;
}


/* Dropdown должен быть поверх карточки */

.ai-test-card {
    overflow: visible;
}

.server-picker {
    position: relative;
    z-index: 20;
}

.server-picker.open {
    z-index: 200;
}

.server-picker-menu {
    z-index: 201;
}

/* === END SERVER COLORS FINAL === */

/* === BOB AI: RESULT UI V2 === */

.bob-ai-result {
    width: 100%;
    max-width: 1180px;
    display: grid;
    gap: 18px;
    margin-top: 22px;
    box-sizing: border-box;
}

.bob-ai-result-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 2px 0;
}

.bob-ai-result-head h2,
.bob-ai-panel-heading h2 {
    margin: 5px 0 0;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.25;
}

.bob-ai-result-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(82, 218, 142, .18);
    border-radius: 999px;
    background: rgba(82, 218, 142, .07);
    color: rgba(220, 255, 235, .9);
    font-size: 12px;
    font-weight: 700;
}

.bob-ai-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #52da8e;
    box-shadow: 0 0 12px rgba(82, 218, 142, .55);
}

.bob-ai-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.bob-ai-metric {
    position: relative;
    min-width: 0;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px;
    box-sizing: border-box;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 15px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255, 45, 120, .08),
            transparent 52%
        ),
        rgba(255, 255, 255, .025);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025);
}

.bob-ai-metric::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 45, 120, .4),
        transparent
    );
}

.bob-ai-metric-label {
    color: rgba(255, 255, 255, .43);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bob-ai-metric strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, .96);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.bob-ai-token-arrow {
    padding: 0 4px;
    color: #ff4a8b;
}

.bob-ai-answer-panel,
.bob-ai-sources {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 17px;
    background: rgba(255, 255, 255, .022);
}

.bob-ai-answer-panel {
    padding: 24px;
}

.bob-ai-sources {
    padding: 24px;
}

.bob-ai-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.bob-ai-panel-heading p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, .43);
    font-size: 13px;
    line-height: 1.5;
}

.bob-ai-model-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(255, 45, 120, .18);
    border-radius: 9px;
    background: rgba(255, 45, 120, .07);
    color: #ff7dac;
    font-size: 11px;
    font-weight: 800;
}

.bob-ai-answer-text {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 21px;

    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 13px;

    background: rgba(0, 0, 0, .16);

    color: rgba(255, 255, 255, .86);
    font-size: 14px;
    line-height: 1.75;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bob-ai-corpus {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: 14px;
    padding: 0 2px;

    color: rgba(255, 255, 255, .38);
    font-size: 11px;
}

.bob-ai-corpus code {
    min-width: 0;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .56);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.bob-ai-source-list {
    display: grid;
    gap: 9px;
}

.bob-ai-source {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 13px;

    background: rgba(0, 0, 0, .12);

    transition:
        border-color .16s ease,
        background .16s ease;
}

.bob-ai-source[open] {
    border-color: rgba(255, 45, 120, .17);
    background: rgba(255, 45, 120, .025);
}

.bob-ai-source-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    min-height: 72px;
    padding: 13px 15px;
    box-sizing: border-box;

    cursor: pointer;
    list-style: none;
    user-select: none;
}

.bob-ai-source-summary::-webkit-details-marker {
    display: none;
}

.bob-ai-source-summary::marker {
    display: none;
    content: "";
}

.bob-ai-source-summary:hover {
    background: rgba(255, 255, 255, .018);
}

.bob-ai-source-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.bob-ai-source-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    min-width: 34px;
    height: 27px;
    padding: 0 7px;
    box-sizing: border-box;

    border: 1px solid rgba(255, 45, 120, .18);
    border-radius: 8px;

    background: rgba(255, 45, 120, .075);
    color: #ff679e;

    font-size: 11px;
    font-weight: 900;
}

.bob-ai-source-title-wrap {
    min-width: 0;
}

.bob-ai-source-title {
    display: block;
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bob-ai-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 13px;
    margin-top: 6px;

    color: rgba(255, 255, 255, .34);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .025em;
}

.bob-ai-source-side {
    display: flex;
    align-items: center;
    gap: 13px;
    flex: 0 0 auto;
}

.bob-ai-score {
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 7px;
    background: rgba(255, 255, 255, .025);

    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
}

.bob-ai-chevron {
    width: 8px;
    height: 8px;

    border-right: 2px solid rgba(255, 255, 255, .34);
    border-bottom: 2px solid rgba(255, 255, 255, .34);

    transform: rotate(45deg);
    transition: transform .16s ease;
}

.bob-ai-source[open] .bob-ai-chevron {
    transform: rotate(225deg);
}

.bob-ai-source-body {
    padding: 0 15px 15px 61px;
}

.bob-ai-source-text {
    padding: 15px 16px;

    border-top: 1px solid rgba(255, 255, 255, .05);
    border-radius: 0 0 9px 9px;

    background: rgba(0, 0, 0, .13);

    color: rgba(255, 255, 255, .64);
    font-size: 12px;
    line-height: 1.7;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .bob-ai-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .bob-ai-result-head,
    .bob-ai-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .bob-ai-metrics {
        grid-template-columns: 1fr;
    }

    .bob-ai-answer-panel,
    .bob-ai-sources {
        padding: 18px;
    }

    .bob-ai-source-summary {
        align-items: flex-start;
    }

    .bob-ai-source-side {
        gap: 8px;
    }

    .bob-ai-score {
        display: none;
    }

    .bob-ai-source-body {
        padding: 0 12px 12px;
    }

    .bob-ai-corpus {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* === END BOB AI: RESULT UI V2 === */

 
/* ===== Legislation ===== */

.legislation-toolbar {
    margin-bottom: 22px;
    padding: 20px 22px;
}

.legislation-server-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.legislation-server-form label {
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .7;
}

.legislation-server-form select {
    min-width: 320px;
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.10);
    background: #15151b;
    color: #fff;
    font: inherit;
    outline: none;
}

.legislation-server-form select:focus {
    border-color: rgba(255,77,148,.7);
}

.legislation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 16px;
    font-size: 13px;
    opacity: .78;
}

.legislation-meta code {
    overflow-wrap: anywhere;
}

.legislation-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.legislation-list {
    padding: 16px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.legislation-list .card-label {
    margin: 2px 6px 12px;
}

.legislation-item {
    display: block;
    padding: 13px 14px;
    margin-bottom: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.legislation-item:hover {
    background: rgba(255,255,255,.035);
    border-color: rgba(255,255,255,.07);
}

.legislation-item.active {
    background: rgba(255,77,148,.09);
    border-color: rgba(255,77,148,.30);
}

.legislation-item strong {
    display: block;
    font-size: 13px;
    line-height: 1.45;
}

.legislation-item span {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    opacity: .55;
}

.legislation-viewer {
    min-width: 0;
    padding: 24px 28px;
}

.legislation-viewer h2 {
    margin: 8px 0 12px;
    font-size: 22px;
    line-height: 1.35;
}

.legislation-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-size: 12px;
    opacity: .6;
}

.legislation-document-meta code {
    overflow-wrap: anywhere;
}

.legislation-text {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.75;
}

.legislation-empty {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    opacity: .55;
}

@media (max-width: 1050px) {
    .legislation-layout {
        grid-template-columns: 1fr;
    }

    .legislation-list {
        max-height: 360px;
    }
}

@media (max-width: 700px) {
    .legislation-server-form select {
        min-width: 100%;
        width: 100%;
    }

    .legislation-viewer {
        padding: 20px;
    }
}


/* ===== Legislation picker final ===== */

.legislation-server-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.legislation-server-field {
    min-width: 0;
}

.legislation-server-field > label {
    display: block;
    margin: 0 0 9px;
    color: rgba(255,255,255,.62);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.legislation-open-button {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 145px;
    height: 58px;
    padding: 0 24px;

    border: 1px solid rgba(255,72,137,.55);
    border-radius: 12px;

    background: linear-gradient(135deg,#ff2d78,#e91e63);
    color: #fff;

    font: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 8px 24px rgba(255,45,120,.16);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease,
        filter .16s ease;
}

.legislation-open-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    border-color: rgba(255,105,160,.8);
    box-shadow: 0 10px 30px rgba(255,45,120,.24);
}

.legislation-open-button:active {
    transform: translateY(0);
}

.legislation-open-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255,45,120,.18),
        0 8px 24px rgba(255,45,120,.18);
}

.legislation-layout {
    grid-template-columns: minmax(360px,420px) minmax(0,1fr);
}

/* Firefox */
.legislation-list,
.legislation-viewer,
.legislation-text {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,45,120,.72) rgba(255,255,255,.035);
}

/* Chromium / Edge */
.legislation-list::-webkit-scrollbar,
.legislation-viewer::-webkit-scrollbar,
.legislation-text::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.legislation-list::-webkit-scrollbar-track,
.legislation-viewer::-webkit-scrollbar-track,
.legislation-text::-webkit-scrollbar-track {
    background: rgba(255,255,255,.025);
    border-radius: 999px;
}

.legislation-list::-webkit-scrollbar-thumb,
.legislation-viewer::-webkit-scrollbar-thumb,
.legislation-text::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(255,65,135,.88),
        rgba(220,30,100,.78)
    );

    border: 2px solid rgba(18,18,22,.9);
    border-radius: 999px;
}

.legislation-list::-webkit-scrollbar-thumb:hover,
.legislation-viewer::-webkit-scrollbar-thumb:hover,
.legislation-text::-webkit-scrollbar-thumb:hover {
    background: #ff4388;
}

.legislation-list {
    scrollbar-gutter: stable;
}

@media (max-width: 1050px) {
    .legislation-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .legislation-server-form {
        grid-template-columns: 1fr;
    }

    .legislation-open-button {
        width: 100%;
    }
}

/* ===== Legislation dropdown stacking fix ===== */

.legislation-toolbar {
    position: relative;
    z-index: 100;
    overflow: visible;
}

.legislation-server-form {
    position: relative;
    z-index: 101;
    overflow: visible;
}

.legislation-server-field {
    position: relative;
    z-index: 102;
    overflow: visible;
}

.legislation-server-field .server-picker {
    position: relative;
    z-index: 103;
}

.legislation-server-field .server-picker.open {
    z-index: 1000;
}

.legislation-server-field .server-picker-menu {
    z-index: 1001;
}

.legislation-layout {
    position: relative;
    z-index: 1;
}

/* ===== Legislation instant server switch ===== */

.legislation-server-form {
    display: block;
}

.legislation-server-field {
    width: 100%;
}

.legislation-server-field .server-picker {
    width: 100%;
}

/* ===== BOB AI Markdown ===== */

.bob-ai-answer-text.js-ai-markdown {
    line-height: 1.75;
}

.bob-ai-answer-text.js-ai-markdown p {
    margin: 0 0 14px;
}

.bob-ai-answer-text.js-ai-markdown p:last-child {
    margin-bottom: 0;
}

.bob-ai-answer-text.js-ai-markdown h1,
.bob-ai-answer-text.js-ai-markdown h2,
.bob-ai-answer-text.js-ai-markdown h3,
.bob-ai-answer-text.js-ai-markdown h4 {
    margin: 24px 0 10px;
    color: #fff;
    line-height: 1.35;
}

.bob-ai-answer-text.js-ai-markdown h1:first-child,
.bob-ai-answer-text.js-ai-markdown h2:first-child,
.bob-ai-answer-text.js-ai-markdown h3:first-child {
    margin-top: 0;
}

.bob-ai-answer-text.js-ai-markdown strong {
    color: #fff;
    font-weight: 800;
}

.bob-ai-answer-text.js-ai-markdown ul,
.bob-ai-answer-text.js-ai-markdown ol {
    margin: 10px 0 16px;
    padding-left: 25px;
}

.bob-ai-answer-text.js-ai-markdown li {
    margin: 6px 0;
    padding-left: 3px;
}

.bob-ai-answer-text.js-ai-markdown li::marker {
    color: #ff347f;
    font-weight: 800;
}

.bob-ai-answer-text.js-ai-markdown code {
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    background: rgba(255,255,255,.055);
    color: #ff8bb5;
    font-family: monospace;
}

.bob-ai-answer-text.js-ai-markdown pre {
    margin: 16px 0;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(0,0,0,.24);
}

.bob-ai-answer-text.js-ai-markdown pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: #e8e8ec;
}

.bob-ai-answer-text.js-ai-markdown blockquote {
    margin: 16px 0;
    padding: 10px 16px;
    border-left: 3px solid #ff347f;
    background: rgba(255,52,127,.055);
    border-radius: 0 9px 9px 0;
}

/* ===== Licenses + Requests ===== */

.bob-filter-card {
    padding: 18px 20px;
    margin-bottom: 20px;
}

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

.bob-input,
.bob-select {
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    background: #15151b;
    color: #fff;
    font: inherit;
    outline: none;
}

.bob-input {
    min-width: 280px;
    flex: 1;
}

.bob-select {
    min-width: 160px;
}

.bob-input:focus,
.bob-select:focus {
    border-color: rgba(255,52,127,.65);
}

.bob-filter-button,
.bob-reset-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
}

.bob-filter-button {
    border: 1px solid rgba(255,72,137,.5);
    background: linear-gradient(135deg,#ff2d78,#e91e63);
    color: #fff;
    cursor: pointer;
}

.bob-reset-button {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.035);
    color: rgba(255,255,255,.75);
}

.bob-table-card {
    padding: 0;
    overflow: hidden;
}

.bob-table-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff347f rgba(255,255,255,.03);
}

.bob-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.bob-table th {
    padding: 14px 16px;
    text-align: left;
    color: rgba(255,255,255,.48);
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.bob-table td {
    padding: 15px 16px;
    vertical-align: middle;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}

.bob-table tbody tr:hover {
    background: rgba(255,255,255,.018);
}

.bob-status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
}

.bob-status.success {
    color: #65e6a5;
    background: rgba(50,210,130,.10);
    border: 1px solid rgba(50,210,130,.18);
}

.bob-status.danger {
    color: #ff6d85;
    background: rgba(255,70,100,.10);
    border: 1px solid rgba(255,70,100,.18);
}

.bob-status.warning {
    color: #ffc76a;
    background: rgba(255,180,60,.10);
    border: 1px solid rgba(255,180,60,.18);
}

.bob-status.muted {
    color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}

.bob-subvalue {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.4);
}

.quota-cell {
    min-width: 150px;
}

.quota-track {
    width: 130px;
    height: 6px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}

.quota-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,#ff2d78,#ff65a0);
}

.bob-empty-row {
    padding: 45px !important;
    text-align: center;
    color: rgba(255,255,255,.45);
}

/* ===== BOB detail pages ===== */
.bob-click-row { cursor:pointer; transition:background .15s ease; }
.bob-click-row:hover,.bob-click-row:focus { background:rgba(255,52,127,.045)!important; outline:none; }
.bob-server-name { display:flex; align-items:center; gap:8px; }
.bob-server-dot { display:inline-block; width:9px; height:9px; min-width:9px; border-radius:50%; margin-right:7px; box-shadow:0 0 10px currentColor; vertical-align:middle; }
.bob-server-dot.server_01 { background:#ff3b4f; color:#ff3b4f; }
.bob-server-dot.server_02 { background:#ffd83d; color:#ffd83d; }
.bob-server-dot.server_03 { background:#42d978; color:#42d978; }
.bob-server-dot.server_04 { background:#25b8f4; color:#25b8f4; }
.bob-server-dot.server_05 { background:#c4c9d2; color:#c4c9d2; }
.bob-server-dot.server_06 { background:#ff66a3; color:#ff66a3; }
.bob-server-dot.server_07 { background:#777b86; color:#777b86; }
.bob-server-dot.server_08 { background:#63d4ff; color:#63d4ff; }
.bob-server-dot.server_09 { background:#945cff; color:#945cff; }
.bob-server-dot.server_10 { background:#8f2948; color:#8f2948; }
.bob-server-dot.server_11 { background:#ff5b32; color:#ff5b32; }
.bob-server-dot.server_12 { background:#9bea3f; color:#9bea3f; }
.bob-back-link { display:inline-block; margin-bottom:15px; color:#ff5b95; text-decoration:none; font-weight:750; font-size:13px; }
.bob-back-link:hover { color:#ff8bb5; }
.bob-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.bob-detail-item { padding:18px; }
.bob-detail-item span,.bob-id-panel span { display:block; margin-bottom:7px; color:rgba(255,255,255,.43); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.bob-detail-item strong,.bob-detail-item a { color:#fff; font-size:15px; text-decoration:none; }
.bob-id-panel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; margin-bottom:18px; padding:20px; }
.bob-id-panel code { overflow-wrap:anywhere; color:#ff8bb5; }
.bob-message-panel { padding:24px; margin-bottom:18px; }
.bob-message-panel h2 { margin:5px 0 18px; }
.bob-user-message { white-space:pre-wrap; line-height:1.75; overflow-wrap:anywhere; color:rgba(255,255,255,.82); }
.bob-license-quota { padding:24px; margin-bottom:18px; }
.bob-panel-row { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.bob-panel-row h2 { margin:5px 0 0; }
.bob-big-progress { height:16px; margin-top:20px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.07); box-shadow:inset 0 1px 3px rgba(0,0,0,.4); }
.bob-big-progress>div { height:100%; border-radius:inherit; background:linear-gradient(90deg,#ff2d78,#ff65a0); box-shadow:0 0 14px rgba(255,45,120,.35); }
@media(max-width:900px){.bob-detail-grid{grid-template-columns:1fr 1fr}.bob-id-panel{grid-template-columns:1fr}}
@media(max-width:600px){.bob-detail-grid{grid-template-columns:1fr}}
.bob-nickname { color:#fff; font-weight:750; }
.bob-click-row { position: relative; cursor: pointer; }
.bob-click-row td { position: relative; }
.bob-click-row .bob-row-link-cell { position: static; }
.bob-row-overlay { position: absolute; inset: 0; z-index: 5; display: block; }
.bob-click-row:hover { background: rgba(255,52,127,.045) !important; }

/* ===== BOB DASHBOARD V2 ===== */

.bob-dashboard-wide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 22px 0;
}

.bob-dashboard-wide > .card {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 22px 24px;
    overflow: hidden;
}

.bob-dashboard-wide .panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 18px;
}

.bob-dashboard-wide .panel-header h2 {
    margin: 4px 0 0;
    line-height: 1.15;
}

.bob-dashboard-wide .card-label {
    margin: 0;
}

.bob-dashboard-wide .text-link,
.bob-dashboard-wide .pill {
    flex: 0 0 auto;
}


/* Последний запрос */

.bob-last-request-row {
    display: grid;
    grid-template-columns:
        minmax(140px, 1.15fr)
        minmax(140px, 1fr)
        minmax(120px, .8fr)
        minmax(160px, 1fr)
        minmax(140px, 1fr);
    align-items: center;
    gap: 18px;

    min-height: 62px;
    margin: 0;
    padding: 0 18px;

    color: inherit;
    text-decoration: none;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 13px;
    background: rgba(255,255,255,.025);

    transition:
        border-color .18s ease,
        background .18s ease;
}

.bob-last-request-row:hover {
    border-color: rgba(255,79,163,.40);
    background: rgba(255,79,163,.045);
}

.bob-last-request-row > div {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    padding: 0;
    border: 0;

    white-space: nowrap;
}

.bob-last-request-row .bob-server-dot {
    flex: 0 0 auto;
}


/* VDS */

.bob-vds-panel .bob-resource {
    margin: 0 0 15px;
}

.bob-resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin: 0 0 7px;

    font-size: 14px;
}

.bob-resource-head span {
    color: rgba(255,255,255,.68);
}

.bob-resource-head strong {
    color: #fff;
}

.bob-progress-native {
    display: block;

    width: 100%;
    height: 12px;

    padding: 0;
    border: 0;
    border-radius: 6px;

    overflow: hidden;

    background: #222229;

    appearance: none;
    -webkit-appearance: none;
}

.bob-progress-native::-webkit-progress-bar {
    background: #222229;
    border-radius: 6px;
}

.bob-progress-native::-webkit-progress-value {
    background: linear-gradient(
        90deg,
        #8b5cff,
        #ff4fa3
    );
    border-radius: 6px;
}

.bob-progress-native::-moz-progress-bar {
    background: linear-gradient(
        90deg,
        #8b5cff,
        #ff4fa3
    );
    border-radius: 6px;
}

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

    margin: 18px 0 0;
}

.bob-network-card {
    box-sizing: border-box;

    min-width: 0;
    padding: 14px 16px;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 13px;

    background: rgba(255,255,255,.025);
}

.bob-network-card span,
.bob-network-card small {
    display: block;
    color: rgba(255,255,255,.50);
}

.bob-network-card span {
    font-size: 11px;
    letter-spacing: .08em;
}

.bob-network-card strong {
    display: block;

    margin: 6px 0 4px;

    font-size: 20px;
    line-height: 1.1;
}

.bob-network-card small {
    font-size: 12px;
}


/* Empty */

.bob-empty-state {
    padding: 18px;

    color: rgba(255,255,255,.55);

    border: 1px dashed rgba(255,255,255,.10);
    border-radius: 13px;
}


/* Responsive */

@media (max-width: 1050px) {
    .bob-last-request-row {
        grid-template-columns: 1fr 1fr;
        padding: 14px 18px;
    }

    .bob-network-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .bob-dashboard-wide > .card {
        padding: 18px;
    }

    .bob-last-request-row {
        grid-template-columns: 1fr;
    }
}

/* ===== AMAZING RP SERVER COLORS ===== */

.bob-server-dot {
    display:inline-block;
    width:9px;
    height:9px;
    min-width:9px;
    border-radius:50%;
}

.bob-server-server_01 { background:#ff3b4f !important; box-shadow:0 0 9px #ff3b4f; }
.bob-server-server_02 { background:#ffd83d !important; box-shadow:0 0 9px #ffd83d; }
.bob-server-server_03 { background:#42d978 !important; box-shadow:0 0 9px #42d978; }
.bob-server-server_04 { background:#25b8f4 !important; box-shadow:0 0 9px #25b8f4; }
.bob-server-server_05 { background:#c4c9d2 !important; box-shadow:0 0 9px #c4c9d2; }
.bob-server-server_06 { background:#ff66a3 !important; box-shadow:0 0 9px #ff66a3; }
.bob-server-server_07 { background:#777b86 !important; box-shadow:0 0 9px #777b86; }
.bob-server-server_08 { background:#63d4ff !important; box-shadow:0 0 9px #63d4ff; }
.bob-server-server_09 { background:#945cff !important; box-shadow:0 0 9px #945cff; }
.bob-server-server_10 { background:#8f2948 !important; box-shadow:0 0 9px #8f2948; }
.bob-server-server_11 { background:#ff5b32 !important; box-shadow:0 0 9px #ff5b32; }
.bob-server-server_12 { background:#9bea3f !important; box-shadow:0 0 9px #9bea3f; }

.bob-server-title {
    display:flex;
    align-items:center;
    gap:10px;
}

