/* Valero panel chrome — original, or #D4AF37 */

:root {
    --st-bg: #0a0b09;
    --st-side: #0d0d0d;
    --st-card: #141414;
    --st-elev: #151515;
    --st-line: #242424;
    --st-border: rgba(255, 255, 255, 0.16);
    --st-text: #ecefe6;
    --st-muted: #9a9a93;
    --st-gold: #d4af37;
    --st-ok: #22c55e;
}

html, body {
    height: 100% !important;
    overflow: hidden !important;
    background: var(--st-bg) !important;
    color: var(--st-text) !important;
    font-family: Poppins, system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400;
}

.acestra-glow, .acestra-grid, .app-glow, .app-grid,
.main-shell > .border-beam, .login-mark .border-beam, .login-card .border-beam,
.login-vignette { display: none !important; }

/* —— Login —— */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid !important;
    place-items: center;
    background: var(--st-bg) !important;
    padding: 24px;
}
.login-screen[hidden] { display: none !important; }
.login-box {
    width: min(400px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.login-mark {
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    animation: none !important;
    overflow: visible !important;
}
.login-logo {
    height: 48px !important;
    width: auto !important;
    max-width: 160px;
    object-fit: contain;
    filter: none !important;
}
.login-kicker,
.login-pill {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--st-muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    animation: none !important;
}
.login-pill-dot { display: none; }
.login-card {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    background: var(--st-card) !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    animation: none !important;
}
.login-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
}
.login-head {
    background: transparent !important;
    border: 0 !important;
    text-align: left !important;
    padding: 0 0 8px !important;
}
.login-title {
    display: block;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-text) !important;
    text-shadow: none !important;
}
.login-sub {
    display: block;
    margin-top: 4px;
    font-size: 13px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-muted) !important;
}
.login-field {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
    font-weight: 500;
    color: var(--st-muted);
}
.login-card .input,
.login-card .btn {
    margin: 0 !important;
    width: 100% !important;
}
.login-card .input {
    height: 40px;
    border-radius: 6px !important;
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    font-family: inherit !important;
}
.login-submit {
    height: 40px !important;
    margin-top: 8px !important;
    box-shadow: none !important;
}
.login-error {
    min-height: 18px;
    margin: 0;
    text-align: left;
    font-size: 13px;
    color: #f87171;
}

/* —— App shell —— */
.app {
    display: grid !important;
    grid-template-columns: 236px 1fr !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: var(--st-bg) !important;
    padding: 0 !important;
    gap: 0 !important;
}
.app[hidden] { display: none !important; }

.sidebar {
    position: relative !important;
    top: 0 !important;
    left: auto !important;
    width: 236px !important;
    height: 100% !important;
    transform: none !important;
    z-index: 8 !important;
    background: var(--st-side) !important;
    border-right: 1px solid var(--st-line) !important;
    border-radius: 0 !important;
    padding: 16px 12px 12px !important;
    overflow: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.drawer-dim { display: none !important; }

.brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: 0 !important;
    padding: 4px 6px 14px !important;
    text-decoration: none;
    color: var(--st-text);
}
.brand::before { display: none !important; }
.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--st-gold);
    color: #111;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.login-mark-v {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 10px;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.brand-name em { font-style: normal; color: var(--st-gold); }
.brand-logo {
    display: block !important;
    width: 100% !important;
    height: 100px !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center 48% !important;
    border-radius: 12px !important;
    filter: none !important;
    background: #0a0a0a;
}

.server-switch {
    width: 100%;
    height: 49px;
    margin: 0 0 14px;
    padding: 8px !important;
    border-radius: 12px !important;
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--st-text);
}
.server-avatar {
    width: 32px; height: 32px;
    border-radius: 8px !important;
    background: #111 !important;
    color: #111 !important;
    display: block;
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0;
    padding: 0 !important;
    overflow: hidden;
}
.server-meta strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.server-meta small {
    color: var(--st-muted);
    font-size: 11px;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.nav { padding: 0; flex: 1; min-height: 0; overflow: auto; }
.nav-label, .nav-sep {
    height: 1px;
    margin: 10px 8px;
    background: var(--st-line);
    border: 0;
    padding: 0 !important;
    font-size: 0 !important;
    overflow: hidden;
}
.nav-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 39px !important;
    padding: 8px 12px !important;
    margin: 2px 0;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--st-muted) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    border: 0;
    border-left: 0 !important;
    text-align: left;
    cursor: pointer;
}
.nav-item:hover {
    background: #111 !important;
    color: var(--st-text) !important;
}
.nav-item svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    flex-shrink: 0;
    color: inherit !important;
}
.nav-item.active {
    background: var(--st-elev) !important;
    color: var(--st-text) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
.nav-item.danger { color: #f87171 !important; }
.sidebar-footer { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--st-line); }

.main-shell, .main {
    margin: 0 !important;
    border: 0 !important;
    background: var(--st-bg) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: relative;
    top: 0;
    z-index: 6;
    height: 60px !important;
    padding: 0 24px !important;
    background: var(--st-bg) !important;
    border-bottom: 1px solid var(--st-line) !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}
.top-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-kicker { display: none !important; }
.hamburger { display: none; }
.top-heading, .crumbs {
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-text) !important;
}
.top-search, #topSearchWrap {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 156px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--st-line);
    color: var(--st-muted);
    font-size: 15px;
}
.top-search input {
    width: 100%;
    background: transparent;
    border: 0;
    color: var(--st-text);
    outline: none;
    font-family: inherit;
    font-size: 15px;
}
.top-search kbd {
    font-size: 11px;
    color: var(--st-muted);
    border: 1px solid var(--st-line);
    border-radius: 4px;
    padding: 1px 5px;
}
.lang-chip {
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--st-line);
    color: var(--st-text);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.icon-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: 1px solid var(--st-line) !important;
    color: var(--st-text);
}
.icon-btn:hover, .lang-chip:hover {
    background: var(--st-elev) !important;
    border-color: #333 !important;
}
.icon-btn svg, .hamburger svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
}
.user-chip { display: none !important; }

.page {
    flex: 1;
    min-height: 0;
    overflow: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 24px !important;
}

/* Titre déjà dans la topbar — on garde sous-titre + boutons */
.page-head {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.page-head h1 { display: none; }
.page-head p {
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    color: var(--st-muted) !important;
}

.card, .server-banner, .stat-card, .help-item, .sugg-card, .patch-card, .drive-card {
    background: var(--st-card) !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
.card:hover, .stat-card:hover {
    background: var(--st-card) !important;
    border-color: var(--st-border) !important;
}
.card h3, .stat-card .label {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-text) !important;
}
.card .sub, .stat-card .hint {
    color: var(--st-muted) !important;
    font-size: 13px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.btn {
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    color: var(--st-text) !important;
    box-shadow: none !important;
}
.btn:hover {
    background: #1a1a1a !important;
    border-color: #333 !important;
}
.btn.primary, .login-submit {
    background: var(--st-gold) !important;
    color: #111 !important;
    border-color: var(--st-gold) !important;
}
.btn.primary:hover, .login-submit:hover {
    background: #e0c14a !important;
    border-color: #e0c14a !important;
}
.btn.danger {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: transparent !important;
    color: #f87171 !important;
}
.btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.ov-power { margin-bottom: 16px; }
.ov-power-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--st-muted);
    font-size: 13px;
    margin: -2px 0 14px;
}
.ov-power-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ov-power-actions .btn { min-width: 128px; }

.tabs {
    gap: 16px;
    border-bottom: 1px solid var(--st-line);
}
.tab {
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-muted) !important;
    border-bottom-width: 2px;
}
.tab.active {
    color: var(--st-text) !important;
    border-bottom-color: var(--st-gold) !important;
}

.input, .select, textarea.input {
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    color: var(--st-text) !important;
}
.input:focus, .select:focus, textarea.input:focus {
    border-color: rgba(212, 175, 55, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
}
.prefix {
    border-radius: 6px !important;
    border-color: var(--st-line) !important;
    background: var(--st-elev) !important;
    overflow: hidden;
}
.prefix span {
    background: #111 !important;
    border-right-color: var(--st-line) !important;
}
.field label {
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--st-muted) !important;
}

table th, table td {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}
table th { color: var(--st-muted); font-weight: 500; }

.dropzone, .files, .console, .explorer, .editor {
    border-radius: 12px !important;
    border-color: var(--st-border) !important;
    background: var(--st-card) !important;
}

/* Overview */
.ov-row {
    display: grid;
    grid-template-columns: 334px 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.ov-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.ov-split {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.ov-card {
    background: var(--st-card);
    border: 1px solid var(--st-border);
    border-radius: 12px;
    padding: 16px;
    min-height: 0;
}
.ov-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--st-text);
    margin: 0 0 10px;
}
.ov-card .ov-sub {
    font-size: 13px;
    color: var(--st-muted);
    font-weight: 400;
    margin: -6px 0 10px;
}
.ov-value {
    font-size: 48px;
    font-weight: 600;
    line-height: 48px;
    letter-spacing: -0.03em;
    color: #fff;
}
.ov-meta {
    display: flex;
    gap: 24px;
    margin-top: 18px;
    color: var(--st-muted);
    font-size: 13px;
    flex-wrap: wrap;
}
.ov-meta b { color: var(--st-text); font-weight: 600; }
.ov-spark { height: 118px; margin-top: 8px; }
.ov-spark svg { width: 100%; height: 100%; display: block; }
.ov-mini .ov-card { min-height: 152px; }
.ov-mini .ov-value { font-size: 32px; line-height: 1; }
.ov-mini .ov-spark { height: 42px; margin-top: 10px; }
.ov-pct {
    float: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--st-ok);
}
.ov-table { width: 100%; border-collapse: collapse; }
.ov-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--st-muted);
    padding: 8px 16px;
    border-bottom: 1px solid var(--st-line);
}
.ov-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--st-line);
    font-size: 14px;
}
.ov-kvs { display: grid; gap: 10px; }
.ov-kv { display: flex; justify-content: space-between; color: var(--st-muted); font-size: 14px; }
.ov-kv b { color: var(--st-text); font-weight: 500; }


.page.page-flush {
    padding: 0 !important;
    overflow: auto !important;
    display: flex;
    flex-direction: column;
}
.cfg-wrap {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    height: 100%;
    margin: 0;
}
.cfg-list {
    border-right: 1px solid var(--st-line);
    padding: 16px 12px 28px;
    overflow: auto;
    min-height: 0;
    max-height: none;
}
.cfg-search {
    width: 100% !important;
    height: 40px !important;
    border-radius: 6px !important;
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    padding: 0 12px !important;
    margin-bottom: 10px;
    color: var(--st-text);
    font-family: inherit;
    font-size: 13px;
}
.cfg-search:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--st-gold) 50%, var(--st-line)) !important;
}
.cfg-group { margin-top: 4px; }
.cfg-cat {
    margin: 14px 10px 6px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--st-muted);
    font-weight: 500;
}
.cfg-mod {
    display: flex;
    flex-direction: column !important;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--st-muted);
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.cfg-mod strong {
    font-size: 14px;
    font-weight: 500;
    color: #d8d8d2;
}
.cfg-mod small {
    display: block !important;
    color: #6f6f69;
    font-size: 11px;
    font-weight: 400;
}
.cfg-mod:hover { background: #141414; }
.cfg-mod:hover strong { color: #fff; }
.cfg-mod.on {
    background: var(--st-card);
    box-shadow: inset 2px 0 0 var(--st-gold);
}
.cfg-mod.on strong { color: #fff; }
.cfg-empty { padding: 12px 10px; }
.cfg-main {
    padding: 24px 28px 56px;
    overflow: auto;
    min-height: 0;
}
.cfg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.cfg-head h2 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.cfg-head p, .cfg-note { color: var(--st-muted); font-size: 13px; margin: 0; line-height: 1.5; max-width: 68ch; }
.cfg-note { margin: 0 0 22px; }
.cfg-sec {
    margin: 22px 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--st-text);
}
.cfg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
}
.cfg-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-height: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.cfg-field.cfg-detect { grid-column: 1 / -1; }
.cfg-lab, .cfg-field .cfg-lab {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--st-text);
}
.cfg-field small, .cfg-prod-field small {
    display: block;
    font-size: 11px;
    color: var(--st-muted);
    line-height: 1.35;
}
.cfg-field select, .cfg-field input, .cfg-numwrap input, .cfg-prod-field input.input {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--st-line);
    background: var(--st-elev);
    color: var(--st-text);
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
}
.cfg-field input.cfg-text { width: 100%; }
.cfg-sw { align-self: flex-start; }
.cfg-field select:focus, .cfg-field input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--st-gold) 50%, var(--st-line));
}
.cfg-numwrap {
    position: relative;
    display: block;
    width: 100%;
}
.cfg-numwrap input { width: 100%; padding-right: 32px; }
.cfg-numwrap em {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: var(--st-muted);
    pointer-events: none;
}
.cfg-sw {
    width: 44px;
    height: 24px;
    border-radius: 99px;
    background: #1a1a1a;
    border: 1px solid var(--st-line);
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}
.cfg-sw::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 99px;
    background: #888;
    transition: transform 0.16s ease, background 0.16s ease;
}
.cfg-sw.on { background: var(--st-ok) !important; border-color: var(--st-ok); }
.cfg-sw.on::after { transform: translateX(20px); background: #fff; }
.cfg-field .cfg-detect { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cfg-chip {
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--st-muted);
    background: var(--st-elev);
    border: 1px solid var(--st-line);
    font-family: inherit;
    cursor: pointer;
}
.cfg-chip.on { color: #111; background: var(--st-gold); border-color: var(--st-gold); }
.cfg-jump {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-top: 14px;
    background: var(--st-card);
    border: 1px solid var(--st-border);
    border-radius: 12px;
}
.cfg-jump b { display: block; font-size: 14px; font-weight: 500; }
.cfg-jump span { display: block; margin-top: 3px; font-size: 12px; color: var(--st-muted); }
.cfg-prod {
    padding: 18px 0 16px;
    border-bottom: 1px solid var(--st-line);
}
.cfg-prod h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
}
.cfg-prod-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
}
.cfg-prod-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cfg-prod-price {
    position: relative;
    display: block;
}
.cfg-prod-price input { padding-right: 32px; }
.cfg-prod-price em {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-weight: 600;
    color: var(--st-muted);
    pointer-events: none;
}
.cfg-empty-prod { color: var(--st-muted); font-size: 13px; padding: 12px 0; }
.cfg-catalog { margin: 8px 0 28px; padding: 0; border: 0; background: transparent; }
.cfg-econ-sec { margin-bottom: 8px; }
.cfg-econ-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}
.cfg-econ-bar h3 {
    margin: 0 0 4px;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--st-text) !important;
}
.cfg-econ-bar p { margin: 0; font-size: 13px; color: var(--st-muted); }
.cfg-econ-bar .btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.cfg-catalog .econ-section { margin-bottom: 18px; }
.cfg-catalog .econ-shop { margin-bottom: 14px; }
.cfg-catalog .econ-table { width: 100%; }
.cfg-catalog .econ-table input.input {
    min-width: 90px;
    height: 36px;
}
.cfg-catalog .econ-price-input {
    width: 130px;
    font-weight: 600;
    color: var(--st-gold);
}

.gta-map {
    position: relative;
    z-index: 0;
    isolation: isolate;
    height: min(74vh, 760px);
    border-radius: 12px;
    overflow: hidden;
    background: #3a88b5;
    border: 1px solid var(--st-border);
}
.gta-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: #3a88b5;
    font-family: Poppins, system-ui, sans-serif;
}
.gta-map .leaflet-image-layer {
    image-rendering: auto;
}
.gta-map .leaflet-marker-pane { z-index: 650 !important; }
.modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
}
.toast-stack { z-index: 10001 !important; }
.gta-player {
    background: transparent !important;
    border: 0 !important;
}
.gta-player i {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d4af37;
    border: 2px solid #111;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.5);
}
.gta-player span {
    position: absolute;
    left: 22px;
    top: -3px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(10, 11, 9, 0.82);
    padding: 2px 7px;
    border-radius: 4px;
}
.modal:has(.map-sheet) {
    width: min(420px, 92vw) !important;
    padding: 22px 22px 18px !important;
    background: #121212 !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
}
.modal:has(.map-sheet) h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}
.map-sheet { display: grid; gap: 14px; }
.map-sheet-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.map-sheet-av {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--st-gold) 22%, #1a1a1a);
    color: var(--st-gold);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.map-sheet-head p { margin: 0; color: var(--st-muted); font-size: 12px; }
.map-sheet-sec {
    margin: 2px 0 -6px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--st-muted);
    font-weight: 600;
}
.map-sheet-field { display: grid; gap: 6px; }
.map-sheet-field span { font-size: 13px; font-weight: 500; }
.map-sheet-field small { font-size: 11px; color: var(--st-muted); }
.map-sheet-field .input {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--st-line);
    background: var(--st-elev);
    color: var(--st-text);
    padding: 0 12px;
}
.map-act-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.map-act-grid .map-act:last-child:nth-child(odd) { grid-column: 1 / -1; }
.map-act {
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--st-line);
    background: var(--st-elev);
    color: var(--st-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.map-act:hover { border-color: color-mix(in srgb, var(--st-gold) 45%, var(--st-line)); color: #fff; }
.map-act.gold {
    background: var(--st-gold);
    border-color: var(--st-gold);
    color: #111;
    width: 100%;
}
.map-jail .map-act.gold { width: auto; }
.map-act.gold:hover { filter: brightness(1.08); color: #111; }
.map-act.danger { color: #f3b4b4; border-color: #4a2222; background: #1a1010; }
.map-act.ghost { width: 100%; background: transparent; color: var(--st-muted); font-weight: 500; }
.map-jail { display: grid; gap: 10px; }
.map-jail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.map-chip {
    height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--st-line);
    background: var(--st-elev);
    color: var(--st-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.map-chip.on, .map-chip:hover {
    color: #111;
    background: var(--st-gold);
    border-color: var(--st-gold);
}
.gta-map .leaflet-control-layers {
    background: #151515;
    color: #ecefe6;
    border: 1px solid #242424;
    border-radius: 8px;
}
.gta-map .leaflet-bar a {
    background: #151515;
    color: #ecefe6;
    border-bottom-color: #242424;
}
.gta-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(10, 11, 9, 0.82);
    border: 1px solid var(--st-line);
    font-size: 12px;
    color: var(--st-muted);
    pointer-events: none;
}
.gta-dot {
    position: absolute;
    width: 14px; height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--st-gold);
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.28);
    cursor: pointer;
    z-index: 2;
}
.gta-dot span {
    position: absolute;
    left: 18px; top: -6px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px #000;
    pointer-events: none;
}
.gta-dot:hover { transform: scale(1.15); }

.ingame-log {
    max-height: min(64vh, 640px);
    overflow: auto;
    font-size: 13px;
    line-height: 1.45;
    font-family: ui-monospace, Consolas, monospace;
}
.ingame-line { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--st-line); color: var(--st-text); }
.ingame-time { color: var(--st-muted); min-width: 64px; }
.ingame-chan { color: var(--st-gold); min-width: 110px; }
.ingame-line.err { color: #f87171; }
.ingame-line.warn { color: #fbbf24; }

.ui-preview {
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--pv-menu, #111);
    color: var(--pv-text, #fff);
    border: 1px solid rgba(255,255,255,.12);
    min-height: 160px;
}
.ui-preview-bar { height: 4px; background: var(--pv-primary, #d4af37); margin: -16px -16px 12px; }
.ui-preview strong { display: block; font-size: 16px; margin-bottom: 6px; }
.ui-preview span { display: block; color: var(--pv-text2, #9a9a93); font-size: 13px; margin-bottom: 14px; }
.ui-preview button {
    height: 34px; padding: 0 12px; border-radius: 6px;
    background: var(--pv-primary, #d4af37); color: #111; font-weight: 600; border: 0;
}

.player-row.is-focus, tr.is-focus td { background: rgba(212, 175, 55, 0.12); }
.f5-ph {
    height: 88px;
    display: grid; place-items: center;
    color: var(--st-muted);
    background: var(--st-elev);
    border-radius: 8px;
}

.hud-stage {
    position: relative;
    margin-top: 16px;
    height: min(58vh, 520px);
    background:
        radial-gradient(ellipse at center, transparent 28%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(180deg, #243444 0%, #0b1218 100%);
    border: 1px solid var(--st-border);
    border-radius: 12px;
    overflow: hidden;
}
.hud-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.player-search {
    width: 100%;
    height: 40px;
    margin-bottom: 12px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--st-line);
    background: var(--st-elev);
    color: var(--st-text);
    font-family: inherit;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--st-line);
    width: 100%;
    text-align: left;
    color: inherit;
    background: transparent;
}
.player-row:last-child { border-bottom: 0; }

.modal {
    background: var(--st-card) !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 12px !important;
}
.toast-stack .toast,
.toast {
    background: var(--st-elev) !important;
    border: 1px solid var(--st-line) !important;
    border-radius: 10px !important;
}

@media (max-width: 1200px) {
    .ov-row, .ov-mini, .ov-split { grid-template-columns: 1fr; }
    .ov-mini { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
    .app { grid-template-columns: 1fr !important; }
    .sidebar {
        position: fixed !important;
        transform: translateX(-108%) !important;
        z-index: 80 !important;
        height: 100% !important;
    }
    body.drawer-open .sidebar { transform: none !important; }
    body.drawer-open .drawer-dim {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, 0.58);
    }
    .hamburger {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 6px;
        border: 1px solid var(--st-line);
        background: transparent;
        color: #fff;
    }
    .ov-row, .ov-mini, .ov-split, .cfg-wrap { grid-template-columns: 1fr; }
    .cfg-grid, .cfg-prod-grid { grid-template-columns: 1fr; }
    .cfg-list {
        max-height: 38vh;
        border-right: 0;
        border-bottom: 1px solid var(--st-line);
    }
    .cfg-main { padding: 20px 16px 48px; }
    .cfg-field select, .cfg-field input, .cfg-numwrap, .cfg-numwrap input { width: 100%; }
    .cfg-field.cfg-detect { flex-direction: column; align-items: flex-start; }
    .cfg-field .cfg-detect { justify-content: flex-start; }
}

/* Click / motion */
.btn,
.nav-item,
.icon-btn,
.user-chip,
.lang-chip,
.hamburger,
.cfg-mod,
.map-act,
.map-chip,
.tab,
.range-tabs button,
.player-row,
.server-switch,
.login-submit {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.btn,
.nav-item,
.icon-btn,
.user-chip,
.lang-chip,
.hamburger,
.cfg-mod,
.map-act,
.tab,
.range-tabs button,
.server-switch,
.login-submit {
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.18s ease, filter 0.16s ease !important;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28) !important;
}
.btn.primary:hover:not(:disabled),
.login-submit:hover {
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.32) !important;
}
.btn.danger:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2) !important;
}
.btn:active:not(:disabled),
.login-submit:active,
.nav-item:active,
.icon-btn:active,
.map-act:active,
.cfg-mod:active {
    transform: translateY(1px) scale(0.97);
}
.btn.primary.click-pop,
.login-submit.click-pop,
.btn.click-pop {
    animation: clickRing 0.45s ease-out;
}
@keyframes clickRing {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.55); transform: scale(0.96); }
    100% { box-shadow: 0 0 0 16px rgba(212, 175, 55, 0); transform: scale(1); }
}
.click-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(212, 175, 55, 0.38);
    transform: scale(0);
    animation: clickRipple 0.55s ease-out forwards;
    z-index: 2;
}
.btn.danger .click-ripple { background: rgba(248, 113, 113, 0.38); }
.nav-item .click-ripple { background: rgba(255, 255, 255, 0.16); }
@keyframes clickRipple {
    to { transform: scale(1); opacity: 0; }
}
.nav-item.active {
    box-shadow: inset 3px 0 0 var(--st-gold) !important;
}
.ov-card, .card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ov-power .btn.primary:not(:disabled) {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.35);
}
.status-dot {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.status-dot.online {
    animation: statusGlow 1.8s ease-in-out infinite;
}
.status-dot.starting {
    animation: statusBlink 0.85s ease-in-out infinite;
}
@keyframes statusGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}
@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.page.page-enter > * {
    animation: ovIn 0.38s cubic-bezier(.16, 1, .3, 1) both !important;
}
.page.page-enter > *:nth-child(2) { animation-delay: 0.05s !important; }
.page.page-enter > *:nth-child(3) { animation-delay: 0.1s !important; }
.page.page-enter > *:nth-child(4) { animation-delay: 0.15s !important; }
.page.page-enter > *:nth-child(5) { animation-delay: 0.2s !important; }
@keyframes ovIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.modal-backdrop.is-open {
    animation: fadeDim 0.2s ease;
}
.modal-backdrop.is-open .modal {
    animation: modalIn 0.24s cubic-bezier(.16, 1, .3, 1);
}
.modal-backdrop.is-closing {
    animation: fadeDimOut 0.18s ease forwards;
}
.modal-backdrop.is-closing .modal {
    animation: modalOut 0.18s ease forwards;
}
@keyframes fadeDim {
    from { background: rgba(0, 0, 0, 0); }
    to { background: rgba(0, 0, 0, 0.7); }
}
@keyframes fadeDimOut {
    to { opacity: 0; }
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
@keyframes modalOut {
    to { opacity: 0; transform: translateY(8px) scale(0.97); }
}
.toast-stack .toast,
.toast {
    animation: toastIn 0.32s cubic-bezier(.16, 1, .3, 1);
}
.toast.out {
    animation: toastOut 0.24s ease forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(16px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(12px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
