:root {
    --bg: #0f172a;
    --panel: #111827;
    --border: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #6366f1;
    --accent-strong: #8b5cf6;
    --shadow: none;
    --chrome: #111827;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

[hidden] {
    display: none !important;
}

body *,
body *::before,
body *::after {
    box-shadow: none !important;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #8192f7 rgba(17, 24, 39, 0.9);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.85);
    border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
    background: #8192f7;
    border-radius: 999px;
    border: 2px solid var(--panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.05);
}

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

.topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: var(--chrome, #111827);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-image.placeholder {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2), rgba(107, 114, 128, 0.2));
}

.logo-text {
    font-size: 1.05rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--muted);
}

.nav-menu {
    display: contents;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
    border-color: var(--muted);
    transform: translateY(-1px);
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 3px;
    background: var(--text);
    border-radius: 999px;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bar+.nav-toggle__bar {
    margin-top: 4px;
}

.topbar.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.topbar.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.topbar.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links a {
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-icon {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.btn-primary {
    background: #8192f7;
    color: #fff;
    box-shadow: var(--shadow);
    border: 1px solid #8192f7;
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover {
    border-color: var(--muted);
    transform: translateY(-1px);
}

#logout-button {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    cursor: pointer;
}

#logout-button:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.btn-secondary {
    border-color: #8192f7;
    background: #8192f7;
    color: #fff;
}

.btn-secondary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 5rem;
}

.hero-content {
    width: min(1240px, 100%);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-copy {
    flex: 1 1 420px;
    min-width: 280px;
}

.hero-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar__image {
    width: 240px;
    height: 240px;
    margin-left: -12px;
    border-radius: 28px;
    border: none;
    background: transparent;
    object-fit: cover;
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.25);
    animation: hero-avatar-float 3.5s ease-in-out infinite;
}

.eyebrow {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.hero-subtitle {
    margin: 0.75rem 0 1.5rem;
    color: var(--muted);
    line-height: 1.6;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.hero-subtitle-line {
    display: block;
}

@keyframes hero-avatar-float {

    0%,
    100% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-avatar__image {
        animation: none;
    }
}

@media (max-width: 800px) {
    .hero-layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-avatar {
        width: 100%;
    }

    .hero-avatar__image {
        width: min(240px, 70vw);
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.statistics-section {
    padding: 0 1.5rem 3rem;
    display: flex;
    justify-content: center;
}

.statistics {
    width: min(1240px, 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.statistics-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-label {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}

.card-editor-title {
    text-align: center;
    font-size: 1.1rem;
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.stat-label {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.stat-value {
    margin: 0.35rem 0 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.info {
    padding: 0 1.5rem 3rem;
    display: flex;
    justify-content: center;
}

.info-card {
    width: min(960px, 100%);
    padding: 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.85);
    box-shadow: var(--shadow);
}

.info-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.info-card--media {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.info--showcase {
    padding: 2.5rem 1.5rem 3.5rem;
}

.info-card--showcase {
    width: min(1240px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.85);
    box-shadow: var(--shadow);
}

.info-card--showcase-reverse {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
}

.info-media {
    flex: 0 0 min(320px, 40%);
}

.info-media--card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.info-media--message {
    padding: 0;
    background: transparent;
    box-shadow: none;
    flex: 0 0 min(380px, 45%);
}

.info-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 18px 18px 0;
}

.info-image--message {
    border-radius: 0;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.info-media--message:hover .info-image--message {
    transform: scale(1.03);
}

.info-content {
    flex: 1;
}

.info-title {
    margin: 0 0 0.75rem;
    font-size: 2rem;
}

.info-title--message {
    font-size: 2.5rem;
}

.info-body {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.badge-showcase {
    padding: 0 0 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.badge-marquee {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 0 1.5rem;
}

.badge-marquee__track {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: max-content;
    will-change: transform;
}

.badge-marquee__track img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.4rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
    .info-card--showcase {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .info-card--showcase .info-media {
        order: 1;
    }

    .info-card--showcase .info-content {
        order: 2;
    }

    .info-media--card {
        width: 100%;
    }

    .info-image {
        border-radius: 16px;
    }
}

.site-footer {
    margin-top: auto;
    padding: 2.5rem 2rem 3rem;
    border-top: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-meta {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-email {
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-links {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 160px;
}

.footer-heading {
    margin: 0 0 0.35rem;
    font-weight: 700;
    color: #fff;
}

.footer-column a {
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
    color: var(--text);
    transform: translateY(-1px);
}

/* Commands page */
.page-commands .commands-hero {
    padding: 3rem 1.5rem 2rem;
    display: flex;
    justify-content: center;
}

.commands-hero__content {
    width: min(960px, 100%);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.commands-list {
    padding: 3rem 1.5rem 3rem;
    display: flex;
    justify-content: center;
}

.commands-loading {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 92px);
}

.commands-loading img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transform: translateY(-24px);
}

.page-commands.commands-is-loading #commands-shell {
    display: none;
}

.page-commands.commands-is-loading #commands-loading {
    display: grid;
}

.page-commands:not(.commands-is-loading) #commands-loading {
    display: none;
}

.status-loading {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 92px);
}

.status-loading img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transform: translateY(-24px);
}

.status-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.page-status.status-is-loading #status-shell {
    display: none;
}

.page-status.status-is-loading #status-loading {
    display: grid;
}

.page-status:not(.status-is-loading) #status-loading {
    display: none;
}

.commands-list__inner {
    width: min(1100px, 100%);
}

.commands-status {
    color: var(--muted);
    margin: 0.5rem 0 1rem;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.command-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.command-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.command-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.command-item {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.command-item.has-subcommands {
    padding: 0.35rem 0.65rem 0.4rem;
}

.command-item.expanded {
    background: rgba(255, 255, 255, 0.04);
}

.command-toggle {
    display: flex;
    gap: 0.25rem;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 0.15rem 0.25rem 0.35rem;
    cursor: default;
}

.command-item.has-subcommands .command-toggle {
    cursor: pointer;
    position: relative;
    padding-right: 1.5rem;
}

.command-toggle.static::after {
    display: none;
}

.command-item.has-subcommands .command-toggle::after {
    content: "▾";
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
    color: #8192f7;
    transition: transform 0.15s ease;
}

.command-item.expanded .command-toggle::after {
    transform: rotate(-180deg);
}

.command-name {
    font-weight: 700;
}

.command-description {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.15rem;
}

.subcommand-list {
    list-style: none;
    padding: 0.35rem 0.25rem 0 0.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subcommand-list[hidden] {
    display: none !important;
}

.subcommand-item {
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
}

.subcommand-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.subcommand-description {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

/* Status page */
.page-status .status-hero {
    padding: 3rem 1.5rem 2rem;
    display: flex;
    justify-content: center;
}

.status-hero__content {
    width: min(1100px, 100%);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.status-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-summary__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.status-summary__card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.status-caption {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.status-pill__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.status-pill__dot--ok {
    color: #34d399;
}

.status-pill__dot--warn {
    color: #f59e0b;
}

.status-pill__dot--alert {
    color: #f87171;
}

.status-pill__dot--neutral {
    color: #e5e7eb;
}

.status-pill--ok {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}

.status-pill--warn {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.4);
}

.status-pill--alert {
    background: rgba(248, 113, 113, 0.14);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

.status-pill--neutral {
    background: rgba(156, 163, 175, 0.15);
    color: #e5e7eb;
    border-color: rgba(156, 163, 175, 0.4);
}

.uptime-section {
    padding: 0 1.5rem 3rem;
    display: flex;
    justify-content: center;
}

.uptime-card {
    width: min(1100px, 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.uptime-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 1rem;
}

.uptime-meta {
    display: inline-flex;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
    align-items: center;
}

.uptime-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.uptime-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.uptime-service {
    display: grid;
    grid-template-columns: minmax(170px, 200px) 1fr minmax(110px, 140px);
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.uptime-service__summary {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.uptime-service__label {
    font-weight: 700;
    color: #e5e7eb;
}

.uptime-service__average {
    font-weight: 700;
    font-size: 1.25rem;
}

.uptime-service__track {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.15rem;
}

.uptime-stripes {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 6px;
    gap: 4px;
    align-items: center;
    height: 30px;
    min-width: fit-content;
}

.uptime-stripe {
    height: 26px;
    width: 6px;
    border-radius: 5px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.uptime-stripe--ok {
    background: #34d399;
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25);
}

.uptime-stripe--warn {
    background: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.uptime-stripe--alert {
    background: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25);
}

.uptime-stripe--neutral {
    background: rgba(255, 255, 255, 0.08);
}

.uptime-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.95);
    color: #e5e7eb;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.uptime-tooltip--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.uptime-service__status {
    justify-self: flex-end;
}

.uptime-empty {
    margin-top: 0.5rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .uptime-service {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .uptime-service__status {
        justify-self: flex-start;
    }

    .uptime-stripes {
        height: auto;
        grid-auto-columns: 8px;
        gap: 3px;
        flex-wrap: wrap;
    }
}

/* Error page */
.page-error {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-error .error-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.error-card {
    width: min(760px, 100%);
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.error-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.error-visual img {
    max-width: 480px;
    width: 100%;
    height: auto;
}

.error-actions {
    margin-top: 1.5rem;
}

.error-card .cta-group {
    justify-content: center;
}

.error-card .hero-title {
    margin-top: 0.2rem;
}

.error-card .hero-subtitle {
    margin-bottom: 0;
}

/* Docs page */
.page-docs {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-docs .docs-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.docs-card {
    width: min(760px, 100%);
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.docs-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.docs-visual img {
    max-width: 420px;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Legal page */
.page-legal {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-legal .legal-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 3.5rem 1.5rem 4.5rem;
}

.legal-card {
    width: min(980px, 100%);
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem 2.75rem;
    box-shadow: var(--shadow);
}

.legal-card .hero-title {
    margin-bottom: 0.5rem;
}

.legal-card .hero-subtitle {
    margin-bottom: 2rem;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.legal-section ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.5rem;
}

.legal-section code {
    background: rgba(129, 146, 247, 0.15);
    border-radius: 6px;
    padding: 0.05rem 0.35rem;
    font-size: 0.95em;
}

.page-dashboard {
    background: var(--bg);
}

.topbar-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dashboard-shell {
    max-width: 1320px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-loading {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 92px);
}

.dashboard-loading img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transform: translateY(-24px);
}

.page-dashboard.dashboard-is-loading #dashboard-shell {
    display: none;
}

.page-dashboard.dashboard-is-loading #dashboard-loading {
    display: grid;
}

.page-dashboard:not(.dashboard-is-loading) #dashboard-loading {
    display: none;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    gap: 1rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-alert {
    border-radius: 18px;
    border: 1px solid rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.1);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}

.dashboard-alert__title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    color: #fecaca;
    font-size: 1.05rem;
}

.dashboard-alert__body {
    margin: 0;
    color: #fee2e2;
}

.user-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar__initials {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 1.1rem;
    color: #e6ebff;
}

.user-avatar[data-kind="server"].placeholder {
    background: linear-gradient(135deg, rgba(101, 117, 255, 0.15), rgba(11, 18, 36, 0.85));
}

.user-avatar[data-kind="server"].placeholder img {
    display: none;
}

.user-avatar[data-kind="server"].placeholder .user-avatar__initials {
    display: inline-flex;
}

.user-text .user-name {
    margin: 0.15rem 0;
    font-size: 1.5rem;
}

.user-username {
    margin: 0;
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.dashboard-servers {
    margin-bottom: 1.5rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.dashboard-profile {
    position: sticky;
    top: 1.5rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.dashboard-nav__button {
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.35);
    color: var(--text);
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    font: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.dashboard-nav__button.is-active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.45);
    color: #fff;
    font-weight: 600;
}

.dashboard-nav__button:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.user-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-settings-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1.5rem;
}

.user-settings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.toggle-button {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.toggle-button__indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: transform 0.2s ease;
}

.toggle-button.is-on {
    background: rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.6);
}

.toggle-button.is-on .toggle-button__indicator {
    transform: translateX(18px);
    background: #f8fafc;
}

.settings-control__label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.settings-control__label p {
    margin: 0;
}

.card-editor-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.card-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-editor-preview {
    width: 100%;
    margin-top: 0.75rem;
}

.card-editor-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-editor-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 0.6rem 3rem 0.6rem 0.75rem;
    color: var(--text);
    font: inherit;
}

.card-editor-input.is-invalid {
    border-color: rgba(248, 113, 113, 0.8);
}

.card-editor-picker {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 0;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), 0 6px 14px rgba(15, 23, 42, 0.35);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.card-editor-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
}

.card-editor-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.card-editor-picker::-moz-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.card-editor-color {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.card-editor-tier-colors {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card-editor-input-row {
    display: flex;
    align-items: center;
    position: relative;
    gap: 0.5rem;
}

.card-editor-input-row .card-editor-input {
    flex: 1;
}

.card-editor-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.card-editor-clear:hover {
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.card-editor-clear img {
    width: 18px;
    height: 18px;
}

.card-editor-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.card-editor-upload input {
    display: none;
}

.card-editor-upload.is-dragging {
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(99, 102, 241, 0.15);
}

.card-editor-select {
    width: 100%;
    min-height: 180px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    color: var(--text);
    padding: 0.6rem;
    font-size: 1.15rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-editor-select option {
    padding: 0.4rem 0.6rem;
    font-weight: 500;
}

.card-editor-select option:checked,
.card-editor-select option:hover,
.card-editor-select option:focus {
    background: rgba(99, 102, 241, 0.2);
    color: #eef2ff;
}

.card-editor-select:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.card-editor-error {
    color: #fecaca;
}

.status-text.card-editor-error {
    color: #fecaca;
}

.achievement-card-preview {
    width: 100%;
    position: relative;
}

.achievement-card-canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 200ms ease;
    will-change: transform;
}

.achievement-card-preview:hover .achievement-card-canvas {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.card-editor-actions {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-editor-actions .status-text {
    text-align: center;
}

.button-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-admin {
    background: var(--bg);
}

.admin-shell {
    max-width: none;
    margin: 2rem 0;
    padding: 0 2rem 2.5rem;
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.admin-layout {
    align-items: stretch;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 2rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.admin-nav__link:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(2px);
}

.admin-nav__link.is-active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    color: #fff;
    font-weight: 600;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-filter {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-filter .btn.is-active,
.admin-filter__option.is-active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
}

.admin-filter__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-filter__caret {
    font-size: 0.75rem;
    opacity: 0.8;
}

.admin-filter__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 160px;
    padding: 0.4rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
    z-index: 10;
}

.admin-filter.is-open .admin-filter__menu {
    display: flex;
}

.admin-filter__option {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    padding: 0.45rem 0.75rem;
    border-radius: 0.55rem;
    font: inherit;
    cursor: pointer;
}

.admin-filter__option:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.admin-analytics {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(200px, 240px);
    gap: 1.5rem;
    align-items: stretch;
}

.admin-analytics__chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 320px;
}

.admin-chart-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.admin-chart-canvas {
    flex: 1;
    min-height: 280px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem;
}

.admin-analytics__cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-metric-card {
    text-align: left;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-metric-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.admin-metric-card.is-active {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.25);
}

.admin-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.35rem 0 0.5rem;
    color: #fff;
}

.admin-placeholder {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    color: rgba(226, 232, 240, 0.7);
}


.admin-shards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-shards__status {
    margin: 0;
}

.admin-shards__table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.35);
}

.admin-shards__table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.admin-shards__table th,
.admin-shards__table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-shards__table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.82);
}

.admin-shards__table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.admin-status-badge.is-healthy {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.55);
    color: #86efac;
}

.admin-status-badge.is-warning {
    background: rgba(250, 204, 21, 0.16);
    border-color: rgba(250, 204, 21, 0.55);
    color: #fde68a;
}

.admin-status-badge.is-offline {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fca5a5;
}


.admin-services {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-service__log {
    background: #0b1220;
    border: 1px solid #1f2937;
    border-radius: 14px;
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #d7e0ff;
    font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}


@media (max-width: 960px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-analytics {
        grid-template-columns: 1fr;
    }
}

.dashboard-section .panel-header {
    margin-bottom: 1.25rem;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header--centered {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.panel-header--centered > div {
    width: 100%;
}

.server-config-title {
    font-size: 1.4rem;
}

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

.server-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(129, 146, 247, 0.08), rgba(11, 18, 36, 0.8));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.server-card:hover {
    transform: translateY(-4px);
    border-color: #6575ff;
    box-shadow: 0 12px 35px rgba(101, 117, 255, 0.2);
}

.server-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    overflow: hidden;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
}

.server-icon.placeholder {
    background: linear-gradient(135deg, rgba(101, 117, 255, 0.15), rgba(11, 18, 36, 0.85));
    color: #e6ebff;
}

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

.server-icon__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 1.05rem;
}

.server-icon--large {
    width: 82px;
    height: 82px;
}

.server-icon--large .server-icon__initials {
    font-size: 1.25rem;
}


.server-name {
    font-weight: 700;
    font-size: 1rem;
}

.server-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: rgba(129, 146, 247, 0.12);
}

.server-role--admin {
    color: #bfdbfe;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.15);
}

.server-role--owner {
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.3);
    background: rgba(250, 204, 21, 0.12);
}

.server-role--manager {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.12);
}

.server-detail__body {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.leaderboard-panel {
    margin-top: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stats-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(11, 18, 36, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stats-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.stats-card__item {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(11, 18, 36, 0.6);
    font-size: 0.95rem;
}

.leaderboard-row--current {
    border-color: rgba(101, 117, 255, 0.5);
    background: rgba(101, 117, 255, 0.18);
}

.leaderboard-row--extra {
    border-style: dashed;
}

.leaderboard-rank {
    font-weight: 700;
    color: var(--muted);
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

.leaderboard-divider {
    height: 1px;
    width: 100%;
    background: var(--border);
    opacity: 0.5;
}

.settings-divider {
    height: 1px;
    width: 100%;
    background: var(--border);
    opacity: 0.45;
    margin: 1.5rem 0;
}

.achievement-columns,
.badge-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.list-panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(11, 18, 36, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 160px;
}

.list-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.list-panel__count {
    color: var(--muted);
    font-size: 0.85rem;
}

.list-panel__items {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 280px;
    overflow: auto;
}

.list-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--border);
}

.list-item__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.list-item__image {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    border: none;
}

.list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.list-item__title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.list-item__meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.tag--global {
    border-color: rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
}

.tag--server {
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.privacy-grid,
.settings-grid {
    display: grid;
    gap: 1rem;
}

.privacy-grid {
    gap: 0.6rem;
}

.privacy-control,
.settings-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.privacy-control {
    gap: 0.35rem;
}

.settings-control--toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.privacy-control label,
.settings-control label {
    font-weight: 600;
    font-size: 0.9rem;
}

.settings-helper {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.settings-helper--center {
    text-align: center;
}

.privacy-control select,
.settings-control input,
.settings-control select {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    background: rgba(11, 18, 36, 0.8);
    color: var(--text);
    font-size: 0.9rem;
}

.channel-input--styled {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.6rem 0.75rem;
    font-size: 1.05rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.channel-input--styled:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#achievement-card-editor {
    margin-top: 1.5rem;
}

.channel-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-picker__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.55rem 0.85rem;
    background: rgba(11, 18, 36, 0.7);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.channel-picker__toggle--styled {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.65rem 0.9rem;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.channel-picker__toggle:hover {
    border-color: #6575ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(101, 117, 255, 0.18);
}

.channel-picker__status {
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.channel-picker__arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-left: 0.5rem;
}

.channel-picker--open .channel-picker__arrow {
    transform: rotate(45deg);
}

.channel-picker__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.channel-option {
    width: 100%;
    background: transparent;
    color: inherit;
    border: none;
    padding: 0.35rem 0.5rem;
    margin: 0;
    text-align: left;
    font: inherit;
    cursor: pointer;
    letter-spacing: inherit;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.channel-option:hover {
    background: rgba(99, 102, 241, 0.16);
}

.channel-option:focus-visible {
    outline: 2px solid rgba(101, 117, 255, 0.6);
    outline-offset: 2px;
    border-radius: 8px;
}

.channel-picker__empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.status-text {
    color: var(--muted);
    font-size: 0.85rem;
}

.settings-toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(360px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    pointer-events: auto;
    z-index: 200;
}

.settings-toast {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
}

.settings-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.settings-toast-stack .settings-toast:not(:first-child) {
    margin-top: -18px;
}

.settings-toast-stack:hover .settings-toast,
.settings-toast-stack:focus-within .settings-toast {
    margin-top: 0;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.4);
}

.settings-toast__icon {
    position: relative;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
}

.settings-toast__mark {
    font-size: 0.9rem;
    font-weight: 600;
    color: #bbf7d0;
}

.settings-toast__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.settings-toast__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.settings-toast__text {
    font-size: 0.8rem;
    color: #c7f9cc;
    font-weight: 600;
}

.settings-toast--error .settings-toast__mark {
    color: #fecaca;
}

.settings-toast--error .settings-toast__text {
    color: #fecaca;
}

.server-detail__summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.server-detail__hint {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 1.5rem;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: rgba(11, 18, 36, 0.65);
}

.empty-title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.empty-body {
    margin: 0;
    color: var(--muted);
}

.empty-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

@media (max-width: 1100px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .dashboard-profile {
        position: static;
    }

    .dashboard-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

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

@media (max-width: 768px) {
    .topbar {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            'brand toggle'
            'menu menu';
        row-gap: 0.75rem;
    }

    .site-footer {
        padding: 2rem 1.5rem 2.5rem;
        align-items: flex-start;
        text-align: left;
    }

    .footer-links {
        width: 100%;
        justify-content: flex-start;
    }

    .logo {
        grid-area: brand;
    }

    .nav-toggle {
        grid-area: toggle;
        display: inline-flex;
        justify-self: flex-end;
    }

    .nav-menu {
        grid-area: menu;
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .topbar.is-open .nav-menu {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nav-menu .btn,
    .nav-menu .topbar-actions {
        width: 100%;
    }

    .nav-menu .btn {
        justify-content: center;
    }

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

    .dashboard-shell {
        padding: 0 1.25rem 1.25rem;
    }

    .dashboard-nav {
        flex-direction: column;
    }

    .dashboard-nav__button {
        width: 100%;
        text-align: center;
    }

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

@media (max-width: 640px) {
    .toggle-button {
        flex: 0 0 auto;
    }
}