:root {
  --ink: #000000;
  --on-ink: #ffffff;
  --on-primary: #ffffff;
  --canvas-night: #000000;
  --canvas-night-elevated: #0a0a0a;
  --canvas-light: #ffffff;
  --canvas-cream: #fbfbf5;
  --surface-elevated-dark: #1e2c31;
  --shade-30: #d4d4d8;
  --shade-40: #a1a1aa;
  --shade-50: #71717a;
  --shade-60: #52525b;
  --shade-70: #3f3f46;
  --hairline-light: #e4e4e7;
  --hairline-dark: #1e2c31;
  --aloe-10: #c1fbd4;
  --pistachio-10: #d4f9e0;
  --link-cool-1: #9dabad;
  --link-cool-2: #9797a2;
  --link-cool-3: #bdbdca;
  --link-mint: #99b3ad;
  --warn: #f59e0b;
  --error: #ef4444;
  --radius-xs: 4px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  --shadow-card: 0 8px 8px rgba(0,0,0,0.1), 0 4px 4px rgba(0,0,0,0.1), 0 2px 2px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.1);
  --shadow-modal: 0 25px 50px -12px rgba(0,0,0,0.25);
  --font-display: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Cascadia Mono", monospace;
}

/* Dark track (cinematic). Light track is the default above. */
[data-theme="dark"] {
  --ink: #f4f4f5;
  --on-ink: #0a0a0a;
  --canvas-night: #050505;
  --canvas-night-elevated: #101012;
  --canvas-light: #0e0e10;
  --canvas-cream: #000000;
  --shade-30: #232326;
  --shade-40: #9d9da5;
  --shade-50: #a8a8b0;
  --shade-60: #b5b5bc;
  --shade-70: #c8c8cf;
  --hairline-light: #26262a;
  --hairline-dark: #2a2a2e;
  --aloe-10: #1b3b26;
  --pistachio-10: #1e3f2c;
  --shadow-card: 0 8px 8px rgba(0,0,0,0.5), 0 4px 4px rgba(0,0,0,0.5), 0 2px 2px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.6);
  --shadow-modal: 0 25px 50px -12px rgba(0,0,0,0.7);
}
[data-theme="dark"] .topbar { background: rgba(10,10,12,0.85); }
[data-theme="dark"] .input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.12); }
[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,0.65); }
[data-theme="dark"] .pill-amber { color: #fbbf24; background: rgba(245,158,11,0.12); }
[data-theme="dark"] .pill-mint { color: #c1fbd4; background: rgba(193,251,212,0.08); }
[data-theme="dark"] .toast { border-color: var(--hairline-dark); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { border-color: var(--canvas-night); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--canvas-cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 420;
  line-height: 1.5;
  font-feature-settings: "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--aloe-10); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--shade-30); border-radius: var(--radius-pill); border: 2px solid var(--canvas-cream); }
::-webkit-scrollbar-thumb:hover { background: var(--shade-40); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Typography ---------- */
.display { font-family: var(--font-display); font-weight: 330; letter-spacing: 0; }
.display-xl { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; font-weight: 330; letter-spacing: 0; }
.display-md { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.14; font-weight: 330; }
.heading-xl { font-size: 28px; font-weight: 500; line-height: 1.28; letter-spacing: 0.42px; }
.heading-lg { font-size: 24px; font-weight: 400; line-height: 1.14; letter-spacing: 0.36px; }
.heading-md { font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: 0.3px; }
.heading-sm { font-size: 18px; font-weight: 500; line-height: 1.25; letter-spacing: 0.72px; }
.body-lg { font-size: 18px; font-weight: 550; line-height: 1.56; }
.body-strong { font-weight: 550; }
.caption { font-size: 14px; font-weight: 500; line-height: 1.49; letter-spacing: 0.28px; }
.micro { font-size: 13px; font-weight: 500; line-height: 1.5; letter-spacing: -0.13px; }
.eyebrow { font-size: 12px; font-weight: 400; line-height: 1.2; letter-spacing: 0.72px; text-transform: uppercase; }
.mono { font-family: var(--font-mono); font-size: 14px; line-height: 1.5; }

.muted { color: var(--shade-50); }
.muted-2 { color: var(--shade-40); }

/* ---------- Layout ---------- */
.app { max-width: 1320px; margin: 0 auto; padding: 0 24px 96px; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-light);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: baseline; gap: 8px; cursor: pointer; user-select: none; }
.brand .mark { font-family: var(--font-display); font-weight: 330; font-size: 24px; letter-spacing: 1.2px; }
.brand .dot { width: 9px; height: 9px; border-radius: var(--radius-pill); background: var(--ink); align-self: center; }
.brand .sub { font-size: 12px; font-weight: 400; letter-spacing: 2.4px; text-transform: uppercase; color: var(--shade-40); }

.nav-tabs { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav-tab {
  padding: 8px 16px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500;
  color: var(--shade-50); cursor: pointer; border: 1px solid transparent; background: transparent;
  transition: all .15s ease;
}
.nav-tab:hover { color: var(--ink); background: var(--shade-30); opacity: .6; }
.nav-tab.active { color: var(--ink); background: var(--canvas-light); border-color: var(--hairline-light); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons (pill only) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-pill); border: none; cursor: pointer;
  font-size: 15px; font-weight: 550; line-height: 1.4; letter-spacing: 0.1px;
  padding: 10px 22px; white-space: nowrap;
  transition: all .16s ease; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover:not(:disabled) { background: var(--shade-70); }
.btn-outline { background: var(--canvas-light); color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); }
.btn-outline-shade { background: var(--canvas-light); color: var(--ink); border: 1px solid var(--shade-30); }
.btn-outline-shade:hover:not(:disabled) { border-color: var(--ink); }
.btn-aloe { background: var(--aloe-10); color: var(--ink); }
.btn-aloe:hover:not(:disabled) { background: #a9f4c2; }
.btn-ghost { background: transparent; color: var(--shade-50); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: var(--shade-30); opacity: .7; }
.btn-danger { background: var(--canvas-light); color: var(--error); border: 1px solid var(--error); }
.btn-danger:hover:not(:disabled) { background: var(--error); color: var(--on-ink); }
.btn-white { background: var(--canvas-light); color: var(--ink); }
.btn-white:hover:not(:disabled) { background: var(--shade-30); }
.btn-night { background: var(--canvas-night); color: var(--on-primary); border: 1px solid var(--on-primary); }
.btn-night:hover:not(:disabled) { background: var(--shade-70); border-color: var(--shade-70); }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-pill); border: 1px solid var(--hairline-light);
  background: var(--canvas-light); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--shade-50); transition: all .15s ease; font-size: 15px;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Pills / chips / tags ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500; letter-spacing: 0.72px; text-transform: uppercase;
  white-space: nowrap;
}
.pill-mint { background: var(--aloe-10); color: var(--ink); }
.pill-shade { background: var(--shade-30); color: var(--ink); }
.pill-pistachio { background: var(--pistachio-10); color: var(--ink); }
.pill-night { background: var(--canvas-night); color: var(--on-primary); }
.pill-line { background: transparent; color: var(--shade-50); border: 1px solid var(--shade-30); }

.dot { width: 7px; height: 7px; border-radius: var(--radius-pill); display: inline-block; }
.dot-on { background: #22c55e; }
.dot-off { background: var(--shade-30); }
.dot-warn { background: var(--warn); }
.dot-err { background: var(--error); }
.dot.spin { background: transparent; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; width: 8px; height: 8px; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase;
}
.chip-paper { background: var(--canvas-light); color: var(--ink); border: 1px solid var(--shade-30); }
.chip-velocity { background: var(--canvas-night); color: var(--on-primary); }

/* ---------- Cards ---------- */
.card {
  background: var(--canvas-light); border-radius: var(--radius-lg);
  padding: 28px; border: 1px solid var(--hairline-light);
}
.card-soft {
  background: var(--canvas-light); border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-light);
  box-shadow: var(--shadow-card);
}
.card-aloe { background: var(--aloe-10); border-radius: var(--radius-lg); border: 1px solid transparent; }
.card-pistachio { background: var(--pistachio-10); border-radius: var(--radius-lg); border: 1px solid transparent; }
.card-night {
  background: var(--canvas-night-elevated); color: var(--on-primary);
  border-radius: var(--radius-lg); border: 1px solid var(--hairline-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.card-void {
  background: var(--canvas-night); color: var(--on-primary);
  border-radius: var(--radius-xl); padding: 0; overflow: hidden;
}

/* ---------- Server grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.server-card { cursor: pointer; position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.server-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.server-card.running { border-color: var(--ink); }
.server-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.server-card-title { font-size: 19px; font-weight: 550; letter-spacing: 0.3px; }
.server-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 11px; font-weight: 500; letter-spacing: 0.9px; text-transform: uppercase; color: var(--shade-40); }
.stat-value { font-size: 18px; font-weight: 550; font-family: var(--font-display); font-weight: 500; }
.server-card-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 13px; font-weight: 550; color: var(--shade-50); letter-spacing: 0.3px; }
.input, select.input, textarea.input {
  background: var(--canvas-light); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; font-weight: 420;
  border: 1px solid var(--hairline-light); border-radius: var(--radius-md);
  padding: 10px 12px; width: 100%; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
.input.mono { font-family: var(--font-mono); font-size: 13px; }
.input-row { display: flex; gap: 10px; align-items: flex-end; }
.input-group { display: flex; gap: 8px; }

.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 44px; height: 24px; border-radius: var(--radius-pill); background: var(--shade-30);
  position: relative; transition: background .18s ease; flex-shrink: 0;
}
.toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: var(--radius-pill); background: var(--on-ink); transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle input:checked + .track { background: var(--ink); }
.toggle input:checked + .track::after { transform: translateX(20px); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.9px; text-transform: uppercase; color: var(--shade-40);
  border-bottom: 1px solid var(--hairline-light);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--hairline-light); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--canvas-cream); }

/* ---------- Console ---------- */
.console-wrap { display: flex; flex-direction: column; height: 520px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--hairline-dark); }
.console {
  flex: 1; overflow-y: auto; background: #060606; color: #cbd5d1;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
  padding: 14px 16px; white-space: pre-wrap; word-break: break-word;
}
.console .l { display: block; }
.console .l.info { color: #cbd5d1; }
.console .l.warn { color: #fbbf24; }
.console .l.error { color: #f87171; }
.console .l.cmd { color: #8b93a7; font-style: italic; }
.console .l.time { color: #565c6b; }
.console-input-row { display: flex; background: #0c0c0c; border-top: 1px solid #1f2937; padding: 10px; gap: 8px; }
.console-input {
  flex: 1; background: #0c0c0c; color: #e5e7eb; border: 1px solid #1f2937; border-radius: var(--radius-pill);
  padding: 9px 18px; font-family: var(--font-mono); font-size: 13px; outline: none;
}
.console-input:focus { border-color: #374151; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}
.modal {
  background: var(--canvas-light); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal);
  max-width: 620px; width: 100%; max-height: 86vh; overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-head { padding: 24px 28px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 20px 28px 24px; overflow-y: auto; }
.modal-actions { padding: 0 28px 24px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  background: var(--canvas-night); color: var(--on-primary); border-radius: var(--radius-lg);
  padding: 14px 18px; font-size: 14px; font-weight: 450; box-shadow: var(--shadow-modal);
  animation: toast-in .25s ease; border: 1px solid var(--hairline-dark);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.ok { background: var(--aloe-10); color: var(--ink); }
.toast.err { background: var(--canvas-light); color: var(--error); border-color: var(--error); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Wizard ---------- */
.wizard {
  min-height: 100vh; background: var(--canvas-night); color: var(--on-primary);
  font-feature-settings: "ss03";
  display: flex; flex-direction: column;
}
.wizard-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; }
.wizard-nav .brand .mark { color: var(--on-primary); }
.wizard-nav .brand .dot { background: var(--on-primary); }
.wizard-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 24px 40px 80px; }
.wizard-card { max-width: 720px; width: 100%; }
.wizard-eyebrow { color: var(--link-cool-2); }
.wizard-title { font-size: clamp(40px, 6vw, 62px); font-weight: 330; line-height: 1.05; letter-spacing: 1.2px; margin: 18px 0 16px; }
.wizard-sub { color: var(--link-cool-1); font-size: 17px; font-weight: 420; line-height: 1.6; max-width: 620px; }
.wizard-step-card {
  margin-top: 36px; background: var(--canvas-night-elevated); border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-xl); padding: 30px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.wizard-section-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--link-cool-2); margin: 22px 0 10px; }
.wizard-section-label:first-child { margin-top: 0; }
.wizard-input {
  background: #0d0d0d; color: var(--on-primary); border: 1px solid #232323;
  border-radius: var(--radius-md); padding: 12px 14px; width: 100%; font-size: 15px; outline: none; font-family: var(--font-body);
}
.wizard-input:focus { border-color: var(--on-primary); }
select.wizard-input { appearance: auto; }
.wizard-actions { display: flex; gap: 12px; margin-top: 28px; justify-content: space-between; align-items: center; }
.wizard-actions .grp { display: flex; gap: 12px; }
.wizard-row { display: flex; gap: 12px; align-items: center; }
.wizard-server {
  display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid #222;
  border-radius: var(--radius-lg); background: #0d0d0d; margin-bottom: 10px;
}
.wizard-server .meta { flex: 1; min-width: 0; }
.wizard-progress {
  height: 6px; background: #1a1a1a; border-radius: var(--radius-pill); overflow: hidden; margin: 18px 0;
}
.wizard-progress .bar { height: 100%; background: var(--on-primary); width: 0; transition: width .3s ease; border-radius: var(--radius-pill); }
.wizard-log {
  background: #060606; border: 1px solid #1c1c1c; border-radius: var(--radius-md);
  padding: 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  height: 280px; overflow-y: auto; color: #94a3b8; white-space: pre-wrap;
}
.wizard-log .ok { color: var(--aloe-10); }
.wizard-log .err { color: #f87171; }
.wizard-footer { padding: 24px 40px; border-top: 1px solid #141414; display: flex; justify-content: space-between; align-items: center; color: var(--link-cool-2); font-size: 13px; }

/* ---------- Misc ---------- */
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-col { display: flex; flex-direction: column; gap: 8px; }
.gap-sm { gap: 6px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 18px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.banner-band {
  background: var(--pistachio-10); border-radius: var(--radius-lg);
  padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline-light); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--shade-50);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.empty {
  border: 1px dashed var(--shade-30); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; color: var(--shade-40);
}

.progress-bar { height: 6px; background: var(--shade-30); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar .bar { height: 100%; background: var(--ink); transition: width .3s ease; }

.file-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.file-row:hover { background: var(--canvas-cream); }
.file-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-row .meta { color: var(--shade-40); font-size: 12px; font-family: var(--font-mono); }

.player-row { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--hairline-light); }
.player-row:last-child { border-bottom: none; }

.plugin-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--hairline-light); }
.plugin-row:last-child { border-bottom: none; }

.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.result-card { display: flex; flex-direction: column; gap: 10px; }
.result-card .icon { width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--canvas-cream); overflow: hidden; flex-shrink: 0; }
.result-card .icon img { width: 100%; height: 100%; object-fit: cover; }

.kbd { font-family: var(--font-mono); font-size: 12px; background: var(--canvas-cream); border: 1px solid var(--hairline-light); border-bottom-width: 2px; border-radius: var(--radius-xs); padding: 1px 6px; }

/* ---- player / file / plugin component bits ---- */
.file-ic { width: 18px; text-align: center; color: var(--shade-40); display: inline-flex; justify-content: center; flex-shrink: 0; }
.file-ic svg { vertical-align: middle; }

.phead { width: 32px; height: 32px; border-radius: 6px; background: var(--canvas-cream); overflow: hidden; flex-shrink: 0; }
.phead img { width: 100%; height: 100%; object-fit: cover; display: block; }

.player-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--hairline-light); border-radius: var(--radius-pill); background: var(--canvas-cream); font-size: 13px; }
.player-chip .phead { width: 24px; height: 24px; border-radius: 50%; }
.player-chip .servs { display: inline-flex; gap: 4px; }
.player-chip .servs .pill { font-size: 10px; padding: 1px 6px; }

.player-mod { -webkit-appearance: none; appearance: none; background: transparent; color: var(--shade-50); border: none; border-radius: var(--radius-pill); padding: 7px 16px; font-size: 13px; font-weight: 550; letter-spacing: 0.1px; cursor: pointer; transition: all .16s ease; white-space: nowrap; }
.player-mod:hover:not(:disabled) { color: var(--ink); background: var(--shade-30); opacity: .7; }
.player-mod:focus { outline: none; color: var(--ink); }

.coord-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.coord { border: 1px solid var(--hairline-light); border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; background: var(--canvas-cream); }
.coord .mono { font-size: 18px; }

.lookup-body { min-width: 280px; }

.prop-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.prop-row { display: grid; grid-template-columns: minmax(180px, 42%) 1fr; gap: 12px; align-items: center; }
.prop-key { font-size: 13px; color: var(--shade-50); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-row .input { width: 100%; }

.pill-amber { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.pill-mint { background: rgba(193, 251, 212, 0.55); color: #14643d; }

/* ------------------------------------------------------------------
   Auth (login / first-run admin claim)
   ------------------------------------------------------------------ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 30px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.user-row { padding: 14px 16px; margin-bottom: 10px; }

/* Plugin enable/disable + config editor */
.plugin-disabled .nm { opacity: 0.45; text-decoration: line-through; }
.config-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.config-tab {
  padding: 5px 12px; font-size: 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--shade-30); cursor: pointer; user-select: none;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.config-tab.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* Dashboard sparkline */
.stat.spark-stat { display: flex; flex-direction: column; gap: 4px; }
.spark { color: var(--shade-50); }

@media (max-width: 860px) {
  .prop-row { grid-template-columns: 1fr; gap: 4px; }
  .coord-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; padding: 12px 16px; }
  .nav-tabs { order: 3; width: 100%; overflow-x: auto; }
  .app { padding: 0 16px 64px; }
  .wizard-body { padding: 16px 16px 60px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .search-results { grid-template-columns: 1fr; }
}
