/* 12Tails admin panel — light dashboard look (sidebar + cards), with a dark mode. */
@import url('/fonts/kanit.css');

:root {
  --bg: #121316; --side: #16181d; --card: #1a1d24; --text: #ecedee; --muted: #a1a1aa; --faint: #636b7b;
  --border: rgba(218, 196, 167, 0.16); --line: rgba(255, 255, 255, 0.08); --hover: #222631;
  --accent: #dac4a7; --accent-2: #e9d4b9; --accent-soft: rgba(218, 196, 167, 0.16); --accent-text: #241c12;
  --ok: #45d483; --ok-soft: rgba(69, 212, 131, 0.16); --bad: #f54180; --bad-soft: rgba(245, 65, 128, 0.16);
  --amber: #f7b750; --amber-soft: rgba(247, 183, 80, 0.16); --violet: #ae7ede; --violet-soft: rgba(174, 126, 222, 0.16);
  --code: #27272a; --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  font-family: 'Kanit', 'Noto Sans Thai', 'Leelawadee UI', 'Segoe UI', Tahoma, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --side: #ffffff;
  --card: #ffffff;
  --text: #18191d;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: rgba(0, 0, 0, 0.10);
  --line: rgba(0, 0, 0, 0.06);
  --hover: #f1f5f9;
  --accent: #9a6b38;
  --accent-2: #7a4f20;
  --accent-soft: rgba(154, 107, 56, 0.12);
  --accent-text: #ffffff;
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.12);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.12);
  --code: #eef2f6;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121316; --side: #16181d; --card: #1a1d24; --text: #ecedee; --muted: #a1a1aa; --faint: #636b7b;
  --border: rgba(218, 196, 167, 0.16); --line: rgba(255, 255, 255, 0.08); --hover: #222631;
  --accent: #dac4a7; --accent-2: #e9d4b9; --accent-soft: rgba(218, 196, 167, 0.16); --accent-text: #241c12;
  --ok: #45d483; --ok-soft: rgba(69, 212, 131, 0.16); --bad: #f54180; --bad-soft: rgba(245, 65, 128, 0.16);
  --amber: #f7b750; --amber-soft: rgba(247, 183, 80, 0.16); --violet: #ae7ede; --violet-soft: rgba(174, 126, 222, 0.16);
  --code: #27272a; --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
:root[data-theme="light"] .brand {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
:root[data-theme="light"] .brand-title {
  background: linear-gradient(135deg, #9a6b38 0%, #b47836 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
:root[data-theme="light"] .brand-content {
  background: #ffffff;
}
:root[data-theme="light"] .brand-sub {
  color: #64748b;
}
:root[data-theme="light"] .facility-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
:root[data-theme="light"] .facility-thumb {
  background: rgba(0, 0, 0, 0.06);
}
:root[data-theme="light"] .log {
  background: #181b22;
  color: #d1d5db;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #121316; --side: #16181d; --card: #1a1d24; --text: #ecedee; --muted: #a1a1aa; --faint: #636b7b;
    --border: rgba(218, 196, 167, 0.16); --line: rgba(255, 255, 255, 0.08); --hover: #222631;
    --accent: #dac4a7; --accent-2: #e9d4b9; --accent-soft: rgba(218, 196, 167, 0.16); --accent-text: #241c12;
    --ok: #45d483; --ok-soft: rgba(69, 212, 131, 0.16); --bad: #f54180; --bad-soft: rgba(245, 65, 128, 0.16);
    --amber: #f7b750; --amber-soft: rgba(247, 183, 80, 0.16); --violet: #ae7ede; --violet-soft: rgba(174, 126, 222, 0.16);
    --code: #27272a; --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; }
code { background: var(--code); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.btn .ic { width: 15px; height: 15px; vertical-align: middle; }
h1 .ic, h2 .ic, h3 .ic { width: 1.12em; height: 1.12em; vertical-align: -0.15em; margin-right: 4px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--border); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.main-col { min-width: 0; display: flex; flex-direction: column; }

.brand {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  background: #14161b;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: all .25s ease;
}
.brand:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px var(--accent-soft);
}
.brand-media-wrap {
  position: relative;
  width: 100%;
  height: 94px;
  overflow: hidden;
  background: #090a0d;
}
.brand-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  filter: contrast(1.06) brightness(1.02);
  transition: transform .4s ease;
}
.brand:hover .brand-video {
  transform: scale(1.05);
}
.brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 19, 22, 0.08) 0%, rgba(18, 19, 22, 0.75) 100%);
  pointer-events: none;
}
.brand-content {
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--side);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
}
.brand-title {
  font-weight: 900;
  font-size: 16.5px;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, #f7d59b 0%, #d8b26e 50%, #fbe9b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(216, 178, 110, 0.3);
  text-transform: uppercase;
  line-height: 1.2;
}
.brand-sub {
  color: var(--muted);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.brand .pro {
  font-size: 10px;
  font-weight: 800;
  color: #241c12;
  background: linear-gradient(135deg, #e9d4b9, #c8b49a);
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex: none;
}

.host-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 12px; color: var(--muted); background: var(--card); }
.host-chip code { background: none; padding: 0; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-title { font-size: 12px; color: var(--faint); font-weight: 600; margin: 12px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit;
  font-size: 15px; color: var(--text); background: none; border: 0; border-radius: 10px; padding: 10px 12px;
  cursor: pointer; position: relative; }
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 700; border: 1px solid rgba(218, 196, 167, 0.22); }
.nav-item.active .ic { color: var(--accent); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--accent); }
.count { margin-left: auto; min-width: 24px; text-align: center; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding: 1px 7px; }
.nav-item.active .count { background: var(--card); }
.flag { margin-left: auto; font-size: 10.5px; font-weight: 800; color: #241c12; border-radius: 6px; padding: 2px 6px; }
.flag.blue { background: linear-gradient(135deg, #e9d4b9, #c8b49a); }
.flag.green { background: #45d483; }

.side-foot { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.seg { display: inline-flex; background: var(--code); border-radius: 10px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--muted); padding: 5px 10px;
  border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.seg .ic { width: 15px; height: 15px; vertical-align: 0; }
.me { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.me-name { font-weight: 700; font-size: 14px; }
.me-sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ---------- top bar + page head ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 28px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.crumb { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.crumb-bar { width: 5px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #e9d4b9, #c8b49a); }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; color: var(--muted); background: var(--card); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card);
  color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700;
  font-size: 13px; background: var(--code); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

main { padding: 20px 24px 40px; width: 100%; max-width: 100%; box-sizing: border-box; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; font-size: 27px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 0; font-size: 14px; }
.badge-soft { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); border-radius: 999px; padding: 3px 12px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px;
  margin-bottom: 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card-head.between { justify-content: space-between; }
.card-head p { margin: 2px 0 0; font-size: 13.5px; }
h2 { font-size: 16.5px; margin: 0; font-weight: 800; }
h2.inline { display: inline; }
h3 { margin: 0 0 16px; font-size: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col > .card { margin-bottom: 18px; }

.sicon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.sicon .ic { width: 20px; height: 20px; vertical-align: 0; }
.sicon.blue { background: var(--accent-soft); color: var(--accent); }
.sicon.green { background: var(--ok-soft); color: var(--ok); }
.sicon.amber { background: var(--amber-soft); color: var(--amber); }
.sicon.red { background: var(--bad-soft); color: var(--bad); }
.sicon.violet { background: var(--violet-soft); color: var(--violet); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1250px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-height: 132px; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat .k { color: var(--muted); font-size: 14px; font-weight: 600; }
.stat .v { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.stat .s { font-size: 13px; color: var(--faint); }
.stat .s.ok { color: var(--ok); font-weight: 600; }
.stat .s.bad { color: var(--bad); font-weight: 600; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }

.guide summary { display: flex; gap: 14px; align-items: center; cursor: pointer; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); flex: none; }
.guide-list { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.guide-list b { color: var(--text); }

/* ---------- toolbar / search ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px;
  padding: 3px 4px 3px 12px; background: var(--bg); flex: 1; max-width: 460px; color: var(--faint); }
.search.wide { max-width: 520px; }
.search input { border: 0; background: none; padding: 7px 4px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.note { margin: -6px 4px 12px; font-size: 13px; }

/* ---------- forms + buttons ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-top: 18px; }
input, select { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); min-width: 0; flex: 1; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); box-sizing: border-box; }
.card-head.pad { padding: 16px 18px 8px; display: block; }
.card-head.pad h2 { margin: 0 0 4px; }
.btn { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap; display: inline-flex;
  align-items: center; justify-content: center; gap: 7px; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text);
  border-color: var(--accent); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover { color: var(--accent-text); filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn.outline-accent { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.btn.outline-accent.stop { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-soft); }
.btn.block { width: 100%; padding: 12px 16px; border-radius: 12px; }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn.sm.primary { box-shadow: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.actions.start { justify-content: flex-start; margin-top: 4px; }
.mt { margin-top: 22px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.check input { flex: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 13px; background: color-mix(in srgb, var(--bg) 60%, var(--card));
  white-space: nowrap; }
th.right, td.right { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
tr.clickable { cursor: pointer; }
.card:not(.flush) table th { background: none; }
.card:not(.flush) th, .card:not(.flush) td { padding: 10px 12px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; margin: 0; }
.who { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.who small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  font-size: 14px; color: var(--accent); background: var(--accent-soft); flex: none; }
.avatar.big { width: 40px; height: 40px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #1f6feb, #7c3aed); }
.num { font-variant-numeric: tabular-nums; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; background: var(--code); color: var(--muted); margin-right: 4px; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.ok::before, .tag.bad::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.blue { background: var(--accent-soft); color: var(--accent); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }

.log { background: #0d1117; color: #c9d1d9; border-radius: 12px; padding: 14px 16px; height: 62vh; overflow: auto;
  font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; margin: 0; white-space: pre-wrap; }

/* ---------- dialogs + toasts ---------- */
dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: var(--text);
  width: min(440px, calc(100vw - 32px)); padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,19,27,.45); backdrop-filter: blur(2px); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }

.spawn { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.spawn .field { margin: 0; }
.spawn .btn { height: 42px; }
.hint { margin: 12px 0 0; color: var(--muted); display: flex; align-items: center; gap: 8px; min-height: 40px; }
dialog.wide { width: min(760px, calc(100vw - 32px)); }
/* themed confirm (replaces the browser's grey confirm()) */
dialog.confirm { width: min(460px, calc(100vw - 32px)); padding: 22px 22px 18px; }
dialog.confirm[open] { animation: cfm-in .16s ease-out; }
@keyframes cfm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.cfm-head { display: flex; gap: 14px; align-items: flex-start; }
.cfm-head h3 { margin: 2px 0 6px; font-size: 18px; }
.cfm-head p { margin: 0; color: var(--muted); line-height: 1.55; }
.cfm-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.cfm-icon .ic { width: 22px; height: 22px; }
.cfm-icon.danger { background: var(--bad-soft); color: var(--bad); }
.cfm-icon.warn { background: var(--amber-soft); color: var(--amber); }
.cfm-detail { margin: 14px 0 0 58px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); }
dialog.confirm .row.end { margin-top: 18px; }
.btn.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.solid-danger:hover { filter: brightness(1.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 0 12px; }
.grid .span2 { grid-column: span 2; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.checks input { flex: none; }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.toast { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--ok); color: var(--text);
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-width: 360px; font-weight: 600; }
.toast.bad { border-left-color: var(--bad); }

.item-icon { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; border-radius: 8px;
  background: var(--code); padding: 2px; }
#spawn-hint .item-icon { width: 42px; height: 42px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-title { display: none; }
  .nav-item { width: auto; }
  .nav-item.active::before { display: none; }
  .side-foot { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .me { display: none; }
  .topbar { position: static; padding: 10px 16px; }
  main { padding: 16px; }
}
@media (max-width: 640px) {
  .spawn { grid-template-columns: 1fr 1fr; }
  .spawn .btn { grid-column: span 2; }
  .side-foot { grid-template-columns: 1fr; }
  th, td { padding: 10px; }
  .page-head h1 { font-size: 22px; }
}

/* ---------- Admin Panel 2.0 Components ---------- */
.inv-section-title { font-weight: 700; margin: 14px 0 8px; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.inv-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.storage-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 18px; }
@media (max-width: 800px) {
  .inv-grid { grid-template-columns: repeat(4, 1fr); }
  .storage-grid { grid-template-columns: repeat(4, 1fr); }
}
.inv-slot { position: relative; background: var(--hover); border: 2px dashed var(--border); border-radius: 12px; height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; user-select: none; }
.inv-slot.empty { opacity: 0.6; cursor: default; }
.inv-slot.filled { background: var(--card); border: 2px solid var(--border); box-shadow: var(--shadow); }
.inv-slot.filled:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.inv-slot .slot-num { position: absolute; top: 4px; left: 6px; font-size: 10px; color: var(--faint); font-weight: 600; }
.inv-slot .slot-tag { position: absolute; top: 4px; left: 6px; font-size: 9.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.inv-slot .item-icon { width: 40px; height: 40px; object-fit: contain; }
.inv-slot .item-count { position: absolute; bottom: 4px; right: 6px; background: rgba(15,23,42,.85); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 6px; line-height: 1.2; }
.inv-slot .item-enhance { position: absolute; top: 4px; right: 6px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; }

.badge-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-tag.blue { background: var(--accent-soft); color: var(--accent); }
.badge-tag.green { background: var(--ok-soft); color: var(--ok); }
.badge-tag.amber { background: var(--amber-soft); color: var(--amber); }

.char-card-selector { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.char-pill-btn { border: 1px solid var(--border); background: var(--card); padding: 8px 14px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.char-pill-btn:hover { background: var(--hover); }
.char-pill-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.guild-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.guild-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.guild-card-header { display: flex; justify-content: space-between; align-items: center; }
.guild-card-title { font-weight: 800; font-size: 17px; display: inline-flex; align-items: center; gap: 6px; }
.guild-card .muted div { display: flex; align-items: center; gap: 6px; margin-top: 3px; }

.ip-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-family: monospace; font-size: 11.5px; background: var(--hover); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: all .15s ease; }
.ip-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ip-chip.banned { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); text-decoration: line-through; }

/* Combat Studio & GM Tools enhancements */
.stat-box-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
@media (max-width: 860px) { .stat-box-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-box-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.stat-box-item label { font-size: 11.5px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 4px; }
.stat-box-item input { width: 100%; font-size: 15px; font-weight: 700; }
.preset-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.preset-btn { border: 1px solid var(--border); background: var(--card); padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text); transition: all .15s ease; }
.preset-btn:hover { border-color: var(--accent); background: var(--hover); }

/* Live Chat Spy */
.chat-line { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 6px; transition: background .1s; }
.chat-line:hover { background: var(--hover); }
.chat-time { color: var(--muted); font-size: 11px; flex: none; }
.chat-mode-tag { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; flex: none; }
.chat-mode-0 { background: rgba(59,130,246,.2); color: #60a5fa; }
.chat-mode-1 { background: rgba(148,163,184,.2); color: var(--text); }
.chat-mode-2 { background: rgba(168,85,247,.2); color: #c084fc; }
.chat-mode-3 { background: rgba(34,197,94,.2); color: #4ade80; }
.chat-mode-4 { background: rgba(236,72,153,.2); color: #f472b6; }
.chat-sender { font-weight: 700; color: var(--accent); cursor: pointer; flex: none; }
.chat-sender:hover { text-decoration: underline; }
.chat-msg { word-break: break-word; color: var(--text); }

/* Alt accounts detector badge */
.alt-badge-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.alt-chip { border: 1px solid var(--border); background: var(--hover); border-radius: 6px; padding: 4px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.alt-chip:hover { border-color: var(--accent); color: var(--accent); }
.alt-chip.banned { border-color: var(--bad); color: var(--bad); text-decoration: line-through; }

/* Split Workspace with Item Palette (Drag & Drop Engine) */
.split-palette { display: grid; grid-template-columns: 310px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .split-palette { grid-template-columns: 1fr; } }

.palette-panel { padding: 14px; position: sticky; top: 70px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; overflow: hidden; }
.palette-head { flex: none; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 8px; }
.palette-filter-row { display: flex; flex-wrap: wrap; gap: 4px; }
.p-filter { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s; }
.p-filter:hover { background: var(--hover); color: var(--text); }
.p-filter.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }

.palette-item-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; max-height: 480px; }
.palette-pagination { flex: none; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.palette-page-ctrls { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.palette-page-btn { padding: 4px 8px; font-size: 11.5px; font-weight: 700; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; transition: all .15s ease; user-select: none; display: inline-flex; align-items: center; justify-content: center; }
.palette-page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--hover); }
.palette-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.palette-page-input { width: 48px; padding: 2px 4px; font-size: 12px; font-weight: 700; text-align: center; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.palette-page-input:focus { border-color: var(--accent); outline: none; }
.palette-page-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.palette-per-page-select { padding: 2px 6px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; }
.palette-per-page-select:focus { border-color: var(--accent); color: var(--text); outline: none; }
.drag-palette-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); cursor: grab; user-select: none; transition: transform .1s, box-shadow .15s, border-color .15s; }
.drag-palette-item:hover { border-color: var(--accent); background: var(--hover); box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: translateY(-1px); }
.drag-palette-item:active { cursor: grabbing; opacity: 0.6; }
.drag-palette-item .item-meta { flex: 1; min-width: 0; line-height: 1.25; }
.drag-palette-item .item-title { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-palette-item .item-sub { font-size: 11px; color: var(--muted); font-family: monospace; }
.drag-palette-item .btn-quick-add { border: 1px solid var(--border); background: var(--bg); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; flex: none; }
.drag-palette-item .btn-quick-add:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }

/* Drop Target Zones */
.drop-target-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 14px; min-height: 220px; transition: all .2s ease; background: color-mix(in srgb, var(--card) 95%, transparent); }
.drop-target-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 16px rgba(59,130,246,.25); }

.drop-empty-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 180px; text-align: center; color: var(--muted); }

.drop-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.shop-shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }

/* Item Card inside drop zone */
.drop-item-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; box-shadow: var(--shadow); cursor: move; user-select: none; transition: transform .15s, border-color .15s; }
.drop-item-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.drop-item-card .card-top { display: flex; align-items: center; gap: 8px; }
.drop-item-card .card-info { flex: 1; min-width: 0; }
.drop-item-card .card-name { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-item-card .card-code { font-size: 11px; font-family: monospace; color: var(--muted); }
.drop-item-card .btn-remove { border: none; background: none; color: var(--muted); font-size: 16px; font-weight: 800; cursor: pointer; border-radius: 4px; padding: 2px 6px; flex: none; }
.drop-item-card .btn-remove:hover { color: var(--bad); background: var(--bad-soft); }

/* Card inputs for price, qty */
.drop-item-card .card-inputs { display: flex; gap: 6px; align-items: center; font-size: 11.5px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.drop-item-card .card-inputs input, .drop-item-card .card-inputs select { padding: 2px 6px; font-size: 12px; border-radius: 6px; }

/* Trash Dropzone */
.trash-dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: default; transition: all .2s; }
.trash-dropzone.drag-over { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }

/* ========================================================
   CRAFT STUDIO: VISUAL RECIPE CATALOG & FORGE BENCH
   ======================================================== */
.craft-catalog-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.craft-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.craft-catalog-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.craft-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}
.craft-recipe-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
  position: relative;
}
.craft-recipe-card:hover {
  border-color: #8b5cf6;
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,.15);
}
.craft-recipe-card.active {
  border-color: #8b5cf6;
  background: color-mix(in srgb, #8b5cf6 15%, var(--card));
  box-shadow: 0 0 14px rgba(139,92,246,.35);
}
.craft-recipe-card .r-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.craft-recipe-card .r-info {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.craft-recipe-card .r-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.craft-recipe-card .r-sub {
  font-size: 10.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.craft-recipe-card .r-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(139,92,246,.15);
  color: #a78bfa;
}

/* Catalog Pagination */
.craft-catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.craft-catalog-pctrls {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Forge Bench: 3-Chamber Layout */
.craft-forge-bench {
  display: grid;
  grid-template-columns: 1.2fr 70px 1fr;
  gap: 12px;
  align-items: stretch;
}
@media (max-width: 1080px) {
  .craft-forge-bench {
    grid-template-columns: 1fr;
  }
  .craft-catalyst-conduit {
    flex-direction: row !important;
    padding: 8px 0 !important;
  }
}
.craft-chamber {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chamber-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.chamber-hint {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Ingredients Grid inside Chamber */
.craft-ing-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.craft-ing-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: all .15s ease;
}
.craft-ing-card:hover {
  border-color: var(--accent);
  background: var(--hover);
}
.craft-ing-card .ing-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.craft-ing-card .ing-info {
  flex: 1;
  min-width: 0;
}
.craft-ing-card .ing-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.craft-ing-card .ing-code {
  font-size: 11px;
  font-family: monospace;
  color: var(--muted);
}
.craft-ing-card .ing-ctrls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.craft-ing-card .ing-ctrls input {
  width: 48px;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border-radius: 6px;
}

/* Conduit in center */
.craft-catalyst-conduit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
}
.catalyst-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, #8b5cf6 20%, var(--card));
  border: 2px solid #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 16px rgba(139,92,246,.35);
  animation: pulseOrb 2.5s infinite ease-in-out;
}
@keyframes pulseOrb {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(139,92,246,.3); }
  50% { transform: scale(1.06); box-shadow: 0 0 24px rgba(139,92,246,.6); }
}
.catalyst-flow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (max-width: 1080px) {
  .catalyst-flow { flex-direction: row; }
}
.flow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5cf6;
  opacity: 0.7;
}
.catalyst-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.3);
  padding: 2px 8px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

/* Result Card */
.craft-result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.craft-result-card.has-item {
  border-color: rgba(245,158,11,.4);
  background: color-mix(in srgb, #f59e0b 5%, var(--card));
}
.craft-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.craft-result-icon-frame {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0,0,0,.4);
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(245,158,11,.3);
  flex: none;
}
.craft-result-icon-frame img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Modern Fullscreen Shop Studio */
.shop-hero-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 16px;
  min-height: 96px;
}
.shop-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  opacity: 0.16;
  filter: blur(1.5px);
  pointer-events: none;
  transition: opacity .3s ease;
}
.shop-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}
.shop-hero-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  box-shadow: 0 0 18px rgba(59,130,246,.35);
  flex: none;
}
.shop-hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111827;
  object-fit: cover;
  display: block;
}
.shop-hero-title-group {
  flex: 1;
  min-width: 0;
}
.shop-hero-title-group h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-hero-desc {
  margin: 3px 0 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shop-hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
}

/* Modern Shop Navigator Cards (8 NPC Shops) */
.shop-nav-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
@media (max-width: 1280px) {
  .shop-nav-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .shop-nav-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Unified Facility Studio Navigation */
.facility-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.facility-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.facility-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.facility-chip:hover {
  background: var(--hover);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.facility-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(16,185,129,.35);
}
.facility-filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.facility-search-box {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 8px;
  width: 200px;
  transition: all .15s ease;
}
.facility-search-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(16,185,129,.25);
  width: 240px;
}

/* Facility Cards Grid (All 17 Facilities Unified) */
.facility-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.facility-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, #000);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
  position: relative;
}
.facility-card:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.facility-card.active {
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(16,185,129,.3);
}
.facility-card[data-facility-type="craft"].active {
  background: color-mix(in srgb, #8b5cf6 18%, var(--card));
  border-color: #8b5cf6;
  box-shadow: 0 0 14px rgba(139,92,246,.3);
}
.facility-card[data-facility-type="jil"].active {
  background: color-mix(in srgb, #f59e0b 18%, var(--card));
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245,158,11,.3);
}
.facility-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  object-fit: cover;
  flex: none;
}
.facility-info {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.facility-name {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.facility-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.facility-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.facility-card.active .facility-badge {
  background: var(--accent);
  color: #fff;
}
.facility-card[data-facility-type="craft"].active .facility-badge {
  background: #8b5cf6;
  color: #fff;
}
.facility-card[data-facility-type="jil"].active .facility-badge {
  background: #f59e0b;
  color: #fff;
}

/* Strict Isolation for Facilities Workspace - Overlap Prevention */
.facility-workspace {
  display: none !important;
}
.facility-workspace.workspace-active {
  display: block !important;
}

.shop-nav-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, #000);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.shop-nav-card:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.shop-nav-card.active {
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(59,130,246,.3);
}
.shop-nav-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  object-fit: cover;
  flex: none;
}
.shop-nav-info {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.shop-nav-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-nav-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-nav-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.shop-nav-card.active .shop-nav-badge {
  background: var(--accent);
  color: #fff;
}

/* Compact MMO GM Shop Table (Fixed Layout) */
.compact-shelf-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  table-layout: fixed;
}
.compact-shelf-table thead th {
  background: color-mix(in srgb, var(--card) 90%, #000);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}
.compact-shelf-table th.col-idx { width: 38px; text-align: center; }
.compact-shelf-table th.col-icon { width: 48px; text-align: center; }
.compact-shelf-table th.col-code { width: 95px; }
.compact-shelf-table th.col-name { min-width: 220px; }
.compact-shelf-table th.col-price { width: 105px; }
.compact-shelf-table th.col-cur { width: 120px; }
.compact-shelf-table th.col-lv { width: 65px; }
.compact-shelf-table th.col-order { width: 65px; text-align: center; }
.compact-shelf-table th.col-del { width: 42px; text-align: center; }

.compact-shelf-table tbody tr.shelf-row-item {
  border-bottom: 1px solid var(--border);
  transition: background .12s ease;
}
.compact-shelf-table tbody tr.shelf-row-item:hover {
  background: var(--hover);
}
.compact-shelf-table tbody tr.shelf-row-item.drag-hover-row {
  border-top: 2px solid var(--accent);
  background: var(--accent-soft);
}
.compact-shelf-table tbody td {
  padding: 6px 10px;
  vertical-align: middle;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.shelf-item-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.shelf-item-desc {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.compact-num-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}
.compact-num-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.compact-select-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11.5px;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.compact-select-input:focus {
  border-color: var(--accent);
  outline: none;
}
.btn-icon-order {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  margin: 0 1px;
  transition: all .1s;
}
.btn-icon-order:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-icon-order:disabled {
  opacity: 0.25;
  cursor: default;
}
.btn-table-remove {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  transition: all .1s;
}
.btn-table-remove:hover {
  border-color: var(--bad);
  color: var(--bad);
  background: var(--bad-soft);
}

/* Visual Shelf Cards (View Mode: Visual Grid) */
.visual-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(185px, 100%), 1fr));
  gap: 12px;
}
.visual-shelf-card {
  background: color-mix(in srgb, var(--card) 95%, #000);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all .15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  cursor: move;
  user-select: none;
}
.visual-shelf-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.visual-card-thumb-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.visual-card-thumb-wrap img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.visual-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.visual-card-code {
  font-size: 11px;
  font-family: monospace;
  color: var(--accent);
  margin-bottom: 8px;
}
.visual-card-inputs {
  display: flex;
  gap: 4px;
  width: 100%;
  align-items: center;
  margin-bottom: 8px;
}
.visual-card-inputs input {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  font-size: 12px;
  font-family: monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-align: center;
}
.visual-card-inputs select {
  width: 65px;
  padding: 3px 4px;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}
.visual-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}

/* Interactive In-Game Item Tooltip (Topic 3) */
#item-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.06);
  display: none;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  backdrop-filter: blur(10px);
  transition: opacity .08s ease;
}
#item-tooltip.visible {
  display: flex;
}
.tt-head { display: flex; align-items: center; gap: 10px; }
.tt-img { width: 44px; height: 44px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); padding: 4px; object-fit: contain; flex: none; }
.tt-title { font-weight: 800; font-size: 14px; color: var(--text); }
.tt-meta { display: flex; gap: 6px; align-items: center; font-size: 11px; margin-top: 2px; }
.tt-desc { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 6px; line-height: 1.35; }
.tt-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg); padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); font-size: 11px; }
.tt-stat-item { display: flex; justify-content: space-between; font-weight: 700; }
.tt-stat-atk { color: #f87171; }
.tt-stat-def { color: #60a5fa; }
.tt-stat-agi { color: #34d399; }
.tt-stat-vit { color: #fbbf24; }
.tt-stat-int { color: #a78bfa; }
.tt-stat-cha { color: #f472b6; }
.tt-stat-tal { color: #38bdf8; }
.tt-stat-lck { color: #e879f9; }
.tt-badge-row { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; border-top: 1px solid var(--border); padding-top: 6px; }
.tt-badge-line { display: flex; align-items: baseline; gap: 6px; }
.tt-badge-label { color: var(--muted); font-weight: 700; flex: none; width: 62px; font-size: 11px; }

/* Item Inspector Drawer / Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 9999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 16px; }
.modal-overlay.hidden { display: none !important; }
.inspect-modal { background: var(--card); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.inspect-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.inspect-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.inspect-chip { border: 1px solid var(--border); background: var(--hover); padding: 4px 10px; border-radius: 6px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: all .15s; }
.inspect-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================
   PHASE 1: Sidebar Accordion & Mini-Sidebar
   ========================================== */
.sidebar { transition: width .2s cubic-bezier(.4,0,.2,1); }
.sidebar-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.btn-sidebar-toggle { background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer; padding: 4px 8px; display: inline-flex; align-items: center; transition: all .15s; }
.btn-sidebar-toggle:hover { color: var(--text); border-color: var(--accent); }

.nav-category { margin-bottom: 8px; }
.nav-category-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); cursor: pointer; border-radius: 6px; user-select: none; transition: background .12s; }
.nav-category-head:hover { background: var(--hover); color: var(--text); }
.nav-category-head .nav-chevron { width: 14px; height: 14px; transition: transform .2s ease; }
.nav-category.collapsed .nav-category-head .nav-chevron { transform: rotate(-90deg); }
.nav-category.collapsed .nav-category-items { display: none; }
.nav-category-items { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }

/* Mini Sidebar Mode */
.app.sidebar-mini .sidebar { width: 72px; padding: 12px 8px; }
.app.sidebar-mini .brand, .app.sidebar-mini .brand-sub, .app.sidebar-mini .nav-category-head span, .app.sidebar-mini .nav-item span, .app.sidebar-mini .nav-item .flag, .app.sidebar-mini .nav-item .count, .app.sidebar-mini #btn-side-create span, .app.sidebar-mini .host-chip code, .app.sidebar-mini .side-foot .me-name, .app.sidebar-mini .side-foot .me-sub, .app.sidebar-mini #btn-hotreload span { display: none !important; }
.app.sidebar-mini .nav-item { justify-content: center; padding: 10px 0; }
.app.sidebar-mini .nav-item svg.ic { margin: 0; }
.app.sidebar-mini .main-col { margin-left: 72px; }

/* ==========================================
   PHASE 1: Universal Command Palette (Ctrl+K)
   ========================================== */
.cmd-palette-modal {
  position: fixed;
  inset: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: 80vh;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 25px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.07);
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(16px);
  z-index: 100000;
}
.cmd-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cmd-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}
.cmd-kbd-esc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  padding: 2px 8px;
  color: var(--muted);
}
.cmd-filters {
  display: flex;
  gap: 6px;
  padding: 8px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.cmd-filter-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11.5px;
  padding: 3px 10px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.cmd-filter-pill.active, .cmd-filter-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cmd-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background .1s ease;
}
.cmd-item:hover, .cmd-item.selected {
  background: var(--hover);
}
.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.cmd-item-title { font-weight: 600; white-space: nowrap; }
.cmd-item-sub { font-size: 11.5px; color: var(--muted); margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.cmd-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.cmd-footer kbd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  color: var(--text);
}

/* ==========================================
   PHASE 1: Modern Bento-Grid Dashboard
   ========================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.bento-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.bento-card.span-3 { grid-column: span 3; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-6 { grid-column: span 6; }
.bento-card.span-8 { grid-column: span 8; }
.bento-card.span-12 { grid-column: span 12; }
@media (max-width: 1024px) {
  .bento-card.span-3, .bento-card.span-4 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .bento-card.span-3, .bento-card.span-4, .bento-card.span-6, .bento-card.span-8 { grid-column: span 12; }
}

.kpi-row { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--text); margin-top: 6px; letter-spacing: -.02em; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi-icon-wrap { width: 36px; height: 36px; border-radius: 10px; background: var(--hover); display: grid; place-items: center; color: var(--accent); }

/* ==========================================
   PHASE 2: Live Dungeon & World Boss Monitor
   ========================================== */
.room-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.room-badge { font-size: 11px; padding: 2px 7px; border-radius: 20px; font-weight: 700; }
.room-badge.lobby { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.room-badge.started { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }

.boss-banner {
  background: linear-gradient(135deg, rgba(239,68,68,.1) 0%, rgba(245,158,11,.08) 100%);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.boss-timer-clock { font-size: 20px; font-weight: 800; font-family: monospace; color: #ef4444; }

/* ==========================================
   PHASE 3: Character Paperdoll & Inspector
   ========================================== */
.paperdoll-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.paperdoll-slot {
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 84px;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
}
.paperdoll-slot.equipped { border-style: solid; border-color: var(--border); }
.paperdoll-slot:hover { border-color: var(--accent); transform: translateY(-1px); }
.paperdoll-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.paperdoll-lv {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(0,0,0,.6);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(251,191,36,.4);
}
.stat-bar-container { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.stat-bar-row { display: grid; grid-template-columns: 48px 1fr 40px; align-items: center; gap: 8px; }
.stat-bar-track { height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.stat-bar-fill { height: 100%; border-radius: 4px; }

.anticheat-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ef4444;
  background: rgba(239,68,68,.08);
  color: #ef4444;
  font-size: 12.5px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================
   Genuine 12 Tails Game UI: Character Portraits & Stage Banners
   ========================================== */
.char-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: var(--hover);
  border: 1.5px solid var(--border);
  flex: none;
  transition: transform .15s ease, border-color .15s ease;
}
.char-avatar-img:hover {
  transform: scale(1.08);
  border-color: var(--accent);
}
.char-avatar-img.big {
  width: 52px;
  height: 52px;
  border-width: 2px;
  object-position: center 18%;
}
.char-avatar-img.sm {
  width: 26px;
  height: 26px;
  object-position: center 18%;
}

.mission-stage-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: all .2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.mission-stage-card:hover, .mission-stage-card.active {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  transform: translateY(-2px);
}
.mission-stage-thumb {
  width: 100%;
  height: 88px;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.mission-stage-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mission-stage-code {
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}
.mission-stage-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mission-preview-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(34, 38, 49, 0.7) 0%, rgba(18, 19, 22, 0.95) 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 12px;
  min-height: 220px;
}
.mission-banner-large {
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  display: block;
}
.chapter-title-banner {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.craft-banner-preview {
  height: 40px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.quest-giver-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: var(--hover);
  border: 1px solid var(--border);
  flex: none;
}








/* ==========================================================================
   12Tails RPG Item Stat Badges & Floating Inspect Tooltip
   ========================================================================== */

.stat-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 2px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.2px;
  line-height: 1.25;
  white-space: nowrap;
}

.stat-badge.atk { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.stat-badge.def { background: rgba(59, 130, 246, 0.16); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.stat-badge.agi { background: rgba(245, 158, 11, 0.16); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.stat-badge.vit { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.stat-badge.int { background: rgba(139, 92, 246, 0.16); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.stat-badge.cha { background: rgba(236, 72, 153, 0.16); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.stat-badge.tal { background: rgba(6, 182, 212, 0.16); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); }
.stat-badge.lck { background: rgba(234, 179, 8, 0.16); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.35); }
.stat-badge.hp  { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.stat-badge.mp  { background: rgba(59, 130, 246, 0.16); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.35); }
.stat-badge.sp  { background: rgba(245, 158, 11, 0.16); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.35); }
.stat-badge.spc { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.45); text-shadow: 0 0 6px rgba(168,85,247,.5); }
.stat-badge.wt  { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.25); }
.stat-badge.cls { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.4); font-weight: 800; }
.stat-badge.req-lv { background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.15); }

/* --- In-Shop Quick Filter Toolbar --- */
.shop-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 12px;
}
.shop-filter-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.shop-search-input {
  min-width: 170px;
  max-width: 240px;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 12px;
}
.shop-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}
.shop-type-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.shop-type-pill {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.shop-type-pill:hover, .shop-type-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}
.shop-filter-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Floating 12Tails RPG Item Inspect Tooltip --- */
#item-rpg-tooltip {
  position: fixed;
  z-index: 999999;
  width: 320px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(59, 130, 246, 0.35);
  padding: 12px;
  pointer-events: none;
  display: none;
  flex-direction: column;
  gap: 8px;
  font-family: inherit;
  animation: tooltipFadeIn .1s ease-out;
}
.rpg-tt-head {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}
.rpg-tt-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
  flex-shrink: 0;
}
.rpg-tt-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.rpg-tt-info {
  flex: 1;
  min-width: 0;
}
.rpg-tt-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpg-tt-code {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.rpg-tt-sub {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.rpg-tt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rpg-tt-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.rpg-tt-stat .stat-lbl { color: var(--muted); }
.rpg-tt-stat .stat-val { font-weight: 700; font-family: var(--mono); }
.rpg-tt-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: #cbd5e1;
  font-style: italic;
  padding: 2px 0;
}
.rpg-tt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================
   Crafting Rates & Invest Settings (Full Page & Subnav)
   ========================================== */
.shops-subnav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.shops-subnav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shops-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.shops-subtab:hover {
  color: var(--text);
  background: var(--bg);
}
.shops-subtab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.shops-subtab .subtab-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.2);
  color: inherit;
}
.shops-subtab.active .subtab-pill {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.shops-subnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Full Page Crafting Rates View */
.view-shops-rates, #view-shops-rates {
  animation: fadeIn 0.25s ease-out;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rates-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-wrap: wrap;
}
.rates-hero-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.12);
  flex-wrap: wrap;
}
.rates-hero-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 780px;
}
.rates-hero-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(239,68,68,0.5));
}
.rates-hero-title {
  font-size: 17px;
  font-weight: 800;
  color: #f87171;
  margin-bottom: 4px;
}
.rates-hero-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 8px 0;
}
.btn-hero-toggle {
  font-size: 14px;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
}
.btn-hero-toggle:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.btn-hero-toggle.on {
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
}

/* Master Crafting Grid */
.rates-facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 16px;
}
.craft-master-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.craft-master-box:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}
.craft-master-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.craft-master-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
.craft-master-avatar-wrap img,
.craft-master-box img,
.craft-rate-card img,
dialog#modal-crafting-rates img {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  display: block !important;
  flex: none !important;
}
.craft-master-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.craft-master-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-unit .inp {
  padding-right: 48px !important;
  font-weight: 700;
  font-size: 13.5px;
}
.input-with-unit .unit {
  position: absolute;
  right: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}
.field-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.rates-extra-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.rates-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  flex-wrap: wrap;
}

/* Modal Fallback Width (if opened) */
dialog#modal-crafting-rates {
  width: min(920px, 95vw) !important;
  max-width: 920px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Item Category Filter Pills */
.item-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  width: 100%;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim, #94a3b8);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.cat-pill.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 600;
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}
.cat-pill .count {
  font-size: 0.72rem;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  padding: 1px 6px;
  border-radius: 999px;
}
.cat-pill.active .count {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

#inv-hero-banner:empty { display: none !important; }



/* ---------- admin login (auth.js) ---------- */
.pa-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: radial-gradient(circle at 50% 30%, rgba(40, 30, 18, .92), rgba(8, 8, 12, .97)); }
.pa-modal { background: rgba(6, 8, 12, .72); }
.pa-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px;
  border-radius: 16px; background: #171a21; color: #eef0f4; border: 1px solid rgba(242, 193, 78, .35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55); font: 14px/1.5 system-ui, "Leelawadee UI", sans-serif; }
.pa-wide { max-width: 760px; max-height: 88vh; overflow: auto; }
.pa-logo { height: 54px; object-fit: contain; align-self: center; }
.pa-title { margin: 2px 0; font-size: 19px; font-weight: 600; text-align: center; color: #f6d78a; }
.pa-head { display: flex; align-items: center; justify-content: space-between; }
.pa-head .pa-title { text-align: left; }
.pa-h3 { margin: 10px 0 0; font-size: 15px; color: #f6d78a; }
.pa-sub { margin: 0; font-size: 12.5px; color: #a9afbb; text-align: center; }
.pa-wide .pa-sub { text-align: left; }
.pa-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid #343a46;
  background: #0f1116; color: #eef0f4; font: inherit; }
.pa-input:focus { outline: 2px solid rgba(242, 193, 78, .6); border-color: transparent; }
.pa-btn { padding: 10px 14px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600;
  background: linear-gradient(#f2c14e, #c98a1e); color: #2a1700; }
.pa-btn:disabled { opacity: .6; cursor: wait; }
.pa-err { min-height: 18px; font-size: 13px; color: #ff8a80; }
.pa-x { border: 0; background: none; color: #a9afbb; font-size: 18px; cursor: pointer; }
.pa-form { display: flex; flex-direction: column; gap: 10px; }
.pa-row { flex-direction: row; flex-wrap: wrap; }
.pa-row .pa-input { flex: 1 1 150px; width: auto; }
.pa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pa-table th, .pa-table td { padding: 7px 6px; border-bottom: 1px solid #2a2f3a; text-align: left; vertical-align: middle; }
.pa-table th { color: #a9afbb; font-weight: 500; }
.pa-name { font-weight: 600; }
.pa-acts { white-space: nowrap; }
.pa-mini { padding: 5px 9px; margin: 2px; border-radius: 8px; border: 1px solid #3a4150; background: #20242d;
  color: #e6e8ee; font: inherit; font-size: 12.5px; cursor: pointer; }
.pa-mini:hover { border-color: #f2c14e; }
.pa-danger { color: #ff8a80; }
.pa-inline { display: inline-flex; gap: 4px; }
.pa-inline .pa-input { width: 160px; padding: 5px 8px; }
.pa-chip { position: fixed; top: 10px; right: 14px; z-index: 900; display: flex; align-items: center; gap: 4px;
  padding: 5px 8px 5px 12px; border-radius: 999px; background: rgba(20, 22, 28, .92); color: #eef0f4;
  border: 1px solid rgba(242, 193, 78, .35); font: 13px system-ui, "Leelawadee UI", sans-serif; }
.pa-who { margin-right: 4px; white-space: nowrap; }
@media (max-width: 640px) { .pa-chip { top: auto; bottom: 10px; right: 10px; left: 10px; flex-wrap: wrap; border-radius: 14px; } }
/* Generated from former inline style attributes (CSP style-src 'self' blocks those).
   Tripled class = beats ordinary component rules like inline did; JS el.style still wins. */
.s-002535c.s-002535c.s-002535c { margin-top:12px; }
.s-0129ec9.s-0129ec9.s-0129ec9 { font-size:14px; font-weight:600; color:var(--muted); }
.s-015ccf9.s-015ccf9.s-015ccf9 { max-width:280px; }
.s-028671c.s-028671c.s-028671c { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; border-bottom:1px solid var(--border); padding-bottom:10px; }
.s-0442ce8.s-0442ce8.s-0442ce8 { max-height:280px; overflow-y:auto; margin-bottom:14px; }
.s-070ea89.s-070ea89.s-070ea89 { background:linear-gradient(135deg, rgba(234,179,8,0.12), rgba(245,158,11,0.08)); border:1px solid rgba(234,179,8,0.35); border-radius:14px; padding:16px 20px; margin-bottom:16px; display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.s-07e66d0.s-07e66d0.s-07e66d0 { border-color:rgba(239,68,68,.3); background:linear-gradient(135deg,var(--card) 0%,rgba(239,68,68,.05) 100%); }
.s-0839683.s-0839683.s-0839683 { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:16px; margin-top:12px; }
.s-09fe845.s-09fe845.s-09fe845 { font-size:12px; margin-top:3px; }
.s-0c37a81.s-0c37a81.s-0c37a81 { margin-bottom:8px; font-size:15px; display:flex; align-items:center; gap:6px; }
.s-0d55f66.s-0d55f66.s-0d55f66 { display:flex; gap:6px; }
.s-0ee8830.s-0ee8830.s-0ee8830 { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.s-114b3e2.s-114b3e2.s-114b3e2 { gap:10px; }
.s-11582dd.s-11582dd.s-11582dd { display:flex; align-items:center; gap:12px; }
.s-11aabd4.s-11aabd4.s-11aabd4 { font-size:12px; margin-top:2px; }
.s-130492f.s-130492f.s-130492f { margin-top:12px; gap:8px; flex-wrap:wrap; }
.s-13076d9.s-13076d9.s-13076d9 { text-align:center; }
.s-1386d50.s-1386d50.s-1386d50 { margin:0; }
.s-168c995.s-168c995.s-168c995 { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:14px; }
.s-168f2b5.s-168f2b5.s-168f2b5 { font-size:12px; margin-top:6px; }
.s-1797dd2.s-1797dd2.s-1797dd2 { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.s-18b8537.s-18b8537.s-18b8537 { color:#f59e0b; font-weight:700; }
.s-18d0d43.s-18d0d43.s-18d0d43 { font-weight:700; color:var(--text); font-size:13.5px; }
.s-1a30558.s-1a30558.s-1a30558 { width:110px; }
.s-1ae8a3c.s-1ae8a3c.s-1ae8a3c { font-size:10.5px; }
.s-1be5ad5.s-1be5ad5.s-1be5ad5 { display:flex; flex-direction:column; gap:12px; }
.s-1beb464.s-1beb464.s-1beb464 { font-size:28px; font-weight:900; color:#facc15; }
.s-1cb3f56.s-1cb3f56.s-1cb3f56 { display:flex; align-items:center; gap:3px; font-size:12px; font-weight:700; }
.s-201f64c.s-201f64c.s-201f64c { border:1px solid var(--accent); margin-bottom:16px; }
.s-221a9ff.s-221a9ff.s-221a9ff { margin:4px 0 0 16px; padding:0; }
.s-23fca94.s-23fca94.s-23fca94 { padding:24px; text-align:center; color:var(--muted); font-size:13px; }
.s-241341f.s-241341f.s-241341f { margin-top:14px; margin-bottom:14px; }
.s-2477994.s-2477994.s-2477994 { max-height:260px; overflow-y:auto; }
.s-2592cc7.s-2592cc7.s-2592cc7 { font-size:16px; }
.s-2761a6a.s-2761a6a.s-2761a6a { display:flex; align-items:center; gap:8px; }
.s-2880b6f.s-2880b6f.s-2880b6f { width:32px; height:32px; object-fit:contain; }
.s-29201f7.s-29201f7.s-29201f7 { padding:2px 8px; font-size:11px; }
.s-2937bfc.s-2937bfc.s-2937bfc { margin-bottom:6px; }
.s-2a7310a.s-2a7310a.s-2a7310a { background:#8b5cf620; color:#a78bfa; font-weight:700; }
.s-2ad971b.s-2ad971b.s-2ad971b { background-image:url('/assets/shop/window.png'); }
.s-2adf932.s-2adf932.s-2adf932 { font-size:14px; color:var(--muted); font-weight:700; }
.s-2baa9b9.s-2baa9b9.s-2baa9b9 { background:var(--bg); border:1px solid var(--border); padding:14px; border-radius:var(--radius); margin-bottom:12px; }
.s-2c1cfb3.s-2c1cfb3.s-2c1cfb3 { width:100%; margin-top:6px; }
.s-2ce8c7c.s-2ce8c7c.s-2ce8c7c { font-size:11.5px; max-width:260px; }
.s-2e4d9bb.s-2e4d9bb.s-2e4d9bb { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap:16px; margin-bottom:16px; }
.s-2e63745.s-2e63745.s-2e63745 { gap:12px; margin-top:10px; flex-wrap:wrap; }
.s-2ec33a7.s-2ec33a7.s-2ec33a7 { border-top:1px solid var(--border); padding-top:12px; margin-top:4px; }
.s-2ed22e5.s-2ed22e5.s-2ed22e5 { font-weight:700; font-size:13px; }
.s-2ee2942.s-2ee2942.s-2ee2942 { font-weight:700; font-size:13.5px; }
.s-2ef66ac.s-2ef66ac.s-2ef66ac { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.s-2f01efd.s-2f01efd.s-2f01efd { width:140px; }
.s-2f1018c.s-2f1018c.s-2f1018c { font-weight:700; padding:0 6px; color:var(--text); }
.s-2facf25.s-2facf25.s-2facf25 { margin:2px 0 0; font-size:13px; }
.s-3044b60.s-3044b60.s-3044b60 { font-size:13px; }
.s-304cd5c.s-304cd5c.s-304cd5c { gap:8px; }
.s-31c90b9.s-31c90b9.s-31c90b9 { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.s-333ba70.s-333ba70.s-333ba70 { display:flex; gap:12px; }
.s-3347178.s-3347178.s-3347178 { background:rgba(59,130,246,0.25); color:#60a5fa; }
.s-3390deb.s-3390deb.s-3390deb { display:flex; justify-content:space-between; align-items:center; }
.s-33ac9b0.s-33ac9b0.s-33ac9b0 { font-size:12px; display:block; margin-bottom:4px; }
.s-33f08e9.s-33f08e9.s-33f08e9 { margin-bottom:14px; background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:12px; }
.s-36b745a.s-36b745a.s-36b745a { justify-content:flex-end; }
.s-38861b5.s-38861b5.s-38861b5 { display:flex; gap:8px; }
.s-38b3dad.s-38b3dad.s-38b3dad { font-size:11px; margin-left:4px; }
.s-392f92d.s-392f92d.s-392f92d { padding:10px 4px; font-size:12px; }
.s-39807c8.s-39807c8.s-39807c8 { border-color:var(--bad); }
.s-3adafda.s-3adafda.s-3adafda { align-self:flex-end; }
.s-3b07e75.s-3b07e75.s-3b07e75 { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:12px 14px; font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:10px; }
.s-3bb4f87.s-3bb4f87.s-3bb4f87 { margin:8px 0 6px; }
.s-3c38ba2.s-3c38ba2.s-3c38ba2 { display:flex; align-items:center; gap:10px; flex-wrap:wrap; flex:1; }
.s-3e406e8.s-3e406e8.s-3e406e8 { margin:0; font-size:17px; font-weight:700; }
.s-3e49f9b.s-3e49f9b.s-3e49f9b { width:110px; font-weight:700; font-size:14px; }
.s-3fa317f.s-3fa317f.s-3fa317f { white-space:nowrap; background:rgba(239, 68, 68, 0.15); border:1px solid rgba(239, 68, 68, 0.35); color:#f87171; font-weight:700; }
.s-403e409.s-403e409.s-403e409 { color:#22c55e; font-weight:700; }
.s-40c1ce9.s-40c1ce9.s-40c1ce9 { max-width:680px; border-radius:16px; }
.s-4195d9b.s-4195d9b.s-4195d9b { display:flex; align-items:center; gap:4px; }
.s-41f9633.s-41f9633.s-41f9633 { font-size:12px; margin-top:4px; }
.s-420c934.s-420c934.s-420c934 { margin-bottom:12px; padding:12px; text-align:center; border:1px dashed var(--border); border-radius:8px; background:var(--bg); }
.s-4245c8f.s-4245c8f.s-4245c8f { margin:0; font-size:17px; font-weight:800; display:flex; align-items:center; gap:8px; }
.s-42b021c.s-42b021c.s-42b021c { gap:8px; align-items:center; }
.s-45090ed.s-45090ed.s-45090ed { font-size:13.5px; font-weight:700; display:flex; align-items:center; gap:6px; }
.s-4533b80.s-4533b80.s-4533b80 { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); padding-bottom:10px; }
.s-460ef34.s-460ef34.s-460ef34 { display:flex; align-items:flex-start; gap:10px; }
.s-4d11bbc.s-4d11bbc.s-4d11bbc { background:#eab30825; color:#eab308; font-weight:700; }
.s-4dbc886.s-4dbc886.s-4dbc886 { margin-top:8px; gap:6px; }
.s-4ddbe90.s-4ddbe90.s-4ddbe90 { white-space:nowrap; }
.s-4f0489c.s-4f0489c.s-4f0489c { flex:1; min-width:180px; }
.s-4fb0389.s-4fb0389.s-4fb0389 { margin:0; font-size:16px; font-weight:800; color:var(--text); }
.s-5371db1.s-5371db1.s-5371db1 { margin-top:10px; }
.s-543c8aa.s-543c8aa.s-543c8aa { margin:0 0 14px 0; font-size:15px; font-weight:800; display:flex; align-items:center; gap:8px; }
.s-553a645.s-553a645.s-553a645 { margin-top:14px; }
.s-57a3d5a.s-57a3d5a.s-57a3d5a { color:var(--danger); font-size:14px; }
.s-58cd3ef.s-58cd3ef.s-58cd3ef { font-weight:700; display:block; margin-bottom:8px; font-size:13.5px; }
.s-597c263.s-597c263.s-597c263 { justify-content:space-between; align-items:center; margin-bottom:12px; flex-wrap:wrap; gap:8px; }
.s-5c89cf3.s-5c89cf3.s-5c89cf3 { font-size:13px; line-height:1.6; margin:0; }
.s-5e87568.s-5e87568.s-5e87568 { font-size:11.5px; padding:2px 8px; }
.s-5f50ec5.s-5f50ec5.s-5f50ec5 { background:#f59e0b; color:#fff; }
.s-6069bb5.s-6069bb5.s-6069bb5 { padding:14px; }
.s-6179637.s-6179637.s-6179637 { margin-bottom:14px; }
.s-627e92a.s-627e92a.s-627e92a { white-space:pre-wrap; margin-top:6px; padding:12px; border-radius:10px; border:1px solid var(--border); background:var(--bg); }
.s-6425963.s-6425963.s-6425963 { font-weight:700; margin-top:6px; }
.s-642634d.s-642634d.s-642634d { flex-wrap:wrap; gap:8px; }
.s-6503d6d.s-6503d6d.s-6503d6d { margin-top:6px; font-size:13px; }
.s-6519eb2.s-6519eb2.s-6519eb2 { color:var(--ok); font-weight:700; }
.s-6792688.s-6792688.s-6792688 { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.s-69e6838.s-69e6838.s-69e6838 { width:220px; }
.s-6a134bd.s-6a134bd.s-6a134bd { font-size:16px; font-weight:800; color:var(--text); }
.s-6a399d6.s-6a399d6.s-6a399d6 { margin:12px 0 16px; padding:12px; background:var(--hover); border-radius:12px; }
.s-6a47cf3.s-6a47cf3.s-6a47cf3 { width:40px; height:40px; border-radius:50%; background:var(--accent-dim); display:grid; place-items:center; font-size:20px; }
.s-6aa208f.s-6aa208f.s-6aa208f { font-size:15px; margin:0; display:flex; align-items:center; gap:6px; }
.s-6b28678.s-6b28678.s-6b28678 { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); padding-bottom:10px; margin-bottom:10px; }
.s-6b68c10.s-6b68c10.s-6b68c10 { width:48px; height:48px; border-radius:12px; border:2px dashed var(--border); display:flex; align-items:center; justify-content:center; font-size:24px; color:var(--muted); }
.s-6b9c179.s-6b9c179.s-6b9c179 { font-size:12px; }
.s-6d2e934.s-6d2e934.s-6d2e934 { margin:0; display:flex; align-items:center; gap:8px; }
.s-6d56738.s-6d56738.s-6d56738 { width:100%; }
.s-6defa8d.s-6defa8d.s-6defa8d { padding:8px 24px; font-weight:700; }
.s-6ef7cbd.s-6ef7cbd.s-6ef7cbd { margin-top:12px; gap:8px; }
.s-700d588.s-700d588.s-700d588 { width:28px; height:28px; object-fit:contain; }
.s-7236b44.s-7236b44.s-7236b44 { flex:1; min-width:130px; }
.s-729192c.s-729192c.s-729192c { width:130px; }
.s-73371da.s-73371da.s-73371da { max-height:220px; overflow-y:auto; display:none; flex-direction:column; gap:6px; margin-bottom:12px; }
.s-7428644.s-7428644.s-7428644 { max-width:180px; }
.s-753eda1.s-753eda1.s-753eda1 { padding:10px 6px; }
.s-77f43ec.s-77f43ec.s-77f43ec { border-top:1px solid var(--border); padding-top:10px; display:flex; justify-content:space-between; align-items:center; }
.s-77fc6eb.s-77fc6eb.s-77fc6eb { width:32px; height:32px; color:var(--muted); }
.s-7802e1f.s-7802e1f.s-7802e1f { display:flex; gap:6px; margin-bottom:10px; border-bottom:1px solid var(--border); padding-bottom:8px; }
.s-784aef6.s-784aef6.s-784aef6 { display:flex; flex-direction:column; justify-content:space-between; }
.s-79117ae.s-79117ae.s-79117ae { background:var(--bg); padding:12px; border-radius:12px; border:1px solid var(--border); }
.s-79328ce.s-79328ce.s-79328ce { color:var(--ok); background:var(--ok-soft); }
.s-7b3c091.s-7b3c091.s-7b3c091 { margin-top:20px; display:flex; gap:10px; flex-wrap:wrap; }
.s-7bdc275.s-7bdc275.s-7bdc275 { color:var(--accent); font-size:1.15em; }
.s-7f67a89.s-7f67a89.s-7f67a89 { font-weight:800; font-size:14px; color:var(--text); display:flex; align-items:center; gap:6px; }
.s-81d6504.s-81d6504.s-81d6504 { font-weight:800; padding:10px 24px; box-shadow:0 0 16px rgba(16,185,129,0.35); }
.s-820a1c7.s-820a1c7.s-820a1c7 { box-shadow:0 0 14px rgba(16,185,129,.4); }
.s-8230798.s-8230798.s-8230798 { font-size:16px; margin-right:4px; }
.s-8235295.s-8235295.s-8235295 { box-shadow:0 0 14px rgba(16,185,129,.4); white-space:nowrap; }
.s-8345637.s-8345637.s-8345637 { margin-left:auto; }
.s-83e4487.s-83e4487.s-83e4487 { font-weight:700; }
.s-83f52d6.s-83f52d6.s-83f52d6 { gap:6px; align-items:center; }
.s-84ceca4.s-84ceca4.s-84ceca4 { margin:0; font-size:18px; }
.s-85c6f75.s-85c6f75.s-85c6f75 { padding:16px 20px; margin-bottom:14px; }
.s-8b68521.s-8b68521.s-8b68521 { font-size:11px; }
.s-8bf3586.s-8bf3586.s-8bf3586 { flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.s-8c20311.s-8c20311.s-8c20311 { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; border-bottom:1px solid var(--border); padding-bottom:12px; }
.s-8db8d85.s-8db8d85.s-8db8d85 { width:80px; }
.s-8e160d0.s-8e160d0.s-8e160d0 { display:flex; align-items:center; gap:10px; }
.s-8e38008.s-8e38008.s-8e38008 { white-space:nowrap; background:rgba(168, 85, 247, 0.15); border:1px solid rgba(168, 85, 247, 0.35); color:#c084fc; font-weight:700; }
.s-8e86974.s-8e86974.s-8e86974 { margin-bottom:16px; }
.s-8e980dc.s-8e980dc.s-8e980dc { max-height:220px; overflow-y:auto; display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.s-8ecfff9.s-8ecfff9.s-8ecfff9 { font-size:12px; padding:4px 8px; border-radius:6px; border:1px solid var(--border); background:var(--bg); color:var(--text); }
.s-8eecdff.s-8eecdff.s-8eecdff { display:inline-block; width:16px; height:16px; border:2px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin 0.8s linear infinite; }
.s-8f0751f.s-8f0751f.s-8f0751f { width:20px; height:20px; margin-top:2px; accent-color:var(--primary); cursor:pointer; }
.s-8f77872.s-8f77872.s-8f77872 { width:200px; }
.s-919376a.s-919376a.s-919376a { white-space:nowrap; background:rgba(59, 130, 246, 0.15); border:1px solid rgba(59, 130, 246, 0.4); color:#60a5fa; }
.s-91da88d.s-91da88d.s-91da88d { padding:1px 6px; font-size:10.5px; }
.s-91fdc37.s-91fdc37.s-91fdc37 { padding:8px 4px; }
.s-943b6f7.s-943b6f7.s-943b6f7 { padding:10px 4px; }
.s-9578226.s-9578226.s-9578226 { width:150px; }
.s-958b2fd.s-958b2fd.s-958b2fd { height:380px; overflow-y:auto; background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:12px; font-family:monospace; font-size:13px; display:flex; flex-direction:column; gap:6px; }
.s-981e4da.s-981e4da.s-981e4da { gap:6px; margin:10px 0; flex-wrap:wrap; }
.s-98a719f.s-98a719f.s-98a719f { margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.s-98d4c82.s-98d4c82.s-98d4c82 { font-weight:700; font-size:13.5px; margin-bottom:10px; }
.s-99aaba3.s-99aaba3.s-99aaba3 { width:54px; height:54px; }
.s-9ab095b.s-9ab095b.s-9ab095b { width:50px; }
.s-9acca08.s-9acca08.s-9acca08 { display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--border); padding-top:12px; margin-top:8px; }
.s-9ace82f.s-9ace82f.s-9ace82f { width:100%; margin-top:8px; }
.s-9b624ae.s-9b624ae.s-9b624ae { padding:16px; }
.s-9cbc747.s-9cbc747.s-9cbc747 { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap:16px; }
.s-9ccb169.s-9ccb169.s-9ccb169 { font-size:11.5px; color:var(--muted); display:block; margin-bottom:3px; }
.s-9cdb5ad.s-9cdb5ad.s-9cdb5ad { display:flex; gap:12px; margin-top:4px; flex-wrap:wrap; }
.s-9d95e46.s-9d95e46.s-9d95e46 { font-size:12px; font-weight:700; color:var(--muted); display:block; margin-bottom:3px; }
.s-9e3c4cc.s-9e3c4cc.s-9e3c4cc { margin-top:6px; }
.s-9e4d5e9.s-9e4d5e9.s-9e4d5e9 { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.s-9e6571b.s-9e6571b.s-9e6571b { display:flex; align-items:center; gap:8px; background:var(--card); padding:10px 14px; border-radius:10px; border:1px solid var(--border); }
.s-9e69028.s-9e69028.s-9e69028 { gap:6px; margin-top:4px; flex-wrap:wrap; }
.s-9ec5053.s-9ec5053.s-9ec5053 { display:inline-flex; align-items:center; gap:6px; cursor:pointer; font-size:12px; }
.s-a0290db.s-a0290db.s-a0290db { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; gap:10px; }
.s-a18ac80.s-a18ac80.s-a18ac80 { margin-top:4px; }
.s-a25c3f8.s-a25c3f8.s-a25c3f8 { background:#f59e0b20; color:#f59e0b; font-weight:700; }
.s-a497463.s-a497463.s-a497463 { max-height:240px; overflow-y:auto; }
.s-a497ea7.s-a497ea7.s-a497ea7 { max-width:140px; }
.s-a5c1b26.s-a5c1b26.s-a5c1b26 { margin-left:8px; font-size:12px; }
.s-a724cdf.s-a724cdf.s-a724cdf { background:var(--bg); padding:1px 5px; border-radius:4px; font-size:10px; margin-left:4px; border:1px solid var(--border); }
.s-a7409f7.s-a7409f7.s-a7409f7 { margin-bottom:10px; }
.s-a81f771.s-a81f771.s-a81f771 { width:120px; font-weight:700; }
.s-ace3ddd.s-ace3ddd.s-ace3ddd { margin-left:auto; align-self:center; }
.s-ad0d123.s-ad0d123.s-ad0d123 { color:var(--amber); }
.s-aee76f9.s-aee76f9.s-aee76f9 { color:var(--text); }
.s-afbe2cc.s-afbe2cc.s-afbe2cc { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; text-align:center; gap:8px; }
.s-b0043ef.s-b0043ef.s-b0043ef { margin-top:16px; }
.s-b0a03ab.s-b0a03ab.s-b0a03ab { background:rgba(234,179,8,0.25); color:#facc15; }
.s-b14eb6f.s-b14eb6f.s-b14eb6f { font-weight:800; font-size:13.5px; color:var(--text); display:flex; align-items:center; gap:6px; }
.s-b1a2900.s-b1a2900.s-b1a2900 { text-align:center; padding:16px; }
.s-b1bc916.s-b1bc916.s-b1bc916 { gap:10px; flex-wrap:wrap; align-items:center; }
.s-b1efe2f.s-b1efe2f.s-b1efe2f { cursor:pointer; display:flex; align-items:center; gap:6px; }
.s-b22af4d.s-b22af4d.s-b22af4d { grid-column:1/-1; text-align:center; font-size:10.5px; }
.s-ba5910b.s-ba5910b.s-ba5910b { gap:10px; margin-top:12px; }
.s-ba61d25.s-ba61d25.s-ba61d25 { gap:10px; margin-top:16px; flex-wrap:wrap; align-items:center; }
.s-bb2b0e5.s-bb2b0e5.s-bb2b0e5 { color:var(--accent); }
.s-bb2cb6b.s-bb2cb6b.s-bb2cb6b { display:flex; align-items:center; gap:8px; background:var(--hover); padding:6px 12px; border-radius:10px; border:1px solid var(--border); }
.s-bd0336d.s-bd0336d.s-bd0336d { border:1px solid var(--border); background:var(--card); }
.s-be8a286.s-be8a286.s-be8a286 { padding:3px 10px; font-size:12px; }
.s-bf83cf1.s-bf83cf1.s-bf83cf1 { font-size:18px; }
.s-c1a2654.s-c1a2654.s-c1a2654 { display:flex; gap:12px; margin-top:10px; font-size:12px; border-top:1px solid var(--border); padding-top:8px; flex-wrap:wrap; }
.s-c1d497f.s-c1d497f.s-c1d497f { display:none; margin-top:12px; background:var(--bg); padding:14px; border-radius:10px; border:1px solid var(--border); }
.s-c3f8370.s-c3f8370.s-c3f8370 { margin-left:8px; }
.s-c5ac9c4.s-c5ac9c4.s-c5ac9c4 { width:60px; }
.s-c6fe85c.s-c6fe85c.s-c6fe85c { margin-top:10px; gap:8px; flex-wrap:wrap; }
.s-c73c410.s-c73c410.s-c73c410 { font-size:11.5px; }
.s-c78f494.s-c78f494.s-c78f494 { width:90px; }
.s-c7d3551.s-c7d3551.s-c7d3551 { max-height:220px; overflow-y:auto; }
.s-c8a22c4.s-c8a22c4.s-c8a22c4 { display:flex; flex-direction:column; gap:6px; margin-top:10px; max-height:220px; overflow-y:auto; font-size:12px; }
.s-c8cdc19.s-c8cdc19.s-c8cdc19 { font-size:11.5px; color:var(--muted); display:block; margin-bottom:4px; }
.s-c9e3486.s-c9e3486.s-c9e3486 { color:#ef4444; }
.s-cabd0b7.s-cabd0b7.s-cabd0b7 { margin-top:14px; display:none; background:var(--hover); border:1px solid var(--accent); }
.s-cb45893.s-cb45893.s-cb45893 { display:none; }
.s-cb66db6.s-cb66db6.s-cb66db6 { margin-top:14px; padding-top:10px; border-top:1px solid var(--border); }
.s-cbcd490.s-cbcd490.s-cbcd490 { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.s-cc234e8.s-cc234e8.s-cc234e8 { font-size:12.5px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:4px; }
.s-ccf8497.s-ccf8497.s-ccf8497 { font-size:12px; color:var(--text); }
.s-d03feff.s-d03feff.s-d03feff { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap:12px; }
.s-d0a03ba.s-d0a03ba.s-d0a03ba { width:20px; height:20px; }
.s-d20161e.s-d20161e.s-d20161e { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:14px; }
.s-d3863ca.s-d3863ca.s-d3863ca { margin-left:6px; color:#4ade80; background:rgba(74,222,128,0.12); }
.s-d431697.s-d431697.s-d431697 { margin-top:8px; }
.s-d51702b.s-d51702b.s-d51702b { margin-bottom:8px; }
.s-d692729.s-d692729.s-d692729 { padding:12px; text-align:center; }
.s-d6c3084.s-d6c3084.s-d6c3084 { display:inline; margin:0; }
.s-d7f8723.s-d7f8723.s-d7f8723 { font-size:12px; font-weight:700; }
.s-d86cbca.s-d86cbca.s-d86cbca { display:none; margin-top:6px; }
.s-da5cd67.s-da5cd67.s-da5cd67 { flex:1; }
.s-dbc1e58.s-dbc1e58.s-dbc1e58 { gap:6px; margin-top:4px; }
.s-dcc05aa.s-dcc05aa.s-dcc05aa { width:16px; height:16px; }
.s-dd76ed5.s-dd76ed5.s-dd76ed5 { max-width:240px; }
.s-df344b7.s-df344b7.s-df344b7 { margin:0 0 10px; font-size:13px; color:var(--text); line-height:1.4; }
.s-e0c05a3.s-e0c05a3.s-e0c05a3 { margin:0 0 8px 0; font-size:14px; font-weight:800; }
.s-e175a7f.s-e175a7f.s-e175a7f { margin-top:14px; gap:8px; }
.s-e2fa586.s-e2fa586.s-e2fa586 { color:var(--text); font-size:13px; }
.s-e661f79.s-e661f79.s-e661f79 { justify-content:flex-start; text-align:left; }
.s-e847605.s-e847605.s-e847605 { margin:4px 0 0; font-size:13px; }
.s-e95c842.s-e95c842.s-e95c842 { padding:3px 8px; font-size:13px; border-radius:6px; width:110px; }
.s-ea8bbc8.s-ea8bbc8.s-ea8bbc8 { font-size:12.5px; }
.s-eaa55bc.s-eaa55bc.s-eaa55bc { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.s-eb1ed4f.s-eb1ed4f.s-eb1ed4f { border-radius:50%; width:30px; height:30px; padding:0; display:grid; place-items:center; }
.s-eb3e58e.s-eb3e58e.s-eb3e58e { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); padding-bottom:12px; margin-bottom:14px; }
.s-ecff2ba.s-ecff2ba.s-ecff2ba { border-color:var(--accent); }
.s-ed3a493.s-ed3a493.s-ed3a493 { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.s-edab193.s-edab193.s-edab193 { width:20px; height:20px; color:var(--accent); }
.s-ee0435f.s-ee0435f.s-ee0435f { width:100px; }
.s-efcceb1.s-efcceb1.s-efcceb1 { margin-top:10px; padding:10px; background:var(--bg); border-radius:8px; }
.s-f1aa132.s-f1aa132.s-f1aa132 { width:100%; margin-top:10px; font-family:Consolas,monospace; }
.s-f247e12.s-f247e12.s-f247e12 { width:100%; margin-top:12px; }
.s-f2ba615.s-f2ba615.s-f2ba615 { display:flex; align-items:baseline; gap:8px; margin-top:6px; }
.s-f4d1664.s-f4d1664.s-f4d1664 { margin-top:16px; background:var(--card); border:1px solid var(--border); }
.s-f4e1992.s-f4e1992.s-f4e1992 { margin:0; flex:1; max-width:280px; }
.s-f52ed57.s-f52ed57.s-f52ed57 { width:100%; padding:6px 8px; }
.s-f5754c3.s-f5754c3.s-f5754c3 { max-height:220px; overflow-y:auto; display:none; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.s-f577ca1.s-f577ca1.s-f577ca1 { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:14px; }
.s-f5b833f.s-f5b833f.s-f5b833f { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.s-f66574d.s-f66574d.s-f66574d { width:56px; height:56px; border-radius:50%; object-fit:cover; border:2px solid var(--primary); }
.s-f75c6b6.s-f75c6b6.s-f75c6b6 { display:grid; grid-template-columns:180px 1fr auto auto; gap:10px; align-items:center; margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
.s-f95ebd2.s-f95ebd2.s-f95ebd2 { width:70px; }
.s-fa3e1c7.s-fa3e1c7.s-fa3e1c7 { margin-bottom:12px; }
.s-fb97512.s-fb97512.s-fb97512 { color:#ef4444; font-weight:700; }
.s-fcc53cb.s-fcc53cb.s-fcc53cb { font-size:24px; }
.s-fd0d8f2.s-fd0d8f2.s-fd0d8f2 { margin:0 0 12px 0; padding:10px 14px; background:rgba(59, 130, 246, 0.08); border:1px solid rgba(59, 130, 246, 0.22); border-radius:10px; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; }
.s-fef974b.s-fef974b.s-fef974b { display:flex; justify-content:space-between; align-items:center; cursor:pointer; }
.s-ff59efa.s-ff59efa.s-ff59efa { font-weight:800; font-size:15px; color:var(--text); }
.s-ffa2312.s-ffa2312.s-ffa2312 { max-width:520px; border-radius:16px; }

/* =====================================================================
   v6 — refreshed shell + responsive layout (desktop · tablet · phone)
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img, video, canvas { max-width: 100%; }
.main-col > main, .tab-page, .card, .bento-card { min-width: 0; }
.two-col > *, .toolbar > * { min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- topbar ---- */
.topbar { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); z-index: 40; min-height: 60px; }
.crumb { min-width: 0; }
#page-crumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-open-btn, .nav-close-btn { display: none; }
.mobile-tabbar { display: none; }
.nav-backdrop { display: none; }

/* ---- sidebar polish ---- */
.nav-item { min-height: 40px; border-radius: 10px; position: relative; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* ---- cards / tables ---- */
.card { box-shadow: var(--shadow); }
.page-head h1 { letter-spacing: -.01em; }
.table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; max-width: 100%; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* ---- admin user chip docked in the topbar (auth.js) ---- */
.pa-slot { display: flex; align-items: center; }
.pa-chip.pa-docked { position: relative; inset: auto; z-index: 60; padding: 0; border: 0; background: none;
  display: block; font: inherit; color: var(--text); }
.pa-docked > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  font-size: 13px; user-select: none; min-height: 36px; margin: 0; }
.pa-docked > summary::-webkit-details-marker { display: none; }
.pa-docked > summary:hover, .pa-docked[open] > summary { border-color: var(--accent); }
.pa-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  font-size: 13px; color: var(--accent-text); background: linear-gradient(135deg, var(--accent-2), var(--accent)); flex: none; }
.pa-who-name { font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-role { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.pa-chip:not(.pa-docked) .pa-avatar { display: none; }
.pa-chip:not(.pa-docked) .pa-who { display: inline-flex; gap: 6px; align-items: center; }
.pa-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; display: flex; flex-direction: column;
  gap: 2px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
.pa-menu:empty { display: none; }
.pa-menu .pa-mini { margin: 0; text-align: left; border: 0; background: none; color: var(--text); padding: 10px 12px;
  border-radius: 10px; font-size: 14px; }
.pa-menu .pa-mini:hover { background: var(--hover); }
.pa-menu .pa-mini.pa-danger { color: var(--bad); }

/* ---- login / admin dialogs follow the light and dark theme ---- */
.pa-card { background: var(--card); color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  font-family: inherit; }
.pa-title, .pa-h3 { color: var(--accent-2); }
.pa-sub, .pa-x, .pa-table th { color: var(--muted); }
.pa-input { background: var(--bg); color: var(--text); border-color: var(--border); font-size: 15px; min-height: 44px; }
.pa-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.pa-btn { min-height: 44px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text); }
.pa-err { color: var(--bad); }
.pa-table th, .pa-table td { border-bottom-color: var(--line); }
.pa-mini { background: var(--hover); color: var(--text); border-color: var(--border); }
.pa-mini:hover { border-color: var(--accent); }
.pa-danger { color: var(--bad); }
.pa-list { overflow-x: auto; }
:root[data-theme="light"] .pa-overlay:not(.pa-modal) { background: radial-gradient(circle at 50% 30%, #fff7ec, #e9e2d6); }
:root[data-theme="light"] .pa-modal { background: rgba(20, 22, 28, .45); }

#toasts { max-width: calc(100vw - 24px); }
.toast { overflow-wrap: anywhere; }

/* ---------- tablet and phone: drawer menu + bottom tab bar ---------- */
@media (max-width: 900px) {
  .app, .app.sidebar-mini { display: block; }
  .app.sidebar-mini .main-col { margin-left: 0; }
  .sidebar, .app.sidebar-mini .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000; width: min(86vw, 320px); height: 100%;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); border-right: 1px solid var(--border); border-bottom: 0;
    transform: translateX(-105%); transition: transform .22s cubic-bezier(.4, 0, .2, 1), visibility .22s;
    overflow-y: auto; overscroll-behavior: contain; visibility: hidden; }
  .app.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(8, 10, 14, .5);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
  .nav-backdrop[hidden] { display: none; }
  .nav { flex-direction: column; flex-wrap: nowrap; }
  .nav-item { width: 100%; min-height: 46px; }
  .nav-item.active::before { display: none; }
  .app.sidebar-mini .brand, .app.sidebar-mini .nav-category-head span, .app.sidebar-mini .nav-item span,
  .app.sidebar-mini .nav-item .count, .app.sidebar-mini #btn-side-create span, .app.sidebar-mini .host-chip code,
  .app.sidebar-mini #btn-hotreload span { display: revert !important; }
  .app.sidebar-mini .nav-item { justify-content: flex-start; padding: 9px 12px; }
  .btn-sidebar-toggle { display: none; }
  .nav-close-btn { display: grid; place-items: center; flex: none; }
  .sidebar-header-row { gap: 10px; }
  .sidebar-header-row .brand { flex: 1; min-width: 0; }
  .side-foot { display: flex; flex-direction: column; }
  .me { display: flex; }

  .nav-open-btn { display: grid; place-items: center; flex: none; }
  .topbar { position: sticky; top: 0; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top));
    gap: 8px; flex-wrap: nowrap; min-height: 56px; }
  .crumb { flex: 1; font-size: 15px; }
  .crumb-bar { display: none; }
  .top-actions { gap: 6px; flex-wrap: nowrap; }
  #top-host { display: none; }
  #btn-cmd-palette span, #btn-cmd-palette kbd { display: none; }
  #btn-cmd-palette, #btn-maint { padding: 0; width: 36px; height: 36px; min-height: 36px; border-radius: 50%;
    font-size: 0; gap: 0; display: inline-grid; place-items: center; }
  #btn-cmd-palette .ic, #btn-maint .ic { width: 17px; height: 17px; }
  #status-pill { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  .pa-who-name, .pa-role { display: none; }
  .pa-docked > summary { padding: 3px; }

  main { padding: 14px 12px calc(88px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 21px; gap: 8px; }
  .page-head p { font-size: 13px; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .card.flush { padding: 0; }
  .card-head { flex-wrap: wrap; gap: 10px; }
  .card-head.between > * { min-width: 0; }
  .toolbar { padding: 10px; }
  .toolbar .search { flex: 1 1 100%; max-width: none; }
  .search input { min-width: 0; flex: 1; }
  .two-col { grid-template-columns: 1fr; gap: 14px; }

  .mobile-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 900; background: color-mix(in srgb, var(--card) 92%, transparent); border-top: 1px solid var(--border);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .mtab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px;
    border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; border-radius: 12px;
    cursor: pointer; padding: 4px 2px; -webkit-tap-highlight-color: transparent; min-width: 0; }
  .mtab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mtab .ic { width: 50px; height: 27px; padding: 3px 14px; border-radius: 999px; }
  .mtab.active { color: var(--accent); }
  .mtab.active .ic { background: var(--accent-soft); }
  .app.nav-open #btn-nav-more { color: var(--accent); }
  #toasts { right: 12px; left: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  dialog { max-height: calc(100dvh - 24px); overflow: auto; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; max-width: 100%; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; }
  .bento-grid { gap: 10px; }
  .bento-card.span-3, .bento-card.span-4 { grid-column: span 6; }
  .bento-card { padding: 14px; }
  .kpi-value { font-size: 19px; overflow-wrap: anywhere; }
  .kpi-sub { font-size: 11.5px; flex-wrap: wrap; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  th, td { padding: 10px 12px; }
  table { font-size: 13.5px; }
  dialog, dialog.wide, dialog.confirm { width: calc(100vw - 20px); max-width: none; padding: 18px 16px; }
  .cfm-detail { margin-left: 0; }
  .pa-card { padding: 22px 16px; }
  .pa-row { flex-direction: column; }
  .pa-row .pa-input { flex: none; width: 100%; }
  .pa-inline { display: flex; flex-wrap: wrap; }
  .pa-inline .pa-input { width: 100%; }
}
@media (max-width: 380px) {
  #status-pill { display: none; }
  .bento-card.span-3, .bento-card.span-4 { grid-column: span 12; }
}

/* ---- v6 phone fixes for wide widgets found by the 375px sweep ---- */
.shop-shelf-container { overflow-x: auto; max-width: 100%; }
@media (max-width: 900px) {
  .spawn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spawn .field > input, .spawn .field > select { width: 100%; min-width: 0; }
  .spawn > .btn, .spawn > button { grid-column: 1 / -1; }
  input[type="file"] { max-width: 100%; display: block; }
  .s-f75c6b6.s-f75c6b6.s-f75c6b6 { grid-template-columns: minmax(0, 1fr) auto; }
  .s-f75c6b6.s-f75c6b6.s-f75c6b6 > div:first-child { grid-column: 1 / -1; }
  .s-fd0d8f2.s-fd0d8f2.s-fd0d8f2, .s-2761a6a.s-2761a6a.s-2761a6a { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .spawn { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .row > * { max-width: 100%; }
  .row > label { overflow-wrap: anywhere; }
}
@media (max-width: 900px) {
  .row > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .row > select { flex: 1 1 160px; min-width: 0; }
  #chat-search-input { flex-basis: 100%; }
  .chat-line { flex-wrap: wrap; row-gap: 2px; }
  .chat-msg { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .table-wrap > table > thead > tr > th:first-child,
  .table-wrap > table > tbody > tr > td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card);
    box-shadow: 1px 0 0 var(--line); }
  .table-wrap > table > thead > tr > th:first-child { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
}
@media (max-width: 900px) {
  .shops-subnav-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .shops-subnav-tabs { flex-direction: column; width: 100%; }
  .shops-subtab { width: 100%; justify-content: flex-start; }
  .shops-subtab .subtab-pill { margin-left: auto; }
  .shops-subnav-right .live-pill, .facility-filter-right .live-pill { white-space: normal; }
  .facility-filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .facility-filter-right { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .facility-search-box { width: 100%; min-width: 0; }
  .facility-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .facility-chip { flex: none; }
}
@media (max-width: 900px) {
  .shop-hero-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  .shop-hero-content { width: 100%; min-width: 0; }
  .shop-hero-title-group { flex: 1; min-width: 0; }
  .shop-hero-tags { flex-wrap: wrap; }
  .shop-hero-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
  .shop-hero-actions > .btn.primary { flex: 1 1 100%; }
}
/* inventory hero (inline-styled by app.js): let the action buttons wrap under the character instead of overlapping */
#inv-hero-banner { flex-wrap: wrap; gap: 12px; }
#inv-hero-banner > div:first-child { flex: 1 1 300px !important; min-width: 0; }
#inv-hero-banner > .row { flex: 1 1 320px; min-width: 0; }
@media (max-width: 640px) {
  #inv-hero-banner > div:first-child img:last-child { display: none; }
  #inv-hero-banner > .row .btn { flex: 1 1 auto; }
}

/* donation slips (tab-donate) */
.slip-pad { padding: 0 16px 16px; }

/* ---------- admin login background: Over Tails theme (night sky, wind swirl, leaves) ---------- */
.pa-overlay:not(.pa-modal) {
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(255, 196, 92, .22), transparent 70%),
    radial-gradient(ellipse 90% 60% at 15% 10%, rgba(64, 140, 214, .30), transparent 70%),
    radial-gradient(ellipse 80% 60% at 90% 20%, rgba(40, 170, 150, .18), transparent 70%),
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #cfe9ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 67% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 83% 30%, #ffe8b0 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 24%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 92% 9%, #cfe9ff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 42%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #0a1736 0%, #0f2747 45%, #12343f 75%, #0a1a1c 100%);
}
.pa-overlay:not(.pa-modal)::before,
.pa-overlay:not(.pa-modal)::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.pa-overlay:not(.pa-modal)::before {                 /* the wind swirl, drifting slowly */
  inset: -10% -20%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%237fd3ff' stop-opacity='0'/%3E %3Cstop offset='.35' stop-color='%239fe0ff' stop-opacity='.55'/%3E%3Cstop offset='.7' stop-color='%234fa8e0' stop-opacity='.35'/%3E %3Cstop offset='1' stop-color='%237fd3ff' stop-opacity='0'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23e8f7ff' stop-opacity='0'/%3E %3Cstop offset='.5' stop-color='%23e8f7ff' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%23e8f7ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cg fill='none' stroke-linecap='round'%3E %3Cpath d='M-100 640 C 250 420, 520 820, 860 560 S 1380 260, 1720 420' stroke='url%28%23a%29' stroke-width='70'/%3E %3Cpath d='M-100 640 C 250 420, 520 820, 860 560 S 1380 260, 1720 420' stroke='url%28%23b%29' stroke-width='10'/%3E %3Cpath d='M-120 330 C 240 180, 560 420, 900 300 S 1400 120, 1720 230' stroke='url%28%23a%29' stroke-width='34' opacity='.7'/%3E %3Cpath d='M-80 790 C 320 700, 700 900, 1060 760 S 1480 640, 1700 700' stroke='url%28%23a%29' stroke-width='22' opacity='.55'/%3E %3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: pa-wind 26s ease-in-out infinite alternate;
}
.pa-overlay:not(.pa-modal)::after {                  /* hills at the bottom + falling leaves */
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 260' preserveAspectRatio='xMidYMax slice'%3E %3Cpath d='M0 260V170c120-30 240 10 380-20s260-60 420-30 300 50 440 20 240-40 360-10v130z' fill='%230d1d22'/%3E %3Cpath d='M0 260V210c160-20 300 20 460 0s300-40 460-10 320 30 480 0 160-10 200 0v70z' fill='%23081317'/%3E %3Cg fill='%232f4d3c'%3E%3Cpath d='M240 205l26-18 30 8 6 22-34 8z'/%3E%3Cpath d='M1180 196l22-14 26 10 2 18-30 6z'/%3E %3Cpath d='M720 222l18-10 20 6-2 14-24 4z'/%3E%3C/g%3E %3Cg fill='%234c8a4a' opacity='.8'%3E%3Cpath d='M262 187c4-10 12-14 16-12-2 8-8 12-16 12z'/%3E%3Cpath d='M1200 182c4-8 10-12 14-10-2 6-6 10-14 10z'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% 30% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 840 840'%3E %3Cg fill='%235fae54'%3E %3Cpath d='M40 60c18-16 44-14 52 2-18 14-40 16-52-2z' opacity='.75'/%3E %3Cpath d='M300 40c10-20 34-26 46-14-10 18-30 26-46 14z' fill='%237cc46a' opacity='.6'/%3E %3Cpath d='M190 220c18-12 42-8 48 8-18 10-38 10-48-8z' fill='%234f9a48' opacity='.7'/%3E %3Cpath d='M360 300c14-14 36-14 44 0-14 12-32 14-44 0z' opacity='.55'/%3E %3Cpath d='M80 340c16-10 36-6 40 8-16 8-32 8-40-8z' fill='%238fd37a' opacity='.5'/%3E %3C/g%3E %3Cg fill='%23ffe29a'%3E%3Ccircle cx='140' cy='120' r='2.2' opacity='.8'/%3E%3Ccircle cx='260' cy='300' r='1.6' opacity='.7'/%3E %3Ccircle cx='380' cy='170' r='1.8' opacity='.6'/%3E%3Ccircle cx='30' cy='250' r='1.4' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 420px 420px repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 840 840'%3E %3Cg fill='%235fae54'%3E %3Cpath d='M40 60c18-16 44-14 52 2-18 14-40 16-52-2z' opacity='.75'/%3E %3Cpath d='M300 40c10-20 34-26 46-14-10 18-30 26-46 14z' fill='%237cc46a' opacity='.6'/%3E %3Cpath d='M190 220c18-12 42-8 48 8-18 10-38 10-48-8z' fill='%234f9a48' opacity='.7'/%3E %3Cpath d='M360 300c14-14 36-14 44 0-14 12-32 14-44 0z' opacity='.55'/%3E %3Cpath d='M80 340c16-10 36-6 40 8-16 8-32 8-40-8z' fill='%238fd37a' opacity='.5'/%3E %3C/g%3E %3Cg fill='%23ffe29a'%3E%3Ccircle cx='140' cy='120' r='2.2' opacity='.8'/%3E%3Ccircle cx='260' cy='300' r='1.6' opacity='.7'/%3E %3Ccircle cx='380' cy='170' r='1.8' opacity='.6'/%3E%3Ccircle cx='30' cy='250' r='1.4' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") 170px 230px / 260px 260px repeat;
  opacity: .9;
  animation: pa-leaves 40s linear infinite;
}
@keyframes pa-wind { from { transform: translateX(-4%) translateY(1%); } to { transform: translateX(4%) translateY(-2%); } }
@keyframes pa-leaves { from { background-position: center bottom, 0 0, 170px 230px; } to { background-position: center bottom, 420px 840px, -90px 750px; } }
.pa-overlay:not(.pa-modal) .pa-card {
  background: rgba(16, 22, 34, .82); backdrop-filter: blur(10px) saturate(130%);
  border-color: rgba(242, 193, 78, .45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(127, 211, 255, .08), 0 0 60px rgba(255, 196, 92, .12);
}
.pa-overlay:not(.pa-modal) .pa-logo { height: 72px; filter: drop-shadow(0 4px 14px rgba(255, 196, 92, .35)); }
@media (prefers-reduced-motion: reduce) {
  .pa-overlay:not(.pa-modal)::before, .pa-overlay:not(.pa-modal)::after { animation: none; }
}

/* web shop tab */
.ws-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ws-kpi { display: grid; gap: 2px; padding: 14px 16px; }
.ws-kpi b { font-size: 20px; }
.ws-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 4px 0; }
.ws-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.ws-bar i { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f2c14e, #c98a1f); }
.ws-bar small { font-size: 10px; color: var(--muted, #9aa3b2); white-space: nowrap; }
.ws-bar span { font-size: 11px; color: var(--muted, #9aa3b2); }
.ws-add { padding: 0 16px 12px; align-items: flex-end; }
.ws-search { margin-left: auto; max-width: 220px; }
.ws-table td { vertical-align: middle; }
.ws-in { width: 96px; padding: 6px 8px; }
.ws-in.xs { width: 64px; }
.ws-in.sm { width: 84px; }
.ws-in.dt { width: 178px; }
.ws-dates { display: grid; gap: 4px; }
.ws-item { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.ws-sale { font-size: 11.5px; color: #4ade80; margin-top: 3px; white-space: nowrap; }
.ws-sale.bad { color: #ff8a80; }
.ws-actions { white-space: nowrap; }
.ws-actions .btn + .btn { margin-left: 4px; }
.ws-off td { opacity: .55; }
.ws-off td:nth-last-child(-n+2) { opacity: 1; }
.ws-recent { max-height: 420px; overflow: auto; }
@media (max-width: 900px) { .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
