:root {
  color-scheme: dark;
  --bg: #080b11;
  --bg-soft: #0c111a;
  --panel: rgba(17, 23, 34, .82);
  --panel-solid: #111722;
  --panel-raised: #151d2a;
  --panel-hover: #192332;
  --line: rgba(151, 174, 207, .14);
  --line-strong: rgba(151, 174, 207, .25);
  --text: #f2f6fb;
  --muted: #93a0b2;
  --subtle: #687588;
  --accent: #68d8be;
  --accent-2: #6d91ff;
  --accent-bg: rgba(104, 216, 190, .1);
  --ok: #60d394;
  --warn: #f5b95f;
  --danger: #ff707d;
  --info: #74a7ff;
  --radius: 16px;
  --radius-small: 11px;
  --shadow: 0 22px 64px rgba(0, 0, 0, .28);
  --sidebar: 256px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% -20%, rgba(69, 104, 178, .12), transparent 38%), var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.ambient { position: fixed; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(130px); opacity: .1; pointer-events: none; z-index: 0; }
.ambient-one { background: #43c6ac; top: -18rem; left: 12%; }
.ambient-two { background: #5278ff; bottom: -22rem; right: 4%; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 22px 14px 16px; background: rgba(9, 13, 20, .88); border-right: 1px solid var(--line); backdrop-filter: blur(24px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(145deg, rgba(104, 216, 190, .2), rgba(109, 145, 255, .18)); border: 1px solid rgba(104, 216, 190, .35); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 30px rgba(64, 166, 149, .12); }
.brand-mark span { font-weight: 900; font-size: 1.15rem; background: linear-gradient(135deg, #8be7d1, #87a5ff); color: transparent; background-clip: text; }
.brand-mark.large { width: 52px; height: 52px; border-radius: 15px; }
.brand-mark.large span { font-size: 1.55rem; }
.brand div:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 1rem; letter-spacing: .01em; }
.brand div:last-child span { margin-top: 4px; color: var(--muted); font-size: .78rem; }

.main-nav { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.nav-item { min-height: 43px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 11px; padding: 9px 11px; margin: 2px 0; color: var(--muted); border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-size: .89rem; font-weight: 570; transition: .16s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: #dcfff7; background: linear-gradient(90deg, rgba(104,216,190,.13), rgba(104,216,190,.035)); border-color: rgba(104,216,190,.13); box-shadow: inset 3px 0 var(--accent); }
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-button { width: 100%; font: inherit; text-align: left; background: transparent; cursor: pointer; }
.nav-game-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: 5px; background: var(--game-accent, var(--accent)); box-shadow: 0 0 13px color-mix(in srgb, var(--game-accent, var(--accent)) 65%, transparent); }
.nav-section-label { color: #536074; padding: 19px 11px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.nav-count { min-width: 20px; padding: 1px 6px; border-radius: 20px; text-align: center; color: #121923; background: var(--warn); font-size: .7rem; font-weight: 800; }
.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.connection-state { display: grid; grid-template-columns: 9px 1fr; align-items: center; gap: 10px; margin-bottom: 14px; }
.connection-state div { display: flex; flex-direction: column; }
.connection-state strong { font-size: .78rem; font-weight: 700; }
.connection-state div span { color: var(--subtle); font-size: .71rem; }
.icon-text-button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; padding: 8px 1px; background: transparent; color: var(--muted); cursor: pointer; font-size: .8rem; }
.icon-text-button:hover { color: var(--text); }
.icon-text-button svg { width: 16px; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); padding: 0 34px 60px; }
.topbar { min-height: 112px; max-width: 1480px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 2px 0 0; font-size: clamp(1.45rem, 2vw, 1.9rem); line-height: 1.2; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--accent); font-size: .69rem; line-height: 1.3; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.refresh-label { color: var(--subtle); font-size: .72rem; }
.server-avatar { width: 38px; height: 38px; display: grid; place-items: center; margin-left: 5px; border-radius: 50%; background: linear-gradient(145deg, #1a2835, #151c29); border: 1px solid var(--line-strong); color: #b9c9db; font-size: .69rem; font-weight: 850; letter-spacing: .04em; }
.content { max-width: 1480px; margin: 0 auto; padding-top: 28px; }
.content.soft-refresh { animation: content-settle .18s ease; }
.topbar.is-refreshing #refresh-button svg { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@keyframes content-settle { from { opacity: .82; } }
.mobile-bar { display: none; }

.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; background: var(--panel-raised); color: var(--text); font-size: .82rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); background: var(--panel-hover); border-color: var(--line-strong); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.button svg { width: 16px; height: 16px; }
.button.primary { color: #06110e; background: linear-gradient(135deg, #7be2ca, #6ad1bb); border-color: rgba(131,236,211,.6); }
.button.primary:hover:not(:disabled) { background: linear-gradient(135deg, #8debd6, #74dbc4); }
.button.subtle { background: rgba(255,255,255,.025); }
.button.warning { color: #ffe9c4; background: rgba(245,185,95,.1); border-color: rgba(245,185,95,.28); }
.button.danger { color: #ffbdc3; background: rgba(255,112,125,.1); border-color: rgba(255,112,125,.3); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { min-height: 145px; padding: 18px; position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(19,27,39,.93), rgba(14,20,30,.82)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 32px rgba(0,0,0,.12); }
.metric-card::after { content: ""; position: absolute; inset: auto -25% -60% 30%; height: 90%; background: radial-gradient(ellipse, var(--metric-glow, rgba(104,216,190,.12)), transparent 70%); pointer-events: none; }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.metric-label { color: var(--muted); font-size: .78rem; font-weight: 620; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.035); color: var(--accent); }
.metric-icon svg { width: 17px; }
.metric-value { position: relative; z-index: 1; margin-top: 20px; font-size: 1.65rem; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.metric-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; margin-top: 11px; color: var(--subtle); font-size: .72rem; }
.progress { height: 4px; margin-top: 13px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--value, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }

.section-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(0,0,0,.1); backdrop-filter: blur(16px); overflow: hidden; }
.panel-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: .98rem; letter-spacing: -.01em; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.panel-body { padding: 18px; }
.panel-link { color: var(--accent); font-size: .75rem; font-weight: 700; text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

.server-list { display: flex; flex-direction: column; }
.server-row { --game-accent: var(--accent); min-height: 78px; display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(120px,.8fr) auto; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .14s ease; }
.server-row:last-child { border-bottom: 0; }
.server-row:hover { background: rgba(255,255,255,.025); }
.game-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--game-accent); background: color-mix(in srgb, var(--game-accent) 11%, transparent); border: 1px solid color-mix(in srgb, var(--game-accent) 22%, transparent); }
.game-icon svg { width: 21px; height: 21px; }
.server-name { display: flex; flex-direction: column; min-width: 0; }
.server-name strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-name span { margin-top: 2px; color: var(--subtle); font-size: .71rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-resource { color: var(--muted); font-size: .73rem; }
.server-resource strong { display: block; margin-bottom: 5px; color: #c5cfda; font-size: .76rem; font-weight: 650; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 5px 9px; border: 1px solid rgba(96,211,148,.2); border-radius: 99px; color: #9ce7bd; background: rgba(96,211,148,.07); font-size: .7rem; font-weight: 750; }
.status-pill.off { color: #a7b0bc; background: rgba(147,160,178,.07); border-color: rgba(147,160,178,.17); }
.status-pill.warn { color: #ffd696; background: rgba(245,185,95,.08); border-color: rgba(245,185,95,.2); }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 3px rgba(104,117,136,.09); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(96,211,148,.1), 0 0 12px rgba(96,211,148,.35); }
.status-dot.warn { background: var(--warn); }
.status-dot.danger { background: var(--danger); }

.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-item .status-dot { margin-top: 7px; }
.activity-copy strong { display: block; font-size: .78rem; font-weight: 650; }
.activity-copy span { display: block; margin-top: 3px; color: var(--subtle); font-size: .7rem; }
.activity-time { color: var(--subtle); font-size: .68rem; white-space: nowrap; }

.game-hero { --game-accent: var(--accent); display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 17px; margin-bottom: 18px; padding: 20px; background: linear-gradient(115deg, color-mix(in srgb, var(--game-accent) 9%, var(--panel-solid)), var(--panel)); border: 1px solid color-mix(in srgb, var(--game-accent) 20%, var(--line)); border-radius: var(--radius); overflow: hidden; position: relative; }
.game-hero::after { content: ""; position: absolute; width: 26rem; height: 18rem; right: -9rem; top: -8rem; border-radius: 50%; background: color-mix(in srgb, var(--game-accent) 11%, transparent); filter: blur(45px); pointer-events: none; }
.game-hero .game-icon { width: 56px; height: 56px; border-radius: 15px; }
.game-hero .game-icon svg { width: 29px; height: 29px; }
.game-identity { position: relative; z-index: 1; min-width: 0; }
.game-identity h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }
.game-identity p { margin: 4px 0 0; color: var(--muted); font-size: .79rem; }
.game-address { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #bec9d5; font: 500 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.tabs { display: flex; gap: 3px; overflow-x: auto; margin-bottom: 17px; padding: 4px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 12px; scrollbar-width: none; }
.tab { min-height: 36px; border: 0; border-radius: 8px; padding: 7px 13px; background: transparent; color: var(--muted); font-size: .77rem; font-weight: 650; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel-raised); box-shadow: 0 2px 8px rgba(0,0,0,.18); }

.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.info-card { min-height: 115px; padding: 16px; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 13px; }
.info-card .label { color: var(--subtle); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.info-card .value { margin-top: 12px; font-size: 1.05rem; font-weight: 750; }
.info-card .meta { margin-top: 5px; color: var(--muted); font-size: .72rem; }
.recommendation { display: flex; gap: 13px; padding: 15px 16px; margin-top: 14px; border: 1px solid rgba(116,167,255,.19); background: rgba(116,167,255,.055); border-radius: 13px; }
.recommendation > span { color: var(--info); }
.recommendation svg { width: 18px; }
.recommendation strong { display: block; font-size: .78rem; }
.recommendation p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.recommendation.warning { border-color: rgba(245,185,95,.28); background: rgba(245,185,95,.07); }
.recommendation.warning > span { color: var(--warn); }

.media-upload-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 22px; border: 1px dashed rgba(104,216,190,.34); border-radius: 16px; background: linear-gradient(135deg, rgba(104,216,190,.075), rgba(116,167,255,.035)); }
.media-upload-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(104,216,190,.2); border-radius: 14px; background: rgba(104,216,190,.08); }
.media-upload-icon svg { width: 25px; height: 25px; }
.media-upload-hero h2 { margin: 2px 0 5px; font-size: 1.05rem; }
.media-upload-hero p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.media-file-name { margin-left: 8px; vertical-align: middle; overflow-wrap: anywhere; }
.data-table td > svg { width: 15px; height: 15px; color: var(--subtle); vertical-align: middle; }
.empty-state.compact { min-height: 170px; }

.config-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-input { min-height: 40px; width: min(340px, 100%); padding: 8px 12px 8px 38px; color: var(--text); background: var(--panel-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.toggle-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .75rem; }
.switch { width: 38px; height: 21px; position: relative; display: inline-block; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #273140; border: 1px solid var(--line-strong); cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: #8996a6; transition: .15s; }
.switch input:checked + span { background: rgba(104,216,190,.22); border-color: rgba(104,216,190,.42); }
.switch input:checked + span::after { transform: translateX(17px); background: var(--accent); }

.config-group { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.012); }
.config-group-title { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: rgba(255,255,255,.018); border-bottom: 1px solid var(--line); }
.config-group-title h3 { margin: 0; font-size: .77rem; letter-spacing: .03em; }
.config-group-title span { color: var(--subtle); font-size: .68rem; }
.setting-row { display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(180px, .7fr); align-items: center; gap: 22px; min-height: 76px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row.changed { background: rgba(104,216,190,.025); }
.setting-row.advanced-setting[hidden] { display: none; }
.setting-copy label { display: flex; align-items: center; gap: 8px; font-size: .79rem; font-weight: 660; }
.setting-copy p { margin: 3px 0 0; color: var(--subtle); font-size: .69rem; line-height: 1.45; }
.recommended-badge, .restart-badge, .advanced-badge, .source-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 99px; font-size: .6rem; font-weight: 750; letter-spacing: .025em; }
.recommended-badge { color: #9ce7bd; background: rgba(96,211,148,.09); }
.restart-badge { color: #ffd696; background: rgba(245,185,95,.08); }
.advanced-badge { color: #a8bbd3; background: rgba(151,174,207,.08); }
.source-badge.inherited { color: #b8c8ff; background: rgba(124,151,255,.1); }
.source-badge.default { color: #c8b8e8; background: rgba(170,133,224,.1); }
.setting-control { justify-self: stretch; }
.setting-control input:not([type="checkbox"]), .setting-control select, .setting-control textarea { width: 100%; min-height: 38px; padding: 7px 10px; color: var(--text); background: #0d131d; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; }
.setting-control input:focus, .setting-control select:focus, .setting-control textarea:focus { border-color: rgba(104,216,190,.55); box-shadow: 0 0 0 3px rgba(104,216,190,.08); }
.setting-control .bool-control { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: .73rem; }
.config-footer { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; padding: 12px 14px; background: rgba(14,20,30,.94); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.35); backdrop-filter: blur(18px); }
.change-count { color: var(--muted); font-size: .75rem; }
.config-footer-actions { display: flex; gap: 8px; }

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.data-table th { padding: 10px 13px; color: var(--subtle); background: rgba(255,255,255,.018); border-bottom: 1px solid var(--line); text-align: left; font-size: .65rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 13px; color: #c7d0dc; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(255,255,255,.018); }
.data-table .table-section-row th { padding-top: 16px; color: #98a9bd; background: rgba(104,216,190,.035); border-top: 1px solid var(--line); }
.data-table .panel-link { display: inline-flex; align-items: center; gap: 5px; }
.data-table .panel-link svg { width: 13px; height: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

.log-view { min-height: 420px; max-height: 70vh; margin: 0; padding: 17px; overflow: auto; color: #bdc9d8; background: #090d13; border: 1px solid var(--line); border-radius: 12px; font: .72rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); gap: 14px; }
.console-panel { background: #090d13; }
.console-history { min-height: 420px; max-height: 62vh; margin: 0; padding: 17px; overflow: auto; color: #bdc9d8; font: .75rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-command { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--line); background: rgba(255,255,255,.018); }
.console-command input { min-width: 0; flex: 1; padding: 8px 11px; color: var(--text); background: #0d131d; border: 1px solid var(--line-strong); border-radius: 9px; }

.access-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.account-list { display: flex; flex-direction: column; }
.account-row { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.3fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-identity strong, .account-identity span { display: block; }
.account-identity span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.permission-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.permission-chip { padding: 3px 8px; color: #b9c7d8; background: rgba(151,174,207,.07); border: 1px solid var(--line); border-radius: 99px; font-size: .66rem; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.account-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field > span { color: #c5d0dd; font-size: .74rem; font-weight: 650; }
.form-field input { width: 100%; min-height: 41px; padding: 8px 11px; color: var(--text); background: #0d131d; border: 1px solid var(--line-strong); border-radius: 9px; }
.permission-matrix { display: grid; gap: 9px; }
.permission-game { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.7fr); gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.permission-game > strong { font-size: .76rem; }
.permission-options { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.permission-option { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .69rem; }
.permission-option input { accent-color: var(--accent); }
.audit-detail { max-width: 420px; overflow-wrap: anywhere; color: var(--muted); }
.empty-state { display: grid; place-items: center; min-height: 260px; padding: 30px; text-align: center; }
.empty-state svg { width: 34px; height: 34px; color: var(--subtle); }
.empty-state h3 { margin: 13px 0 5px; font-size: .95rem; }
.empty-state p { max-width: 440px; margin: 0; color: var(--muted); font-size: .76rem; }
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.035); border-radius: 7px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.login-shell { min-height: 100vh; position: relative; z-index: 1; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(450px, 100%); display: grid; gap: 19px; padding: 30px; background: rgba(15,21,31,.84); border: 1px solid var(--line-strong); border-radius: 21px; box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.login-card h1 { margin: 4px 0 7px; font-size: 1.8rem; letter-spacing: -.045em; }
.login-card p { margin: 0; }
.field-label { color: #c5d0dd; font-size: .78rem; font-weight: 650; }
.login-card > input { width: 100%; height: 43px; padding: 9px 12px; color: var(--text); background: #0b1018; border: 1px solid var(--line-strong); border-radius: 10px; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.password-row input { min-width: 0; height: 43px; padding: 9px 12px; color: var(--text); background: #0b1018; border: 1px solid var(--line-strong); border-radius: 10px; }
.form-error { min-height: 1.3em; color: var(--danger); font-size: .75rem; }
.microcopy { color: var(--subtle); font-size: .68rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3,6,10,.72); backdrop-filter: blur(7px); }
.modal { width: min(530px, 100%); max-height: 88vh; overflow: auto; background: #121925; border: 1px solid var(--line-strong); border-radius: 17px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: flex-start; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); }
.modal-symbol { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--warn); background: rgba(245,185,95,.09); }
.modal-symbol.danger { color: var(--danger); background: rgba(255,112,125,.09); }
.modal-head h2 { margin: 0; font-size: 1rem; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: .74rem; }
.modal-body { padding: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.change-list { display: flex; flex-direction: column; gap: 8px; }
.change-item { display: grid; grid-template-columns: 1fr auto 1fr; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.015); font-size: .72rem; }
.change-item .old { color: var(--subtle); text-align: right; overflow-wrap: anywhere; }
.change-item .new { color: var(--accent); overflow-wrap: anywhere; }
.change-item svg { width: 14px; color: var(--subtle); }

.toast-region { position: fixed; z-index: 150; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 9px; width: min(370px, calc(100vw - 36px)); }
.toast { display: grid; grid-template-columns: 8px 1fr; align-items: start; gap: 11px; padding: 13px 14px; background: rgba(19,27,39,.96); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,.35); animation: toast-in .2s ease; }
.toast strong { display: block; font-size: .76rem; }
.toast span:last-child { display: block; margin-top: 2px; color: var(--muted); font-size: .69rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .console-layout { grid-template-columns: 1fr; }
  .access-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .media-upload-hero { grid-template-columns: auto 1fr; }
  .media-upload-hero > .button, .media-upload-hero > .status-pill { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
}

@media (max-width: 780px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.45); }
  .sidebar.open { transform: translateX(0); }
  .mobile-bar { position: sticky; top: 0; z-index: 15; height: 62px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; padding: 0 12px; background: rgba(9,13,20,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
  .mobile-brand { text-align: center; font-size: .83rem; font-weight: 750; text-decoration: none; }
  .mobile-health { justify-self: end; margin-right: 12px; }
  .main-content { margin-left: 0; padding: 0 14px 45px; }
  .topbar { min-height: 92px; }
  .topbar-actions .refresh-label, .topbar-actions .server-avatar, .topbar-actions .button span:not([data-icon]) { display: none; }
  .content { padding-top: 18px; }
  .game-hero { grid-template-columns: 48px 1fr; padding: 16px; }
  .game-hero .game-icon { width: 47px; height: 47px; }
  .hero-actions { grid-column: 1 / -1; justify-content: stretch; }
  .hero-actions .button { flex: 1 1 auto; }
  .setting-row { grid-template-columns: 1fr; gap: 10px; }
  .setting-control .bool-control { justify-content: flex-start; }
  .server-row { grid-template-columns: 40px 1fr auto; }
  .server-resource { display: none; }
  .account-row { grid-template-columns: 1fr; }
  .account-actions { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 126px; }
  .info-grid { grid-template-columns: 1fr; }
  .topbar { align-items: center; }
  .topbar h1 { font-size: 1.32rem; }
  .game-identity p { display: none; }
  .game-address { overflow: hidden; text-overflow: ellipsis; }
  .panel-header { align-items: flex-start; }
  .config-footer { align-items: stretch; flex-direction: column; }
  .config-footer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .password-row { grid-template-columns: 1fr; }
  .change-item { grid-template-columns: 1fr; }
  .change-item .old { text-align: left; }
  .change-item svg { transform: rotate(90deg); }
  .access-grid, .form-grid { grid-template-columns: 1fr; }
  .permission-game { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
