:root {
    color-scheme: dark;
    --bg: #090d14;
    --panel: #111823;
    --panel-2: #151f2c;
    --border: #263448;
    --text: #f3f6fb;
    --muted: #8e9bad;
    --accent: #7c5cff;
    --accent-2: #5d40dc;
    --success: #3ddc97;
    --danger: #ff6b77;
    --warning: #f6c85f;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(124, 92, 255, .14), transparent 34rem),
        var(--bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
}

code {
    color: #b8a8ff;
    word-break: break-all;
}

.topbar {
    min-height: 78px;
    padding: 14px clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 13, 20, .82);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark,
.server-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #3f8cff);
    box-shadow: 0 12px 32px rgba(124, 92, 255, .2);
}

.server-icon.large {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 1.35rem;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    margin-top: 2px;
}

.dev-badge {
    color: var(--warning);
    border: 1px solid rgba(246, 200, 95, .35);
    background: rgba(246, 200, 95, .08);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr .7fr;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 58px;
}

.hero h1,
.page-title h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.03;
    margin: 8px 0 16px;
    letter-spacing: -.045em;
}

.hero p,
.page-title p {
    color: var(--muted);
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.eyebrow {
    color: #a895ff !important;
    font-size: .75rem !important;
    font-weight: 800;
    letter-spacing: .14em;
    margin: 0 !important;
}

.hero-card,
.panel,
.server-card,
.empty-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(21, 31, 44, .92), rgba(15, 22, 32, .92));
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}

.hero-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.hero-card span {
    color: var(--muted);
    font-size: .85rem;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2,
.panel-heading h2 {
    margin: 6px 0 0;
}

.server-grid {
    display: grid;
    gap: 16px;
}

.server-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
}

.server-main h3 {
    margin: 0 0 3px;
}

.muted {
    color: var(--muted) !important;
}

.module-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.pill {
    color: #738195;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
}

.pill.on {
    color: var(--success);
    border-color: rgba(61, 220, 151, .3);
    background: rgba(61, 220, 151, .08);
}

.server-actions,
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 11px;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.button:hover {
    transform: translateY(-1px);
    border-color: #425571;
}

.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.button.danger {
    color: #ffc1c6;
    border-color: rgba(255, 107, 119, .25);
    background: rgba(255, 107, 119, .08);
}

.button.full {
    width: 100%;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 30px 0;
}

.dashboard-form {
    display: grid;
    gap: 20px;
}

.panel {
    padding: 24px;
}

.panel-heading {
    margin-bottom: 20px;
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 0;
    border-top: 1px solid var(--border);
    cursor: pointer;
}

.toggle-card strong,
.toggle-card small {
    display: block;
}

.toggle-card small,
.field small,
.check-row small {
    color: var(--muted);
    margin-top: 5px;
    line-height: 1.5;
}

.toggle-card input[type="checkbox"],
.check-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
}

.field {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.field label {
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    background: #0c121b;
    color: var(--text);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .12);
}

textarea {
    resize: vertical;
}

.command-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-input span {
    color: var(--muted);
    font-size: 1.2rem;
}

.check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 20px 0;
}

.check-row strong,
.check-row small {
    display: block;
}

.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid rgba(124, 92, 255, .3);
    background: rgba(124, 92, 255, .08);
    border-radius: 13px;
}

.alert.success {
    color: #aef3d1;
    border-color: rgba(61, 220, 151, .3);
    background: rgba(61, 220, 151, .07);
}

.form-actions {
    justify-content: flex-end;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: start;
}

.command-list {
    display: grid;
    gap: 10px;
}

.command-card {
    border: 1px solid var(--border);
    background: rgba(8, 13, 20, .5);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.command-card strong {
    font-size: 1.05rem;
    color: #b9aaff;
}

.command-card p {
    margin: 6px 0;
}

.command-card small {
    color: var(--muted);
}

.empty-card,
.empty-inline {
    color: var(--muted);
    padding: 26px;
}

.footer {
    color: #647185;
    text-align: center;
    padding: 26px;
    border-top: 1px solid var(--border);
    font-size: .83rem;
}

@media (max-width: 800px) {
    .hero,
    .two-column {
        grid-template-columns: 1fr;
    }

    .server-card {
        grid-template-columns: auto 1fr;
    }

    .server-actions {
        grid-column: 1 / -1;
    }

    .dev-badge {
        display: none;
    }

    .form-actions {
        flex-wrap: wrap;
    }
}

.module-note{color:var(--muted);font-size:.9rem;}


select {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    background: #0c121b;
    color: var(--text);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .12);
}

.role-menu-card {
    border: 1px solid var(--border);
    background: rgba(8, 13, 20, .5);
    border-radius: 17px;
    padding: 18px;
}

.role-menu-header,
.role-option-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.role-menu-header p {
    margin: 6px 0;
}

.role-menu-header small,
.role-option-row small {
    color: var(--muted);
}

.role-option-list {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.role-option-row {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
    border-radius: 12px;
    padding: 12px;
}

.role-option-row strong,
.role-option-row small {
    display: block;
}

.option-builder {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.option-builder summary {
    color: #b9aaff;
    font-weight: 800;
    cursor: pointer;
}

.role-option-form {
    margin-top: 14px;
}

.role-menu-command {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.role-menu-command code {
    border: 1px solid var(--border);
    background: #0c121b;
    padding: 6px 8px;
    border-radius: 8px;
}


.account-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-name {
    color: var(--muted);
    font-weight: 700;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}


.legal-hero {
    margin-bottom: 28px;
}

.legal-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.05;
    margin: 8px 0 12px;
    letter-spacing: -.045em;
}

.legal-document {
    max-width: 920px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(21, 31, 44, .92), rgba(15, 22, 32, .92));
    border-radius: 22px;
    padding: clamp(22px, 4vw, 42px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}

.legal-document h2 {
    margin-top: 34px;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.legal-document h2:first-child {
    margin-top: 0;
}

.legal-document p,
.legal-document li {
    color: var(--muted);
    line-height: 1.75;
}

.legal-document ul {
    padding-left: 24px;
}

.legal-document a {
    color: #b9aaff;
}

.legal-contact {
    display: inline-block;
    margin: 8px 0 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: #0c121b;
    border-radius: 10px;
}

.legal-disclaimer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: .9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-links a {
    color: #9ea9ba;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}


.launch-callout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin: 0 0 22px;
    border: 1px solid rgba(124, 92, 255, .38);
    background: linear-gradient(135deg, rgba(124, 92, 255, .13), rgba(63, 140, 255, .07));
    border-radius: 18px;
}

.launch-callout strong {
    display: block;
    font-size: 1.05rem;
}

.launch-callout p {
    margin: 6px 0 0;
    color: var(--muted);
}

.setup-progress {
    display: flex;
    gap: 10px;
    margin: 0 0 24px;
}

.setup-step {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--panel);
    font-weight: 800;
}

.setup-step.active {
    color: white;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), #3f8cff);
    box-shadow: 0 8px 24px rgba(124, 92, 255, .2);
}

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

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

.setup-module-grid .toggle-card {
    min-height: 64px;
}

.setup-subtitle {
    margin-top: 28px;
}

.setup-finish p {
    color: var(--muted);
    line-height: 1.7;
}

.mini-stat {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
    border-radius: 13px;
    padding: 14px;
}

.mini-stat strong,
.mini-stat span {
    display: block;
}

.mini-stat span {
    color: var(--muted);
    font-size: .8rem;
    margin-top: 4px;
}

.dashboard-actions {
    flex-wrap: wrap;
}

.danger-zone {
    border-color: rgba(255, 107, 119, .28);
}

.danger-zone h2 {
    color: #ffc1c6;
}

.error-card {
    max-width: 720px;
    margin: 50px auto;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.error-id {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #0c121b;
    letter-spacing: .08em;
}

@media (max-width: 800px) {
    .launch-callout {
        align-items: stretch;
        flex-direction: column;
    }

    .setup-grid,
    .setup-module-grid {
        grid-template-columns: 1fr;
    }

    .account-name {
        display: none;
    }

    .topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .shell {
        width: min(100% - 24px, 1180px);
        padding-top: 32px;
    }

    .button {
        min-height: 42px;
    }
}


/* =========================================================
   NystBot Dashboard UI v2
   ========================================================= */

:root {
    --sidebar: #0b111a;
    --sidebar-hover: rgba(124, 92, 255, .08);
    --sidebar-active: rgba(124, 92, 255, .16);
    --topbar-height: 72px;
    --sidebar-width: 248px;
    --surface-soft: rgba(255, 255, 255, .025);
}

body {
    overflow-x: hidden;
}

.topbar {
    min-height: var(--topbar-height);
    height: var(--topbar-height);
    padding: 0 24px;
    background: rgba(8, 12, 19, .94);
    border-bottom: 1px solid rgba(50, 66, 88, .72);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    min-width: 215px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    overflow: hidden;
    background: #0c121b;
    border: 1px solid rgba(124, 92, 255, .28);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
}

.brand-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-copy strong {
    font-size: .96rem;
    letter-spacing: -.01em;
}

.brand-copy small {
    color: var(--muted);
    font-size: .72rem;
    margin-top: 2px;
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.topbar-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aab5c5;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 14px rgba(61, 220, 151, .65);
}

.account-bar {
    justify-content: flex-end;
    min-width: 215px;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.account-avatar,
.account-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: 0 0 34px;
    border: 1px solid var(--border);
}

.account-avatar {
    object-fit: cover;
}

.account-avatar-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #3f8cff);
    color: #fff;
    font-size: .8rem;
    font-weight: 900;
}

.account-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-frame {
    min-height: calc(100vh - var(--topbar-height));
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    padding: 20px 14px;
    background:
        radial-gradient(circle at 20% 0%, rgba(124, 92, 255, .08), transparent 19rem),
        var(--sidebar);
    border-right: 1px solid var(--border);
}

.sidebar-section {
    margin-bottom: 22px;
}

.sidebar-title {
    padding: 0 10px 8px;
    color: #65758a;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.side-nav {
    display: grid;
    gap: 4px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 11px;
    color: #9aa8bb;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 750;
    transition:
        background .14s ease,
        color .14s ease,
        transform .14s ease;
}

.side-nav-item:hover {
    color: var(--text);
    background: var(--sidebar-hover);
}

.side-nav-item.active {
    color: #dcd5ff;
    background: var(--sidebar-active);
    box-shadow: inset 2px 0 0 var(--accent);
}

.side-nav-icon {
    width: 21px;
    display: inline-grid;
    place-items: center;
    opacity: .92;
}

.sidebar-server {
    margin: 6px 6px 18px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .025);
}

.sidebar-server small {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    margin-bottom: 4px;
}

.sidebar-server strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.sidebar-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.app-main {
    min-width: 0;
    background:
        radial-gradient(circle at 82% 0%, rgba(124, 92, 255, .11), transparent 30rem),
        var(--bg);
}

.page-container {
    width: min(1240px, calc(100% - 52px));
    margin: 0 auto;
    padding: 36px 0 72px;
}

.public-shell {
    width: min(1080px, calc(100% - 36px));
    min-height: calc(100vh - var(--topbar-height));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.public-footer {
    color: #647185;
    text-align: center;
    padding: 26px;
    border-top: 1px solid var(--border);
    font-size: .83rem;
}

.dashboard-heading,
.setup-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-heading h1,
.setup-header h1 {
    margin: 6px 0 8px;
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    line-height: 1.06;
    letter-spacing: -.04em;
}

.dashboard-heading p:not(.eyebrow),
.setup-header p:not(.eyebrow) {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.dashboard-status-card {
    min-width: 235px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(17, 24, 35, .82);
}

.dashboard-status-card small,
.dashboard-status-card strong {
    display: block;
}

.dashboard-status-card small {
    color: var(--muted);
    margin-bottom: 4px;
}

.dashboard-status-card strong {
    color: #baf4d6;
}

.server-grid {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
}

.server-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: 210px;
    padding: 20px;
    overflow: hidden;
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.server-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -75px;
    top: -90px;
    border-radius: 50%;
    background: rgba(124, 92, 255, .08);
    pointer-events: none;
}

.server-card:hover {
    transform: translateY(-2px);
    border-color: #354965;
    box-shadow: 0 26px 65px rgba(0, 0, 0, .22);
}

.server-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Discord guild artwork */
.server-icon-image {
    overflow: hidden;
    padding: 0;
    background: #0c121b;
}

.server-icon-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-card .server-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    font-size: 1.05rem;
}

.server-card:hover .server-icon-image img {
    transform: scale(1.035);
}

.server-icon-image img {
    transition: transform .18s ease;
}

.server-card .server-main {
    flex: 1;
    min-width: 0;
}

.server-card .server-main h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-card .server-actions {
    margin-top: auto;
    justify-content: flex-end;
}

.server-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .73rem;
}

.server-meta span {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
}

.server-meta .ready {
    color: var(--success);
    border-color: rgba(61, 220, 151, .22);
}

.server-meta .needs-setup {
    color: var(--warning);
    border-color: rgba(246, 200, 95, .24);
}

.setup-header {
    align-items: center;
    margin-bottom: 22px;
}

.setup-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.setup-title-wrap .server-icon.large {
    flex: 0 0 auto;
}

.setup-step-counter {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(124, 92, 255, .28);
    background: rgba(124, 92, 255, .08);
    color: #c8bdff;
    text-align: center;
    font-size: .76rem;
    font-weight: 900;
}

.setup-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 0 20px;
}

.setup-progress-item {
    position: relative;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(17, 24, 35, .68);
}

.setup-progress-item strong,
.setup-progress-item small {
    display: block;
}

.setup-progress-item strong {
    color: #8c9aae;
    font-size: .8rem;
}

.setup-progress-item small {
    color: #5f6d80;
    margin-top: 3px;
    font-size: .67rem;
}

.setup-progress-item.complete {
    border-color: rgba(61, 220, 151, .20);
}

.setup-progress-item.complete strong {
    color: #8fdab6;
}

.setup-progress-item.active {
    border-color: rgba(124, 92, 255, .5);
    background: linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(63, 140, 255, .07));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.setup-progress-item.active strong {
    color: #d8d1ff;
}

.directory-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid rgba(61, 220, 151, .23);
    background: rgba(61, 220, 151, .055);
    color: #a9d9c2;
    font-size: .8rem;
}

.directory-status.warning {
    border-color: rgba(246, 200, 95, .28);
    background: rgba(246, 200, 95, .06);
    color: #e9d18f;
}

.setup-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px;
    align-items: start;
}

.setup-panel {
    padding: clamp(20px, 3vw, 30px);
}

.setup-panel .panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.setup-panel .panel-heading h2 {
    font-size: 1.35rem;
}

.setup-panel .field {
    margin: 20px 0;
}

.setup-grid {
    gap: 0 20px;
}

.setup-side-card {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(21, 31, 44, .88), rgba(12, 18, 27, .9));
}

.setup-side-card h3 {
    margin: 0 0 8px;
    font-size: .98rem;
}

.setup-side-card p,
.setup-side-card li {
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.6;
}

.setup-side-card ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.setup-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.setup-module-grid .toggle-card {
    min-height: 70px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.setup-module-grid .toggle-card:first-child {
    border-top: 1px solid var(--border);
}

.setup-subtitle {
    padding-top: 24px;
    margin-top: 26px;
    border-top: 1px solid var(--border);
}

.setup-finish-card {
    padding: 8px 0 2px;
}

.setup-finish-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 17px;
    background: rgba(61, 220, 151, .09);
    border: 1px solid rgba(61, 220, 151, .23);
    font-size: 1.7rem;
}

.setup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.setup-actions-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.page-title {
    margin: 6px 0 26px;
}

.page-title h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.panel {
    border-radius: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.button.primary {
    box-shadow: 0 10px 24px rgba(92, 65, 220, .15);
}

input,
textarea,
select {
    min-height: 45px;
    background: rgba(8, 13, 20, .78);
}

.field label {
    font-size: .84rem;
}

.footer {
    display: none;
}

@media (max-width: 1050px) {
    :root {
        --sidebar-width: 210px;
    }

    .setup-workspace {
        grid-template-columns: 1fr;
    }

    .setup-side-card {
        position: static;
    }
}

@media (max-width: 800px) {
    .topbar {
        height: 66px;
        min-height: 66px;
        padding: 0 12px;
    }

    :root {
        --topbar-height: 66px;
    }

    .brand {
        min-width: auto;
    }

    .brand-copy small,
    .topbar-center,
    .account-name {
        display: none;
    }

    .account-bar {
        min-width: auto;
    }

    .app-frame {
        display: block;
    }

    .sidebar {
        position: sticky;
        top: var(--topbar-height);
        z-index: 90;
        width: 100%;
        height: auto;
        padding: 8px 10px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-section {
        margin: 0;
    }

    .sidebar-title,
    .sidebar-server,
    .sidebar-bottom {
        display: none;
    }

    .side-nav {
        display: flex;
        gap: 6px;
        width: max-content;
    }

    .side-nav-item {
        min-height: 38px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .page-container {
        width: min(100% - 24px, 1240px);
        padding: 24px 0 60px;
    }

    .dashboard-heading,
    .setup-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

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

    .setup-module-grid,
    .setup-grid {
        grid-template-columns: 1fr;
    }

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

    .setup-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .setup-actions-right {
        width: 100%;
        margin-left: 0;
    }

    .setup-actions-right .button,
    .setup-actions > .button {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .brand-copy strong {
        font-size: .88rem;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .account-profile {
        display: none;
    }

    .setup-title-wrap {
        align-items: flex-start;
    }

    .setup-title-wrap .server-icon.large {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .setup-progress {
        grid-template-columns: 1fr;
    }

    .setup-progress-item:not(.active) {
        display: none;
    }

    .setup-actions-right {
        flex-direction: column;
    }
}

/* =========================================================
   NystBot public changelog / release history
   ========================================================= */

.topbar-release-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #9eabba;
    text-decoration: none;
    font-size: .76rem;
    font-weight: 800;
    transition:
        color .14s ease,
        border-color .14s ease,
        background .14s ease;
}

.topbar-release-link:hover,
.topbar-release-link.active {
    color: #e5e0ff;
    border-color: rgba(124, 92, 255, .25);
    background: rgba(124, 92, 255, .08);
}

.topbar-release-link strong {
    padding: 3px 7px;
    border-radius: 999px;
    color: #c9bdff;
    background: rgba(124, 92, 255, .12);
    font-size: .67rem;
    letter-spacing: .03em;
}

.topbar-release-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px rgba(61, 220, 151, .55);
}

.whats-new-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(124, 92, 255, .30);
    border-radius: 17px;
    color: inherit;
    background:
        linear-gradient(110deg, rgba(124, 92, 255, .13), rgba(63, 140, 255, .045) 55%, rgba(17, 24, 35, .80));
    text-decoration: none;
    transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.whats-new-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -85px;
    top: -95px;
    border-radius: 50%;
    background: rgba(124, 92, 255, .09);
    pointer-events: none;
}

.whats-new-card:hover {
    transform: translateY(-1px);
    border-color: rgba(144, 119, 255, .52);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .16);
}

.whats-new-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(124, 92, 255, .28);
    border-radius: 13px;
    background: rgba(124, 92, 255, .11);
    font-size: 1.15rem;
}

.whats-new-copy {
    min-width: 0;
}

.whats-new-copy small,
.whats-new-copy strong,
.whats-new-copy > span {
    display: block;
}

.whats-new-copy small {
    color: #a895ff;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.whats-new-copy strong {
    margin-top: 3px;
    font-size: .93rem;
}

.whats-new-copy > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .76rem;
}

.whats-new-arrow {
    position: relative;
    z-index: 1;
    color: #c8bdff;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.changelog-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
    align-items: stretch;
    margin: 6px 0 22px;
}

.changelog-hero-copy {
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0%, rgba(124, 92, 255, .18), transparent 18rem),
        linear-gradient(180deg, rgba(21, 31, 44, .90), rgba(12, 18, 27, .92));
    box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}

.changelog-hero h1 {
    max-width: 760px;
    margin: 8px 0 14px;
    font-size: clamp(2.15rem, 5vw, 4rem);
    line-height: .98;
    letter-spacing: -.05em;
}

.changelog-hero-copy > p:not(.eyebrow) {
    max-width: 730px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.changelog-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.changelog-current-version {
    color: #91a0b5;
    font-size: .78rem;
    font-weight: 800;
}

.changelog-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(124, 92, 255, .26);
    border-radius: 24px;
    background:
        linear-gradient(155deg, rgba(124, 92, 255, .13), rgba(17, 24, 35, .92) 58%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .14);
}

.changelog-summary-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(124, 92, 255, .14);
    font-size: 1.1rem;
}

.changelog-summary-card small,
.changelog-summary-card strong,
.changelog-summary-card div > span {
    display: block;
}

.changelog-summary-card small {
    color: #aa9aff;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.changelog-summary-card strong {
    margin-top: 7px;
    line-height: 1.35;
}

.changelog-summary-card div > span {
    margin-top: 7px;
    color: var(--muted);
    font-size: .75rem;
}

.changelog-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.changelog-stat {
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(17, 24, 35, .74);
}

.changelog-stat strong,
.changelog-stat span {
    display: block;
}

.changelog-stat strong {
    font-size: 1rem;
}

.changelog-stat span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .72rem;
}

.changelog-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.changelog-jump-card {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
    max-height: calc(100vh - var(--topbar-height) - 36px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: rgba(11, 17, 26, .92);
}

.changelog-jump-list {
    display: grid;
    gap: 3px;
    margin-top: 10px;
}

.changelog-jump-list a {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    color: #8d9caf;
    text-decoration: none;
    transition: background .14s ease, color .14s ease;
}

.changelog-jump-list a:hover {
    color: var(--text);
    background: rgba(124, 92, 255, .08);
}

.changelog-jump-list strong,
.changelog-jump-list span {
    display: block;
}

.changelog-jump-list strong {
    color: #b7aaff;
    font-size: .72rem;
}

.changelog-jump-list span {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .68rem;
}

.changelog-timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.changelog-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 19px;
    bottom: 19px;
    width: 1px;
    background: linear-gradient(var(--accent), rgba(38, 52, 72, .45));
}

.changelog-entry {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 13px;
    scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.changelog-entry-marker {
    position: relative;
    z-index: 2;
    padding-top: 27px;
}

.changelog-entry-marker span {
    width: 17px;
    height: 17px;
    display: block;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: #526174;
    box-shadow: 0 0 0 1px #526174;
}

.changelog-entry.latest .changelog-entry-marker span {
    background: var(--accent);
    box-shadow:
        0 0 0 1px var(--accent),
        0 0 18px rgba(124, 92, 255, .58);
}

.changelog-entry-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: linear-gradient(180deg, rgba(21, 31, 44, .88), rgba(13, 20, 29, .90));
    box-shadow: 0 16px 44px rgba(0, 0, 0, .11);
}

.changelog-entry.latest .changelog-entry-card {
    border-color: rgba(124, 92, 255, .38);
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .12), transparent 18rem),
        linear-gradient(180deg, rgba(21, 31, 44, .92), rgba(13, 20, 29, .94));
}

.changelog-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid rgba(38, 52, 72, .80);
}

.changelog-entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.release-version,
.release-badge,
.release-latest {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.release-version {
    color: #d3c9ff;
    border: 1px solid rgba(124, 92, 255, .28);
    background: rgba(124, 92, 255, .09);
}

.release-badge {
    color: #91a1b6;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}

.release-latest {
    color: #aef3d1;
    border: 1px solid rgba(61, 220, 151, .24);
    background: rgba(61, 220, 151, .07);
}

.changelog-entry-header h2 {
    margin: 9px 0 7px;
    font-size: 1.18rem;
    letter-spacing: -.02em;
}

.changelog-entry-header p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.65;
}

.changelog-entry-header time {
    flex: 0 0 auto;
    color: #718097;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.changelog-sections {
    display: grid;
    gap: 16px;
    padding-top: 18px;
}

.changelog-section {
    padding: 15px 16px;
    border: 1px solid rgba(38, 52, 72, .72);
    border-radius: 14px;
    background: rgba(8, 13, 20, .35);
}

.changelog-section.added {
    border-left: 3px solid rgba(124, 92, 255, .72);
}

.changelog-section.improved {
    border-left: 3px solid rgba(63, 140, 255, .72);
}

.changelog-section.fixed {
    border-left: 3px solid rgba(61, 220, 151, .65);
}

.changelog-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: .82rem;
}

.changelog-section ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 19px;
}

.changelog-section li {
    color: #9ba8b9;
    font-size: .78rem;
    line-height: 1.55;
}

@media (max-width: 980px) {
    .changelog-hero {
        grid-template-columns: 1fr;
    }

    .changelog-summary-card {
        align-items: center;
    }

    .changelog-layout {
        grid-template-columns: 1fr;
    }

    .changelog-jump-card {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .changelog-jump-list {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 700px) {
    .whats-new-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .whats-new-arrow {
        grid-column: 2;
    }

    .changelog-overview {
        grid-template-columns: 1fr;
    }

    .changelog-entry-header {
        flex-direction: column;
        gap: 10px;
    }

    .changelog-entry-card {
        padding: 17px;
    }
}

/* =========================================================
   Add NystBot / server discovery
   ========================================================= */

.dashboard-heading-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.add-bot-button,
.section-add-bot-button,
.topbar-add-bot,
.add-server-button {
    white-space: nowrap;
}

.add-bot-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

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

.section-description {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.55;
}

.bot-empty-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.bot-empty-card h3,
.bot-empty-card p {
    margin: 0;
}

.bot-empty-card p {
    margin-top: 6px;
    line-height: 1.6;
}

.empty-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    border: 1px solid rgba(124, 92, 255, .25);
    background: rgba(124, 92, 255, .09);
    font-size: 1.25rem;
}

.available-servers-section {
    margin-top: 42px;
    padding-top: 30px;
    border-top: 1px solid rgba(38, 52, 72, .72);
}

.available-count {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(124, 92, 255, .24);
    border-radius: 999px;
    color: #c4b9ff;
    background: rgba(124, 92, 255, .07);
    font-size: .72rem;
    font-weight: 800;
}

.available-server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 14px;
}

.available-server-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 17px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .07), transparent 12rem),
        rgba(17, 24, 35, .75);
    transition:
        transform .14s ease,
        border-color .14s ease,
        background .14s ease;
}

.available-server-card:hover {
    transform: translateY(-1px);
    border-color: #354965;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .11), transparent 13rem),
        rgba(18, 26, 38, .88);
}

.available-server-info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.available-server-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
}

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

.available-server-copy h3 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .96rem;
}

.available-server-copy p {
    margin: 4px 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: .72rem;
}

.not-installed-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid rgba(246, 200, 95, .22);
    border-radius: 999px;
    color: var(--warning);
    background: rgba(246, 200, 95, .06);
    font-size: .62rem;
    font-weight: 850;
}

.add-server-button {
    flex: 0 0 auto;
}

.available-empty-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border: 1px solid rgba(61, 220, 151, .18);
    border-radius: 15px;
    background: rgba(61, 220, 151, .035);
}

.available-empty-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--success);
    background: rgba(61, 220, 151, .08);
    font-weight: 900;
}

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

.available-empty-card span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.5;
}

.available-server-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(63, 140, 255, .16);
    border-radius: 13px;
    background: rgba(63, 140, 255, .035);
}

.available-server-note p {
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.55;
}

.side-nav-invite {
    color: #c9c0ff;
}

.side-nav-external {
    margin-left: auto;
    color: #68778b;
    font-size: .72rem;
}

.public-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

@media (max-width: 1050px) {
    .topbar-add-bot {
        display: none;
    }
}

@media (max-width: 800px) {
    .dashboard-heading-actions {
        width: 100%;
        justify-content: stretch;
    }

    .dashboard-heading-actions > * {
        flex: 1 1 220px;
    }

    .dashboard-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .section-add-bot-button {
        width: 100%;
        text-align: center;
    }

    .bot-empty-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .bot-empty-card .button {
        grid-column: 1 / -1;
        text-align: center;
    }

    .available-server-card {
        align-items: stretch;
        flex-direction: column;
    }

    .add-server-button {
        width: 100%;
        text-align: center;
    }
}

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

    .public-topbar-actions > .button:first-child {
        display: none;
    }
}

/* =========================================================
   Public NystBot website / showroom
   ========================================================= */

.marketing-topbar .topbar-inner,
.marketing-footer-inner,
.marketing-footer-bottom,
.marketing-shell {
    width: min(1240px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.marketing-topbar .brand {
    min-width: 230px;
}

.marketing-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.marketing-nav a {
    padding: 9px 12px;
    border-radius: 10px;
    color: #93a0b3;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 750;
    transition: color .14s ease, background .14s ease;
}

.marketing-nav a:hover,
.marketing-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, .035);
}

.marketing-nav a.active {
    color: #d8d1ff;
}

.marketing-topbar .public-topbar-actions {
    min-width: 230px;
}

.marketing-shell {
    min-height: calc(100vh - var(--topbar-height));
    padding: 0 0 92px;
}

.marketing-hero {
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr);
    gap: clamp(34px, 6vw, 82px);
    align-items: center;
    padding: 92px 0 82px;
}

.marketing-hero-copy {
    position: relative;
    z-index: 2;
}

.marketing-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    border: 1px solid rgba(124, 92, 255, .24);
    border-radius: 999px;
    color: #b9adff;
    background: rgba(124, 92, 255, .065);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .07em;
}

.marketing-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 14px rgba(61, 220, 151, .62);
}

.marketing-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 6.2vw, 5.75rem);
    line-height: .96;
    letter-spacing: -.065em;
}

.marketing-hero h1 span {
    background: linear-gradient(90deg, #a996ff 0%, #79a8ff 72%, #6ce1ca 120%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.marketing-hero-copy > p {
    max-width: 720px;
    margin: 25px 0 0;
    color: #9aa8ba;
    font-size: clamp(1rem, 1.6vw, 1.16rem);
    line-height: 1.75;
}

.marketing-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
}

.marketing-primary-action,
.marketing-secondary-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 18px;
    padding-right: 18px;
}

.marketing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 17px;
    margin-top: 24px;
    color: #718097;
    font-size: .72rem;
    font-weight: 700;
}

.marketing-preview {
    position: relative;
    overflow: hidden;
    border: 1px solid #2a3950;
    border-radius: 24px;
    background: #0b111a;
    box-shadow: 0 38px 90px rgba(0, 0, 0, .34), 0 0 0 1px rgba(124, 92, 255, .04);
    transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg);
}

.marketing-preview::before {
    content: "";
    position: absolute;
    inset: -35% -20% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(124, 92, 255, .12);
    filter: blur(65px);
    pointer-events: none;
}

.preview-window-bar {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    color: #6f7f94;
    font-size: .66rem;
}

.preview-window-dots {
    display: flex;
    gap: 5px;
}

.preview-window-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #354154;
}

.preview-dashboard {
    min-height: 390px;
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
}

.preview-sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 17px 11px;
    border-right: 1px solid var(--border);
    background: #0a1018;
}

.preview-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 6px 15px;
    font-size: .72rem;
    font-weight: 850;
}

.preview-brand img {
    width: 27px;
    height: 27px;
    border-radius: 8px;
}

.preview-nav {
    padding: 8px 9px;
    border-radius: 8px;
    color: #66758a;
    font-size: .61rem;
    font-weight: 750;
}

.preview-nav.active {
    color: #c9c0ff;
    background: rgba(124, 92, 255, .12);
}

.preview-content {
    position: relative;
    padding: 34px 26px;
    background: radial-gradient(circle at 85% 0%, rgba(124, 92, 255, .13), transparent 20rem), #090e16;
}

.preview-content > small {
    color: #8c7dff;
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.preview-content h3 {
    margin: 6px 0 22px;
    font-size: 1.3rem;
}

.preview-server-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(18, 27, 39, .9);
}

.preview-server-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #3f8cff);
    font-size: .78rem;
    font-weight: 900;
}

.preview-server-card strong,
.preview-server-card span {
    display: block;
}

.preview-server-card strong {
    font-size: .7rem;
}

.preview-server-card span {
    margin-top: 4px;
    color: var(--success);
    font-size: .54rem;
}

.preview-server-card b {
    color: #a99aff;
    font-size: .58rem;
}

.preview-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 13px;
}

.preview-mini-grid span {
    padding: 11px;
    border: 1px solid rgba(38, 52, 72, .75);
    border-radius: 11px;
    color: #708096;
    background: rgba(255, 255, 255, .018);
    font-size: .52rem;
    line-height: 1.5;
}

.preview-mini-grid strong {
    color: #c7bfff;
    font-size: .61rem;
}

.marketing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marketing-stats article {
    min-width: 0;
    padding: 23px 22px;
    border-right: 1px solid var(--border);
}

.marketing-stats article:last-child {
    border-right: 0;
}

.marketing-stats strong,
.marketing-stats span {
    display: block;
}

.marketing-stats strong {
    margin-bottom: 5px;
    color: #d9d4ff;
    font-size: .9rem;
}

.marketing-stats span {
    color: #748398;
    font-size: .7rem;
    line-height: 1.5;
}

.marketing-section {
    padding: 106px 0 80px;
}

.marketing-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.marketing-section-heading h2,
.marketing-dashboard-copy h2,
.marketing-latest-release h2,
.marketing-security-section h2,
.marketing-final-cta h2,
.public-page-hero h1,
.about-story-panel h2 {
    margin: 7px 0 11px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -.045em;
}

.marketing-section-heading > p:not(.eyebrow),
.marketing-dashboard-copy > p:not(.eyebrow),
.marketing-security-section > div > p:not(.eyebrow),
.marketing-final-cta > p:not(.eyebrow),
.public-page-hero > p:not(.eyebrow),
.about-story-panel > p {
    color: var(--muted);
    line-height: 1.72;
}

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

.feature-showcase-card {
    min-height: 220px;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 29, 42, .76), rgba(12, 18, 27, .76));
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.feature-showcase-card:hover {
    transform: translateY(-2px);
    border-color: #3a4e6c;
    background: linear-gradient(180deg, rgba(24, 35, 50, .86), rgba(13, 20, 30, .84));
}

.feature-showcase-card.featured {
    grid-column: span 2;
    background: radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .13), transparent 18rem), linear-gradient(180deg, rgba(22, 32, 47, .86), rgba(13, 20, 30, .82));
}

.feature-showcase-card.game-card {
    border-color: rgba(63, 140, 255, .22);
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 17px;
    border: 1px solid rgba(124, 92, 255, .2);
    border-radius: 13px;
    background: rgba(124, 92, 255, .07);
    font-size: 1.15rem;
}

.feature-showcase-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.feature-showcase-card p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.65;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.feature-tags span {
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #8594a8;
    font-size: .58rem;
    font-weight: 800;
}

.marketing-section-action {
    margin-top: 22px;
    text-align: center;
}

.marketing-dashboard-section {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
    gap: 70px;
    align-items: center;
    margin: 40px 0 96px;
    padding: 58px;
    border: 1px solid var(--border);
    border-radius: 27px;
    background: radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .11), transparent 32rem), rgba(15, 23, 34, .7);
}

.marketing-check-list {
    display: grid;
    gap: 9px;
    margin: 23px 0 27px;
    padding: 0;
    list-style: none;
}

.marketing-check-list li {
    position: relative;
    padding-left: 24px;
    color: #9ba8b8;
    font-size: .8rem;
}

.marketing-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 900;
}

.marketing-dashboard-cards {
    display: grid;
    gap: 11px;
}

.marketing-dashboard-cards article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 15px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(7, 12, 20, .47);
}

.marketing-dashboard-cards article > span {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #c4b9ff;
    background: rgba(124, 92, 255, .09);
    font-size: .68rem;
    font-weight: 900;
}

.marketing-dashboard-cards strong {
    font-size: .84rem;
}

.marketing-dashboard-cards p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.55;
}

.marketing-latest-release {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 34px;
    margin-bottom: 96px;
    padding: 28px 30px;
    border: 1px solid rgba(124, 92, 255, .27);
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(124, 92, 255, .11), rgba(63, 140, 255, .045));
}

.marketing-latest-release h2 {
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.marketing-latest-release p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.6;
}

.marketing-release-version {
    display: inline-block;
    margin-top: 12px;
    color: #c4b9ff;
    font-size: .72rem;
    font-weight: 900;
}

.marketing-release-actions {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.marketing-release-actions > span {
    color: #748398;
    font-size: .7rem;
}

.marketing-security-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    gap: 70px;
    align-items: center;
    margin-bottom: 98px;
}

.marketing-security-links {
    display: grid;
    gap: 8px;
}

.marketing-security-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: #9eabbd;
    text-decoration: none;
    background: rgba(255, 255, 255, .018);
    font-size: .78rem;
    font-weight: 750;
}

.marketing-security-links a:hover {
    color: var(--text);
    border-color: #3b4f6b;
}

.marketing-final-cta {
    padding: 58px 28px;
    border: 1px solid var(--border);
    border-radius: 25px;
    text-align: center;
    background: radial-gradient(circle at 50% 100%, rgba(124, 92, 255, .13), transparent 26rem), rgba(13, 20, 30, .7);
}

.marketing-final-cta.small {
    margin-top: 70px;
    padding-top: 42px;
    padding-bottom: 42px;
}

.marketing-final-cta > img {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 16px;
}

.marketing-final-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.85rem);
}

.marketing-final-cta .marketing-hero-actions {
    justify-content: center;
}

.marketing-footer {
    padding: 0;
    text-align: left;
    background: #080c13;
}

.marketing-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    padding-top: 44px;
    padding-bottom: 38px;
}

.marketing-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.marketing-footer-brand img {
    width: 43px;
    height: 43px;
    border-radius: 12px;
}

.marketing-footer-brand strong,
.marketing-footer-brand span {
    display: block;
}

.marketing-footer-brand strong {
    color: var(--text);
    font-size: .92rem;
}

.marketing-footer-brand span {
    margin-top: 4px;
    color: #647185;
    font-size: .68rem;
}

.marketing-footer-links {
    display: flex;
    gap: 70px;
}

.marketing-footer-links > div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.marketing-footer-links strong {
    margin-bottom: 3px;
    color: #b5bfcd;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.marketing-footer-links a {
    color: #6f7d91;
    text-decoration: none;
    font-size: .72rem;
}

.marketing-footer-links a:hover {
    color: var(--text);
}

.marketing-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid var(--border);
    color: #58667a;
    font-size: .66rem;
}

.public-page-hero {
    max-width: 880px;
    padding: 92px 0 58px;
}

.public-page-hero.compact {
    padding-bottom: 42px;
}

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

.feature-detail-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: rgba(15, 23, 34, .7);
}

.feature-detail-grid article > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(124, 92, 255, .075);
}

.feature-detail-grid h2 {
    margin: 0 0 7px;
    font-size: .96rem;
}

.feature-detail-grid p {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.6;
}

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

.about-principles-grid article {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 34, .72);
}

.about-principles-grid article > span {
    color: #8f7fff;
    font-size: .7rem;
    font-weight: 900;
}

.about-principles-grid h2 {
    margin: 11px 0 8px;
    font-size: 1.05rem;
}

.about-principles-grid p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.65;
}

.about-story-panel {
    margin-top: 60px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 21px;
    background: radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .09), transparent 24rem), rgba(13, 20, 30, .7);
}

.about-story-panel h2 {
    font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.about-story-panel > p {
    max-width: 940px;
    margin-bottom: 20px;
}

@media (max-width: 1050px) {
    .marketing-nav {
        display: none;
    }

    .marketing-topbar .public-topbar-actions {
        min-width: auto;
    }

    .marketing-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 72px;
    }

    .marketing-preview {
        max-width: 760px;
        transform: none;
    }

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

    .marketing-dashboard-section {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 42px;
    }
}

@media (max-width: 800px) {
    .marketing-topbar .topbar-inner,
    .marketing-footer-inner,
    .marketing-footer-bottom,
    .marketing-shell {
        width: min(100% - 24px, 1240px);
    }

    .marketing-hero {
        padding: 58px 0 60px;
    }

    .marketing-hero h1 {
        font-size: clamp(2.7rem, 12vw, 4.7rem);
    }

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

    .marketing-stats article:nth-child(2) {
        border-right: 0;
    }

    .marketing-stats article:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .marketing-dashboard-section,
    .marketing-security-section,
    .marketing-latest-release {
        grid-template-columns: 1fr;
    }

    .marketing-release-actions {
        justify-items: start;
    }

    .marketing-security-section {
        gap: 30px;
    }

    .feature-detail-grid,
    .about-principles-grid {
        grid-template-columns: 1fr;
    }

    .marketing-footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .marketing-topbar .brand-copy small {
        display: none;
    }

    .public-login-button {
        display: none;
    }

    .marketing-topbar .public-topbar-actions .button.primary {
        padding-left: 11px;
        padding-right: 11px;
        font-size: .72rem;
    }

    .marketing-preview {
        border-radius: 18px;
    }

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

    .preview-sidebar {
        display: none;
    }

    .preview-content {
        min-height: 330px;
        padding: 26px 18px;
    }

    .preview-mini-grid {
        grid-template-columns: 1fr;
    }

    .marketing-stats,
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }

    .marketing-stats article,
    .marketing-stats article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .marketing-stats article:last-child {
        border-bottom: 0;
    }

    .feature-showcase-card.featured {
        grid-column: span 1;
    }

    .marketing-dashboard-section {
        margin-left: -4px;
        margin-right: -4px;
        padding: 27px 20px;
    }

    .marketing-footer-links {
        gap: 38px;
        flex-wrap: wrap;
    }

    .marketing-footer-bottom {
        flex-direction: column;
        gap: 7px;
    }
}
