/* ==========================================================================
   Bohemia Server Manager - "HUD Panel" theme
   Neubrutalist gamer-HUD + bento dashboard. Dark-only, violet/cyan/pink accents.
   Applies broadly to MudBlazor's own component classes so every page in the
   app inherits the bold look, on top of page-level HUD component usage.
   ========================================================================== */

:root {
    --bsm-glow-primary: rgba(139, 92, 246, 0.4);
    --bsm-glow-success: rgba(34, 197, 94, 0.4);
    --bsm-glow-error: rgba(244, 63, 94, 0.4);
    --bsm-glow-cyan: rgba(34, 211, 238, 0.4);
    --bsm-panel-radius: 8px;
    --bsm-corner: 12px;
}

html,
body {
    min-height: 100%;
    background-color: var(--mud-palette-background);
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 3px),
        radial-gradient(circle at 12% -10%, rgba(139, 92, 246, 0.22) 0%, rgba(139, 92, 246, 0) 45%),
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.12) 0%, rgba(34, 211, 238, 0) 40%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: auto, auto, auto, 34px 34px, 34px 34px;
    background-attachment: fixed;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #3a3646 transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #3a3646;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #4c4760;
}

.bsm-shell .mud-main-content {
    min-height: 100vh;
}

/* Typography ---------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
    letter-spacing: 0.1px;
}

.bsm-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #f5f3ff;
    font-variant-numeric: tabular-nums;
}

.bsm-stat-value-lg {
    font-size: 2.6rem;
}

.bsm-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #a29cb8;
}

/* App bar --------------------------------------------------------------- */

.bsm-appbar {
    background-image: linear-gradient(180deg, #131019 0%, #0f0e15 100%) !important;
    border-bottom: 2px solid #2b2438;
    box-shadow: 0 1px 0 rgba(139, 92, 246, 0.25);
}

.bsm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsm-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 0 18px var(--bsm-glow-primary);
    color: #fff;
    clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}

.bsm-app-title {
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 1.05rem;
}

.bsm-host-chip {
    border-color: #3a3450 !important;
    font-weight: 700 !important;
}

.bsm-host-chip .bsm-status-dot {
    box-shadow: 0 0 8px var(--bsm-glow-success);
}

/* Nav menu ---------------------------------------------------------------- */

.mud-drawer {
    border-right: 2px solid #211d2a;
    background-image: linear-gradient(180deg, #131019 0%, #100e16 100%);
}

.bsm-nav-section {
    padding: 4px 20px;
    font-weight: 800;
    letter-spacing: 1.6px;
    opacity: 0.6;
    position: relative;
}

.bsm-nav-section::before {
    content: "// ";
    color: #6d28d9;
}

.mud-nav-link {
    border-radius: 4px;
    margin: 2px 10px;
    position: relative;
    transition: background-color 120ms ease, color 120ms ease;
    font-weight: 600;
}

.mud-nav-link:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

.mud-nav-link.active,
.mud-nav-link .active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.28) 0%, rgba(139, 92, 246, 0.04) 100%);
    color: #d8caff !important;
    font-weight: 800;
}

.mud-nav-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 7px solid #a78bfa;
    filter: drop-shadow(0 0 6px var(--bsm-glow-primary));
}

/* Page layout -------------------------------------------------------------- */

.bsm-content {
    padding-top: 64px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 24px;
}

.bsm-compact .bsm-content {
    padding-top: 56px;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 16px;
}

.bsm-page-header {
    gap: 12px;
    padding: 0 0 10px 14px;
    border-bottom: 2px solid #221e2c;
    margin-bottom: 4px;
    position: relative;
}

.bsm-page-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 12px;
    width: 4px;
    background: linear-gradient(180deg, #8b5cf6, #22d3ee);
    box-shadow: 0 0 10px var(--bsm-glow-primary);
}

.bsm-muted {
    color: var(--mud-palette-text-secondary);
}

/* Panels / cards -- HUD corner brackets everywhere ------------------------- */

.mud-paper,
.mud-card {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border: 1px solid #241f30;
    position: relative;
}

.mud-paper::before,
.mud-card::before,
.mud-paper::after,
.mud-card::after {
    content: "";
    position: absolute;
    width: var(--bsm-corner);
    height: var(--bsm-corner);
    pointer-events: none;
    opacity: 0.85;
    z-index: 2;
}

.mud-paper::before,
.mud-card::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid #8b5cf6;
    border-left: 2px solid #8b5cf6;
}

.mud-paper::after,
.mud-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid #22d3ee;
    border-right: 2px solid #22d3ee;
}

.mud-paper.mud-elevation-0 {
    border: 1px solid #201c28;
}

.bsm-metric-card,
.bsm-server-card {
    border: 1px solid #241f30 !important;
    border-radius: var(--bsm-panel-radius);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.bsm-metric-card:hover,
.bsm-server-card:hover {
    border-color: #4c3f66 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.bsm-server-card .mud-card-actions {
    border-top: 1px solid #241f30;
}

.bsm-metric-card .mud-avatar {
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}

/* Bento stat tiles ------------------------------------------------------------- */

.bsm-bento-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 104px;
    justify-content: center;
}

.bsm-bento-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
    z-index: 1;
}

.bsm-bento-icon-primary { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 0 12px var(--bsm-glow-primary); }
.bsm-bento-icon-secondary { background: linear-gradient(135deg, #22d3ee, #0891b2); box-shadow: 0 0 12px var(--bsm-glow-cyan); }
.bsm-bento-icon-success { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 0 12px var(--bsm-glow-success); }
.bsm-bento-icon-warning { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }
.bsm-bento-icon-error { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 0 12px var(--bsm-glow-error); }
.bsm-bento-icon-info { background: linear-gradient(135deg, #818cf8, #4f46e5); box-shadow: 0 0 12px rgba(129, 140, 248, 0.4); }
.bsm-bento-icon-default { background: linear-gradient(135deg, #4b4658, #302b3d); }

.bsm-auth-card {
    border: 1px solid #2c2638 !important;
    border-radius: var(--bsm-panel-radius);
    background-image: linear-gradient(180deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0) 60%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

/* Server status accents ----------------------------------------------------- */

.bsm-status-running {
    border-left: 4px solid #22c55e !important;
    box-shadow: -8px 0 22px -12px var(--bsm-glow-success);
}

.bsm-status-stopped {
    border-left: 4px solid #4b4658 !important;
}

.bsm-status-crashed {
    border-left: 4px solid #f43f5e !important;
    box-shadow: -8px 0 22px -12px var(--bsm-glow-error);
}

.bsm-status-transition {
    border-left: 4px solid #f59e0b !important;
}

.bsm-status-updating {
    border-left: 4px solid #818cf8 !important;
}

.bsm-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.bsm-status-dot.online { background-color: #22c55e; box-shadow: 0 0 6px #22c55e; }
.bsm-status-dot.offline { background-color: #6b6577; }
.bsm-status-dot.error { background-color: #f43f5e; box-shadow: 0 0 6px #f43f5e; }
.bsm-status-dot.busy { background-color: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* Chips -- bold ribbon shape everywhere -------------------------------------- */

.mud-chip {
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.68rem !important;
    letter-spacing: 0.6px;
    border-radius: 4px !important;
}

.mud-chip.mud-chip-filled,
.mud-chip.mud-chip-outlined {
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

/* Buttons ------------------------------------------------------------------------ */

.mud-button-root {
    font-weight: 800;
}

.mud-button-filled {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 6px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.mud-button-filled-primary {
    box-shadow: 0 2px 14px var(--bsm-glow-primary);
}

.mud-button-outlined {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
}

.mud-icon-button {
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.mud-icon-button:hover {
    transform: translateY(-1px);
}

/* Tabs -- HUD segmented style ------------------------------------------------- */

.mud-tabs-toolbar {
    border-bottom: 2px solid #241f30;
}

.mud-tab {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.mud-tab.mud-tab-active {
    color: #d8caff !important;
}

.mud-tabs-toolbar .mud-tab-slider {
    height: 3px !important;
    background: linear-gradient(90deg, #8b5cf6, #22d3ee) !important;
    box-shadow: 0 0 8px var(--bsm-glow-primary);
}

/* Tables --------------------------------------------------------------------- */

.mud-table-container {
    border: 1px solid #241f30;
    border-radius: var(--bsm-panel-radius);
}

.mud-table-head .mud-table-cell {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    color: var(--mud-palette-text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid #2b2438 !important;
}

.mud-table-row:hover {
    background-color: rgba(139, 92, 246, 0.08) !important;
}

/* Alerts ----------------------------------------------------------------------- */

.mud-alert {
    border-left-width: 4px !important;
    font-weight: 500;
}

/* Console / log output --------------------------------------------------------- */

.bsm-console {
    background-color: #0a090e !important;
    border: 1px solid #241f30 !important;
    border-radius: var(--bsm-panel-radius);
    font-family: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #d8d4e6;
}

.bsm-console::before,
.bsm-console::after {
    border-color: #8b5cf6;
}

/* Server card v2 -- banner header, ribbon status, mini stats, tile actions --- */

.bsm-server-card {
    overflow: visible;
}

.bsm-card-banner-wrap {
    position: relative;
    margin: -1px -1px 0 -1px;
}

.bsm-status-ribbon {
    position: absolute;
    top: 10px;
    right: -6px;
    padding: 3px 16px 3px 12px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #08070b;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 60%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bsm-status-ribbon.bsm-status-running { background: #22c55e; box-shadow: 0 4px 16px var(--bsm-glow-success); }
.bsm-status-ribbon.bsm-status-stopped { background: #8a8394; }
.bsm-status-ribbon.bsm-status-crashed { background: #f43f5e; box-shadow: 0 4px 16px var(--bsm-glow-error); }
.bsm-status-ribbon.bsm-status-transition { background: #f59e0b; }
.bsm-status-ribbon.bsm-status-updating { background: #818cf8; }

.bsm-card-body-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.bsm-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.bsm-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.bsm-mini-stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b849c;
}

.bsm-mini-stat-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f0edf7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsm-card-map {
    grid-column: 1 / -1;
    padding-top: 4px;
    border-top: 1px dashed #241f30;
}

.bsm-tile-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #241f30;
    align-items: center;
}

.bsm-tile-btn {
    appearance: none;
    border: 1px solid #322b40;
    background: #17141d;
    color: #cfc9de;
    width: 38px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, calc(100% - 8px) 100%, 0 100%, 0 8px);
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.bsm-tile-btn:hover {
    transform: translateY(-2px);
}

.bsm-tile-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.bsm-tile-btn.bsm-tile-start:hover { background: rgba(34, 197, 94, 0.15); color: #4ade80; box-shadow: 0 4px 14px var(--bsm-glow-success); }
.bsm-tile-btn.bsm-tile-stop:hover { background: rgba(244, 63, 94, 0.15); color: #fb7185; box-shadow: 0 4px 14px var(--bsm-glow-error); }
.bsm-tile-btn.bsm-tile-restart:hover { background: rgba(245, 158, 11, 0.15); color: #fbbf24; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35); }
.bsm-tile-btn.bsm-tile-update:hover { background: rgba(34, 211, 238, 0.15); color: #67e8f9; box-shadow: 0 4px 14px var(--bsm-glow-cyan); }

.bsm-tile-open {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    color: #d8caff;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #4c3f66;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, calc(100% - 8px) 100%, 0 100%, 0 8px);
    transition: background-color 120ms ease, transform 120ms ease;
}

.bsm-tile-open:hover {
    background-color: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

/* Dashboard host panel / section headings ------------------------------------ */

.bsm-host-panel {
    position: relative;
}

.bsm-nav-section-inline {
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #a29cb8;
}

.bsm-nav-section-inline::before {
    content: "// ";
    color: #6d28d9;
}

.bsm-panel-title {
    margin-bottom: 14px;
}

.bsm-gauge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-around;
}

.bsm-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 4px 2px;
    border-bottom: 1px solid #221e2c;
}

/* Servers list filter bar + grid status ---------------------------------------- */

.bsm-filter-bar {
    border-left: 3px solid #8b5cf6 !important;
}

.bsm-search-input .mud-input-outlined {
    border-radius: 4px;
}

.bsm-count-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    white-space: nowrap;
}

.bsm-count-chip-primary { background: rgba(139, 92, 246, 0.18); color: #cbb8ff; }
.bsm-count-chip-success { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.bsm-count-chip-warning { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }

.bsm-grid-status {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
}

.bsm-grid-status.bsm-status-running { color: #4ade80; }
.bsm-grid-status.bsm-status-stopped { color: #9a93ab; }
.bsm-grid-status.bsm-status-crashed { color: #fb7185; }
.bsm-grid-status.bsm-status-transition { color: #fbbf24; }
.bsm-grid-status.bsm-status-updating { color: #a5b4fc; }

.bsm-detail-banner {
    border-radius: var(--bsm-panel-radius);
    overflow: hidden;
    border: 1px solid #241f30;
}

.bsm-detail-actions {
    border-top: none;
    padding: 12px 4px;
    flex-wrap: wrap;
}

.bsm-mod-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.bsm-mod-stat-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #241f30;
    border-left: 3px solid #4b4658;
    border-radius: 4px;
}

.bsm-mod-stat-tile .bsm-stat-value { font-size: 1.5rem; }

.bsm-mod-stat-success { border-left-color: #22c55e; }
.bsm-mod-stat-warning { border-left-color: #f59e0b; }
.bsm-mod-stat-info { border-left-color: #818cf8; }
.bsm-mod-stat-error { border-left-color: #f43f5e; }

.bsm-workshop-header-stats,
.bsm-workshop-actions,
.bsm-workshop-browser-search,
.bsm-workshop-result-meta,
.bsm-workshop-result-tags,
.bsm-workshop-result-toolbar {
    flex-wrap: wrap;
}

.bsm-workshop-sidebar-panel,
.bsm-workshop-result-card {
    border: 1px solid #241f30 !important;
    background: rgba(255, 255, 255, 0.018);
}

.bsm-selected-row {
    background: rgba(139, 92, 246, 0.12);
}

.bsm-preset-list {
    border: 1px solid #241f30;
    border-radius: 6px;
    overflow: hidden;
}

.bsm-preset-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #241f30;
}

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

.bsm-preset-row-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.bsm-preset-row > .mud-button-root {
    flex: 0 0 auto;
}

.bsm-preset-row-main .mud-chip {
    max-width: 100%;
    width: fit-content;
}

.bsm-preset-row-main .mud-chip-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsm-workshop-result-card {
    height: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.bsm-workshop-result-card-compact .mud-chip {
    height: 22px;
}

.bsm-workshop-result-card:hover {
    border-color: #4c3f66 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    transform: translateY(-1px);
}

.bsm-workshop-result-title {
    min-width: 0;
}

.bsm-workshop-result-summary {
    color: var(--mud-palette-text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bsm-workshop-result-tags {
    max-height: 28px;
    overflow: hidden;
}

.bsm-workshop-tabs .mud-tabs-panels {
    padding-top: 10px;
}

.bsm-path-status {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 2px;
}

.bsm-config-editor-shell {
    border: 1px solid rgba(139, 92, 246, 0.32) !important;
    border-radius: 10px !important;
    background: rgba(18, 15, 26, 0.92) !important;
    overflow: hidden;
}

.bsm-config-editor-toolbar {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.22);
    background: linear-gradient(90deg, rgba(38, 28, 59, 0.92), rgba(18, 15, 26, 0.92));
    flex-wrap: wrap;
}

.bsm-config-editor {
    min-height: 520px;
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 10px;
    background: #0d0b13;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.bsm-config-editor:empty {
    min-height: 520px;
    background:
        linear-gradient(90deg, #171222 0, #171222 58px, transparent 58px),
        #0d0b13;
}

.bsm-config-editor:empty::before {
    content: "Loading editor...";
    display: block;
    padding: 16px 18px 16px 76px;
    color: var(--mud-palette-text-secondary);
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 13px;
}

.bsm-local-editor {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 520px;
    background: #0d0b13;
    color: #e8e1f5;
}

.bsm-local-editor::after {
    content: attr(data-language);
    position: absolute;
    right: 10px;
    top: 8px;
    padding: 2px 7px;
    border: 1px solid rgba(139, 92, 246, 0.34);
    border-radius: 999px;
    color: #c4b5fd;
    background: rgba(26, 20, 39, 0.94);
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
}

.bsm-local-editor-gutter,
.bsm-local-editor-highlight,
.bsm-local-editor-input {
    margin: 0;
    border: 0;
    font-family: Consolas, "Cascadia Code", "JetBrains Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 4;
}

.bsm-local-editor-gutter {
    min-height: 520px;
    padding: 14px 10px 14px 6px;
    overflow: hidden;
    text-align: right;
    color: #8d829f;
    background: #171222;
    border-right: 1px solid rgba(139, 92, 246, 0.26);
    user-select: none;
}

.bsm-local-editor-code {
    position: relative;
    min-width: 0;
    min-height: 520px;
    background: #0d0b13;
}

.bsm-local-editor-highlight,
.bsm-local-editor-input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 520px;
    padding: 14px 40px 14px 14px;
    white-space: pre;
    overflow: auto;
}

.bsm-local-editor-highlight {
    color: #e8e1f5;
    background: #0d0b13;
    pointer-events: none;
}

.bsm-local-editor-input {
    display: block;
    resize: vertical;
    color: transparent;
    background: transparent;
    caret-color: #f5f3ff;
    outline: none;
    overflow: auto;
}

.bsm-local-editor-input:focus {
    box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.65);
}

.bsm-local-editor-input::selection {
    background: rgba(139, 92, 246, 0.42);
}

.bsm-token-key {
    color: #c4b5fd;
}

.bsm-token-keyword {
    color: #a78bfa;
    font-weight: 700;
}

.bsm-token-string {
    color: #86efac;
}

.bsm-token-number {
    color: #fbbf24;
}

.bsm-token-bool {
    color: #f472b6;
}

.bsm-token-comment {
    color: #80738f;
    font-style: italic;
}

.bsm-token-punctuation {
    color: #d8b4fe;
}

@media (max-width: 600px) {
    .bsm-content {
        padding-left: 10px;
        padding-right: 10px;
    }
}
