:root {
    color-scheme: dark;
    --bg: #090d12;
    --panel: #111821;
    --panel-2: #17212c;
    --line: #253241;
    --text: #f3f6f8;
    --muted: #91a0ae;
    --accent: #d6ff3f;
    --accent-dark: #8fac18;
    --danger: #ff6b6b;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 0%, rgba(130, 164, 36, .12), transparent 30rem),
        linear-gradient(155deg, #0b1016, var(--bg) 55%);
    color: var(--text);
}

button, input, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar {
    position: sticky; top: 0; height: 100vh;
    padding: 22px 0;
    border-right: 1px solid var(--line);
    background: rgba(11, 16, 22, .9);
    backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 0 16px; text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px;
    border: 1px solid var(--accent-dark); border-radius: 12px;
    color: var(--accent); font-weight: 900; letter-spacing: -.08em;
    background: rgba(214, 255, 63, .08);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .08em; }
.brand small { color: var(--muted); }
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 12px;
    color: var(--text); font-size: 16px; font-weight: 800;
}
.sidebar-user::before, .sidebar-user::after {
    content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(3px);
}
.sidebar-user span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: grid; gap: 0; border-top: 1px solid var(--line); }
.nav a {
    width: 100%; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted);
    text-decoration: none; transition: .16s ease;
}
.nav a:hover, .nav a.active { background: var(--panel-2); color: var(--text); }
.nav a.active { box-shadow: inset 3px 0 var(--accent); }
.nav a.nav-section-start { margin-top: 70px; border-top: 1px solid var(--line); }
.sidebar-footer { position: absolute; left: 16px; right: 16px; bottom: 22px; }

.content { padding: 42px clamp(24px, 4vw, 64px) 64px; min-width: 0; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 8px 0 10px; font-size: clamp(30px, 4vw, 50px); letter-spacing: -.045em; }
.lead { margin: 0; color: var(--muted); max-width: 760px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 30px; }

.user { display: flex; gap: 10px; align-items: center; }
.user img { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-2); }
.user span { color: var(--muted); font-size: 14px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--panel-2); color: var(--text); text-decoration: none; cursor: pointer;
}
.button:hover { border-color: #41556a; }
.button.primary { color: #101500; background: var(--accent); border-color: var(--accent); font-weight: 800; }
.button.ghost { width: 100%; color: var(--muted); background: transparent; }

.auth-screen { min-height: 100vh; display: none; place-items: center; padding: 24px; }
body.auth-required .auth-screen { display: grid; }
.auth-card {
    width: min(100%, 470px); padding: 34px; border: 1px solid var(--line); border-radius: 20px;
    background: linear-gradient(145deg, rgba(23, 33, 44, .96), rgba(12, 18, 25, .96));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
}
.auth-card h1 { font-size: 34px; }
.auth-card p { color: var(--muted); line-height: 1.55; }
.auth-card .button { width: 100%; margin-top: 12px; }
.login-form { display: grid; gap: 14px; margin-top: 24px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.login-form .button { margin-top: 2px; }
.status { margin-top: 18px; padding: 12px 14px; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 13px; }
.status.error { color: #ffd0d0; background: rgba(255, 107, 107, .09); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.stat, .panel { border: 1px solid var(--line); border-radius: 16px; background: rgba(17, 24, 33, .86); }
.stat { padding: 22px; }
.stat strong { display: block; margin-top: 8px; font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; }
.panel { margin-top: 18px; padding: 24px; }
.panel h2 { margin: 0 0 8px; }
.panel p { color: var(--muted); }

.server-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.server-card {
    display: block; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px;
    color: var(--text); background: rgba(17, 24, 33, .86); text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.server-card:hover, .server-card:focus-visible { transform: translateY(-2px); border-color: #536b81; background: rgba(21,31,42,.96); outline: none; }
.server-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.server-card h2 { margin: 0 0 5px; font-size: 21px; }
.server-card-id { color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.server-status { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; color: #bfe7c7; background: rgba(110,220,140,.1); font-size: 12px; font-weight: 800; white-space: nowrap; }
.server-status.offline { color: #ffb5b5; background: rgba(255,107,107,.1); }
.server-card-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.server-card-data div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.server-card-data span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.server-card-data strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 18px; white-space: nowrap; }
.server-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.server-detail-stats .stat { min-width: 0; padding: 12px 14px; }
.server-detail-stats .stat strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 18px; }
.server-detail-stats .stat span { font-size: 11px; }
.server-players-panel { margin-top: 14px; padding: 12px; }
.server-players-panel .section-head { margin-bottom: 10px; }
.server-players-panel .section-head h2 { font-size: 18px; }
.online-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.online-table th, .online-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.online-table th { color: var(--muted); background: rgba(255,255,255,.02); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.online-table tbody tr:last-child td { border-bottom: 0; }
.online-player-name strong, .online-player-name small, .online-player-name .user-name-link { display: block; }
.online-player-name small { margin-top: 2px; font-size: 10px; }
.user-name-link { width: fit-content; color: var(--text); font-weight: 700; text-decoration: none; }
.user-name-link:hover { color: var(--accent); text-decoration: underline; }
.user-rating { font-weight: 800; }
.online-player-actions { flex-wrap: nowrap; }
.online-table th:last-child, .online-table td:last-child,
.users-table th:last-child, .users-table td:last-child { text-align: right; }
.online-player-actions .button { min-height: 30px; padding: 0 8px; font-size: 11px; }
.user-focus-card { margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); background: rgba(17,24,33,.86); }
.user-focus-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.user-focus-head h2 { margin: 5px 0 4px; }
.user-focus-title { display: flex; align-items: center; gap: 10px; }
.player-online-status { display: inline-flex; align-items: center; gap: 6px; color: #bfe7c7; font-size: 12px; font-weight: 800; white-space: nowrap; }
.player-online-status::before { width: 7px; height: 7px; border-radius: 50%; background: #6edc8c; box-shadow: 0 0 8px rgba(110,220,140,.5); content: ""; }
.player-online-status.offline { color: var(--muted); }
.player-online-status.offline::before { background: #788493; box-shadow: none; }
.user-focus-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.user-focus-metrics > div { padding: 10px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.user-focus-metrics span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.user-focus-metrics strong { font-size: 15px; }
.user-focus-note { padding: 10px 12px; border: 1px solid var(--line); border-top: 0; color: var(--muted); font-size: 12px; }
.danger-text { color: var(--danger); }
.user-movements { margin-bottom: 20px; }
.user-movements .section-head { margin-bottom: 8px; }
.user-movements .section-head h2 { margin: 0 0 3px; font-size: 16px; }
.movement-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 12px; }
.movement-table th, .movement-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.movement-table th { color: var(--muted); background: rgba(255,255,255,.02); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.movement-table tbody tr:last-child td { border-bottom: 0; }
.movement-table tbody tr:hover { background: rgba(255,255,255,.025); }
.movement-session, .movement-coordinate { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.movement-more-row { display: flex; justify-content: center; padding-top: 10px; }
.user-warehouse { margin-bottom: 20px; }
.user-warehouse .section-head { margin-bottom: 8px; }
.user-warehouse .section-head h2 { margin: 0 0 3px; font-size: 16px; }
.user-warehouse-add { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 10px; margin-bottom: 10px; }
.warehouse-item-search { position: relative; }
.warehouse-search-results {
    position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; right: 0;
    max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px;
    background: #111821; box-shadow: 0 18px 40px rgba(0,0,0,.42);
}
.warehouse-search-result { display: flex; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.warehouse-search-result:last-child { border-bottom: 0; }
.warehouse-search-result:hover { background: var(--panel-2); }
.warehouse-search-result strong, .warehouse-search-result small { display: block; }
.warehouse-search-result small { margin-top: 3px; color: var(--muted); font: 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.warehouse-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; }
.warehouse-table th, .warehouse-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.warehouse-table th { color: var(--muted); background: rgba(255,255,255,.02); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.warehouse-table td:nth-child(2) { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.toolbar {
    display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; gap: 12px;
    margin-bottom: 18px;
}
.field {
    width: 100%; min-height: 44px; padding: 0 14px;
    color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    outline: none;
}
.field.integer-field { padding-right: 14px; }
.field:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 3px rgba(214, 255, 63, .07); }
.count { align-self: center; color: var(--muted); white-space: nowrap; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.item-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: inherit; background: var(--panel); text-decoration: none; }
.item-card { cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
.item-card:hover, .item-card:focus-visible { transform: translateY(-2px); border-color: #536b81; outline: none; }
.item-image { aspect-ratio: 1; display: grid; place-items: center; background: #0c1219; }
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-placeholder { color: #526171; font-size: 12px; }
.item-body { padding: 14px; }
.item-name { margin: 0; font-size: 16px; line-height: 1.25; }
.classname { margin-top: 5px; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.badge { padding: 3px 7px; border-radius: 999px; color: #ddebab; background: rgba(214, 255, 63, .08); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 28px; }
.empty { grid-column: 1 / -1; padding: 50px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.catalog-navigation { margin-bottom: 22px; }
.catalog-navigation-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.catalog-navigation-head h2 { margin: 0 0 3px; font-size: 22px; }
.catalog-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.catalog-category-card {
    position: relative; display: block; min-height: 104px; padding: 18px 48px 18px 18px; border: 1px solid var(--line); border-radius: 0;
    color: var(--text); background: rgba(17,24,33,.86); cursor: pointer; text-align: left; text-decoration: none; transition: border-color .15s ease, background .15s ease;
}
.catalog-category-card:hover, .catalog-category-card:focus-visible { border-color: #536b81; background: var(--panel-2); outline: none; }
.catalog-category-card strong, .catalog-category-card span { display: block; }
.catalog-category-card strong { margin-bottom: 8px; font-size: 17px; }
.catalog-category-card span { color: var(--muted); font-size: 12px; }
.catalog-category-card b { position: absolute; top: 50%; right: 18px; color: var(--accent); font-size: 20px; transform: translateY(-50%); }

.item-modal {
    width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
    color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .65);
}
.item-modal::backdrop { background: rgba(3, 7, 11, .78); backdrop-filter: blur(5px); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); background: rgba(17, 24, 33, .96); }
.modal-head h2 { margin: 6px 0 2px; font-size: 28px; }
.modal-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel-2); cursor: pointer; font-size: 28px; line-height: 1; }
.modal-content { padding: 26px 28px 32px; }
.detail-hero { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 24px; margin-bottom: 26px; }
.detail-image-box { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); background: #0c1219; }
.detail-image { width: 100%; height: 100%; object-fit: cover; background: #0c1219; }
.detail-intro { min-width: 0; }
.detail-label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.detail-classname { margin-bottom: 18px; font: 14px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.detail-description { margin: 0; color: var(--muted); line-height: 1.55; }
.catalog-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.catalog-breadcrumb-link { color: #ddebab; text-decoration: none; }
.catalog-breadcrumb-link:hover { color: var(--accent); text-decoration: underline; }
.catalog-breadcrumb-separator { color: #526171; }
.catalog-breadcrumb-current { color: var(--text); font-weight: 700; }
.detail-breadcrumbs { margin-bottom: 18px; font-size: 13px; }
.weapon-compatibility { display: grid; gap: 22px; margin: 0 0 22px; }
.weapon-compatibility-group h3 { margin: 0 0 10px; font-size: 17px; }
.weapon-compatibility-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; }
.weapon-compatibility-card { position: relative; display: block; min-width: 0; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); color: var(--text); background: #0c1219; text-decoration: none; }
a.weapon-compatibility-card { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
a.weapon-compatibility-card:hover, a.weapon-compatibility-card:focus-visible { border-color: #536b81; outline: none; transform: translateY(-2px); }
.weapon-compatibility-image-box { display: grid; place-items: center; width: 100%; height: 100%; }
.weapon-compatibility-image { width: 100%; height: 100%; object-fit: cover; background: #0c1219; }
.weapon-compatibility-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 8px 9px; background: rgba(5,9,13,.88); backdrop-filter: blur(5px); }
.weapon-compatibility-name, .weapon-compatibility-classname { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weapon-compatibility-name { font-size: 12px; font-weight: 700; }
.weapon-compatibility-classname { margin-top: 3px; color: #aab6c1; font: 9px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.weapon-compatibility-empty { padding: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.characteristics-section { margin-top: 8px; }
.characteristics-search { width: 100%; margin-bottom: 12px; }
.characteristics-table-shell { max-height: min(58vh, 720px); overflow: auto; border: 1px solid var(--line); }
.characteristics-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 12px; }
.characteristics-table thead { position: sticky; top: 0; z-index: 1; }
.characteristics-table th, .characteristics-table td { padding: 8px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.characteristics-table thead th { color: var(--muted); background: #17212c; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.characteristics-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.characteristics-table tbody tr.is-primary td { background: rgba(214,255,63,.025); }
.characteristics-table .characteristic-section { position: static; color: var(--text); background: #111821; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.characteristic-name { width: 27%; color: #e9eef2; font-weight: 700; }
.characteristic-value { width: 38%; overflow-wrap: anywhere; }
.characteristic-path { width: 35%; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.detail-section { margin-top: 24px; }
.detail-section h3 { margin: 0 0 12px; font-size: 18px; }
.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.property { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.property dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.property dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.config-tools { margin-bottom: 12px; }
.config-groups { display: grid; gap: 8px; }
.config-group { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.config-group summary { padding: 12px 14px; cursor: pointer; color: #dce5ec; font-weight: 700; }
.config-list { margin: 0; padding: 0 14px 12px; list-style: none; }
.config-row { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(240px, 1.2fr); gap: 14px; padding: 8px 0; border-top: 1px solid rgba(37,50,65,.7); font-size: 12px; }
.config-path { color: var(--muted); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.config-value { overflow-wrap: anywhere; }
.modal-loading { padding: 60px 0; text-align: center; color: var(--muted); }

.faction-layout { display: grid; grid-template-columns: minmax(320px, 410px) minmax(0, 1fr); gap: 20px; align-items: start; }
.faction-editor.panel { position: sticky; top: 24px; margin: 0; }
.faction-editor-page.panel { position: static; max-width: 1180px; margin: 0; }
.page-actions { display: flex; gap: 12px; align-items: center; }
.back-link { display: block; width: fit-content; margin-bottom: 12px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--text); }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.admin-form { display: grid; gap: 16px; }
.admin-form > label:not(.check-row) { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.faction-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.form-section { display: grid; gap: 16px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.form-section-wide { grid-column: 1 / -1; }
.form-section h2 { margin: 0 0 2px; font-size: 18px; }
.form-section > label:not(.check-row) { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.faction-basic-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; align-items: start; }
.faction-basic-grid > label:not(.check-row) { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.faction-basic-grid .upload-preview { grid-column: 1 / -1; }
.faction-description-field { min-height: 108px; resize: vertical; line-height: 1.45; }
.form-section-main { align-content: start; gap: 11px; padding: 14px; }
.form-section-main h2 { margin-bottom: 0; }
.form-section-main .check-row { padding: 10px 11px; }
.form-section-main .check-row small { margin-top: 2px; }
#faction-group-row.is-disabled { opacity: .55; }
.form-section-loadout { align-self: stretch; align-content: start; }
.faction-editor-page .form-section { gap: 10px; padding: 14px; }
.faction-editor-page .form-section h2 { margin: 0; }
.faction-editor-page .form-section > .field-hint { margin: 0; }
.faction-editor-page .faction-basic-grid { gap: 9px; }
.spawn-items-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.spawn-items-head h2 { margin: 0; }
.spawn-item-search { position: relative; }
.spawn-search-results { position: absolute; z-index: 8; top: calc(100% + 5px); right: 0; left: 0; max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #111821; box-shadow: 0 18px 45px rgba(0,0,0,.45); }
.spawn-search-result { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 7px 9px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.spawn-search-result:last-child { border-bottom: 0; }
.spawn-search-result:hover, .spawn-search-result:focus-visible { background: var(--panel-2); outline: none; }
.spawn-search-result:disabled { opacity: .55; cursor: default; }
.spawn-search-image { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 7px; background: #0c1219; }
.spawn-search-image img { width: 100%; height: 100%; object-fit: cover; }
.spawn-search-text { min-width: 0; }
.spawn-search-text strong, .spawn-search-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spawn-search-text strong { font-size: 13px; }
.spawn-search-text small { margin-top: 3px; color: var(--muted); font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.spawn-search-action { color: var(--accent); font-size: 18px; font-weight: 800; }
.spawn-search-result:disabled .spawn-search-action { color: var(--muted); font-size: 10px; }
.spawn-search-message { padding: 15px; color: var(--muted); font-size: 12px; text-align: center; }
.spawn-item-list { display: grid; gap: 7px; max-height: 390px; overflow: auto; }
.loadout-subtitle { margin: 10px 0 2px; color: var(--text); font-size: 14px; }
.faction-equipment-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.equipment-slot-card { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; min-height: 68px; padding: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.018); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.equipment-slot-card:hover, .equipment-slot-card:focus-visible { border-color: rgba(114,196,255,.55); background: rgba(114,196,255,.055); outline: none; }
.equipment-slot-card.is-filled { padding-right: 78px; }
.equipment-slot-image { display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; color: var(--accent); background: #0c1219; font-size: 23px; }
.equipment-slot-image img { width: 100%; height: 100%; object-fit: contain; }
.equipment-slot-text { min-width: 0; align-self: center; }
.equipment-slot-text strong, .equipment-slot-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equipment-slot-text strong { font-size: 12px; }
.equipment-slot-text small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.equipment-slot-actions { position: absolute; top: 7px; right: 7px; bottom: 7px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.equipment-slot-lock { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 10px; cursor: pointer; }
.equipment-slot-lock input { margin: 0; accent-color: var(--accent); }
.equipment-slot-remove { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; color: #ffb5b5; background: transparent; cursor: pointer; font-size: 17px; }
.inventory-loadout-title { margin-top: 12px; }
.spawn-items-empty { padding: 28px 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.spawn-item-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 30px; gap: 10px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.inventory-spawn-item-row { grid-template-columns: 46px minmax(0, 1fr) 30px; }
.spawn-item-image { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 7px; color: #526171; background: #0c1219; font-size: 9px; text-align: center; }
.spawn-item-image img { width: 100%; height: 100%; object-fit: cover; }
.spawn-item-details { min-width: 0; }
.spawn-item-details strong, .spawn-item-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spawn-item-details strong { font-size: 13px; }
.spawn-item-details small { margin-top: 3px; color: var(--muted); font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.spawn-item-lock { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.spawn-item-lock input { accent-color: var(--accent); }
.spawn-item-remove { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(255,107,107,.25); border-radius: 7px; color: #ffb5b5; background: rgba(255,107,107,.06); cursor: pointer; font-size: 18px; }
.spawn-item-remove:hover { background: rgba(255,107,107,.14); }
.faction-slot-modal { box-sizing: border-box; width: min(1440px, calc(100vw - 24px)); height: calc(100vh - 20px); max-height: none; padding: 0; overflow: hidden; border: 1px solid rgba(114,196,255,.28); color: var(--text); background: #101821; }
.faction-slot-modal[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.faction-slot-modal::backdrop { background: rgba(0,0,0,.62); }
.faction-slot-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 13px; border-bottom: 1px solid var(--line); }
.faction-slot-modal-head h2 { margin: 3px 0 0; font-size: 20px; }
.faction-slot-modal > .field { width: calc(100% - 40px); margin: 16px 20px 12px; }
.faction-slot-modal-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; min-height: 0; padding: 0 20px 20px; overflow: auto; }
.faction-slot-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; min-width: 0; min-height: 156px; padding: 12px; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.018); }
.faction-slot-choice:hover { border-color: rgba(114,196,255,.55); background: rgba(114,196,255,.055); }
.faction-slot-choice-link { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; align-items: center; min-width: 0; color: var(--text); text-decoration: none; }
.faction-slot-choice-link:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.faction-slot-choice-image { display: grid; place-items: center; width: 128px; height: 128px; overflow: hidden; background: #0c1219; }
.faction-slot-choice-image img { width: 100%; height: 100%; object-fit: contain; }
.faction-slot-choice-text { min-width: 0; }
.faction-slot-choice-text strong, .faction-slot-choice-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faction-slot-choice-text strong { font-size: 15px; }
.faction-slot-choice-text small { margin-top: 6px; color: var(--muted); font: 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; }
.faction-slot-assign { min-width: 126px; padding: 12px 14px; border: 1px solid rgba(114,196,255,.55); color: #fff; background: rgba(114,196,255,.12); cursor: pointer; font-size: 12px; font-weight: 700; }
.faction-slot-assign:hover, .faction-slot-assign:focus-visible { background: rgba(114,196,255,.24); outline: none; }
.faction-slot-assign:disabled { border-color: var(--line); color: var(--muted); background: rgba(255,255,255,.025); cursor: default; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.check-row { display: flex; gap: 11px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.check-row strong, .check-row small { display: block; }
.check-row small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.source-field { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.source-field legend { padding: 0 6px; color: var(--muted); font-size: 13px; }
.source-list { display: grid; gap: 8px; max-height: 190px; overflow: auto; }
.source-option { display: flex; gap: 9px; align-items: center; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.025); font-size: 13px; cursor: pointer; }
.source-option input { accent-color: var(--accent); }
.field-hint { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.collapsible-section { display: block; padding: 0; }
.faction-editor-page .form-section.collapsible-section { gap: 0; padding: 0; }
.collapsible-summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px; color: var(--text); cursor: pointer; font-size: 18px; font-weight: 700; list-style: none; }
.collapsible-summary::-webkit-details-marker { display: none; }
.collapsible-summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 22px; font-weight: 400; }
.collapsible-section[open] > .collapsible-summary::after { content: "−"; }
.collapsible-summary .badge { margin-left: 4px; }
.collapsible-content { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.collapsible-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; }
.collapsible-toolbar .field-hint { margin: 0; }
.transition-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.transition-row { position: relative; display: grid; grid-template-columns: 1fr; gap: 11px; align-content: start; min-width: 0; padding: 13px 42px 13px 13px; background: rgba(255,255,255,.025); }
.transition-name { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.transition-rating { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 9px; align-items: center; color: var(--muted); font-size: 11px; }
.transition-rating input { width: 100%; text-align: right; }
.transition-remove { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; color: #ffb5b5; background: transparent; cursor: pointer; font-size: 18px; }
.transition-empty { grid-column: 1 / -1; padding: 12px 0; }
.faction-transition-modal { width: min(560px, calc(100vw - 28px)); padding: 0; border: 1px solid rgba(114,196,255,.28); color: var(--text); background: #101821; }
.faction-transition-modal::backdrop { background: rgba(0,0,0,.62); }
.transition-modal-fields { display: grid; gap: 14px; padding: 18px 20px 20px; }
.transition-modal-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.transition-modal-fields .button { justify-self: end; }
.kill-reward-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.kill-reward-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; align-items: center; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.025); font-size: 13px; }
.kill-reward-row input { width: 100%; text-align: right; }
.rating-editor { display: grid; grid-template-columns: 1fr; gap: 12px; }
.faction-rating-section > .rating-editor { padding-top: 12px; }
.rating-group { padding: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.rating-group h3 { margin: 0 0 5px; font-size: 15px; }
.rating-group > .field-hint { margin: 0 0 7px; }
.faction-rating-section .kill-reward-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
.rating-single-row, .hunt-reward-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; align-items: center; padding: 9px 10px; background: rgba(255,255,255,.025); font-size: 13px; }
.rating-single-row input, .hunt-reward-row input { width: 100%; text-align: right; }
.faction-rating-section input.rating-value-negative { border-color: #d85b5b; box-shadow: inset 0 0 0 1px rgba(216,91,91,.12); }
.faction-rating-section input.rating-value-positive { border-color: #55b978; box-shadow: inset 0 0 0 1px rgba(85,185,120,.12); }
.hunt-reward-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rating-zombie-row { border: 1px solid var(--line); }
.file-field { padding: 9px; }
.upload-preview { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; }
.upload-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #0c1219; }
.muted { color: var(--muted); font-size: 13px; }
.faction-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faction-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.faction-card.is-clickable { cursor: pointer; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.faction-card.is-clickable:hover, .faction-card.is-clickable:focus-visible { border-color: rgba(114,196,255,.55); background: rgba(21,31,42,.96); outline: none; transform: translateY(-1px); }
.faction-card-image { width: 110px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #0c1219; }
.faction-card-placeholder { display: grid; place-items: center; width: 110px; aspect-ratio: 1; border-radius: 10px; background: #0c1219; color: #526171; font-size: 11px; text-align: center; }
.faction-card h3 { margin: 0 0 7px; font-size: 19px; }
.faction-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.faction-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.faction-card-description { margin-bottom: 7px !important; color: var(--text) !important; white-space: pre-line; }
.faction-actions { display: grid; gap: 8px; }
.button.danger { color: #ffd0d0; border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.08); }
.world-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.world-card { display: flex; justify-content: space-between; gap: 16px; min-width: 0; padding: 15px; border: 1px solid var(--line); background: var(--panel); }
.world-card-body { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; min-width: 0; }
.world-card-body h2 { width: 100%; margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.world-coordinate { width: 100%; color: var(--muted); font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.world-card-actions { display: grid; gap: 7px; align-content: start; }
.world-tabs { display: flex; gap: 8px; margin: -4px 0 18px; border-bottom: 1px solid var(--line); }
.world-tab { padding: 11px 17px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.world-tab:hover { color: var(--text); }
.world-tab.active { border-bottom-color: var(--accent); color: var(--accent); }
.world-tab-panel { display: grid; gap: 14px; }
.world-panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.world-panel-head h2, .world-panel-head p { margin: 0; }
.world-panel-head p { margin-top: 5px; }
.world-editor-modal { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 1px solid rgba(114,196,255,.28); color: var(--text); background: #101821; }
.world-editor-modal::backdrop { background: rgba(0,0,0,.62); }
.npc-editor-modal { width: min(980px, calc(100vw - 28px)); }
.world-editor-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 17px 20px 20px; }
.world-editor-fields > label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.world-field-wide { grid-column: 1 / -1; }
.world-editor-actions { display: flex; justify-content: flex-end; gap: 9px; }
.npc-items-editor { display: grid; gap: 10px; padding-top: 5px; }
.npc-items-editor h3 { margin: 0; font-size: 15px; }
.npc-items-editor .spawn-item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 250px; }

.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(17, 24, 33, .86); }
.users-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 12px; }
.users-table th, .users-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.users-table th { color: var(--muted); background: rgba(255,255,255,.02); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table tbody tr:hover { background: rgba(255,255,255,.025); }
.user-id { color: var(--muted); font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.user-name { font-weight: 700; }
.user-faction { color: #ddebab; }
.table-empty { padding: 42px !important; color: var(--muted); text-align: center !important; }
.game-command-panel { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr); gap: 22px; margin-bottom: 26px; padding: 22px; }
.game-command-panel h2 { margin: 6px 0 8px; }
.game-command-form { display: grid; gap: 12px; }
.game-command-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.game-command-form textarea { resize: vertical; min-height: 82px; }
.game-command-panel .status { grid-column: 1 / -1; margin: 0; }
.user-status { color: #bfe7c7; font-size: 12px; }
.user-status.banned { color: #ffb5b5; }
.user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.button.compact { padding: 7px 10px; font-size: 12px; }
.command-history-head { margin-top: 28px; }
.command-history { display: grid; gap: 9px; }
.command-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,24,33,.86); }
.command-card-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.command-state { padding: 3px 8px; border-radius: 999px; color: #f3d896; background: rgba(243,216,150,.08); font-size: 11px; }
.command-state.completed { color: #bfe7c7; background: rgba(110,220,140,.08); }
.command-state.failed { color: #ffb5b5; background: rgba(255,107,107,.08); }
.command-result { margin-top: 7px; color: var(--text); font-size: 13px; }
.task-list { display: grid; gap: 18px; }
.task-card { padding: 20px; border: 1px solid var(--line); background: rgba(17,24,33,.86); }
.task-card-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.task-card-head h2 { margin: 0 0 4px; }
.task-code { color: var(--muted); font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.task-json { width: 100%; min-height: 360px; padding: 14px; resize: vertical; color: var(--text); border: 1px solid var(--line); background: #0b1017; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.task-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.stat, .panel, .server-card, .server-card-data div, .item-card, .empty, .property,
.config-group, .form-section, .check-row, .source-field, .upload-preview,
.faction-card, .table-shell, .command-card, .user-focus-card, .user-focus-metrics > div {
    border-radius: 0;
}

@media (max-width: 820px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .brand { margin-bottom: 14px; }
    .nav { grid-template-columns: repeat(2, 1fr); }
    .sidebar-footer { position: static; margin-top: 14px; }
    .content { padding: 28px 18px 50px; }
    .page-head { display: block; }
    .page-actions { justify-content: space-between; margin-top: 18px; }
    .user { margin-top: 18px; }
    .stats { grid-template-columns: 1fr; }
    .server-grid { grid-template-columns: 1fr; }
    .server-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-focus-head { align-items: flex-start; flex-direction: column; }
    .user-focus-metrics { grid-template-columns: 1fr; }
    .user-warehouse-add { grid-template-columns: 1fr; }
    .toolbar { grid-template-columns: 1fr; }
    .catalog-category-grid { grid-template-columns: 1fr; }
    .detail-hero { grid-template-columns: 1fr; }
    .detail-image-box { max-width: 240px; }
    .weapon-compatibility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .config-row { grid-template-columns: 1fr; gap: 4px; }
    .modal-head, .modal-content { padding-left: 18px; padding-right: 18px; }
    .faction-layout { grid-template-columns: 1fr; }
    .faction-editor.panel { position: static; }
    .faction-form-grid, .faction-basic-grid { grid-template-columns: 1fr; }
    .transition-list, .faction-rating-section .kill-reward-list, .hunt-reward-list { grid-template-columns: 1fr; }
    .collapsible-toolbar { align-items: stretch; flex-direction: column; }
    .faction-equipment-slots, .faction-slot-modal-results { grid-template-columns: 1fr; }
    .faction-slot-modal { width: calc(100vw - 20px); height: calc(100vh - 20px); }
    .faction-slot-choice { grid-template-columns: 1fr; min-height: 0; }
    .faction-slot-choice-link { grid-template-columns: 88px minmax(0, 1fr); }
    .faction-slot-choice-image { width: 88px; height: 88px; }
    .faction-slot-assign { width: 100%; }
    .spawn-item-row { grid-template-columns: 42px minmax(0, 1fr) 30px; }
    .spawn-item-image { width: 42px; height: 42px; }
    .spawn-item-lock { grid-column: 2 / -1; }
    .form-section-wide { grid-column: auto; }
    .faction-list { grid-template-columns: 1fr; }
    .world-card-grid { grid-template-columns: 1fr; }
    .world-panel-head { display: grid; }
    .world-editor-fields { grid-template-columns: 1fr; }
    .world-field-wide { grid-column: auto; }
    .npc-items-editor .spawn-item-list { grid-template-columns: 1fr; }
    .faction-card { grid-template-columns: 82px minmax(0, 1fr); }
    .faction-card-image, .faction-card-placeholder { width: 82px; }
    .faction-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .game-command-panel { grid-template-columns: 1fr; }
    .game-command-panel .status { grid-column: auto; }
}
