/* MineNetworkManagement Panel – Author: Sintrax */
:root {
    --bg: #0d1117;
    --bg-2: #121821;
    --panel: #161d28;
    --panel-2: #1c2533;
    --border: #263142;
    --text: #e6edf3;
    --muted: #8b98a9;
    --accent: #31c48d;
    --accent-2: #23a676;
    --accent-soft: rgba(49, 196, 141, .14);
    --danger: #f25f5c;
    --danger-soft: rgba(242, 95, 92, .14);
    --warn: #f5b649;
    --warn-soft: rgba(245, 182, 73, .14);
    --info: #58a6ff;
    --info-soft: rgba(88, 166, 255, .14);
    --radius: 10px;
    --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    padding: 18px 12px;
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-logo { width: 36px; height: 36px; border-radius: 9px; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 20px; }
.login-brand img { border-radius: 22px; box-shadow: 0 18px 50px rgba(64, 160, 250, .25), 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-name { font-weight: 700; line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 28px; border-bottom: 1px solid var(--border); background: var(--bg);
    position: sticky; top: 0; z-index: 5;
}
.content { padding: 24px 28px 48px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.menu-toggle { display: none; }

/* ------------------------------------------------------------ components */
.card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.groups-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { min-width: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; padding: 7px 13px; font: inherit; font-weight: 550; cursor: pointer;
    transition: background .12s, border-color .12s; white-space: nowrap;
}
.btn:hover { background: #233044; border-color: #33425a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06130d; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn svg { width: 15px; height: 15px; }

.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px;
    font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.pulse::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .015); }
td.actions { text-align: right; white-space: normal; min-width: 120px; }
td.actions .btn { margin: 2px 0 2px 4px; }

.bar { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.warn > span { background: var(--warn); }
.bar.err > span { background: var(--danger); }
.meter { display: flex; flex-direction: column; gap: 5px; }
.meter-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.banner {
    display: flex; gap: 14px; align-items: center; padding: 13px 16px; border-radius: var(--radius);
    border: 1px solid var(--warn); background: var(--warn-soft); margin-bottom: 18px; flex-wrap: wrap;
}
.banner.err { border-color: var(--danger); background: var(--danger-soft); }

.group-card { display: flex; flex-direction: column; gap: 12px; }
.group-card .kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 13px; }
.group-card .kv span:nth-child(odd) { color: var(--muted); }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--panel-2); color: var(--muted); font-weight: 600; }
.tag.accent { color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------ forms */
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 550; }
label.field small { color: var(--muted); font-weight: 400; }
input, select, textarea {
    background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 11px; font: inherit; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { font-family: var(--mono); font-size: 12.5px; min-height: 70px; resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-top: 6px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.preset {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer;
    background: var(--bg-2); text-align: left; color: var(--text); font: inherit;
}
.preset:hover, .preset.active { border-color: var(--accent); background: var(--accent-soft); }
.preset b { display: block; margin-bottom: 2px; }
.preset span { font-size: 12px; color: var(--muted); }
.ram-row { display: flex; gap: 10px; align-items: center; }
.ram-row input[type=range] { flex: 1; padding: 0; accent-color: var(--accent); }
.ram-row output { min-width: 70px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
details.advanced summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 4px 0; }
details.advanced[open] summary { margin-bottom: 12px; }

/* ------------------------------------------------------------ modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(2, 6, 12, .72); display: grid; place-items: start center;
    padding: 6vh 16px; z-index: 50; overflow-y: auto;
}
.modal {
    background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 560px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }

.copy-box { display: flex; gap: 8px; }
.copy-box code {
    flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
    overflow-x: auto; white-space: nowrap;
}

/* ------------------------------------------------------------ toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast {
    background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
    padding: 10px 14px; border-radius: 8px; max-width: 380px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    animation: fade .15s;
}
.toast.err { border-left-color: var(--danger); }

/* ------------------------------------------------------------ console */
.console {
    background: #070a0f; border: 1px solid var(--border); border-radius: var(--radius);
    height: calc(100vh - 290px); min-height: 320px; overflow-y: auto; padding: 12px 14px;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.console .l-warn { color: var(--warn); }
.console .l-err { color: var(--danger); }
.console .l-mnm { color: var(--accent); }
.console .l-cmd { color: var(--info); }
.console-input { display: flex; gap: 8px; margin-top: 10px; }
.console-input input { font-family: var(--mono); }

/* ------------------------------------------------------------ charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-empty { height: 150px; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-item b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ files */
.files-layout { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.files-sources { display: flex; flex-direction: column; gap: 2px; padding: 12px; max-height: calc(100vh - 170px); overflow-y: auto; }
.files-sources .section-title { margin: 10px 6px 4px; }
.files-sources .section-title:first-child { margin-top: 0; }
.files-sources a { align-items: flex-start; line-height: 1.3; }
.files-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; min-width: 0; }
.file-name { display: inline-flex; align-items: center; gap: 8px; color: var(--text); overflow-wrap: anywhere; }
#files-table td:first-child { min-width: 220px; }
@media (max-width: 1100px) {
    .files-layout { grid-template-columns: 1fr; }
    .files-sources { max-height: 260px; }
}
.file-name svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.file-name:hover { color: var(--accent); text-decoration: none; }
#files-drop.dragging { outline: 2px dashed var(--accent); outline-offset: 4px; }
textarea.editor { min-height: 60vh; font-size: 13px; line-height: 1.5; tab-size: 2; white-space: pre; }

/* ------------------------------------------------------------ login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
    background: radial-gradient(1200px 500px at 50% -10%, rgba(49, 196, 141, .12), transparent); }
.login { width: 100%; max-width: 380px; }
.login .brand { justify-content: center; padding-bottom: 22px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .presets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 240px; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; }
    .menu-toggle { display: inline-flex; }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .grid-3, .grid-2, .form-grid, .files-layout { grid-template-columns: 1fr; }
    .files-sources { max-height: 240px; }
}
@media (max-width: 520px) {
    .grid-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ persistence (dauerhaft / temporär) */
.persist {
    display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; line-height: 1;
    padding: 3px 7px 3px 6px; border-radius: 5px; vertical-align: 1px; cursor: help; white-space: nowrap;
}
.persist svg { width: 12px; height: 12px; }
.persist-static { color: var(--info); background: var(--info-soft); }
.persist-temp { color: var(--warn); background: var(--warn-soft); }
.persist-legend {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-bottom: 14px;
    padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
    font-size: 12.5px; color: var(--muted);
}
.persist-legend > div { display: flex; gap: 9px; align-items: flex-start; }
.persist-legend b { color: var(--text); font-weight: 600; }
.persist-note {
    display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted);
    padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid rgba(245, 182, 73, .25);
}
.persist-note.is-static { background: var(--info-soft); border-color: rgba(88, 166, 255, .25); }
.persist-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.persist-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.persist-option { position: relative; cursor: pointer; }
.persist-option input { position: absolute; opacity: 0; pointer-events: none; }
.persist-option-body {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
    font-size: 12.5px; color: var(--muted); transition: border-color .12s, background .12s;
}
.persist-option-body b { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); }
.persist-option-body b svg { width: 16px; height: 16px; }
.persist-option-body ul { margin: 2px 0; padding-left: 18px; }
.persist-option-body li { margin: 2px 0; }
.persist-option-body em { font-style: normal; color: var(--text); font-weight: 550; }
.persist-option:hover .persist-option-body { border-color: #33425a; }
.persist-option input:checked + .persist-option-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.persist-option input:focus-visible + .persist-option-body { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent) inset; }

.group-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 4px; border-top: 1px solid var(--border); padding-top: 12px; }
.group-actions .danger-row { justify-content: flex-end; }
.btn.is-on { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }

/* ------------------------------------------------------------ team area */
.tabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 550;
    border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a svg { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.role-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; white-space: nowrap;
    font-size: 12px; font-weight: 650; color: var(--role);
    background: color-mix(in srgb, var(--role) 15%, transparent); border: 1px solid color-mix(in srgb, var(--role) 35%, transparent);
}
.role-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--role); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
    font-weight: 750; font-size: 15px; color: var(--role);
    background: color-mix(in srgb, var(--role) 16%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--role) 40%, transparent);
}

.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.member { display: flex; flex-direction: column; gap: 10px; }
.member-name { min-width: 0; }
.member-name b { overflow-wrap: anywhere; }
.member-note { margin: 0; font-size: 13px; color: var(--muted); padding: 8px 10px; background: var(--bg-2); border-radius: 8px; }
.member-meta { gap: 8px; }
.member-actions { gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }

.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.role-card { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--role); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--role); box-shadow: 0 0 0 4px color-mix(in srgb, var(--role) 18%, transparent); }
.role-desc { margin: 0; color: var(--muted); font-size: 13px; }
.perm-all { font-size: 13px; font-weight: 600; color: var(--role); padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--role) 12%, transparent); }
.perm-list { display: flex; flex-direction: column; gap: 7px; }
.perm-cat { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: start; font-size: 12px; }
.perm-cat > span { color: var(--muted); font-weight: 600; padding-top: 2px; }
.perm-cat > div { display: flex; flex-wrap: wrap; gap: 4px; }
.perm-chip { font-size: 11.5px; padding: 2px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border); cursor: help; }
.perm-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.perm-editor fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 9px; background: var(--bg-2); }
.perm-editor legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.scoped svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--info); }
.role-hint { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.5; min-height: 20px; }

.board { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.post { display: flex; flex-direction: column; gap: 10px; border-left: 3px solid var(--info); }
.post-important { border-left-color: var(--danger); }
.post-maintenance { border-left-color: var(--warn); }
.post h3 { font-size: 16px; }
.post-text { color: var(--text); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.post footer { gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 980px) {
    .perm-editor { grid-template-columns: 1fr; }
    .members, .roles { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ accessibility & polish */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.btn:focus-visible { outline-offset: 1px; }
td, .stat-value, .kv { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ tables as cards on narrow screens */
@media (max-width: 1100px) {
    .table-wrap { overflow: visible; border: 0; background: transparent; }
    .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
    .table-wrap thead { display: none; }
    .table-wrap tr {
        background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 8px 14px; margin-bottom: 10px;
    }
    .table-wrap td { border: 0; padding: 6px 0 6px 118px; position: relative; min-height: 30px; }
    .table-wrap td::before {
        content: attr(data-label); position: absolute; left: 0; top: 8px; width: 108px;
        color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    }
    .table-wrap td:not([data-label]), .table-wrap td[data-label=""], .table-wrap td:first-child, .table-wrap td[colspan] { padding-left: 0; }
    .table-wrap td:not([data-label])::before, .table-wrap td[data-label=""]::before, .table-wrap td:first-child::before { display: none; }
    .table-wrap td:first-child { padding-top: 4px; font-size: 15px; }
    .table-wrap td.actions { padding-left: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; white-space: normal; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
    .table-wrap td.actions::before { display: none; }
    .table-wrap td.actions .btn { margin-left: 0; }
    #files-table td:first-child { min-width: 0; }
    .topbar { gap: 8px; }
    .hide-mobile, .btn-label { display: none; }
    .topbar .btn-sm { padding: 6px 8px; }
    .persist-legend, .persist-choice { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ two factor */
.qr-box { width: 200px; height: 200px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 10px; }
.qr-box svg { width: 100%; height: 100%; display: block; }

/* icons: 16 px by default (attribute), components override the size; inline icons sit on the text baseline */
svg.i { flex: none; }
p svg.i, small svg.i, .muted svg.i, .section-title svg.i { width: 14px; height: 14px; vertical-align: -2px; }

/* ------------------------------------------------------------ help boxes */
details.help {
    margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(88, 166, 255, .06), transparent 70%), var(--panel);
}
details.help > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
    padding: 11px 16px; font-weight: 600; color: var(--info); user-select: none;
}
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::after { content: "›"; margin-left: auto; font-size: 18px; line-height: 1; transition: transform .15s; color: var(--muted); }
details.help[open] > summary::after { transform: rotate(90deg); }
details.help > summary svg { width: 17px; height: 17px; }
.help-body { padding: 2px 16px 16px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; }
.help-grid .help-wide { grid-column: 1 / -1; }
.help-grid h4 { margin: 0 0 4px; font-size: 13.5px; }
.help-grid p, .help-grid ul { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.help-grid ul { padding-left: 18px; }
.help-grid li { margin: 2px 0; }
.help-grid b { color: var(--text); font-weight: 600; }
@media (max-width: 980px) { .help-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ players (moderation) */
.player-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.player-link .avatar { width: 30px; height: 30px; font-size: 13px; }
.player-link:hover { text-decoration: none; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    font: inherit; font-size: 12.5px; padding: 4px 11px; border-radius: 99px; cursor: pointer;
    background: var(--bg-2); color: var(--text); border: 1px solid var(--border); transition: border-color .12s, background .12s;
}
.chip:hover { border-color: #33425a; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); align-self: flex-start; flex-wrap: wrap; }
.seg-btn { font: inherit; font-weight: 600; padding: 7px 16px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 8px rgba(0, 0, 0, .3); }
.field > span small { display: block; color: var(--muted); font-weight: 400; }
div.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 550; }
.mc-disconnect {
    margin-top: 8px; padding: 26px 18px; border-radius: 8px; text-align: center; line-height: 1.7;
    font-family: var(--mono); font-size: 13.5px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .75);
    background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), repeating-conic-gradient(#4a3423 0 25%, #3d2b1d 0 50%) 0 0 / 32px 32px;
    border: 1px solid #000;
}
.preview .mc-chat { margin-top: 8px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head .avatar { width: 52px; height: 52px; font-size: 22px; }
.profile-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.profile-stats > div { background: var(--bg-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.profile-stats b { font-weight: 600; overflow-wrap: anywhere; }
.profile-actions { gap: 6px; }
.profile-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.timeline li.is-active::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.note { padding: 9px 11px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); margin-top: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.note .btn svg { width: 13px; height: 13px; }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.note-form textarea { font-family: inherit; min-height: 64px; }
.note-form .btn { align-self: flex-end; }
@media (max-width: 980px) {
    .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-cols { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ setup assistant */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--border); }
.step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11.5px; background: var(--panel-2); }
.step.current { color: var(--text); border-color: var(--accent); }
.step.current span { background: var(--accent); color: #06130d; }
.step.done span { background: var(--accent-soft); color: var(--accent); }
.setup-hero { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(88, 166, 255, .12), transparent 70%), var(--bg-2); border: 1px solid var(--border); }
.setup-hero.ok { background: linear-gradient(135deg, rgba(49, 196, 141, .14), transparent 70%), var(--bg-2); }
.setup-hero > svg { width: 34px; height: 34px; color: var(--info); flex: none; }
.setup-hero.ok > svg { color: var(--accent); }
.setup-hero h3 { font-size: 17px; margin-bottom: 4px; }
.setup-hero p { margin: 0; }
.setup-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.setup-facts > div { padding: 10px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.setup-facts span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.setup-check { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.setup-parts { display: flex; flex-direction: column; gap: 8px; }
.setup-part { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; transition: border-color .12s, background .12s; }
.setup-part.on { border-color: var(--accent); background: var(--accent-soft); }
.setup-part input[type=checkbox] { width: auto; accent-color: var(--accent); }
.setup-part .row { gap: 8px; }
.setup-ram select { width: 110px; }
.setup-meter { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.setup-meter.over { border-color: var(--danger); }
.setup-list { display: flex; flex-direction: column; gap: 8px; }
.setup-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.setup-item > svg { width: 20px; height: 20px; color: var(--info); flex: none; }
.setup-item input[type=checkbox] { width: auto; accent-color: var(--accent); }
.setup-summary { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 980px) { .setup-facts { grid-template-columns: 1fr; } .setup-part { flex-wrap: wrap; } }

/* minecraft chat preview */
.mc-chat {
    font-family: var(--mono); font-size: 13.5px; padding: 10px 12px; border-radius: 8px; line-height: 1.55;
    background: rgba(0, 0, 0, .55); border: 1px solid var(--border); text-shadow: 1px 1px 0 rgba(0, 0, 0, .7);
}
