:root {
  color-scheme: dark;
  --bg: #090d14;
  --sidebar: #080c13;
  --surface: #0f1520;
  --surface-2: #131b28;
  --surface-3: #182231;
  --input: #0b111b;
  --line: #202b3a;
  --line-strong: #314054;
  --text: #f3f5f8;
  --muted: #8c98aa;
  --muted-2: #657184;
  --accent: #f4511e;
  --accent-hover: #ff6734;
  --accent-soft: rgba(244, 81, 30, 0.12);
  --blue: #5794f2;
  --green: #24c28a;
  --yellow: #f3a712;
  --red: #ef4e5d;
  --cyan: #25b9cb;
  --post-image: #7db1ff;
  --post-image-soft: rgba(87, 148, 242, 0.14);
  --post-gallery: #d39cff;
  --post-gallery-soft: rgba(192, 132, 252, 0.14);
  --post-video: #ff8492;
  --post-video-soft: rgba(239, 78, 93, 0.14);
  --post-text: #4ddba9;
  --post-text-soft: rgba(36, 194, 138, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --sidebar-width: 252px;
  --topbar-height: 58px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #edf1f5;
  --input: #ffffff;
  --line: #dfe5eb;
  --line-strong: #cbd4de;
  --text: #17202b;
  --muted: #657184;
  --muted-2: #8a95a3;
  --accent-soft: rgba(244, 81, 30, 0.09);
  --post-image: #145fb8;
  --post-image-soft: rgba(20, 95, 184, 0.09);
  --post-gallery: #7e22ce;
  --post-gallery-soft: rgba(126, 34, 206, 0.08);
  --post-video: #b42336;
  --post-video-soft: rgba(180, 35, 54, 0.08);
  --post-text: #087a55;
  --post-text-soft: rgba(8, 122, 85, 0.08);
  --shadow: 0 24px 70px rgba(40, 53, 69, 0.16);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.48; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
svg { width: 17px; height: 17px; stroke-width: 1.8; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
  color: var(--muted);
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(244,81,30,.22);
}

.brand-mark-lg { width: 48px; height: 48px; font-size: 14px; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(500px, 1fr);
  background: var(--bg);
}

.auth-context {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px clamp(30px, 5vw, 82px) 42px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.auth-context::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: 17%;
  width: 42%;
  height: 1px;
  background: var(--accent);
  opacity: .38;
}

.auth-brand, .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand > span:last-child, .sidebar-brand > span:nth-child(2) { display: grid; }
.auth-brand b, .sidebar-brand b { color: var(--accent); font-size: 10px; letter-spacing: 2px; }
.auth-brand strong, .sidebar-brand strong { margin-top: 1px; font-size: 15px; }

.auth-title { position: relative; z-index: 1; max-width: 680px; }
.eyebrow, .section-kicker, .panel-kicker { font-size: 10px; font-weight: 750; letter-spacing: 1.6px; color: var(--accent); }
.auth-title h1 { margin: 15px 0 0; max-width: 10ch; font-size: clamp(46px, 6vw, 84px); line-height: .98; font-weight: 800; }
.auth-title p { margin: 18px 0 0; color: var(--muted); font-size: 18px; }

.auth-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.auth-status div { min-width: 0; padding: 14px 16px; background: var(--surface); }
.auth-status dt { margin-bottom: 5px; color: var(--muted-2); font: 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.auth-status dd { display: flex; align-items: center; gap: 7px; margin: 0; overflow: hidden; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }

.signal { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.signal-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(36,194,138,.12); }
.signal-error { background: var(--red); box-shadow: 0 0 0 3px rgba(239,78,93,.12); }

.auth-panel-wrap { display: grid; place-items: center; padding: 28px; background: var(--bg); }
.auth-panel { width: min(440px, 100%); padding: 26px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.auth-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 30px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-panel-head h2, .modal-head h2 { margin: 4px 0 0; font-size: 21px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.auth-foot svg { width: 14px; }
.demo-login-hint { width: 100%; margin: 2px 0 14px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.demo-login-hint:hover { border-color: color-mix(in srgb, var(--accent) 72%, var(--line)); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); transform: translateY(-1px); }
.demo-login-hint > span { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--accent); font-size: 12px; letter-spacing: .04em; }
.demo-login-hint svg { width: 15px; height: 15px; }
.demo-login-hint small { display: block; color: var(--muted); line-height: 1.5; }
.demo-login-hint b { color: var(--text); font-family: var(--mono); font-weight: 600; }

.field { display: grid; gap: 7px; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.input-shell, .search-shell { position: relative; display: flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--input); color: var(--muted); }
.input-shell:focus-within, .search-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-shell > svg, .search-shell > svg { position: absolute; left: 12px; width: 16px; pointer-events: none; }
.input-shell input, .search-shell input { width: 100%; height: 42px; padding: 0 42px 0 38px; border: 0; outline: 0; background: transparent; color: var(--text); }
.field textarea { width: 100%; min-height: 82px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); line-height: 1.5; }
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-action { position: absolute; right: 5px; }
.form-error { min-height: 19px; margin: -3px 0 12px; color: var(--red); font-size: 12px; }

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}

.btn { min-height: 36px; gap: 8px; padding: 0 13px; font-weight: 650; }
.btn-compact { min-height: 32px; padding-inline: 10px; font-size: 12px; }
.btn-block { width: 100%; min-height: 42px; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn-secondary { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); }
.btn-danger { border-color: rgba(239,78,93,.36); background: rgba(239,78,93,.1); color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.icon-btn { width: 34px; height: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn:hover:not(:disabled) { border-color: var(--line); background: var(--surface-2); color: var(--text); }

.theme-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); }
.theme-control button { display: grid; height: 28px; place-items: center; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.theme-control button.active { background: var(--surface-3); color: var(--text); }
.theme-control svg { width: 14px; height: 14px; }
.theme-control.compact button { width: 30px; padding: 0; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-brand { min-height: 68px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.sidebar-close { display: none; margin-left: auto; }
.sidebar-nav { flex: 1; padding: 17px 10px; overflow-y: auto; }
.nav-section { display: block; margin: 16px 9px 7px; color: var(--muted-2); font-size: 10px; }
.nav-section:first-child { margin-top: 0; }
.nav-item { display: flex; width: 100%; min-height: 38px; align-items: center; gap: 11px; margin: 2px 0; padding: 0 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); text-align: left; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { border-color: rgba(244,81,30,.12); background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 var(--accent); }
.nav-item.active svg { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--surface-3); color: var(--muted); font-size: 10px; text-align: center; }

.sidebar-footer { padding: 11px; border-top: 1px solid var(--line); }
.profile-button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; }
.profile-button:hover { background: var(--surface-2); }
.profile-button > span:nth-child(2) { display: grid; min-width: 0; }
.profile-button strong { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.profile-button small { margin-top: 2px; color: var(--muted); font: 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.profile-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 750; }
.sidebar-settings { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.sidebar-settings .theme-control { flex: 1; }
.sidebar-scrim { display: none; }

.app-main { min-height: 100vh; padding-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; min-height: var(--topbar-height); align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); }
.topbar-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.session-badge { padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.connection-badge { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; }

.content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 25px 26px 42px; }
.page { display: none; }
.page.active { display: block; }
.page-header { display: flex; min-height: 53px; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-header h1 { margin: 4px 0 0; font-size: 25px; line-height: 1.15; }
.page-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.metric-strip { display: grid; grid-template-columns: 1.15fr .8fr .8fr 1.25fr; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.metric { display: grid; min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 11px; }
.metric strong { margin-top: 4px; overflow: hidden; font-size: 22px; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.metric:first-child strong { color: var(--accent); }
.metric small { margin-top: 7px; color: var(--muted-2); font: 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.metric-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px !important; }

.work-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.panel-head { display: flex; min-height: 61px; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 2px 0 0; font-size: 14px; }
.panel-actions { display: flex; gap: 2px; }
.panel-body { padding: 13px; }
.counter { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }

#linksInput { width: 100%; height: 206px; min-height: 138px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
#linksInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-toolbar { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.feed-limit-note { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 9px 10px; border-left: 2px solid var(--yellow); background: rgba(243,167,18,.07); color: var(--muted); font-size: 11px; line-height: 1.55; }
.feed-limit-note svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; color: var(--yellow); }
.toolbar-spacer { flex: 1; }

.log-output { height: 278px; padding: 12px 14px; overflow: auto; background: var(--input); color: #aab5c4; font: 11px/1.72 ui-monospace, SFMono-Regular, Consolas, monospace; }
:root[data-theme="light"] .log-output { color: #566273; }
.log-line { display: grid; grid-template-columns: 68px 52px minmax(0,1fr); gap: 8px; padding: 2px 0; }
.log-time { color: var(--muted-2); }
.log-level { font-weight: 700; text-transform: uppercase; }
.log-line.info .log-level { color: var(--blue); }
.log-line.warning .log-level { color: var(--yellow); }
.log-line.error .log-level { color: var(--red); }
.log-empty { display: grid; height: 100%; place-items: center; color: var(--muted-2); }

.results-panel { margin-top: 0; }
.results-head { min-height: 67px; }
.result-tools { display: flex; align-items: center; gap: 8px; }
.search-shell { width: min(290px, 30vw); }
.search-shell input { height: 34px; padding-left: 36px; padding-right: 10px; font-size: 12px; }
select { height: 36px; padding: 0 34px 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
select:focus { border-color: var(--accent); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: auto; }
.data-table th { height: 39px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
.data-table td { height: 47px; max-width: 320px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-3) 55%, transparent); }
.data-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .actions-column { width: 80px; text-align: right; }
.reddit-link { display: inline-flex; max-width: 240px; align-items: center; gap: 6px; overflow: hidden; color: var(--accent); text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.reddit-link span { overflow: hidden; text-overflow: ellipsis; }
.reddit-link:hover { text-decoration: underline; }
.title-cell { max-width: 340px; }
.time-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.screenshot-preview { display: inline-flex; width: 58px; height: 40px; padding: 0; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); cursor: zoom-in; vertical-align: middle; }
.screenshot-preview:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.screenshot-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screenshot-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.screenshot-muted { color: var(--muted-2); }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.badge.alive, .badge.completed, .badge.enabled { border-color: rgba(36,194,138,.25); background: rgba(36,194,138,.09); color: var(--green); }
.badge.running, .badge.queued, .badge.cancelling { border-color: rgba(87,148,242,.25); background: rgba(87,148,242,.09); color: var(--blue); }
.badge.moderator_removed, .badge.reddit_removed, .badge.filtered, .badge.self_deleted, .badge.cancelled, .badge.disabled { border-color: rgba(243,167,18,.25); background: rgba(243,167,18,.09); color: var(--yellow); }
.badge.error, .badge.failed { border-color: rgba(239,78,93,.25); background: rgba(239,78,93,.09); color: var(--red); }
.empty-row td { height: 176px; text-align: center; color: var(--muted-2); }
.empty-row td > span, .empty-row td > svg { display: inline-block; vertical-align: middle; }
.empty-row svg { margin-right: 8px; }
.table-foot { display: flex; min-height: 43px; align-items: center; justify-content: space-between; padding: 0 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.history-panel, .members-panel, .groups-panel { min-height: 220px; }
.members-panel .data-table { min-width: 1220px; }
.groups-table { min-width: 760px; table-layout: fixed; }
.groups-table th:nth-child(1) { width: 15%; }
.groups-table th:nth-child(2) { width: 27%; }
.groups-table th:nth-child(3) { width: 42%; }
.groups-table th:nth-child(4) { width: 7%; }
.groups-table th:nth-child(5) { width: 9%; }
.group-name-cell { display: grid; gap: 4px; }
.group-name-cell small { color: var(--muted-2); font-size: 10px; }
.group-description-cell { max-width: 330px; color: var(--muted); white-space: normal !important; line-height: 1.45; }
.group-feature-tags { display: flex; flex-wrap: wrap; gap: 5px; white-space: normal; }
.feature-tag { display: inline-flex; min-height: 23px; align-items: center; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 10px; }
.no-access-panel { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 10px; padding: 28px; text-align: center; }
.no-access-panel > svg { width: 34px; height: 34px; color: var(--muted-2); }
.no-access-panel h1 { margin: 0; font-size: 20px; }
.no-access-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.member-bulk-toolbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.member-bulk-toolbar strong { color: var(--text); font-size: 12px; }
.member-bulk-toolbar > div { display: flex; gap: 8px; }
.member-bulk-toolbar .btn { min-height: 40px; }
.selection-column { width: 52px; padding: 0 4px !important; text-align: center !important; }
.selection-control { display: inline-grid; width: 44px; height: 44px; place-items: center; cursor: pointer; }
.selection-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.selection-control input:disabled { cursor: not-allowed; opacity: .35; }
.data-table tbody tr.selected-row { background: var(--accent-soft); }
.post-search-form { margin-bottom: 14px; }
.post-search-body { padding: 14px; }
.post-search-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); }
.mode-switch-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.mode-switch-button:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.mode-switch-button.active { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); box-shadow: 0 1px 5px rgba(0,0,0,.16); }
.mode-switch-button.active svg { color: var(--accent); }
.query-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.query-list-head > span { display: inline-flex; align-items: center; gap: 7px; }
.query-list { display: grid; gap: 7px; }
.query-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.query-index { color: var(--muted-2); font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }
.query-row input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.query-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-settings-grid { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(440px, 1.15fr); gap: 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.search-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.search-fieldset legend { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.post-type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.post-type-options label { position: relative; display: block; cursor: pointer; }
.post-type-option.image, .post-type-label.image { --post-type-color: var(--post-image); --post-type-soft: var(--post-image-soft); }
.post-type-option.gallery, .post-type-label.gallery { --post-type-color: var(--post-gallery); --post-type-soft: var(--post-gallery-soft); }
.post-type-option.video, .post-type-label.video { --post-type-color: var(--post-video); --post-type-soft: var(--post-video-soft); }
.post-type-option.text, .post-type-label.text { --post-type-color: var(--post-text); --post-type-soft: var(--post-text-soft); }
.post-type-options input { position: absolute; top: 12px; left: 11px; width: 15px; height: 15px; margin: 0; accent-color: var(--post-type-color); }
.post-type-options span { display: flex; min-height: 39px; align-items: center; gap: 8px; padding: 0 10px 0 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); color: var(--muted); font-size: 12px; }
.post-type-options input:checked + span { border-color: var(--post-type-color); background: var(--post-type-soft); color: var(--post-type-color); }
.post-type-options input:focus-visible + span { outline: 2px solid var(--post-type-color); outline-offset: 2px; }
.post-type-options svg { width: 15px; height: 15px; color: var(--post-type-color); }
.search-number-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; }
.search-number-grid .field { min-width: 0; margin: 0; }
.search-number-grid .field > input, .search-number-grid select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.search-number-grid .field > input:focus, .search-number-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.custom-range-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 2px; }
.community-search-settings { min-height: 112px; }
.community-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.community-settings-grid .field { min-width: 0; margin: 0; }
.community-settings-grid input, .community-settings-grid select { width: 100%; height: 42px; }
.community-settings-grid input { padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.community-settings-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-prefix-shell { display: flex; min-width: 0; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--input); overflow: hidden; }
.input-prefix-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-prefix-shell > span { height: 40px; padding: 0 0 0 11px; color: var(--muted-2); font: 12px/40px ui-monospace, SFMono-Regular, Consolas, monospace; }
.input-prefix-shell input { height: 40px; padding-left: 3px; border: 0; border-radius: 0; box-shadow: none !important; }
.search-form-foot { display: flex; min-height: 58px; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.search-form-foot .btn { margin-left: auto; }
.search-run-status { color: var(--muted); font-size: 12px; }
.post-search-results { min-height: 260px; }
.post-search-run-table { min-width: 920px; }
.post-search-run-table .task-id { color: var(--muted-2); font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.task-query-list, .task-type-list { display: flex; max-width: 330px; flex-wrap: wrap; gap: 5px; }
.task-query-label { display: inline-flex; max-width: 230px; min-height: 23px; align-items: center; overflow: hidden; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.task-result-count { color: var(--text); font-weight: 650; }
.task-error-count { display: block; margin-top: 2px; color: var(--red); font-size: 10px; }
.search-mode-label { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 7px; border: 1px solid rgba(87,148,242,.35); border-radius: 4px; background: rgba(87,148,242,.09); color: var(--blue); font-size: 10px; white-space: nowrap; }
.search-mode-label.community { border-color: rgba(36,194,138,.35); background: rgba(36,194,138,.09); color: var(--green); }
.task-condition { display: grid; min-width: 190px; gap: 5px; }
.task-condition > strong { font-size: 11px; }
.task-condition > small { color: var(--muted); font-size: 10px; }
.detail-toolbar { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.detail-toolbar .retention-note { margin: 0; }
.post-search-run-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.task-meta-item { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--line); }
.task-meta-item:last-child { border-right: 0; }
.task-meta-item dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.task-meta-item dd { margin: 0; color: var(--text); font-size: 12px; line-height: 1.5; }
.task-meta-item .task-query-list { max-width: none; }
.search-task-errors { padding: 10px 13px; border-bottom: 1px solid rgba(239, 78, 93, .35); background: var(--post-video-soft); color: var(--post-video); font-size: 11px; line-height: 1.6; }
.post-search-table { min-width: 1120px; }
.post-search-table .query-cell { max-width: 190px; color: var(--muted); }
.post-search-table .post-link-cell { max-width: 390px; }
.post-result-link { display: grid; max-width: 370px; gap: 2px; overflow: hidden; color: var(--accent); text-decoration: none; }
.post-result-title { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.post-result-title svg { flex: 0 0 auto; width: 14px; height: 14px; }
.post-result-title span, .post-result-link small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.post-result-link small { color: var(--muted-2); font: 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; }
.post-result-link:hover .post-result-title { text-decoration: underline; }
.post-type-label { --post-type-color: var(--muted); --post-type-soft: var(--surface-2); display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border: 1px solid var(--post-type-color); border-radius: 4px; background: var(--post-type-soft); color: var(--post-type-color); font-size: 10px; }
.post-tracking-filters { margin-bottom: 14px; }
.post-tracking-filter-grid { display: grid; grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(120px, 1fr)) auto; align-items: end; gap: 10px; padding: 14px; }
.post-tracking-filter-grid .field { min-width: 0; margin: 0; }
.post-tracking-filter-grid .search-shell { width: 100%; }
.post-tracking-filter-grid .search-shell input, .post-tracking-filter-grid select { width: 100%; height: 40px; }
.post-tracking-filter-grid .btn { min-height: 40px; }
.post-tracking-results { min-height: 340px; container-type: inline-size; }
.post-tracking-heading { display: flex; align-items: center; gap: 14px; }
.post-tracking-heading .btn { min-height: 34px; }
.tracking-result-summary { color: var(--muted); font-size: 11px; white-space: nowrap; }
.post-tracking-summary { display: flex; align-items: center; gap: 12px; }
.post-tracking-summary strong { color: var(--text); font-size: 11px; white-space: nowrap; }
.post-tracking-results .table-scroll { overflow-x: hidden; }
.post-tracking-table { min-width: 0; table-layout: fixed; }
.post-tracking-table th { padding-inline: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.post-tracking-table td { height: 46px; padding-inline: 3px; font-size: 10px; }
.post-tracking-table .selection-column { width: 2.5%; }
.post-tracking-table th:nth-child(2) { width: 4%; }
.post-tracking-table th:nth-child(3) { width: 5.5%; }
.post-tracking-table th:nth-child(4) { width: 7%; }
.post-tracking-table th:nth-child(5) { width: 5.5%; }
.post-tracking-table th:nth-child(6) { width: 3.5%; text-align: center; }
.post-tracking-table th:nth-child(7) { width: 13.2%; }
.post-tracking-table th:nth-child(8) { width: 8%; }
.post-tracking-table th:nth-child(9) { width: 9%; }
.post-tracking-table th:nth-child(n+10):nth-child(-n+12) { width: 3.2%; }
.post-tracking-table th:nth-child(13) { width: 4.7%; }
.post-tracking-table th:nth-child(14) { width: 6%; }
.post-tracking-table th:nth-child(15) { width: 8.5%; }
.post-tracking-table th:nth-child(16) { width: 6%; }
.post-tracking-table th:nth-child(17) { width: 7%; }
.post-tracking-table .selection-control { width: 100%; height: 36px; }
.post-tracking-table .tracking-id { color: var(--muted); font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.post-tracking-table .title-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-tracking-table .tracking-view-count { overflow: hidden; font-size: 9px; font-variant-numeric: tabular-nums; text-overflow: clip; white-space: nowrap; }
.post-tracking-table tbody tr[data-post-tracking-row] { cursor: pointer; }
.post-tracking-table tbody tr[data-post-tracking-row]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.post-tracking-table .tracking-post-link { width: 30px; height: 30px; margin: 0 auto; color: var(--accent); }
.post-tracking-table .tracking-post-link svg { width: 14px; height: 14px; }
.post-tracking-table .screenshot-preview { width: 34px; height: 26px; }
.post-tracking-table .tracking-detail-button { width: 100%; min-width: 0; padding-inline: 3px; justify-content: center; gap: 3px; font-size: 9px; }
.tracking-time { display: flex; flex-direction: column; gap: 1px; overflow: hidden; line-height: 1.2; white-space: normal; }
.tracking-time span { overflow: hidden; text-overflow: ellipsis; }
.tracking-time span:last-child { color: var(--muted-2); }
.tracking-type { display: inline-flex; max-width: 100%; min-height: 22px; align-items: center; padding: 2px 4px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.survival-cell { color: var(--text); font-variant-numeric: tabular-nums; }
.badge.tracking-active, .badge.tracking-alive { border-color: rgba(36,194,138,.25); background: rgba(36,194,138,.09); color: var(--green); }
.badge.tracking-filtered, .badge.tracking-removed, .badge.tracking-moderator_removed, .badge.tracking-reddit_removed, .badge.tracking-self_deleted { border-color: rgba(243,167,18,.25); background: rgba(243,167,18,.09); color: var(--yellow); }
.badge.tracking-unknown { color: var(--muted); }
.error-row td { color: var(--red); }
.post-tracking-table-foot { gap: 14px; }
.pagination { display: flex; min-width: 150px; align-items: center; justify-content: flex-end; gap: 6px; }
.pagination .icon-btn { width: 32px; height: 32px; border-color: var(--line); }
.pagination > span { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.retention-note { display: flex; align-items: center; gap: 6px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.retention-note svg { width: 14px; height: 14px; color: var(--yellow); }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-actions .icon-btn { width: 30px; height: 30px; }
.row-actions .danger-icon { color: var(--red); }
.row-actions .danger-icon:disabled { color: var(--muted-2); opacity: .45; }
.disabled-field { opacity: .55; }

.modal { width: min(500px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0,0,0,.66); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-foot-spacer { flex: 1; }
.credential-modal { width: min(620px, calc(100vw - 28px)); }
.credential-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: -18px -18px 17px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.credential-status > span { display: grid; min-width: 0; gap: 4px; padding: 13px 14px; border-right: 1px solid var(--line); }
.credential-status > span:last-child { border-right: 0; }
.credential-status small { color: var(--muted-2); font-size: 10px; }
.credential-status strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.credential-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin: 0 0 17px; }
.credential-metadata div { display: flex; min-width: 0; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 0 6px; }
.credential-metadata dt { color: var(--muted-2); font-size: 11px; }
.credential-metadata dd { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.credential-token-input input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.credential-pool-switch { margin: 0 0 12px; }
.credential-pool-panel[hidden] { display: none; }
.automatic-pool-panel { margin: 0 0 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.automatic-pool-head { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.automatic-pool-head h3 { margin: 2px 0 0; font-size: 14px; }
.automatic-pool-head > strong { color: var(--accent); font-size: 12px; }
.automatic-pool-metadata { margin-bottom: 12px; }
.automatic-pool-batches { display: grid; gap: 5px; padding-bottom: 12px; }
.automatic-pool-batch { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; }
.automatic-pool-batch strong { color: var(--text); font-size: 11px; }
.automatic-pool-loids { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 6px; }
.automatic-pool-loids summary { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 9px; cursor: pointer; color: var(--text); font-size: 11px; }
.automatic-pool-loids summary::marker { color: var(--accent); }
.automatic-pool-loids summary strong { color: var(--muted); font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.automatic-pool-loid-table { max-height: 240px; border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.automatic-pool-loid-table .data-table { min-width: 820px; }
.automatic-pool-controls { display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px; gap: 7px; align-items: end; padding: 2px 0 10px; }
.automatic-pool-controls.single-action { grid-template-columns: minmax(0, 1fr) 34px; }
.automatic-pool-controls .field { min-width: 0; margin: 0; }
.automatic-pool-controls input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.automatic-pool-controls input:focus { border-color: var(--accent); }
.automatic-pool-controls .icon-btn { width: 34px; height: 34px; }
.automatic-pool-controls + .form-error { min-height: 0; margin: 0 0 10px; }
.tracking-test-modal { width: min(900px, calc(100vw - 28px)); }
.tracking-test-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tracking-test-range input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.tracking-test-range input:focus { border-color: var(--accent); }
.tracking-test-summary { margin: 2px 0 12px; color: var(--muted); font-size: 12px; }
.tracking-test-pool { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 6px; }
.tracking-test-pool-head { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 9px; color: var(--text); font-size: 11px; }
.tracking-test-pool-head strong { color: var(--muted); font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.tracking-test-pool-table { max-height: 190px; border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.tracking-test-pool-table .data-table { min-width: 680px; }
.tracking-test-results { max-height: 280px; border: 1px solid var(--line); border-radius: 6px; }
.tracking-test-results .data-table { min-width: 920px; }
.tracking-test-post { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.screenshot-modal { width: min(96vw, 1280px); max-width: min(96vw, 1280px); max-height: 92vh; }
.screenshot-modal .modal-head { min-height: 57px; }
.tracking-detail-modal { width: min(920px, calc(100vw - 28px)); max-width: 920px; max-height: 92vh; }
.tracking-detail-body { display: grid; gap: 18px; max-height: calc(92vh - 58px); padding: 18px; overflow: auto; }
.detail-loading { display: flex; min-height: 180px; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.tracking-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.tracking-detail-grid > div { min-width: 0; padding: 12px; background: var(--surface-2); }
.tracking-detail-grid dt { margin-bottom: 5px; color: var(--muted-2); font-size: 10px; font-weight: 700; }
.tracking-detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.tracking-detail-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); border: 0; }
.tracking-detail-grid.compact > div { padding: 9px 0; background: transparent; }
.tracking-detail-section { min-width: 0; }
.tracking-detail-section h3 { margin: 0 0 8px; font-size: 13px; }
.tracking-detail-section > p, .tracking-detail-copy { margin: 0; color: var(--text); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.tracking-detail-copy { max-height: 260px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.tracking-community-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tracking-community-list > span { display: inline-flex; min-width: 0; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.tracking-community-list b { color: var(--muted); font-size: 10px; }
.detail-image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.detail-image-preview { display: grid; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.detail-image-preview:hover { border-color: var(--accent); }
.detail-image-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.detail-image-frame { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.detail-image-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-image-name { display: block; min-width: 0; padding: 7px 8px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-block { display: grid; gap: 6px; margin-top: 9px; }
.detail-block > span { color: var(--muted-2); font-size: 10px; font-weight: 700; }
.detail-block p { margin: 0; overflow-wrap: anywhere; }
.detail-empty { color: var(--muted); }
.detail-error { color: var(--danger); }
.tracking-distribution-list { display: grid; gap: 10px; }
.tracking-distribution { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.tracking-distribution > header, .tracking-submission-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tracking-distribution > header span, .tracking-submission-head span { color: var(--muted); font-size: 11px; }
.tracking-submissions { margin-top: 8px; border-top: 1px solid var(--line); }
.tracking-submission { padding-top: 11px; }
.tracking-submission + .tracking-submission { margin-top: 11px; border-top: 1px solid var(--line); }
.screenshot-preview-body { display: grid; min-height: 180px; max-height: calc(92vh - 57px); place-items: center; overflow: auto; padding: 16px; background: var(--surface-2); }
.screenshot-preview-body img { display: block; max-width: 100%; max-height: calc(92vh - 92px); width: auto; height: auto; object-fit: contain; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-fieldset { min-width: 0; margin: 2px 0 17px; padding: 0; border: 0; }
.feature-fieldset legend { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.feature-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-option { display: grid; min-width: 0; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); cursor: pointer; }
.permission-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: var(--accent-soft); }
.permission-option input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.permission-option span { display: grid; min-width: 0; gap: 3px; }
.permission-option strong { color: var(--text); font-size: 12px; }
.permission-option small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.group-modal { width: min(640px, calc(100vw - 28px)); }
.switch-field { display: flex; align-items: center; justify-content: space-between; align-self: end; height: 42px; margin-bottom: 17px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; }
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 34px; height: 19px; border-radius: 10px; background: var(--muted-2); transition: background .16s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .16s; }
.switch-field input:checked + .switch { background: var(--accent); }
.switch-field input:checked + .switch::after { transform: translateX(15px); }

.segmented-control { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); }
.segmented-control button { min-height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.segmented-control button:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.segmented-control button.active { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }

.dashboard-filter-panel, .dashboard-metric-grid, .dashboard-chart-grid { margin-bottom: 14px; }
.dashboard-filter-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.dashboard-settings-button { min-width: 132px; justify-content: center; }
.dashboard-filter-grid { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, .85fr) minmax(130px, .75fr) auto; align-items: end; gap: 10px; padding: 14px; }
.dashboard-filter-grid .field { min-width: 0; margin: 0; }
.dashboard-filter-grid input, .dashboard-filter-grid select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.dashboard-filter-grid input:focus, .dashboard-filter-grid select:focus { border-color: var(--accent); }
.dashboard-apply-button { min-height: 40px; }

.dashboard-quality-modal { width: min(760px, calc(100vw - 28px)); }
.dashboard-quality-body { max-height: min(62vh, 560px); overflow-y: auto; }
.dashboard-quality-config-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.dashboard-quality-mode { width: min(310px, 100%); }
.dashboard-quality-retention { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.dashboard-quality-retention > span:first-child { display: grid; gap: 4px; }
.dashboard-quality-retention strong { color: var(--text); font-size: 13px; }
.dashboard-quality-retention small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.dashboard-quality-duration { display: flex; flex: 0 0 auto; align-items: center; overflow: hidden; height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--input); }
.dashboard-quality-duration:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
.dashboard-quality-duration input { width: 112px; height: 100%; padding: 0 10px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.dashboard-quality-duration input:invalid { color: var(--danger); }
.dashboard-quality-duration em { align-self: stretch; display: grid; place-items: center; padding: 0 11px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; font-style: normal; }
.dashboard-quality-conditions { display: grid; gap: 8px; }
.dashboard-quality-row { display: grid; grid-template-columns: 28px repeat(3, minmax(120px, 1fr)) 34px; align-items: end; gap: 9px; }
.dashboard-quality-row label { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 10px; }
.dashboard-quality-row select, .dashboard-quality-row input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--input); color: var(--text); }
.dashboard-quality-row select:focus, .dashboard-quality-row input:focus { border-color: var(--accent); }
.dashboard-condition-index { display: grid; width: 28px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font: 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dashboard-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.dashboard-metric { position: relative; display: grid; min-width: 0; min-height: 116px; align-content: center; padding: 15px 16px; border-right: 1px solid var(--line); }
.dashboard-metric:last-child { border-right: 0; }
.dashboard-metric::before { position: absolute; top: 0; right: 16px; left: 16px; height: 2px; background: var(--accent); content: ""; }
.dashboard-metric[data-tone="green"]::before { background: var(--green); }
.dashboard-metric[data-tone="blue"]::before { background: var(--blue); }
.dashboard-metric[data-tone="cyan"]::before { background: var(--cyan); }
.dashboard-metric[data-tone="yellow"]::before { background: var(--yellow); }
.dashboard-metric[data-tone="red"]::before { background: var(--red); }
.dashboard-metric span { color: var(--muted); font-size: 11px; }
.dashboard-metric strong { margin-top: 6px; overflow: hidden; font-size: 24px; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.dashboard-metric small { margin-top: 8px; overflow: hidden; color: var(--muted-2); font-size: 10px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }

.dashboard-chart-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 14px; }
.dashboard-chart-panel { min-height: 360px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.dashboard-chart-panel:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(0, 0, 0, .13); transform: translateY(-1px); }
.dashboard-customer-panel { grid-column: 1 / -1; min-height: 260px; }
.dashboard-chart { display: grid; min-height: 298px; place-items: stretch; padding: 8px 12px 12px; overflow: hidden; }
.dashboard-chart-svg { display: block; width: 100%; height: 286px; overflow: visible; }
.dashboard-chart-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dashboard-chart-axis { fill: var(--muted-2); font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dashboard-chart-x-axis { fill: var(--muted); }
.dashboard-chart-bar { fill: var(--accent); opacity: .9; cursor: pointer; transform-box: fill-box; transform-origin: center bottom; animation: dashboard-bar-rise .48s cubic-bezier(.2, .8, .2, 1) backwards; transition: filter .15s ease, opacity .15s ease, stroke .15s ease; }
.dashboard-chart-bar:hover, .dashboard-chart-bar:focus { filter: brightness(1.16); opacity: 1; stroke: var(--text); stroke-width: 1; outline: none; }
.dashboard-chart-bar.series-retained { fill: var(--green); }
.dashboard-chart-bar.series-highQuality { fill: var(--yellow); }
.dashboard-chart-bar.series-upvotes { fill: var(--blue); }
.dashboard-chart-bar.series-comments { fill: var(--cyan); }
.dashboard-chart-bar.series-shares { fill: var(--post-gallery); }
.dashboard-chart-bar.series-views { fill: var(--blue); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; color: var(--muted); font-size: 10px; }
.chart-legend button { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 650; transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease; }
.chart-legend button:hover, .chart-legend button:focus-visible { border-color: var(--line); background: var(--surface-2); color: var(--text); outline: none; }
.chart-legend button.inactive { opacity: .42; }
.chart-legend button.inactive i { filter: grayscale(1); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.chart-legend i[data-series="retained"] { background: var(--green); }
.chart-legend i[data-series="highQuality"] { background: var(--yellow); }
.chart-legend i[data-series="upvotes"] { background: var(--blue); }
.chart-legend i[data-series="comments"] { background: var(--cyan); }
.chart-legend i[data-series="shares"] { background: var(--post-gallery); }
.dashboard-chart-empty { display: flex; min-height: 250px; align-items: center; justify-content: center; gap: 8px; color: var(--muted-2); font-size: 12px; }

.dashboard-donut { display: grid; grid-template-columns: minmax(120px, 150px) minmax(0, 1fr); min-height: 298px; align-items: center; gap: 18px; padding: 18px 16px; }
.dashboard-donut-svg { display: block; width: 100%; max-width: 150px; height: auto; aspect-ratio: 1; margin: auto; overflow: visible; }
.dashboard-donut-track, .dashboard-donut-segment { fill: none; stroke-width: 15; }
.dashboard-donut-track { stroke: var(--surface-3); }
.dashboard-donut-segment { cursor: pointer; transform: rotate(-90deg); transform-origin: 60px 60px; stroke: var(--muted-2); animation: dashboard-donut-reveal .42s ease-out backwards; transition: opacity .16s ease, stroke-width .16s ease; }
.dashboard-donut-segment:hover, .dashboard-donut-segment:focus, .dashboard-donut-segment.is-highlighted { opacity: 1; stroke-width: 18; outline: none; }
.dashboard-donut-segment.is-dimmed { opacity: .24; }
.dashboard-donut-segment.tone-active { stroke: var(--green); }
.dashboard-donut-segment.tone-filtered { stroke: var(--yellow); }
.dashboard-donut-segment.tone-moderator_removed { stroke: var(--red); }
.dashboard-donut-segment.tone-self_deleted { stroke: var(--post-gallery); }
.dashboard-donut-segment.tone-other_removed { stroke: var(--accent); }
.dashboard-donut-segment.tone-unknown { stroke: var(--muted-2); }
.dashboard-donut-total { fill: var(--text); font: 700 17px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dashboard-donut-caption { fill: var(--muted-2); font-size: 9px; }
.dashboard-donut-legend { display: grid; min-width: 0; gap: 10px; }
.dashboard-donut-legend-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; min-width: 0; padding: 4px 5px; border-radius: 5px; cursor: default; transition: background .15s ease, opacity .15s ease; }
.dashboard-donut-legend-row:hover, .dashboard-donut-legend-row:focus, .dashboard-donut-legend-row.is-highlighted { background: var(--surface-2); outline: none; }
.dashboard-donut-legend-row.is-dimmed { opacity: .38; }
.dashboard-donut-legend-row i { width: 9px; height: 9px; border-radius: 2px; background: var(--muted-2); }
.dashboard-donut-legend-row i.tone-active { background: var(--green); }
.dashboard-donut-legend-row i.tone-filtered { background: var(--yellow); }
.dashboard-donut-legend-row i.tone-moderator_removed { background: var(--red); }
.dashboard-donut-legend-row i.tone-self_deleted { background: var(--post-gallery); }
.dashboard-donut-legend-row i.tone-other_removed { background: var(--accent); }
.dashboard-donut-legend-row span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-donut-legend-row strong { color: var(--text); font: 650 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dashboard-donut-legend-row small { min-width: 42px; color: var(--muted-2); font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; }

.dashboard-breakdown { display: grid; align-content: start; gap: 14px; min-height: 298px; padding: 20px 16px; }
.dashboard-customer-panel .dashboard-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 190px; }
.dashboard-breakdown-row { display: grid; width: 100%; grid-template-columns: minmax(120px, .9fr) minmax(120px, 1.4fr) 54px; align-items: center; gap: 11px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; text-align: left; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.dashboard-breakdown-row:hover, .dashboard-breakdown-row:focus-visible { border-color: var(--line); background: var(--surface-2); outline: none; transform: translateX(2px); }
.dashboard-breakdown-row > div { display: grid; min-width: 0; }
.dashboard-breakdown-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-breakdown-row span { margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.dashboard-breakdown-row b { color: var(--text); font: 650 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; }
.dashboard-progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 4px; appearance: none; background: var(--surface-3); }
.dashboard-progress::-webkit-progress-bar { border-radius: 4px; background: var(--surface-3); }
.dashboard-progress::-webkit-progress-value { border-radius: 4px; background: var(--blue); }
.dashboard-progress::-moz-progress-bar { border-radius: 4px; background: var(--blue); }
.dashboard-progress.tone-active::-webkit-progress-value { background: var(--green); }
.dashboard-progress.tone-active::-moz-progress-bar { background: var(--green); }
.dashboard-progress.tone-filtered::-webkit-progress-value { background: var(--yellow); }
.dashboard-progress.tone-filtered::-moz-progress-bar { background: var(--yellow); }
.dashboard-progress.tone-removed::-webkit-progress-value { background: var(--red); }
.dashboard-progress.tone-removed::-moz-progress-bar { background: var(--red); }
.dashboard-progress.tone-unknown::-webkit-progress-value { background: var(--muted-2); }
.dashboard-progress.tone-unknown::-moz-progress-bar { background: var(--muted-2); }

.dashboard-chart-tooltip { position: fixed; z-index: 120; display: grid; min-width: 126px; max-width: min(240px, calc(100vw - 20px)); gap: 4px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-3); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); color: var(--text); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.dashboard-chart-tooltip.visible { opacity: 1; transform: translateY(0); }
.dashboard-chart-tooltip strong { font-size: 11px; }
.dashboard-chart-tooltip span { color: var(--text); font: 700 17px/1.1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dashboard-chart-tooltip small { color: var(--muted); font-size: 9px; }

@keyframes dashboard-bar-rise {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: .9; transform: scaleY(1); }
}

@keyframes dashboard-donut-reveal {
  from { opacity: 0; transform: rotate(-90deg) scale(.92); }
  to { opacity: 1; transform: rotate(-90deg) scale(1); }
}

.dashboard-quality-posts { min-height: 260px; }
.dashboard-quality-table { min-width: 1180px; }
.dashboard-quality-table th:nth-child(3) { min-width: 260px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; width: min(360px, calc(100vw - 36px)); gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-left: 3px solid var(--blue); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); animation: toast-in .18s ease-out; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--yellow); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@container (max-width: 720px) {
  .post-tracking-table, .post-tracking-table tbody { display: block; width: 100%; }
  .post-tracking-table { min-width: 0; }
  .post-tracking-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .post-tracking-table tbody tr:not(.empty-row) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .post-tracking-table tbody tr:not(.empty-row):last-child { border-bottom: 0; }
  .post-tracking-table tbody tr:not(.empty-row) td { display: flex; width: auto; min-width: 0; max-width: none; height: auto; min-height: 48px; padding: 6px 9px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 5px; border-bottom: 0; overflow-wrap: anywhere; white-space: normal; }
  .post-tracking-table tbody tr:not(.empty-row) td::before { content: attr(data-label); color: var(--muted-2); font-size: 9px; font-weight: 600; }
  .post-tracking-table tbody tr:not(.empty-row) td.number { align-items: flex-start; text-align: left; }
  .post-tracking-table tbody tr:not(.empty-row) .selection-column { text-align: left !important; }
  .post-tracking-table .selection-control { width: 28px; height: 24px; justify-items: start; }
  .post-tracking-table .tracking-post-link { margin: 0; }
  .post-tracking-table .tracking-time { flex-direction: row; gap: 5px; }
  .post-tracking-table .empty-row { display: block; }
  .post-tracking-table .empty-row td { display: flex; width: 100%; max-width: none; align-items: center; justify-content: center; }
}

@media (max-width: 1280px) {
  .dashboard-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-metric:nth-child(3) { border-right: 0; }
  .dashboard-metric:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-context { min-height: 38vh; padding: 24px 28px 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-title h1 { margin-top: 10px; font-size: 46px; }
  .auth-title p { margin-top: 10px; font-size: 15px; }
  .auth-status { margin-top: 34px; }
  .auth-panel-wrap { min-height: 62vh; }
  .work-grid { grid-template-columns: 1fr; }
  .search-settings-grid { grid-template-columns: 1fr; }
  .search-number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-tracking-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-tracking-search-field { grid-column: 1 / -1; }
  .tracking-detail-grid, .tracking-detail-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-search-run-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-chart-grid { grid-template-columns: 1fr; }
  .dashboard-customer-panel { grid-column: auto; }
  .dashboard-customer-panel .dashboard-breakdown { grid-template-columns: 1fr; }
  .task-meta-item:nth-child(2) { border-right: 0; }
  .task-meta-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  #linksInput { height: 170px; }
  .log-output { height: 230px; }
}

@media (max-width: 860px) {
  :root { --topbar-height: 54px; }
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .mobile-menu { display: inline-flex; }
  .sidebar-scrim { position: fixed; z-index: 45; inset: 0; display: block; visibility: hidden; background: rgba(0,0,0,.58); opacity: 0; transition: opacity .2s; }
  .sidebar-scrim.open { visibility: visible; opacity: 1; }
  .app-main { padding-left: 0; }
  .topbar { padding: 0 12px; }
  .connection-badge, .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 34px; padding: 0; }
  .content { padding: 18px 13px 32px; }
  .page-header { align-items: center; }
  .page-header h1 { font-size: 21px; }
  .page-header .btn span { display: none; }
  .page-header .btn { width: 36px; padding: 0; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric strong { font-size: 19px; }
  .metric-code { font-size: 14px !important; }
  .results-head { align-items: flex-start; flex-direction: column; }
  .result-tools { width: 100%; }
  .search-shell { width: 100%; }
  .result-tools select { max-width: 124px; }
  .log-line { grid-template-columns: 59px 46px minmax(0,1fr); gap: 6px; }
  .query-list-head .btn span { display: inline; }
}

@media (max-width: 520px) {
  .auth-context { min-height: auto; padding: 20px 18px 22px; }
  .auth-title { margin-top: 54px; }
  .auth-title h1 { font-size: 39px; }
  .auth-status { grid-template-columns: 1fr; }
  .auth-status div { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
  .auth-status dt { margin: 0; }
  .auth-panel-wrap { min-height: auto; padding: 18px 12px 28px; }
  .auth-panel { padding: 20px 16px; }
  .metric { padding: 12px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .feature-permission-grid { grid-template-columns: 1fr; }
  .post-type-options, .search-number-grid, .custom-range-fields, .community-settings-grid, .post-search-run-meta { grid-template-columns: 1fr; }
  .post-tracking-filter-grid { grid-template-columns: 1fr; padding: 11px; }
  .post-tracking-search-field { grid-column: auto; }
  .post-tracking-filter-grid .btn { min-height: 44px; }
  .dashboard-filter-grid { grid-template-columns: 1fr; padding: 11px; }
  .dashboard-filter-grid .btn { min-height: 44px; }
  .dashboard-settings-button { min-width: 0; }
  .dashboard-quality-config-head { align-items: stretch; flex-direction: column; }
  .dashboard-quality-mode { width: 100%; }
  .dashboard-quality-retention { align-items: stretch; flex-direction: column; gap: 10px; }
  .dashboard-quality-duration { width: 100%; }
  .dashboard-quality-duration input { width: 100%; }
  .dashboard-quality-row { grid-template-columns: 28px minmax(0, 1fr) 34px; align-items: center; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .dashboard-quality-row label { grid-column: 2; }
  .dashboard-quality-row .icon-btn { grid-column: 3; grid-row: 1; }
  .dashboard-condition-index { grid-row: 1; }
  .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric { min-height: 104px; padding: 13px; }
  .dashboard-metric:nth-child(3) { border-right: 1px solid var(--line); }
  .dashboard-metric:nth-child(2n) { border-right: 0; }
  .dashboard-metric:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .dashboard-metric strong { font-size: 21px; }
  .dashboard-chart-panel { min-height: 320px; }
  .dashboard-chart { min-height: 260px; padding-inline: 4px; }
  .dashboard-chart-svg { height: 260px; }
  .dashboard-donut { grid-template-columns: 116px minmax(0, 1fr); min-height: 260px; gap: 11px; padding-inline: 11px; }
  .dashboard-donut-legend-row { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 6px; }
  .dashboard-donut-legend-row small { grid-column: 2 / -1; text-align: left; }
  .dashboard-breakdown { min-height: 240px; padding-inline: 11px; }
  .dashboard-breakdown-row { grid-template-columns: minmax(100px, 1fr) minmax(80px, 1fr) 46px; gap: 7px; }
  .chart-legend { justify-content: flex-start; }
  .post-tracking-filters .panel-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .post-tracking-table-foot { align-items: flex-start; flex-direction: column; padding: 9px 11px; }
  .post-tracking-heading { width: 100%; justify-content: space-between; }
  .post-tracking-heading .btn span { display: inline; }
  .post-tracking-table tbody tr:not(.empty-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 5px; }
  .tracking-detail-grid, .tracking-detail-grid.compact { grid-template-columns: 1fr; }
  .tracking-detail-body { padding: 13px; }
  .pagination { width: 100%; justify-content: space-between; }
  .post-search-form > .panel-head { align-items: stretch; flex-direction: column; }
  .post-search-mode-switch { width: 100%; }
  .mode-switch-button { min-height: 44px; padding-inline: 8px; }
  .search-form-foot .btn { min-height: 44px; }
  .member-bulk-toolbar { align-items: stretch; flex-direction: column; padding: 10px 12px; }
  .member-bulk-toolbar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-bulk-toolbar .btn { min-height: 44px; }
  .credential-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credential-status > span:nth-child(2) { border-right: 0; }
  .credential-status > span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .credential-metadata { grid-template-columns: 1fr; }
  .tracking-test-range { grid-template-columns: 1fr; }
  .task-meta-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .task-meta-item:last-child { border-bottom: 0; }
  .detail-toolbar { align-items: flex-start; flex-direction: column; }
  .detail-toolbar .btn { min-height: 44px; }
  .query-row { grid-template-columns: 25px minmax(0, 1fr) 34px; gap: 6px; }
  .panel-head { padding-inline: 11px; }
  .panel-body { padding: 10px; }
  #linksInput { height: 155px; }
  .log-output { height: 210px; padding: 10px; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
