:root {
  --sidebar: #1f2a37;
  --sidebar-2: #18222e;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #1677ff;
  --primary-2: #0f62d6;
  --primary-soft: #eaf2ff;
  --danger: #ff4d4f;
  --danger-soft: #fff1f0;
  --green: #16a34a;
  --green-soft: #e9f9ef;
  --orange: #d97706;
  --orange-soft: #fff7e6;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .035);
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: var(--primary); text-decoration: none; }
[v-cloak] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
code { font-family: var(--mono); }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small-text { font-size: 12px; }
.center { text-align: center; }
.block { display: block; }
.red { color: var(--danger) !important; }
.danger-text { color: var(--danger) !important; }

/* boot / login */
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--sidebar); color: #cbd5e1; }
.boot-logo { width: 64px; height: 64px; border-radius: 18px; background: var(--primary); color: white; display: grid; place-items: center; font-weight: 900; font-size: 24px; letter-spacing: -2px; }
.spinner { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.2); border-top-color: #60a5fa; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-page { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh; background: #f7f8fa; }
.login-art { position: relative; overflow: hidden; padding: 70px 8vw; background: radial-gradient(circle at 82% 18%, rgba(22,119,255,.35), transparent 32%), radial-gradient(circle at 12% 92%, rgba(245,158,11,.16), transparent 32%), linear-gradient(145deg, #17212c 0%, #1f2a37 62%, #111820 100%); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.login-art::before { content: ""; position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(120deg, #000, transparent 80%); }
.login-art > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 54px; }
.login-brand b { display: block; font-size: 19px; letter-spacing: .5px; }
.login-brand small { color: #91a1b5; font-size: 10px; letter-spacing: 2.4px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 18px; letter-spacing: -1.5px; box-shadow: 0 8px 22px rgba(22,119,255,.32); }
.login-art h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px; font-weight: 800; }
.login-art > p { max-width: 500px; color: #aebccd; font-size: 16px; line-height: 1.9; }
.login-art ul { list-style: none; padding: 0; margin: 46px 0 0; display: grid; gap: 14px; max-width: 500px; }
.login-art li { display: flex; align-items: center; gap: 14px; color: #d7e1ee; }
.login-art li span { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; display: grid; place-items: center; color: #7fb3ff; font-size: 11px; font-family: var(--mono); }
.login-art-foot { position: absolute; bottom: 28px; left: 8vw; color: #627387; font-size: 10px; letter-spacing: 3px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 40px 7vw; }
.login-card { width: 100%; max-width: 390px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px; box-shadow: 0 18px 60px rgba(16,24,40,.08); }
.login-card h2 { font-size: 26px; letter-spacing: -.02em; }
.login-card > p { margin: 8px 0 28px; }
.login-card form { display: grid; gap: 16px; }
.login-hint { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); color: #98a2b3; font-size: 12px; }
.login-links { max-width: 390px; margin: 20px auto 0; width: 100%; display: flex; justify-content: space-between; color: #98a2b3; font-size: 11px; }
.inline-error { background: var(--danger-soft); color: #b91c1c; padding: 9px 12px; border-radius: 6px; font-size: 12px; }

/* layout */
.layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; background: var(--sidebar); color: #cbd5e1; display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; height: 78px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand b { display: block; color: #fff; font-size: 15px; letter-spacing: .3px; }
.sidebar-brand small { display: block; color: #718198; font-size: 8.5px; letter-spacing: 2px; margin-top: 1px; }
.nav { padding: 14px 10px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: #3b4b5e; border-radius: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; background: transparent; color: #aebccd; padding: 10px 12px; border-radius: 7px; cursor: pointer; text-align: left; font-size: 13.5px; position: relative; margin-bottom: 2px; transition: .16s; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(22,119,255,.24), rgba(22,119,255,.08)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #4096ff; }
.nav-ico { width: 18px; height: 18px; display: grid; place-items: center; opacity: .82; flex: none; }
.nav-ico svg { width: 17px; height: 17px; }
.nav-label { flex: 1; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: #faad14; box-shadow: 0 0 0 3px rgba(250,173,20,.14); }
.sidebar-foot { padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: 7px; }
.online-line { display: flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; display: inline-block; flex: none; }
.dot.green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.13); }
.dot.red { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,77,79,.13); }
.main { margin-left: 232px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 78px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 0 26px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; gap: 20px; }
.page-heading h1 { font-size: 19px; letter-spacing: -.02em; }
.page-heading p { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.chip { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 5px 9px; border-radius: 6px; font-size: 11.5px; display: inline-flex; align-items: center; gap: 7px; color: #475569; white-space: nowrap; }
.chip.ghost { background: #fff; color: #94a3b8; }
.icon-btn { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 6px; display: grid; place-items: center; cursor: pointer; color: #475569; }
.icon-btn:hover { color: var(--primary); border-color: #bfd7ff; }
.user-wrap { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 3px; color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 8px; background: #dbeafe; color: var(--primary-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-name { font-size: 12.5px; font-weight: 600; }
.caret { color: #94a3b8; font-size: 10px; }
.dropdown { position: absolute; right: 0; top: 44px; width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 40px rgba(16,24,40,.14); padding: 6px; z-index: 40; }
.dropdown-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown-head b { display: block; font-size: 13px; }
.dropdown-head span { color: var(--muted); font-size: 11px; }
.dropdown button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 5px; cursor: pointer; color: #374151; font-size: 12.5px; }
.dropdown button:hover { background: #f8fafc; }
.content { padding: 22px 26px 40px; width: 100%; max-width: 1680px; }

/* common */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-head h3 { font-size: 15.5px; letter-spacing: -.01em; }
.card-head p { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: #374151; border-radius: 6px; padding: 7px 13px; cursor: pointer; font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: #c7d2fe; color: var(--primary); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-outline { border-color: #bfd7ff; color: var(--primary); background: #fff; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { border-color: transparent; background: #f8fafc; color: #475569; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #e6393b; color: #fff; }
.btn-danger-ghost { border-color: #ffccc7; color: var(--danger); background: #fff; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-lg { padding: 11px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }
.link { border: 0; background: transparent; color: var(--primary); padding: 2px 4px; cursor: pointer; font-size: 12px; }
.link:hover { text-decoration: underline; }
.link:disabled { color: #cbd5e1; cursor: not-allowed; }
.status-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status-tag.running { color: #0b63ce; background: #e8f2ff; }
.status-tag.running .dot { background: var(--primary); }
.status-tag.stopped { color: #cf1322; background: #fff1f0; }
.status-tag.stopped .dot { background: var(--danger); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; background: #f1f5f9; color: #475569; margin-right: 4px; }
.tag-admin { background: #e8f2ff; color: #0b63ce; }
.tag-whitelist { background: var(--green-soft); color: #15803d; }
.tag-blocklist { background: var(--danger-soft); color: #b91c1c; }
.tag-manual { background: #e8f2ff; color: #0b63ce; }
.tag-pre-restore { background: var(--orange-soft); color: #b45309; }
.tag-pre-upload { background: #f5f3ff; color: #6d28d9; }
.tag-auto { background: #f1f5f9; color: #475569; }
.alert { border-radius: 7px; padding: 12px 15px; margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; font-size: 12.5px; border: 1px solid; }
.alert b { display: block; margin-bottom: 2px; }
.alert span { display: block; }
.alert-info { background: #f0f7ff; border-color: #cfe4ff; color: #1d4ed8; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-error { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.compact { padding: 9px 13px; }
.inline-input { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; min-width: 230px; outline: none; }
.inline-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
.empty { color: #98a2b3; text-align: center; padding: 34px 12px; font-size: 12.5px; }

/* fields */
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field > span { font-size: 12px; color: #475569; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dbe1e8; border-radius: 6px; padding: 9px 11px; outline: none; background: #fff; color: var(--text); transition: .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
.field textarea { resize: vertical; }
.field em { font-style: normal; color: #98a2b3; font-size: 10.5px; }
.field.inline { display: flex; align-items: center; gap: 9px; margin: 0; }
.field.inline > span { white-space: nowrap; }
.field.inline input, .field.inline select { min-width: 180px; }
.form-note { background: #f8fafc; border-left: 3px solid #bfd7ff; padding: 9px 12px; color: #64748b; font-size: 11.5px; border-radius: 0 5px 5px 0; margin: 6px 0 18px; }
.form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.page-grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; align-items: start; }
.page-grid-2 > .card + .card { margin-top: 0; }

/* dashboard */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.mini-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.stat-ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.stat-ico.blue { background: #e8f2ff; color: var(--primary); }
.stat-ico.violet { background: #f5f3ff; color: #7c3aed; }
.stat-ico.green { background: var(--green-soft); color: var(--green); }
.stat-ico.orange { background: var(--orange-soft); color: var(--orange); }
.mini-card b { font-size: 20px; line-height: 1.1; display: block; }
.mini-card small { color: var(--muted); font-size: 11px; }
.shard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.shard-card { padding: 18px 20px; }
.shard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.shard-title { display: flex; gap: 12px; align-items: center; }
.shard-glyph { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: #e8f2ff; color: var(--primary); }
.shard-glyph.caves { background: #f5f3ff; color: #7c3aed; }
.shard-title h3 { font-size: 15px; }
.shard-title small { color: var(--muted); font-size: 11px; }
.shard-meta { display: grid; grid-template-columns: .8fr .6fr 1.5fr; gap: 10px; margin: 17px 0 14px; padding: 12px 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.shard-meta small { display: block; color: #94a3b8; font-size: 10px; margin-bottom: 2px; }
.shard-meta b { font-size: 12px; font-weight: 600; }
.shard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-bottom: 16px; }
.dash-grid > .card + .card { margin-top: 0; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-tile { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 13px 14px; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 9px; text-align: left; cursor: pointer; transition: .15s; }
.action-tile span { grid-row: 1 / 3; align-self: center; color: #64748b; font-size: 16px; }
.action-tile b { font-size: 12.5px; }
.action-tile small { color: #98a2b3; font-size: 10.5px; }
.action-tile:hover { border-color: #bfd7ff; background: #fafcff; }
.action-tile.primary { background: var(--primary-soft); border-color: #bfd7ff; }
.action-tile.primary span { color: var(--primary); }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0; padding-top: 15px; border-top: 1px solid #f1f5f9; }
.restore-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 7px; padding: 10px 12px; }
.restore-row .field.inline { flex: 1; }
.restore-row select { width: 100%; }
.connect-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #0f172a; border-radius: 7px; padding: 13px 14px; margin-bottom: 15px; }
.connect-box code { color: #7dd3fc; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.server-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.server-facts div { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 6px; padding: 9px 10px; }
.server-facts small { display: block; color: #94a3b8; font-size: 10px; }
.server-facts b { font-size: 12px; }
.pending-box { margin-top: 14px; border-radius: 7px; padding: 11px 12px; background: var(--orange-soft); border: 1px solid #fde68a; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #92400e; }
.pending-box b { font-size: 12px; }
.pending-box.ok { background: var(--green-soft); border-color: #bbf7d0; color: #15803d; }
.pending-box .link { align-self: flex-start; padding-left: 0; }
.announcements { margin-top: 0; }
.announce-item { display: grid; grid-template-columns: 86px 1fr auto; gap: 14px; align-items: center; padding: 13px 4px; border-top: 1px solid #f1f5f9; color: var(--text); }
.announce-item:hover { background: #fafcff; }
.announce-date { color: #64748b; font-family: var(--mono); font-size: 11px; }
.announce-item b { font-size: 13px; display: block; }
.announce-item p { color: #64748b; font-size: 11.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.announce-source { color: #94a3b8; font-size: 10.5px; white-space: nowrap; }

/* room */
.side-info h3 { font-size: 15px; margin-bottom: 14px; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.steps li { display: flex; gap: 10px; }
.steps li::before { content: counter(list-item); width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.steps b { display: block; font-size: 12.5px; }
.steps span { color: var(--muted); font-size: 11.5px; }
.mini-preview { margin-top: 18px; background: #0f172a; border-radius: 7px; padding: 12px; overflow: auto; }
.mini-preview small { color: #64748b; font-family: var(--mono); font-size: 10px; }
.mini-preview pre { color: #cbd5e1; font-family: var(--mono); font-size: 10.5px; margin: 7px 0 0; line-height: 1.65; white-space: pre-wrap; }

/* players */
.player-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.player-add .field.inline { flex-direction: column; align-items: flex-start; gap: 5px; }
.player-add .field.inline input, .player-add .field.inline select { min-width: 200px; }
.player-ident { display: flex; align-items: center; gap: 10px; }
.player-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; background: #f1f5f9; object-fit: cover; border: 1px solid #dbe5f0; }
.player-avatar.av-wilson { background: #e8f2ff; color: #0b63ce; }
.player-avatar.av-willow { background: #fff1e8; color: #c2410c; }
.player-avatar.av-wolfgang { background: #fef3c7; color: #92400e; }
.player-avatar.av-wendy { background: #f3e8ff; color: #7e22ce; }
.player-avatar.av-wx78 { background: #ecfeff; color: #0e7490; }
.player-avatar.av-wickerbottom { background: #ecfdf5; color: #047857; }
.player-avatar.av-woodie { background: #fef2f2; color: #b91c1c; }
.player-avatar.av-wes { background: #f8fafc; color: #475569; }
.player-avatar.av-waxwell { background: #f5f3ff; color: #5b21b6; }
.player-avatar.av-wathgrithr { background: #fff7ed; color: #9a3412; }
.player-avatar.av-webber { background: #f0fdf4; color: #166534; }
.player-avatar.av-winona { background: #eff6ff; color: #1d4ed8; }
.player-avatar.av-wortox { background: #fdf2f8; color: #be185d; }
.player-avatar.av-wormwood { background: #f0fdf4; color: #15803d; }
.player-avatar.av-wurt { background: #ecfdf5; color: #0f766e; }
.player-avatar.av-walter { background: #fefce8; color: #a16207; }
.player-avatar.av-wanda { background: #f5f3ff; color: #6d28d9; }
.player-avatar.av-warly { background: #fff7ed; color: #c2410c; }
.player-avatar.av-wonkey { background: #f1f5f9; color: #334155; }
.player-actions { display: flex; gap: 2px; flex-wrap: wrap; white-space: nowrap; }
.online-card { margin-top: 14px; }
.online-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 11px; background: #e8f2ff; color: #0b63ce; font-size: 12px; margin-left: 4px; }
.online-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.online-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e8eef6; border-radius: 8px; background: #fafcff; }
.online-person .online-meta { min-width: 0; flex: 1; }
.online-person .online-meta b, .online-person .online-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-person .online-meta small { color: #64748b; font-size: 11px; margin-top: 2px; }
.online-person .status-tag { flex: 0 0 auto; }
.online-text { color: #0b8a4a; font-weight: 600; margin-right: 6px; }
.online-empty { padding: 12px 0 4px; }
.mod-board-card { margin-bottom: 14px; }
.mod-board-tabs { flex-wrap: wrap; }
.mod-board-list { display: flex; flex-direction: column; gap: 6px; }
.mod-board-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; }
.mod-board-item:hover { background: #f8fbff; }
.mod-board-item > img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; background: #eef3f8; }
.mod-board-item .rank { width: 32px; color: #94a3b8; font: 600 12px var(--mono); flex: 0 0 32px; }
.mod-board-meta { flex: 1; min-width: 0; }
.mod-board-meta b, .mod-board-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-board-meta small { color: #64748b; font-size: 11px; margin-top: 2px; }
.mod-board-item .btn { flex: 0 0 auto; }
.tabs { display: flex; gap: 2px; margin: 18px 0 10px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 10px 15px; color: #64748b; cursor: pointer; font-size: 12.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs button span { background: #f1f5f9; border-radius: 8px; padding: 0 5px; font-size: 10px; margin-left: 3px; }
.table-card { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
td code { color: #475569; font-size: 11px; }
.row-actions { display: flex; gap: 3px; align-items: center; }
.table-foot { border-top: 1px solid var(--line); padding: 9px 14px; color: #94a3b8; font-size: 11px; background: #fcfdff; }

/* mods */
.toolbar-card { padding: 13px 15px; margin-bottom: 14px; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar select { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: #fff; outline: none; font-size: 12px; }
.search-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; flex: 1; min-width: 220px; }
.search-box input { border: 0; outline: none; padding: 8px 11px; flex: 1; min-width: 90px; }
.search-box button { border: 0; background: var(--primary); color: #fff; padding: 8px 14px; cursor: pointer; font-size: 12px; }
.search-count { color: #94a3b8; font-size: 11px; padding-right: 9px; }
.risk-banner { display: flex; gap: 10px; align-items: center; background: #fff7f7; border: 1px solid #ffd8d8; border-radius: 7px; padding: 10px 14px; margin-bottom: 15px; color: #9f1239; font-size: 11.5px; }
.risk-banner b { background: var(--danger); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 10px; white-space: nowrap; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.mod-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mod-card.risk-high { border-color: #ffc9c9; }
.mod-cover { height: 128px; background: linear-gradient(135deg, #1e293b, #334155); position: relative; overflow: hidden; }
.mod-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; z-index: 1; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #93c5fd; font-size: 40px; font-weight: 800; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(59,130,246,.35), transparent 45%), linear-gradient(135deg, #1e293b, #334155); }
.risk-tag { position: absolute; left: 9px; top: 9px; padding: 2px 7px; border-radius: 4px; font-size: 10px; color: #fff; background: #64748b; }
.risk-HIGH { background: var(--danger) !important; }
.risk-MEDIUM { background: #f59e0b !important; }
.risk-LOW { background: #16a34a !important; }
.install-tag { position: absolute; right: 9px; top: 9px; padding: 2px 7px; border-radius: 4px; font-size: 10px; color: #fff; background: rgba(15,23,42,.65); }
.install-tag.on { background: rgba(22,163,74,.9); }
.mod-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.mod-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mod-head h3 { font-size: 14px; }
.workshop-id { color: #94a3b8; font-family: var(--mono); font-size: 9.5px; }
.mod-tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 7px 0; }
.mod-tags span { background: #f1f5f9; color: #64748b; font-size: 9.5px; padding: 1px 6px; border-radius: 3px; }
.mod-desc { color: #64748b; font-size: 11.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 58px; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #94a3b8; font-size: 9.5px; margin: 9px 0; }
.mod-status { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 10px; font-size: 11px; color: #64748b; }
.mod-actions { display: flex; gap: 6px; margin-top: 10px; }

/* radios */
.radio { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; color: #475569; user-select: none; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio i { width: 14px; height: 14px; border: 1px solid #cbd5e1; border-radius: 50%; display: inline-block; background: #fff; transition: .12s; flex: none; }
.radio input:checked + i { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.radio.sm { font-size: 11px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 7px 10px; margin-top: 9px; }
.radio-row.five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.radio-row.five .radio { min-width: 0; gap: 3px; font-size: 10.5px; line-height: 1.2; }
.radio-row.five .radio i { width: 12px; height: 12px; }

/* world */
.world-hero { display: flex; justify-content: space-between; gap: 24px; background: radial-gradient(circle at 85% 15%, rgba(22,119,255,.28), transparent 28%), linear-gradient(125deg, #17212c, #1f2a37 58%, #243345); border-radius: 10px; padding: 26px 28px; color: #fff; margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow); }
.eyebrow { display: block; font-family: var(--mono); color: #60a5fa; font-size: 9.5px; letter-spacing: 2.2px; margin-bottom: 8px; }
.world-hero h2 { font-size: 25px; letter-spacing: -.02em; }
.world-hero p { color: #aebccd; font-size: 12px; margin-top: 6px; max-width: 620px; }
.hero-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 15px; }
.badge { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #cbd5e1; padding: 3px 8px; border-radius: 4px; font-size: 10px; }
.badge.green { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.25); color: #86efac; }
.hero-icon-collage { display: grid; grid-template-columns: repeat(4, 58px); gap: 6px; flex: none; align-self: center; transform: rotate(-3deg); }
.hero-icon-collage img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.world-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.world-toolbar > .card + .card { margin: 0; }
.segmented { display: inline-flex; background: #f1f5f9; padding: 3px; border-radius: 6px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 4px; color: #64748b; cursor: pointer; font-size: 11.5px; }
.segmented button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(16,24,40,.1); font-weight: 600; }
.segmented.small button { padding: 4px 9px; font-size: 10.5px; }
.world-toolbar .search-box { max-width: 340px; }
.world-save { display: flex; align-items: center; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.dirty-count { color: var(--orange); background: var(--orange-soft); border: 1px solid #fde68a; padding: 2px 7px; border-radius: 4px; font-size: 10px; }
.group-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 14px; }
.group-chips button { border: 1px solid var(--line); background: #fff; color: #475569; border-radius: 20px; padding: 5px 11px; font-size: 11px; cursor: pointer; }
.group-chips button em { font-style: normal; color: #94a3b8; font-size: 9.5px; margin-left: 2px; }
.group-chips button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.group-chips button.active em { color: #60a5fa; }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 11px; }
.world-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 11px; display: flex; gap: 11px; min-height: 112px; position: relative; }
.world-card.dirty { border-color: #f6c56b; box-shadow: 0 0 0 2px rgba(246,197,107,.12); }
.world-card.disabled { opacity: .62; }
.world-img-wrap { width: 74px; height: 74px; border-radius: 7px; background: #f8fafc; border: 1px solid #eef2f7; flex: none; display: grid; place-items: center; overflow: hidden; position: relative; }
.world-img-wrap img { width: 72px; height: 72px; object-fit: contain; image-rendering: auto; }
.world-img-missing { color: #cbd5e1; font-size: 26px; }
.world-off { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15,23,42,.72); color: #fff; font-size: 8px; text-align: center; padding: 2px 0; }
.world-card-body { min-width: 0; flex: 1; }
.world-name h4 { font-size: 12.5px; display: inline; }
.world-name code { color: #94a3b8; font-size: 8.5px; display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-worlds { display: flex; gap: 3px; margin-top: 4px; }
.mini-tag { font-size: 8.5px; background: #f1f5f9; color: #64748b; border-radius: 3px; padding: 1px 5px; }
.mini-tag.dirty-tag { background: var(--orange-soft); color: var(--orange); }
.mini-tag.server-tag { background: #e8f2ff; color: #0b63ce; }
.world-select { width: 100%; margin-top: 8px; border: 1px solid #dbe1e8; border-radius: 5px; padding: 5px 7px; font-size: 10.5px; color: #475569; background: #fff; }

/* logs */
.log-card { padding: 14px; }
.log-card .toolbar { margin-bottom: 11px; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; cursor: pointer; }
.log-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: #94a3b8; margin-left: auto; }
.log-conn .dot { background: #94a3b8; }
.log-conn.on { color: var(--green); }
.log-conn.on .dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.14); }
.terminal { background: #0b1220; border: 1px solid #1e293b; border-radius: 7px; min-height: 58vh; max-height: 66vh; overflow: auto; padding: 12px 0; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; }
.terminal.small { min-height: 360px; max-height: 440px; }
.log-line { color: #b7c4d6; white-space: pre-wrap; word-break: break-all; padding: 0 14px; }
.log-line:hover { background: rgba(255,255,255,.03); }
.log-line.err { color: #fca5a5; }
.log-line.warn { color: #fcd34d; }
.log-line.ok { color: #86efac; }
.log-no { display: inline-block; width: 32px; color: #334155; user-select: none; }
.log-empty { color: #475569; padding: 30px 14px; }
.terminal-foot { display: flex; justify-content: space-between; color: #94a3b8; font-size: 10px; padding: 9px 3px 0; }
.terminal::-webkit-scrollbar { width: 7px; }
.terminal::-webkit-scrollbar-thumb { background: #334155; border-radius: 6px; }

/* update */
.danger-pill { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; border-radius: 4px; padding: 2px 8px; font-size: 10px; }
.update-steps { list-style: none; padding: 0; margin: 5px 0 18px; display: grid; gap: 9px; }
.update-steps li { display: flex; align-items: center; gap: 12px; border: 1px solid #eef2f7; border-radius: 7px; padding: 10px 12px; background: #fcfdff; }
.update-steps li > span { width: 25px; height: 25px; border-radius: 50%; background: #f1f5f9; color: #94a3b8; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.update-steps li b { font-size: 12px; display: block; }
.update-steps li small { color: #94a3b8; font-size: 10.5px; }
.update-steps li.active { border-color: #bfd7ff; background: var(--primary-soft); }
.update-steps li.active > span { background: var(--primary); color: #fff; }
.update-steps li.done { border-color: #bbf7d0; background: var(--green-soft); }
.update-steps li.done > span { background: var(--green); color: #fff; }

/* config */
.config-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 15px; align-items: start; }
.config-files { padding: 13px; }
.config-files h3 { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .6px; margin: 3px 6px 10px; }
.config-files button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 5px; color: #475569; cursor: pointer; font-size: 11px; }
.config-files button:hover { background: #f8fafc; }
.config-files button.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.file-glyph { width: 20px; height: 20px; border-radius: 4px; background: #eef2f7; color: #64748b; display: grid; place-items: center; font-family: var(--mono); font-size: 9px; flex: none; }
.config-files button.active .file-glyph { background: #dbeafe; color: var(--primary); }
.config-editor { padding: 16px; }
.editor-wrap { position: relative; display: flex; background: #0f172a; border-radius: 7px; overflow: hidden; border: 1px solid #1e293b; }
.line-numbers { margin: 0; padding: 12px 8px; width: 42px; text-align: right; color: #475569; background: #0b1220; font-family: var(--mono); font-size: 11px; line-height: 1.65; user-select: none; overflow: hidden; border-right: 1px solid #1e293b; }
.editor-wrap textarea { flex: 1; min-height: 58vh; background: #0f172a; color: #dbeafe; border: 0; outline: none; resize: vertical; padding: 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.65; white-space: pre; overflow: auto; }
.code-editor { width: 100%; min-height: 400px; background: #0f172a; color: #dbeafe; border: 1px solid #1e293b; border-radius: 7px; padding: 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.65; outline: none; resize: vertical; }

/* archives */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin-top: 14px; }
.archive-card.active { border-color: #bfd7ff; box-shadow: 0 0 0 2px rgba(22,119,255,.08); }
.archive-head { display: flex; align-items: center; gap: 11px; }
.archive-icon { width: 42px; height: 42px; border-radius: 8px; background: #f1f5f9; color: #64748b; display: grid; place-items: center; font-size: 18px; }
.archive-head h3 { font-size: 14px; }
.archive-head small { color: var(--muted); font-size: 10.5px; }
.archive-head .status-tag { margin-left: auto; }
.archive-meta { display: flex; gap: 13px; color: #94a3b8; font-size: 10.5px; margin: 13px 0; padding-top: 11px; border-top: 1px solid #f1f5f9; }
.archive-actions { display: flex; gap: 8px; align-items: center; }

/* cloud */
.cloud-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: start; }
.cloud-head { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.cloud-logo { width: 46px; height: 46px; border-radius: 10px; background: linear-gradient(135deg, #1677ff, #60a5fa); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.cloud-head h3 { font-size: 15px; }
.cloud-head small { color: var(--muted); font-size: 10.5px; }
.cloud-head .status-tag { margin-left: auto; }
.cloud-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.cloud-meta div { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 6px; padding: 10px; }
.cloud-meta small { display: block; color: #94a3b8; font-size: 10px; }
.cloud-meta b { font-size: 12.5px; }
.cloud-message { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 9px 11px; border-radius: 6px; font-size: 11.5px; margin-bottom: 12px; }
.cloud-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cloud-foot { margin-top: 14px; color: #94a3b8; font-size: 10.5px; border-top: 1px solid #f1f5f9; padding-top: 11px; }
.config-list { display: grid; gap: 8px; margin: 15px 0; }
.config-list div { display: flex; flex-direction: column; background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 6px; padding: 8px 10px; }
.config-list code { color: var(--primary); font-size: 10.5px; }
.config-list span { color: #64748b; font-size: 10.5px; }

/* search */
.search-hero { background: linear-gradient(125deg, #17212c, #1f2a37 60%, #25344a); border: 0; color: #fff; padding: 26px 28px; margin-bottom: 15px; }
.search-hero h2 { font-size: 25px; letter-spacing: -.02em; }
.search-hero p { color: #aebccd; font-size: 12px; margin: 6px 0 18px; }
.big-search { display: flex; gap: 8px; max-width: 800px; }
.big-search input { flex: 1; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff; border-radius: 7px; padding: 11px 14px; outline: none; }
.big-search input::placeholder { color: #7b8ca1; }
.big-search input:focus { border-color: #60a5fa; background: rgba(255,255,255,.12); }
.category-chips { display: flex; gap: 6px; margin-top: 13px; flex-wrap: wrap; }
.category-chips button { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #cbd5e1; border-radius: 20px; padding: 4px 13px; cursor: pointer; font-size: 11px; }
.category-chips button.active { background: #fff; color: #0f172a; border-color: #fff; font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.result-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .16s; }
.result-card:hover { transform: translateY(-2px); border-color: #bfd7ff; box-shadow: 0 12px 30px rgba(16,24,40,.09); }
.result-thumb { height: 128px; background: linear-gradient(135deg, #e2e8f0, #f8fafc); display: grid; place-items: center; color: #94a3b8; font-weight: 800; font-size: 30px; overflow: hidden; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-body { padding: 13px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.result-source { display: flex; justify-content: space-between; gap: 8px; font-size: 9.5px; color: #94a3b8; margin-bottom: 6px; }
.result-cat { background: #f1f5f9; color: #64748b; padding: 0 5px; border-radius: 3px; }
.result-body h3 { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-body p { color: #64748b; font-size: 11px; line-height: 1.7; margin: 7px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.open-link { color: var(--primary); font-size: 10.5px; }
.source-note { color: #94a3b8; font-size: 10px; line-height: 1.7; margin-top: 15px; }

/* mod config */
.installed-list { display: grid; gap: 7px; }
.installed-item { display: flex; align-items: center; gap: 9px; border: 1px solid #f1f5f9; border-radius: 6px; padding: 8px; }
.mini-cover { width: 32px; height: 32px; border-radius: 5px; background: #e8f2ff; color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.installed-item b { font-size: 11.5px; display: block; }
.installed-item small { color: #94a3b8; font-size: 9.5px; }
.installed-item .risk-tag { position: static; margin-left: auto; }

/* modals */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 520px; max-width: 100%; max-height: 90vh; overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.small { width: 430px; }
.modal.wide { width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-head .icon-btn { border: 0; font-size: 20px; line-height: 1; }
.modal-body { padding: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 19px; border-top: 1px solid var(--line); background: #fcfdff; border-radius: 0 0 10px 10px; }
.file-drop { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; background: #fafcff; }
.file-drop.has { border-color: var(--primary); background: var(--primary-soft); }
.file-drop input { display: none; }
.file-ico { width: 44px; height: 44px; border-radius: 8px; background: #e2e8f0; color: #64748b; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; }
.file-drop b { font-size: 12px; }
.file-drop small { color: #94a3b8; font-size: 10px; }
.user-create { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 15px; }
.user-create input, .user-create select { border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; font-size: 11.5px; outline: none; }
.user-create input { width: 150px; }
.user-table { width: 100%; }
.user-table select { border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; font-size: 11px; }
.switch { display: inline-block; position: relative; width: 32px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(14px); }

/* toasts */
.toast-stack { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: 380px; }
.toast { background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 36px rgba(16,24,40,.16); padding: 11px 12px; display: flex; align-items: flex-start; gap: 9px; font-size: 12px; animation: slidein .18s ease; }
.toast > span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; flex: none; }
.toast-success > span { background: var(--green); }
.toast-error > span { background: var(--danger); }
.toast-info > span { background: var(--primary); }
.toast > div { flex: 1; line-height: 1.6; }
.toast button { border: 0; background: transparent; color: #94a3b8; cursor: pointer; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1180px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .dash-grid, .page-grid-2, .cloud-grid { grid-template-columns: 1fr; }
  .hero-icon-collage { grid-template-columns: repeat(3, 54px); }
  .hero-icon-collage img { width: 54px; height: 54px; }
  .world-hero { flex-direction: column; }
}
.top-logout { margin-left: 2px; color: #64748b; }
@media (max-width: 900px) {
  .top-logout { display: none; }
  .sidebar { width: 72px; }
  .sidebar-brand { padding: 0 14px; }
  .sidebar-brand div, .nav-label, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 11px; }
  .nav-item.active::before { left: -10px; }
  .main { margin-left: 72px; }
  .topbar { padding: 0 14px; }
  .page-heading p, .top-actions .chip.ghost { display: none; }
  .content { padding: 14px; }
  .shard-grid, .config-layout { grid-template-columns: 1fr; }
  .config-files { max-height: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; }
  .world-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .user-name { display: none; }
}
@media (max-width: 600px) {
  .stat-row, .shard-grid { grid-template-columns: 1fr; }
  .top-actions .chip:first-child { display: none; }
  .action-grid { grid-template-columns: 1fr; }
  .world-toolbar .search-box { max-width: none; width: 100%; }
  .world-save { margin-left: 0; }
}
