:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --panel: #ffffff;
  --ink: #1a2332;
  --muted: #6b7789;
  --line: #e4ebf5;
  --soft: #f3f6fb;
  --accent: #2f6fed;
  --accent-deep: #1d4ed8;
  --accent-soft: #e8f1ff;
  --accent-ink: #ffffff;
  --ok-bg: #e7f6ec;
  --ok: #1f8a4c;
  --off-bg: #eef2f7;
  --off: #6b7789;
  --shadow: 0 1px 2px rgba(29, 78, 216, 0.04), 0 16px 36px rgba(29, 78, 216, 0.07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button, input, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button { cursor: pointer; }

.gate {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 420px at 50% -10%, #ffffff, transparent 60%),
    var(--bg);
}
.gate-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 28px 24px;
}
.mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #5b8def, #2563eb);
  color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}
.mark svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.mark.sm { width: 36px; height: 36px; border-radius: 11px; }
.mark.sm svg { width: 18px; height: 18px; }
.gate h1 { margin: 16px 0 6px; font-size: 26px; letter-spacing: -0.03em; }
.lead, .hint { color: var(--muted); }
.lead { margin: 0 0 18px; }
.hint { margin: 14px 0 0; font-size: 12px; }
label { display: block; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input:not([type]), textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
}
input:focus, textarea:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16); }
textarea { resize: vertical; min-height: 84px; }
.gate button, .form-actions button, .add-row button, button.solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #4d84f3, #2563eb);
  color: var(--accent-ink);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}
.gate button:hover, .form-actions button:hover, .add-row button:hover { filter: brightness(1.04); }
.err {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: #9b2c2c;
}

.shell { min-height: 100%; display: flex; background: var(--bg); }
.side {
  width: 232px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 18px 12px 14px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 16px; }
.brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand span { color: var(--muted); font-size: 12px; }
.navs { display: flex; flex-direction: column; gap: 4px; }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 10px;
}
.nav[hidden] { display: none; }
.nav em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  padding: 0 7px;
}
.nav svg { flex: none; }
.nav:hover { background: var(--soft); }
.nav.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 650; }
.nav.on em { color: var(--accent-deep); background: #fff; }
.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 6px 0;
  border-top: 1px solid var(--line);
}
.avatar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  flex: none;
}
.ava svg { width: 15px; height: 15px; }
#who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}
button.ghost:hover { background: var(--soft); }
button.ghost svg { width: 16px; height: 16px; flex: none; }

.main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.top { margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.page-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  flex: none;
}
.kicker { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; }
#pageTitle { margin: 2px 0 0; font-size: 26px; letter-spacing: -0.03em; font-weight: 650; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.stats .stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
}
.stats .stat:hover { border-color: #c5d8fb; }
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat-ico.all { background: #e8f1ff; color: #1d4ed8; }
.stat-ico.on { background: #e7f6ec; color: #1f8a4c; }
.stat-ico.off { background: #eef2f7; color: #6b7789; }
.stat-ico.hero { background: #e8f1ff; color: #2563eb; }
.stat-ico.hero svg, .star svg { fill: currentColor; stroke: none; }
.stats span { color: var(--muted); font-size: 13px; }
.stats strong { display: block; margin-top: 2px; font-size: 26px; letter-spacing: -0.04em; font-weight: 650; color: var(--ink); }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.03);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}
.panel-head h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel-head h2 svg { color: var(--accent-deep); }
button.text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  padding: 4px 2px;
}
button.text:hover { color: var(--ink); }
.search { position: relative; margin: 0; width: min(260px, 46vw); }
.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--muted);
}
.search input { margin: 0; padding-left: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 16px 8px; }
.filters button, .filters select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
}
.filters button svg { width: 15px; height: 15px; }
.filters button[data-shelf="hero"] svg { fill: currentColor; stroke: none; }
.filters select { width: auto; margin: 0; }
.filters button.on { background: var(--accent-soft); color: var(--accent-deep); border-color: #c5d8fb; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 10px;
  white-space: nowrap;
  flex: none;
}
.tabs button svg { width: 15px; height: 15px; flex: none; }
.tabs button.on { background: var(--accent-soft); color: var(--accent-deep); }
.tabs.inner {
  margin-bottom: 12px;
  padding: 3px;
}
.tabs.inner button { padding: 6px 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions button { white-space: nowrap; flex: none; }
.item.plain {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
  margin: 4px 0;
}
.item.plain > div { min-width: 0; }
.meta { overflow-wrap: anywhere; }
.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; padding: 4px 16px 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--soft);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
}
.tag button { border: 0; background: transparent; color: var(--muted); padding: 0 4px; }
.add-row { display: flex; gap: 8px; padding: 0 16px 16px; }
.add-row input { margin: 0; }
.add-row button { width: auto; min-width: 88px; white-space: nowrap; flex: none; }
select, input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.panel + .panel, form.panel + .panel { margin-top: 14px; }
.slice-note { padding: 0 16px 8px; }
.actions .mini { width: 88px; margin: 0; padding: 6px 8px; flex: none; }
.jumps { display: flex; gap: 12px; margin-top: 4px; }
.edit-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.edit-line input { width: 160px; margin: 0; flex: none; }
.edit-line input.wide { width: min(100%, 280px); }
.edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.cover-prev {
  width: 78px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 16px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
}
#eps { min-height: 220px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.picks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.picks input { width: 16px; height: 16px; margin: 0; }
.ep-list { margin: 0 8px 8px 72px; padding: 0 0 8px; list-style: none; color: var(--muted); font-size: 13px; }
.ep-list li { padding: 6px 0; border-top: 1px solid var(--line); }
button.danger { color: #9b2c2c; border-color: #f0d0d0; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.form-actions .ghost { width: auto; }
#coverNote { display: block; margin-top: 8px; }

.items { display: flex; flex-direction: column; padding: 4px 8px 8px; }
.item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
}
.item.pickable { grid-template-columns: 22px 52px 1fr auto; }
.row-pick { width: 16px; height: 16px; margin: 0; justify-self: center; }
.item:hover { background: #fafbfc; border-color: #c5d8fb; }
.thumb, .thumb img {
  width: 52px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}
.thumb {
  display: grid;
  place-items: center;
  color: #b0b4bc;
  overflow: hidden;
}
.thumb svg { width: 20px; height: 20px; }
.item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 650; }
.item-title .miss { color: var(--muted); font-weight: 550; }
.item-intro, .meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.item-intro {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-intro.body { -webkit-line-clamp: 2; }
.item-url {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: min(100%, 560px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.pill, .chip, .star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 550;
  font-size: 12px;
  border-radius: 999px;
  padding: 1px 8px;
}
.pill svg, .star svg { width: 12px; height: 12px; }
.pill.on { background: var(--ok-bg); color: var(--ok); }
.pill.off { background: var(--off-bg); color: var(--off); }
.chip { background: var(--soft); color: var(--ink); }
.chip.due, .chip.gold, .chip.skip { background: var(--accent-soft); color: var(--accent-deep); }
.edit-line input[type="number"] { width: 108px; }
.star { background: #e8f1ff; color: #1d4ed8; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 12px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg { width: 28px; height: 28px; margin-bottom: 6px; color: #7aa2f5; }
.empty p { margin: 0; }

.form-card { padding-bottom: 8px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 4px 16px 0;
}
.span2 { grid-column: 1 / -1; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  margin-top: 22px;
}
.check input { width: 16px; height: 16px; margin: 0; }
.file { position: relative; }
.file input {
  position: absolute;
  inset: 22px 0 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.file-box {
  margin-top: 6px;
  min-height: 84px;
  border: 1px dashed #d5d8e0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: #fbfbfc;
}
.file-box svg { width: 22px; height: 22px; }
.form-actions { padding: 4px 16px 16px; }
#videoStatus { padding: 0 16px 16px; margin-top: 0; }
.form-actions button { width: auto; min-width: 160px; }
.form-actions button svg { width: 16px; height: 16px; flex: none; }
button:disabled { opacity: 0.55; cursor: default; }

.user-hit {
  appearance: none;
  min-width: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  width: 100%;
  color: inherit;
}
.user-hit:hover .item-title > span:first-child { color: var(--accent-deep); }
.user-hit:focus-visible { outline: 2px solid #93b4f5; outline-offset: 4px; border-radius: 8px; }
.user-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flag {
  font-style: normal;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 16px;
  line-height: 1;
}
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(29, 78, 216, 0.18);
}
.sheet-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 740px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f4f8ff, #fff);
  position: sticky;
  top: 0;
  z-index: 1;
}
.sheet-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-body { padding: 0 0 8px; }
.sheet-dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 12px;
  margin: 0;
  padding: 16px 20px 8px;
}
.sheet-dl dt { color: var(--muted); font-size: 12px; padding-top: 2px; }
.sheet-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sheet-ops { padding: 4px 20px 16px; }
.sheet-block {
  margin: 0 20px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sheet-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--accent-deep);
}
.traces { margin: 0; padding: 0; list-style: none; }
.trace {
  position: relative;
  padding: 0 0 14px 16px;
  border-left: 2px solid #d7e4fb;
}
.trace:last-child { padding-bottom: 0; }
.trace::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.trace-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 2px 8px;
  align-items: baseline;
}
.trace-row + .trace-row { margin-top: 2px; }
.trace-k { color: var(--muted); font-size: 12px; }
.trace-v { overflow-wrap: anywhere; }
.trace-act { font-weight: 650; }
.sheet-empty { margin: 0; color: var(--muted); font-size: 13px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #1a2332;
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: var(--shadow);
  pointer-events: none;
}
#toast svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .navs { flex-direction: row; }
  .nav { width: auto; }
  .side-foot { margin-top: 12px; }
  .stats, .form-grid, .label-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 20px 16px 36px; }
}
@media (max-width: 640px) {
  .stats, .label-grid { grid-template-columns: 1fr; }
  .item { grid-template-columns: 44px 1fr; }
  .item > .actions { grid-column: 2; justify-self: start; }
  .item.pickable { grid-template-columns: 22px 44px minmax(0, 1fr); }
  .item.pickable > .actions { grid-column: 2 / -1; justify-self: start; }
  .item.plain { grid-template-columns: 1fr; }
  .item.plain > .actions { grid-column: 1; }
}

.navs {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.side {
  max-height: 100vh;
  min-height: 0;
}
.side-foot { flex: none; }

.chat-desk {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.chat-list {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 280px;
  border-right: 1px solid var(--line);
  overflow: auto;
  background: #fff;
}
.chat-pane {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.chat-desk > h2,
.chat-pane > h2 {
  margin: 0;
  padding: 14px 16px 10px;
  font-size: 15px;
  font-weight: 650;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.chat-desk > h2 {
  grid-column: 2;
  grid-row: 1;
}
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  overflow: auto;
  max-height: 480px;
  min-height: 0;
  flex: 1;
  background: #fff;
}
.chat-desk > .chat-thread {
  grid-column: 2;
  grid-row: 2;
}
.chat-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.chat-bubble.me {
  align-self: flex-end;
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.them {
  align-self: flex-start;
  margin-right: auto;
  background: var(--soft);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-bubble.sys {
  align-self: center;
  margin: 0 auto;
  max-width: 90%;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 8px;
  text-align: center;
  border-radius: 0;
}
.chat-reply {
  margin-top: auto;
  flex: none;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-desk > .chat-reply {
  grid-column: 2;
  grid-row: 3;
}
.chat-reply.add-row { padding: 12px 16px; }
.chat-list .item.on {
  background: var(--accent-soft);
  border-color: #c5d8fb;
}

.item.off { opacity: 0.55; }
.item.off .item-title { color: var(--muted); font-weight: 550; }

.pill.spend {
  background: #fff1e6;
  color: #c05621;
}

@media (max-width: 900px) {
  .chat-desk {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
  }
  .chat-list {
    width: auto;
    grid-column: auto;
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 220px;
  }
  .chat-pane {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }
  .chat-desk > h2,
  .chat-desk > .chat-thread,
  .chat-desk > .chat-reply {
    grid-column: auto;
    grid-row: auto;
  }
}

.side {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.brand { flex: none; }
.navs {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.side-foot {
  flex: none;
  background: #fff;
}

#page-community > .tabs {
  width: 100%;
  max-width: 100%;
}
#page-community > .tabs button {
  border: 1px solid transparent;
}
#page-community > .tabs button.on {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 650;
  border-color: var(--accent);
}

.chat-list .item.on,
.chat-list .item.plain.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.pill.wait {
  background: #fff1e6;
  color: #c05621;
}
.pill.closed {
  background: var(--off-bg);
  color: var(--off);
}
#ticketRows .pill.off {
  background: #fff1e6;
  color: #c05621;
}
#ticketRows .pill.on {
  background: var(--ok-bg);
  color: var(--ok);
}

#page-community .form-card {
  padding-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.03);
}
#page-community .form-card .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 4px 16px 0;
}
#page-community .form-card .form-actions {
  padding: 4px 16px 16px;
}
#page-community .form-card + .panel {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .side {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    align-self: stretch;
  }
  .navs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: auto;
  }
  #page-community .form-card .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  #page-community .form-card .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

#page-agents > .tabs {
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
}
#page-agents > .tabs button {
  border: 1px solid transparent;
}
#page-agents > .tabs button.on {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 650;
  border-color: var(--accent);
}

#page-board [data-pane="ads"] .form-card,
#page-board [data-pane="appver"] .form-card,
#page-board [data-pane="menus"] .form-card {
  padding-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.03);
}
#page-board [data-pane="ads"] .form-card .form-grid,
#page-board [data-pane="appver"] .form-card .form-grid,
#page-board [data-pane="menus"] .form-card .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 4px 16px 0;
}
#page-board [data-pane="ads"] .form-card .form-actions,
#page-board [data-pane="appver"] .form-card .form-actions,
#page-board [data-pane="menus"] .form-card .form-actions {
  padding: 4px 16px 16px;
}
#page-board [data-pane="ads"] .form-card + .panel,
#page-board [data-pane="appver"] .form-card + .panel,
#page-board [data-pane="menus"] .form-card + .panel {
  margin-top: 14px;
}

#menuRows .item {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-width: 0;
}
#menuRows .item > * {
  min-width: 0;
  max-width: 100%;
}
#menuRows .item .thumb,
#menuRows .item .thumb img,
#menuRows .item > img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  overflow: hidden;
  flex: none;
}
#menuRows .item .thumb svg {
  width: 16px;
  height: 16px;
}

#adsRows .item {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-width: 0;
}
#adsRows .item .thumb,
#adsRows .item .thumb img,
#adsRows .item > img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}

#page-overview .stat:has(#nWithdraws) {
  background: #fff;
  border-color: var(--line);
}
#page-overview .stat:has(#nWithdraws) .stat-ico {
  background: #e8f1ff;
  color: #1d4ed8;
}
#page-overview .stat:has(#nWithdraws) strong,
#nWithdraws {
  color: var(--ink);
}

@media (max-width: 900px) {
  #page-agents > .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  #page-board [data-pane="ads"] .form-card .form-grid,
  #page-board [data-pane="appver"] .form-card .form-grid,
  #page-board [data-pane="menus"] .form-card .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  #page-agents > .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
  }
  #page-board [data-pane="ads"] .form-card .form-grid,
  #page-board [data-pane="appver"] .form-card .form-grid,
  #page-board [data-pane="menus"] .form-card .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  #menuRows .item {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  #menuRows .item > .actions {
    grid-column: 2;
    justify-self: start;
  }
  #adsRows .item {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  #adsRows .item > .actions {
    grid-column: 2;
    justify-self: start;
  }
}

video.preview {
  max-height: 72px;
  border-radius: 8px;
  background: #000;
}
#exportCsv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}
#exportCsv:hover {
  background: var(--soft);
  filter: none;
}
.chat-thread img {
  max-width: 180px;
  border-radius: 8px;
}
#logRows .item {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}
#page-system .form-card {
  padding-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.03);
}
#page-system .form-card .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 4px 16px 0;
}
#page-system .form-card .form-actions {
  padding: 4px 16px 16px;
}
#page-system .form-card + .panel {
  margin-top: 14px;
}
