:root {
  --ink: #172033;
  --ink-soft: #46536a;
  --muted: #7c879b;
  --line: #e5e9f1;
  --line-strong: #d7dde8;
  --paper: #f5f7fb;
  --card: rgba(255, 255, 255, .94);
  --green-950: #0b1221;
  --green-900: #101a2f;
  --green-800: #182845;
  --green-700: #3f6fe5;
  --green-100: #eaf0ff;
  --mint: #78a5ff;
  --mint-soft: #eaf1ff;
  --red: #c84f45;
  --red-soft: #fff0ee;
  --shadow-sm: 0 5px 18px rgba(25, 38, 68, .05);
  --shadow: 0 20px 48px rgba(25, 38, 68, .09);
  --shadow-lg: 0 30px 76px rgba(11, 18, 33, .16);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% -10%, rgba(120, 165, 255, .14), transparent 29rem),
    linear-gradient(135deg, #fafbfe 0%, var(--paper) 52%, #f1f4fa 100%);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .58; cursor: not-allowed; }

aside {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 252px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #33415b transparent;
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 0 0, rgba(120, 165, 255, .16), transparent 19rem),
    linear-gradient(180deg, var(--green-900), var(--green-950));
  color: #dce9e3;
  box-shadow: 12px 0 42px rgba(11, 18, 33, .1);
}

aside::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 80px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(120, 165, 255, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(120, 165, 255, .028), 0 0 0 62px rgba(120, 165, 255, .018);
  pointer-events: none;
}

.logo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 13px;
  margin: 0 5px 42px;
  color: #fff;
}

.logo-mark, .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  background: linear-gradient(145deg, #729dff, #3f6fe5);
  box-shadow: 0 11px 28px rgba(63, 111, 229, .28);
}

.logo-mark img, .brand-mark img { width: 29px; height: 29px; display: block; }

.logo strong, .logo small { display: block; }
.logo > div { min-width: 0; }
.logo strong { font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.logo small { margin-top: 5px; color: #adbed8; font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }

nav { position: relative; z-index: 1; display: grid; gap: 7px; }

nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #91a0b9;
  font-size: 13px;
  font-weight: 600;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}

nav a:hover { color: #fff; background: rgba(255, 255, 255, .055); transform: translateX(2px); }
nav a.active { color: #fff; background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .075); }
nav a.active::before { content: ""; position: absolute; left: -22px; width: 4px; height: 24px; border-radius: 0 6px 6px 0; background: var(--mint); }
nav i { width: 24px; text-align: center; color: #71819d; font-style: normal; font-size: 18px; }
nav a.active i { color: var(--mint); }
nav b { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 20px; background: var(--mint); color: var(--green-950); font-size: 10px; text-align: center; }
.nav-separator { display: block; height: 1px; margin: 8px 10px; background: rgba(255, 255, 255, .1); }
.competitor-nav { margin-top: 1px; }

.side-foot { position: relative; z-index: 1; margin-top: auto; display: grid; flex-shrink: 0; gap: 10px; padding: 16px 6px 0; }
.sidebar-expiry { min-width: 0; padding: 14px; border: 1px solid rgba(241, 195, 117, .35); border-radius: 13px; background: linear-gradient(135deg, rgba(218, 166, 80, .16), rgba(218, 166, 80, .06)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.sidebar-expiry-heading { display: flex; align-items: center; gap: 7px; color: #e9c488; font-size: 11px; font-weight: 600; }
.sidebar-expiry-heading svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-expiry-date { display: block; margin-top: 7px; color: #ffe4b2; font-size: 20px; font-weight: 750; line-height: 1.3; letter-spacing: .035em; font-variant-numeric: tabular-nums; }
.sidebar-expiry-note { display: block; margin-top: 7px; color: #c5b9a7; font-size: 10px; line-height: 1.5; }
.sidebar-expiry.is-admin-expiry { display: none; }
@media (min-width: 861px) { aside > nav { flex-shrink: 0; } }
.pulse { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.pulse > i, .live-chip i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(120, 165, 255, .11); }
.pulse span, .pulse strong, .pulse small { display: block; }
.pulse strong { color: #e2e8f3; font-size: 11px; }
.pulse small { margin-top: 3px; color: #74839c; font-size: 9px; }
.pulse.error { border-color: rgba(224, 108, 100, .26); background: rgba(200, 79, 69, .1); }
.pulse.error > i { background: #e07870; box-shadow: 0 0 0 5px rgba(224, 108, 100, .14); }
.pulse.error strong { color: #f3c0bc; }
.pulse.error small { color: #ce8e88; }
.side-foot form { margin: 0; }
.logout {
  width: 100%;
  min-height: 42px;
  margin: 0;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  padding: 10px 13px;
  color: #8998b0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout:not(:disabled):hover { border-color: rgba(224, 108, 100, .24); background: rgba(200, 79, 69, .1); color: #f0aaa4; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 7px 18px rgba(5, 10, 21, .16); transform: translateY(-1px); }
.logout:not(:disabled):active { background: rgba(200, 79, 69, .14); transform: translateY(0); }
.logout:focus-visible { outline: 3px solid rgba(120, 165, 255, .24); outline-offset: 2px; color: #fff; }
.mobile-logout-form { display: none; margin: 0; flex: 0 0 auto; }
.mobile-menu-toggle { display: none; }
.mobile-menu-actions { display: none; }
.mobile-menu-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mobile-menu-toggle:focus-visible { outline: 3px solid rgba(120, 165, 255, .4); outline-offset: 2px; }
.mobile-logout-button { appearance: none; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; background: rgba(255, 255, 255, .045); padding: 0; color: #91a0b9; cursor: pointer; transition: color .18s, background .18s, border-color .18s, transform .18s; }
.mobile-logout-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-logout-button:not(:disabled):hover { border-color: rgba(224, 108, 100, .28); background: rgba(200, 79, 69, .13); color: #f0aaa4; }
.mobile-logout-button:not(:disabled):active { transform: scale(.96); }
.mobile-logout-button:focus-visible { outline: 3px solid rgba(120, 165, 255, .25); outline-offset: 2px; color: #fff; }

.workspace {
  min-height: 100vh;
  margin-left: 252px;
  padding: 38px clamp(28px, 3.2vw, 54px) 54px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 30px;
  padding: 0 2px 28px;
  border-bottom: 1px solid rgba(215, 221, 232, .82);
}

h1 { margin: 5px 0 0; font-size: clamp(28px, 2.3vw, 38px); font-weight: 750; letter-spacing: -.04em; line-height: 1.15; }
h2 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
h3 { margin: 0; font-size: 15px; line-height: 1.55; }
.eyebrow { margin: 0; color: #8794aa; font-size: 9px; font-weight: 800; letter-spacing: .24em; }
.page-description { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 11px; }
.header-actions form { margin: 0; }
.header-actions .ghost { min-height: 39px; padding: 9px 13px; border-radius: 12px; font-size: 11px; }
.live-chip { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .7); color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.live-chip [data-collection-status-text] { min-width: 90px; text-align: center; font-variant-numeric: tabular-nums; }
.live-chip.updating i { animation: collection-pulse 1s ease-in-out infinite; }
.live-chip.error { border-color: #f0c9c4; background: #fff1ef; color: #a23f34; }
.live-chip.error i { background: #c85e52; box-shadow: 0 0 0 5px rgba(200, 94, 82, .12); animation: none; }
.cookie-status-button { display: inline-flex; align-items: center; gap: 8px; min-height: 39px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .78); padding: 9px 13px; color: var(--ink-soft); font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color .18s, background .18s, color .18s, transform .18s; white-space: nowrap; }
.cookie-status-button:not(:disabled):hover { transform: translateY(-1px); }
.cookie-status-button i, .cookie-modal-status > i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #8995a6; }
.cookie-status-button.ok { border-color: #bfe2cb; background: #edf9f1; color: #307143; }
.cookie-status-button.ok i, .cookie-modal-status.ok > i { background: #43a163; box-shadow: 0 0 0 4px rgba(67, 161, 99, .12); }
.cookie-status-button.error { border-color: #f0c9c4; background: #fff1ef; color: #a23f34; }
.cookie-status-button.error i, .cookie-modal-status.error > i { background: #c85e52; box-shadow: 0 0 0 4px rgba(200, 94, 82, .12); }
.cookie-status-button.unknown { border-color: #ead9ae; background: #fff9ea; color: #8a651b; }
.cookie-status-button.unknown i, .cookie-modal-status.unknown > i { background: #d49b32; }
.cookie-status-button.loading i { animation: collection-pulse .8s ease-in-out infinite; }
.cookie-status-button:disabled { cursor: wait; opacity: .72; transform: none; }
@keyframes collection-pulse { 50% { opacity: .35; transform: scale(.72); } }

.primary {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 650;
  box-shadow: 0 10px 25px rgba(63, 111, 229, .22);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 13px 32px rgba(63, 111, 229, .28); filter: brightness(1.06); }
.primary:not(:disabled):active { transform: translateY(0); }
.full { width: 100%; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats article, .panel { border: 1px solid rgba(225, 230, 239, .95); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); }
.stats article { position: relative; overflow: hidden; min-height: 150px; padding: 24px 25px; transition: transform .22s, box-shadow .22s, border-color .22s; }
.stats article::after { content: ""; position: absolute; right: -22px; top: -30px; width: 104px; height: 104px; border-radius: 50%; background: linear-gradient(145deg, rgba(63, 111, 229, .07), transparent); }
.stats article:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.stats article span, .stats article small { position: relative; z-index: 1; display: block; color: var(--muted); }
.stats article span { font-size: 12px; font-weight: 650; }
.stats article strong { position: relative; z-index: 1; display: block; margin: 13px 0 8px; font-size: 34px; font-weight: 760; letter-spacing: -.05em; }
.stats article small { font-size: 10px; }
.stats article.accent { border-color: transparent; background: linear-gradient(145deg, #20345a, var(--green-950)); color: #fff; box-shadow: 0 17px 38px rgba(11, 18, 33, .18); }
.stats article.accent::after { width: 150px; height: 150px; top: -65px; right: -35px; background: rgba(120, 165, 255, .13); box-shadow: 0 0 0 24px rgba(120, 165, 255, .04); }
.stats .accent span, .stats .accent small { color: #9aabc5; }
.stats .accent strong { color: var(--mint); }

.grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(285px, .78fr); gap: 20px; }
.panel { padding: 25px; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-title p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.panel-title a { padding: 5px 0; color: var(--green-700); font-size: 11px; font-weight: 750; }
.count-badge, .sort-badge { display: inline-flex; align-items: center; min-height: 29px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 30px; background: #f8f9fc; color: var(--ink-soft); font-size: 10px; font-weight: 650; white-space: nowrap; }

.account-row { display: grid; grid-template-columns: 44px minmax(160px, 1fr) minmax(126px, .8fr) 94px minmax(84px, auto); align-items: center; gap: 12px; padding: 14px 2px; border-top: 1px solid var(--line); }
.account-row:first-child { border-top: 0; }
.platform { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.platform.douyin { background: linear-gradient(145deg, #1f2930, #090e11); }
.platform-stack { display: flex; align-items: center; min-width: 44px; }
.account-avatar { position:relative; display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; overflow:hidden; border:1px solid #dbe3ee; border-radius:13px; background:linear-gradient(145deg,#edf2fa,#e1e8f4); color:#4f6fa8; font-size:13px; font-weight:800; }
.account-avatar img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
.account-avatar img[hidden] { display:none; }
.avatar-link { transition:border-color .18s,box-shadow .18s; }
.avatar-link:hover,.avatar-link:focus-visible { border-color:#7596e7; box-shadow:0 0 0 3px rgba(63,111,229,.12); outline:none; }
.platform-stack .platform + .platform { margin-left: -9px; box-shadow: -2px 0 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .08); }
.grow strong, .grow small, .account-row > div strong, .account-row > div small { display: block; }
.grow strong { font-size: 13px; }
.grow small, .account-row > div small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.overview-account-meta { display: flex; min-width: 0; align-items: center; gap: 9px; border: 1px solid #e5eaf2; border-radius: 12px; background: linear-gradient(145deg, #fbfcfe, #f6f8fb); padding: 8px 10px; }
.overview-account-meta > i { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 9px; background: #e8eefc; color: #4f70c1; font-size: 10px; font-style: normal; font-weight: 800; }
.overview-account-meta > span { min-width: 0; }
.overview-account-meta small, .overview-account-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row .overview-account-meta small { margin: 0; color: #929eb0; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.account-row .overview-account-meta strong { margin-top: 3px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.overview-owner.unassigned > i { background: #f0f2f5; color: #9aa4b2; }
.overview-owner.unassigned strong { color: #8994a3; }
.overview-video-total > i { background: #e9f6ee; color: #3d815a; }
.account-row .overview-video-total strong { color: var(--green-900); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.overview-video-total em { margin-left: 3px; color: #8d9b94; font-size: 8px; font-style: normal; font-weight: 650; }

.status { display: inline-block; max-width: 220px; overflow: hidden; padding: 6px 10px; border-radius: 20px; background: #edf2ef; color: #64766e; font-size: 10px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.status.queued { background: #eef2f7; color: #596b7f; }
.status.collecting { background: #e6f1ff; color: #275f9c; box-shadow: inset 0 0 0 1px #c7ddf7; }
.status.uncollected { background: #f2f4f3; color: #738079; }
.status.disabled { background: #eceeed; color: #7d8581; }
.status.ok { background: #e7f6eb; color: #307143; }
.status.warning { background: #fff3d8; color: #94650b; }
.status.error { background: #fce8e5; color: #a23f34; }
.status.has-detail { display: inline-flex; min-width: 170px; max-width: 260px; flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 12px; line-height: 1.35; white-space: normal; }
.status.has-detail strong { font-size: 10px; font-weight: 800; }
.status.has-detail small { display: block; max-width: 238px; overflow: hidden; opacity: .82; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.lead-mini { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
.lead-mini:first-of-type { border-top: 0; }
.lead-mini > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-weight: 750; }
.lead-mini strong { font-size: 12px; }
.lead-mini p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.lead-mini time { color: #a0ada7; font-size: 9px; }
.empty { padding: 65px 20px; color: #98a69f; text-align: center; }
.empty.small { padding: 76px 10px; }

.table-panel { overflow: hidden; padding: 0; }
.table-panel .panel-title { align-items: center; margin: 0; padding: 25px 26px 21px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
th { padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8f9fc; color: #8792a6; font-size: 10px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
td { padding: 17px 18px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .16s; }
tbody tr:hover { background: #fafbfe; }
td.content-cell { min-width: 240px; max-width: 420px; line-height: 1.65; }
.account-cell { display: flex; align-items: center; gap: 12px; min-width: 215px; }
.account-cell strong, .account-cell small { display: block; }
.account-cell strong { color: var(--ink); font-size: 13px; }
.account-cell small { max-width: 220px; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-remark { display: inline-block; min-width: 72px; max-width: 180px; overflow: hidden; border: 1px solid #d8e8e2; border-radius: 8px; background: #f1f8f5; padding: 5px 8px; color: var(--green-700); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.responsible-badge { display: inline-flex; align-items: center; max-width: 150px; overflow: hidden; border: 1px solid #dbe4f5; border-radius: 999px; background: #f2f6ff; padding: 5px 9px; color: #4d6fb9; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.responsible-badge::before { width: 6px; height: 6px; flex: 0 0 6px; margin-right: 6px; border-radius: 50%; background: #6c8bd4; content: ''; }
.responsible-badge.unassigned { border-color: #e2e5e9; background: #f6f7f8; color: #8a95a5; }
.responsible-badge.unassigned::before { background: #aab2be; }
.profile-link { display: block; width: 150px; overflow: hidden; color: #4f72c8; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-link::after { margin-left: 5px; color: #9aa7bb; content: '↗'; }
.profile-link:hover { color: var(--green-700); text-decoration: underline; }
.source-video-link { display: inline-block; min-width: 72px; color: #4f72c8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.source-video-link::after { margin-left: 5px; color: #9aa7bb; content: '↗'; }
.source-video-link:hover { color: var(--green-700); text-decoration: underline; }
.lead-status-form { width: 128px; max-width: 100%; margin: 0; }
.lead-status-form > .ui-field.ui-field-compact { width: 100%; }
.muted-text { color: var(--muted); white-space: nowrap; }
.empty-link { border: 1px dashed #d49b44; border-radius: 8px; background: #fff8e9; padding: 5px 13px; color: #9b6717; cursor: pointer; font-size: 10px; font-weight: 800; transition: border-color .18s, background .18s, color .18s; }
.empty-link:not(:disabled):hover { border-color: #b97613; background: #fff2d7; color: #7e500c; }
.table-number { color: var(--ink); font-size: 14px; }
.inline { display: flex; gap: 6px; white-space: nowrap; }
.ghost { border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; padding: 7px 9px; color: var(--ink-soft); cursor: pointer; font-size: 10px; font-weight: 650; transition: border-color .18s, color .18s, background .18s; }
.ghost:not(:disabled):hover { border-color: #aab8d1; background: #f8faff; color: var(--green-700); }
.ghost.danger { border-color: #f0d2ce; color: var(--red); }
.ghost.danger:not(:disabled):hover { border-color: #e4a9a2; background: var(--red-soft); color: #a9362d; }
.primary:disabled, .ghost:disabled { opacity: .56; cursor: not-allowed; box-shadow: none; filter: saturate(.45); transform: none; }

.video-filter-toolbar { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: visible; margin-bottom: 18px; padding: 15px 17px; border: 1px solid rgba(210, 221, 231, .9); border-radius: 16px; background: linear-gradient(115deg, rgba(255, 255, 255, .96), rgba(244, 248, 252, .92)); box-shadow: 0 8px 24px rgba(42, 59, 87, .06); transition: border-color .2s, box-shadow .2s; }
.video-filter-toolbar::after { position: absolute; top: -48px; right: -30px; width: 150px; height: 110px; border-radius: 50%; background: rgba(75, 121, 229, .06); content: ''; pointer-events: none; }
.video-filter-toolbar.is-filtered { border-color: rgba(85, 145, 119, .35); box-shadow: 0 9px 26px rgba(45, 112, 78, .09); }
.filter-heading { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; min-width: 190px; }
.filter-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: linear-gradient(145deg, #edf3ff, #e2eafb); color: #4f72c8; box-shadow: inset 0 0 0 1px rgba(79, 114, 200, .08); }
.is-filtered .filter-icon { background: linear-gradient(145deg, #e7f6ed, #d9eee3); color: var(--green-700); }
.filter-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.filter-heading strong, .filter-heading small { display: block; }
.filter-heading strong { color: var(--ink); font-size: 14px; }
.filter-heading small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.video-filter-toolbar form { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 9px; }
.filter-result { margin-bottom: 4px; border: 1px solid #dce6f0; border-radius: 20px; background: rgba(255, 255, 255, .78); padding: 7px 11px; color: #68788f; font-size: 11px; font-weight: 700; white-space: nowrap; }
.video-filter-toolbar.is-filtered .filter-result { border-color: #cce3d5; background: #eff8f3; color: var(--green-700); }
.filter-field { display: grid; gap: 5px; }
.video-filter-toolbar label { margin: 0 0 0 2px; color: #64748b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.filter-select-wrap { position: relative; display: block; }
.filter-select-wrap::after { position: absolute; top: 50%; right: 13px; width: 6px; height: 6px; border-right: 1.5px solid #76859a; border-bottom: 1.5px solid #76859a; content: ''; pointer-events: none; transform: translateY(-70%) rotate(45deg); }
.video-filter-toolbar select { width: 240px; min-height: 42px; appearance: none; border-color: #d8e1eb; border-radius: 12px; background: rgba(255, 255, 255, .94); padding: 10px 36px 10px 13px; color: var(--ink-soft); font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s; }
.filter-account-field select { width: 210px; }
.filter-responsible-field select { width: 165px; }
.video-filter-toolbar select:hover { border-color: #b8c6d9; background: #fff; }
.video-filter-toolbar select:focus { border-color: #7596e7; background: #fff; }
.filter-date-wrap { position: relative; display: flex; align-items: center; width: 190px; min-height: 44px; border: 1px solid #d7e0ec; border-radius: 13px; background: linear-gradient(145deg, #fff 28%, #f6f9fd); box-shadow: 0 2px 8px rgba(44, 67, 104, .05), inset 0 1px 0 rgba(255, 255, 255, .9); cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.filter-date-wrap::before { position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(#77a0ef, #5479d5); content: ''; opacity: .55; transition: opacity .18s; }
.date-icon { position: absolute; z-index: 2; top: 5px; right: 5px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(145deg, #edf3ff, #e4edff); color: #5276cc; box-shadow: inset 0 0 0 1px rgba(82, 118, 204, .08); pointer-events: none; transition: background .18s, color .18s, transform .18s; }
.date-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.date-picker-trigger { position: relative; z-index: 1; width: 100%; min-height: 42px; border: 0; border-radius: 13px; background: transparent; padding: 10px 46px 10px 14px; color: #344155; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.filter-date-wrap:hover { border-color: #a9bde1; box-shadow: 0 7px 18px rgba(59, 91, 148, .11), inset 0 1px 0 rgba(255, 255, 255, .95); transform: translateY(-1px); }
.filter-date-wrap:hover .date-icon { background: linear-gradient(145deg, #e2ebff, #d8e5ff); color: #4268bf; transform: scale(1.03); }
.filter-date-wrap:focus-within { border-color: #6f91df; box-shadow: 0 0 0 4px rgba(82, 118, 204, .12), 0 7px 18px rgba(59, 91, 148, .09); }
.filter-date-wrap:focus-within::before, .filter-date-wrap.has-value::before { opacity: 1; }
.filter-date-wrap.has-value { border-color: #a9cdb8; background: linear-gradient(145deg, #fff, #f2faf5); }
.filter-date-wrap.has-value .date-icon { background: linear-gradient(145deg, #e4f5eb, #d8ede2); color: var(--green-700); }
.date-popover { position: absolute; z-index: 80; top: calc(100% + 10px); right: 0; display: block; width: 280px; border: 1px solid rgba(207, 217, 232, .95); border-radius: 18px; background: rgba(255, 255, 255, .98); padding: 14px 15px 12px; box-shadow: 0 22px 55px rgba(27, 43, 72, .2), 0 5px 16px rgba(27, 43, 72, .08); cursor: default; backdrop-filter: blur(16px); animation: date-popover-in .16s ease-out; }
.date-popover[hidden] { display: none; }
@keyframes date-popover-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.date-calendar-head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 12px; }
.date-calendar-head strong { color: #26364e; font-size: 14px; font-weight: 780; text-align: center; }
.date-calendar-head button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #e1e7f0; border-radius: 10px; background: #f7f9fc; color: #5b6f8e; cursor: pointer; transition: border-color .16s, background .16s, color .16s, transform .16s; }
.date-calendar-head button:not(:disabled):hover { border-color: #c4d4ef; background: #edf3ff; color: #456bc2; transform: translateY(-1px); }
.date-calendar-head svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.date-weekdays, .date-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-weekdays { margin-bottom: 5px; color: #8a97aa; font-size: 10px; font-weight: 700; text-align: center; }
.date-weekdays > span { display: grid; place-items: center; height: 26px; }
.date-days button { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: #35435a; font-size: 11px; font-weight: 650; cursor: pointer; transition: background .14s, color .14s, transform .14s, box-shadow .14s; }
.date-days button:not(:disabled):hover { background: #edf3ff; color: #4168c2; transform: translateY(-1px); }
.date-days button.outside { color: #bdc5d1; font-weight: 550; }
.date-days button.today { color: #3c67c7; font-weight: 800; box-shadow: inset 0 0 0 1px #adc1eb; }
.date-days button.selected { background: linear-gradient(145deg, #557ee0, #3f67c8); color: #fff; font-weight: 800; box-shadow: 0 5px 12px rgba(68, 106, 199, .28); }
.date-days button.selected:not(:disabled):hover { color: #fff; transform: translateY(-1px) scale(1.03); }
.date-calendar-foot { display: flex; justify-content: space-between; margin-top: 11px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.date-calendar-foot button { border: 0; border-radius: 9px; background: transparent; padding: 7px 9px; color: #6f7f95; font-size: 11px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.date-calendar-foot button:not(:disabled):hover { background: #edf3ff; color: #4168c2; }
.date-calendar-foot button:last-child { background: #edf3ff; color: #4168c2; }
.filter-reset { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 1px solid #dde4ec; border-radius: 12px; background: rgba(255, 255, 255, .78); padding: 9px 12px; color: #7e8b9d; font-size: 11px; font-weight: 700; white-space: nowrap; transition: border-color .18s, background .18s, color .18s, transform .18s; }
.filter-reset svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.filter-reset:hover, .filter-reset.active { border-color: #bad8c7; background: #eff8f3; color: var(--green-700); }
.filter-reset:hover { transform: translateY(-1px); }
.filter-empty { grid-column: 1 / -1; display: grid; place-items: center; gap: 8px; width: 100%; min-height: 210px; }
.filter-empty strong { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: #edf3f0; color: var(--green-700); font-size: 18px; }
.filter-empty span { color: var(--muted); font-size: 11px; }
.competitor-filter-toolbar form { flex-wrap: wrap; }
.competitor-category-field { position: relative; min-width: 220px; }
.competitor-category-picker { position: relative; display: block; }
.competitor-category-trigger { display: flex; align-items: center; justify-content: space-between; width: 240px; min-height: 42px; border: 1px solid #d8e1eb; border-radius: 12px; background: rgba(255, 255, 255, .94); padding: 10px 13px; color: var(--ink-soft); font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s; }
.competitor-category-trigger:not(:disabled):hover, .competitor-category-trigger[aria-expanded="true"] { border-color: #9fb5dc; background: #fff; box-shadow: 0 0 0 4px rgba(82, 118, 204, .09); }
.competitor-category-trigger i { color: #7d8ba0; font-style: normal; }
.competitor-category-menu { position: absolute; z-index: 90; top: calc(100% + 9px); left: 0; display: block; width: 240px; border: 1px solid #d7dfeb; border-radius: 16px; background: rgba(255, 255, 255, .985); padding: 9px; box-shadow: 0 22px 52px rgba(20, 35, 62, .2), 0 5px 14px rgba(20, 35, 62, .07); backdrop-filter: blur(14px); }
.competitor-category-menu[hidden] { display: none; }
.competitor-category-level { display: grid; gap: 3px; }
.competitor-category-level > strong, .competitor-category-submenu > strong { padding: 7px 9px; color: #7c899d; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.competitor-category-level > button, .competitor-category-item > button, .competitor-category-submenu > button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 10px; background: transparent; padding: 10px 11px; color: #3b4860; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; transition: background .16s, color .16s; }
.competitor-category-level > button:not(:disabled):hover, .competitor-category-item > button:not(:disabled):hover, .competitor-category-item:focus-within > button:not(:disabled), .competitor-category-submenu > button:not(:disabled):hover { background: #edf3ff; color: #4168c2; }
.competitor-category-item { position: relative; display: block; }
.competitor-category-item > button i { color: #8996a9; font-size: 16px; font-style: normal; }
.competitor-category-submenu { position: absolute; top: -9px; left: calc(100% + 9px); display: none; width: 220px; border: 1px solid #d7dfeb; border-radius: 16px; background: rgba(255, 255, 255, .99); padding: 9px; box-shadow: 0 22px 52px rgba(20, 35, 62, .2), 0 5px 14px rgba(20, 35, 62, .07); }
.competitor-category-submenu::before { position: absolute; top: 0; bottom: 0; left: -10px; width: 10px; content: ''; }
.competitor-category-item:hover > .competitor-category-submenu, .competitor-category-item:focus-within > .competitor-category-submenu { display: grid; gap: 3px; }
.competitor-cover-category { position: absolute; z-index: 3; right: 12px; bottom: 10px; display: inline-flex; align-items: center; max-width: calc(100% - 136px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .82); border-radius: 10px; background: rgba(247, 250, 255, .94); color: #304f89; box-shadow: 0 7px 20px rgba(8, 18, 38, .24); backdrop-filter: blur(8px); }
.competitor-cover-category i { flex: 0 0 auto; border-right: 1px solid #c9d8f2; background: #dce8fb; padding: 6px 8px; color: #466aa9; font-size: 10px; font-style: normal; font-weight: 850; }
.competitor-cover-category b { overflow: hidden; padding: 6px 9px; font-size: 11px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.competitor-video-card.is-favorite { border-color: #ead59e; box-shadow: 0 10px 28px rgba(148, 103, 23, .1); }
.competitor-favorite-form { position: absolute; z-index: 8; top: 13px; right: 13px; margin: 0; padding: 0; }
.direct-video-edit-button { position: absolute; z-index: 8; top: 13px; left: 13px; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 999px; background: rgba(24, 32, 46, .72); padding: 8px 14px; color: #fff; box-shadow: 0 7px 18px rgba(13, 20, 32, .2); font-size: 12px; font-weight: 800; cursor: pointer; backdrop-filter: blur(12px); transition: transform .18s, background .18s, border-color .18s, box-shadow .18s; }
.direct-video-edit-button:not(:disabled):hover, .direct-video-edit-button:not(:disabled):focus-visible { border-color: #fff; outline: 0; background: rgba(52, 87, 157, .9); box-shadow: 0 9px 22px rgba(22, 49, 101, .3); transform: translateY(-1px); }
.competitor-favorite-button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; background: rgba(24, 32, 46, .68); padding: 8px 13px; color: #fff; box-shadow: 0 7px 18px rgba(13, 20, 32, .2); font-size: 12px; font-weight: 750; cursor: pointer; backdrop-filter: blur(12px); transition: transform .18s, background .18s, border-color .18s, color .18s; }
.competitor-favorite-button:not(:disabled):hover { transform: translateY(-1px); background: rgba(30, 42, 61, .88); }
.competitor-favorite-button i { color: #fff; font-size: 16px; font-style: normal; line-height: 1; }
.competitor-favorite-button.active { border-color: #f4cf6c; background: rgba(255, 247, 218, .95); color: #8c6319; box-shadow: 0 7px 20px rgba(117, 78, 9, .2); }
.competitor-favorite-button.active i { color: #d69a22; }
.competitor-view-switch { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #dbe3ee; border-radius: 12px; background: #f2f5f9; padding: 3px; }
.competitor-view-switch a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; border-radius: 9px; padding: 7px 12px; color: #68778d; font-size: 12px; font-weight: 750; text-decoration: none; transition: background .16s, color .16s, box-shadow .16s; }
.competitor-view-switch a:hover { color: #536b99; }
.competitor-view-switch a.active { background: #fff; color: #435f96; box-shadow: 0 3px 10px rgba(43, 62, 91, .1); }
.competitor-view-switch a i { color: #d39a2e; font-style: normal; }
.competitor-view-switch a b { min-width: 20px; border-radius: 999px; background: #e6ecf5; padding: 2px 6px; color: #71809a; font-size: 10px; text-align: center; }
.competitor-view-switch a.active b { background: #eef3fb; color: #516b9a; }
.competitor-favorites-refresh-form { margin: 0; padding: 0; }
.direct-video-add-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #8ca9e6; border-radius: 11px; background: linear-gradient(135deg, #edf3ff, #dfe9ff); padding: 8px 13px; color: #3f65b3; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 5px 14px rgba(57, 91, 160, .11); transition: transform .16s, border-color .16s, box-shadow .16s; }
.direct-video-add-button:not(:disabled):hover { border-color: #6f91d8; box-shadow: 0 7px 18px rgba(57, 91, 160, .17); transform: translateY(-1px); }
.favorite-refresh-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid #d8bd75; border-radius: 11px; background: linear-gradient(135deg, #fff9e8, #f7e8b9); padding: 8px 13px; color: #805c16; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 5px 14px rgba(137, 99, 27, .12); transition: transform .16s, border-color .16s, box-shadow .16s; }
.favorite-refresh-button:not(:disabled):hover { border-color: #c9a64d; box-shadow: 0 7px 18px rgba(137, 99, 27, .18); transform: translateY(-1px); }
.favorite-refresh-button i { font-size: 17px; font-style: normal; line-height: 1; }
.video-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 0 4px; }
.video-toolbar div { display: flex; align-items: baseline; gap: 10px; }
.video-toolbar strong { font-size: 15px; }
.video-toolbar div span { color: var(--muted); font-size: 10px; }
.video-toolbar-badges { display: flex; align-items: center; gap: 8px; }
.on-demand-badge, .sort-badge { display: inline-flex; align-items: center; min-height: 29px; border: 1px solid rgba(218, 227, 237, .9); border-radius: 999px; background: rgba(255, 255, 255, .78); padding: 6px 10px; font-size: 9px; font-weight: 700; backdrop-filter: blur(8px); }
.on-demand-badge { color: #526fae; }
.on-demand-badge i { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #6889d7; box-shadow: 0 0 0 4px rgba(104, 137, 215, .12); }
.sort-badge { color: var(--green-700); }
.competitor-video-toolbar { flex-wrap: wrap; }
.competitor-video-toolbar .video-toolbar-badges { flex-wrap: wrap; }
.competitor-sort-switch { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #d8e2f3; border-radius: 12px; background: #edf2fb; padding: 3px; }
.competitor-sort-switch a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border-radius: 9px; padding: 7px 11px; color: #73819a; font-size: 11px; font-weight: 750; white-space: nowrap; transition: background .18s, color .18s, box-shadow .18s; }
.competitor-sort-switch svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.competitor-sort-switch a:hover { background: rgba(255,255,255,.65); color: #345fc0; }
.competitor-sort-switch a.active { background: linear-gradient(135deg, #527de6, #3863c4); color: #fff; box-shadow: 0 3px 9px rgba(56,99,196,.24); }
.competitor-sort-switch a:focus-visible { outline: 2px solid #6e95ed; outline-offset: 2px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 21px; }
.video-pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; border: 1px solid rgba(215, 224, 235, .92); border-radius: 16px; background: rgba(255, 255, 255, .82); padding: 12px 14px; box-shadow: 0 7px 22px rgba(34, 50, 78, .055); }
.pagination-summary { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.pagination-links { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pagination-page, .pagination-arrow { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; border: 1px solid #dbe3ee; border-radius: 10px; background: #fff; padding: 7px 10px; color: #52647e; font-size: 11px; font-weight: 750; line-height: 1; transition: border-color .18s, background .18s, color .18s, transform .18s, box-shadow .18s; }
.pagination-page:hover, .pagination-arrow:hover { border-color: #b8cae7; background: #f2f6ff; color: #456bc2; transform: translateY(-1px); }
.pagination-page.current { border-color: #5278d4; background: linear-gradient(145deg, #5f84df, #456bc7); color: #fff; box-shadow: 0 5px 13px rgba(69, 107, 199, .24); }
.pagination-arrow { min-width: 82px; }
.pagination-arrow.disabled { border-color: #e5e9ef; background: #f7f8fa; color: #b3bbc7; cursor: not-allowed; }
.pagination-ellipsis { display: inline-grid; place-items: center; min-width: 24px; color: #8c99aa; font-size: 13px; }
.video-card { position: relative; display: flex; height: 100%; overflow: hidden; border: 1px solid rgba(218, 225, 236, .96); border-radius: 21px; background: var(--card); box-shadow: 0 8px 24px rgba(31, 45, 69, .065); flex-direction: column; transition: transform .24s, box-shadow .24s, border-color .24s; }
.video-card::before { content: ""; position: absolute; z-index: 3; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #5e82df, #5fa283); opacity: 0; transition: opacity .24s; }
.video-card:hover { transform: translateY(-5px); border-color: #c3d0e2; box-shadow: 0 18px 42px rgba(28, 44, 70, .13); }
.video-card:hover::before { opacity: 1; }
.cover-shell { position: relative; overflow: hidden; }
.video-copy-button { position: absolute; z-index: 5; left: 12px; bottom: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 102px; min-height: 34px; border: 1px solid rgba(255,255,255,.65); border-radius: 11px; background: rgba(20,32,55,.72); padding: 7px 11px; color: #fff; font-size: 11px; font-weight: 750; cursor: pointer; box-shadow: 0 5px 16px rgba(8,18,38,.2); backdrop-filter: blur(10px); transition: background .18s, border-color .18s, transform .18s; }
.video-copy-button[hidden] { display: none; }
.video-copy-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.video-copy-button:hover { background: rgba(47,83,155,.92); border-color: #fff; transform: translateY(-1px); }
.video-copy-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.video-copy-button.is-copied { background: rgba(32,116,81,.95); border-color: #9ae4bb; }
.video-copy-button[aria-busy="true"] { cursor: progress; }
.video-copy-buffer { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; padding: 0; border: 0; font-size: 16px; }
.cover-link { display: block; overflow: hidden; flex: 0 0 auto; }
.cover { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(145deg, #e4e9f2, #cfd7e6) center / cover; transition: transform .4s; }
.video-card:hover .cover { transform: scale(1.025); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 20, 35, .03) 25%, rgba(9, 17, 33, .48)); opacity: .82; transition: opacity .3s; }
.video-card:hover .cover::after { opacity: .95; }
.cover > span { position: relative; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; padding-left: 2px; border: 1px solid rgba(255, 255, 255, .68); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--green-700); font-size: 17px; box-shadow: 0 10px 30px rgba(9, 17, 33, .17); backdrop-filter: blur(8px); transition: transform .2s; }
.video-card:hover .cover > span { transform: scale(1.08); }
.cover em { position: absolute; z-index: 2; bottom: 11px; left: 13px; color: rgba(255, 255, 255, .9); font-size: 9px; font-style: normal; font-weight: 650; }
.video-body { display: flex; min-height: 0; background: linear-gradient(180deg, #fff 0%, #fcfdff 100%); padding: 18px 19px 19px; flex: 1 1 auto; flex-direction: column; }
.video-account { display: flex; min-height: 52px; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.platform.mini { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; font-size: 9px; }
.video-account .platform.mini { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
.video-account .platform.douyin { overflow: hidden; background: radial-gradient(circle at 18% 82%, rgba(37, 244, 238, .16), transparent 36%), radial-gradient(circle at 84% 16%, rgba(254, 44, 85, .18), transparent 38%), linear-gradient(145deg, #171a20, #080a0e); box-shadow: 0 6px 15px rgba(8, 13, 17, .24), inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .2s, box-shadow .2s; }
.video-card:hover .video-account .platform.douyin { box-shadow: 0 8px 19px rgba(8, 13, 17, .3), inset 0 0 0 1px rgba(255, 255, 255, .15); transform: translateY(-1px) rotate(-2deg); }
.douyin-mark { width: 22px; height: 22px; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28)); }
.douyin-mark path { stroke: none; }
.douyin-mark-cyan { fill: #25f4ee; transform: translate(-.6px, .55px); }
.douyin-mark-red { fill: #fe2c55; transform: translate(.6px, -.45px); }
.douyin-mark-main { fill: #fff; }
.video-account div, .video-account strong, .video-account time { display: block; min-width: 0; }
.video-account strong { overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 760; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.video-account .video-remark { display: block; overflow: hidden; margin-top: 3px; color: var(--green-700); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.video-account time { margin-top: 3px; color: var(--muted); font-size: 9px; }
.video-body h3 { display: -webkit-box; height: 48px; min-height: 48px; overflow: hidden; margin-bottom: 16px; color: #28354a; font-size: 14px; font-weight: 680; line-height: 1.72; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; overflow: hidden; margin-top: auto; border: 1px solid #e3e9f2; border-radius: 15px; background: linear-gradient(180deg, #fbfcfe, #f6f8fc); padding: 5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92); flex: 0 0 auto; }
.metric { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: 22px auto; align-items: center; gap: 3px 5px; min-width: 0; min-height: 62px; overflow: hidden; border: 0; border-radius: 9px; background: transparent; padding: 7px 8px 6px; box-shadow: none; transition: background .18s, transform .18s; }
.metric:not(:last-child) { border-right: 1px solid #e5eaf2; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.metric > i { display: grid; grid-column: 1; grid-row: 1; place-items: center; width: 22px; height: 22px; border-radius: 7px; }
.metric svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric > span { display: contents; }
.metric small { display: block; grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; color: #8793a6; font-size: 9px; font-weight: 720; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.metric b { display: block; grid-column: 1 / -1; grid-row: 2; min-width: 0; overflow: hidden; padding: 1px 2px 0; color: #26344a; font-size: clamp(15px, 1.15vw, 18px); font-variant-numeric: tabular-nums; font-weight: 820; line-height: 1.05; letter-spacing: -.02em; text-align: center; text-overflow: clip; white-space: nowrap; }
.metric-like > i { background: #fff0f3; color: #dd5b76; }
.metric-comment > i { background: #edf2ff; color: #4e75dc; }
.comment-trigger { position: relative; width: 100%; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.comment-trigger::after { content: "›"; position: absolute; top: 8px; right: 7px; color: #9aabd3; font-size: 12px; line-height: 1; transition: transform .18s, color .18s; }
.comment-trigger:not(:disabled):hover, .comment-trigger:not(:disabled):focus-visible { outline: 0; background: #edf3ff; box-shadow: none; transform: none; }
.comment-trigger:not(:disabled):hover::after, .comment-trigger:not(:disabled):focus-visible::after { color: #5578cc; transform: translateX(2px); }
.metric-favorite > i { background: #fff6e7; color: #c98a2e; }
.video-refresh-button { position: absolute; z-index: 5; right: 12px; bottom: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 88px; min-height: 34px; border: 1px solid rgba(255, 255, 255, .92); border-radius: 11px; background: linear-gradient(135deg, #2f9a6b, #3e70d1); padding: 7px 12px; color: #fff; cursor: pointer; font-size: 11px; font-weight: 820; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(13, 29, 54, .24); box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 8px 22px rgba(17, 54, 102, .4); backdrop-filter: blur(8px); transition: border-color .18s, background .18s, color .18s, transform .18s, box-shadow .18s; }
.video-refresh-button::before { content: "↻"; font-size: 15px; font-weight: 900; line-height: 1; }
.video-refresh-button:not(:disabled):hover, .video-refresh-button:not(:disabled):focus-visible { border-color: #fff; outline: 0; background: linear-gradient(135deg, #278a5e, #315fc0); box-shadow: 0 0 0 4px rgba(255, 255, 255, .28), 0 11px 28px rgba(13, 43, 86, .5); transform: translateY(-2px) scale(1.025); }
.video-refresh-button.loading, .video-refresh-button:disabled { cursor: wait; opacity: .76; transform: none; }
.video-refresh-button.loading::before { animation: video-refresh-spin .8s linear infinite; }
.video-refresh-button.success { background: rgba(42, 117, 76, .9); }
.video-refresh-button.error { background: rgba(157, 59, 50, .9); }
@keyframes video-refresh-spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 30; top: 22px; right: 28px; max-width: min(540px, calc(100vw - 32px)); padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(16, 26, 47, .97); color: #fff; font-size: 12px; box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); pointer-events: none; }
.toast.error { background: rgba(158, 55, 45, .96); }
button:disabled:hover, button:disabled:active { box-shadow: none; transform: none; }

dialog { width: min(500px, calc(100% - 30px)); border: 1px solid rgba(255, 255, 255, .8); border-radius: 22px; padding: 0; box-shadow: 0 35px 100px rgba(11, 18, 33, .3); }
dialog::backdrop { background: rgba(8, 14, 27, .58); backdrop-filter: blur(6px); }
dialog form { padding: 30px; }
.modal-head { display: flex; justify-content: space-between; margin-bottom: 26px; }
.close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef3f0; color: var(--ink-soft); font-size: 21px; cursor: pointer; }
label { display: grid; gap: 8px; margin: 18px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #d8e2dc; border-radius: 10px; outline: 0; background: #fff; padding: 11px 12px; color: var(--ink); }
input:focus, textarea:focus, select:focus { border-color: #7596e7; box-shadow: 0 0 0 4px rgba(63, 111, 229, .1); }
textarea { min-height: 96px; resize: vertical; }
.hint { margin: 13px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.responsible-modal { width: min(620px, calc(100% - 30px)); }
.responsible-modal-shell { padding: 28px 30px 30px; }
.responsible-modal form { padding: 0; }
.responsible-modal .modal-head { margin-bottom: 20px; }
.responsible-add-form { display: grid; gap: 12px; border: 1px solid #dfe7f1; border-radius: 14px; background: #f7f9fc; padding: 14px !important; }
.responsible-add-form label { margin: 0; }
.responsible-add-form .responsible-name-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.responsible-add-form .primary { min-width: 78px; }
.responsible-list { margin-top: 20px; }
.responsible-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--ink-soft); font-size: 11px; }
.responsible-list-head span { border-radius: 999px; background: #edf2f7; padding: 4px 8px; color: var(--muted); font-size: 9px; font-weight: 750; }
.responsible-list article { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #edf0f4; }
.responsible-rename-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; min-width: 0; }
.responsible-rename-form input { min-width: 0; padding: 9px 11px; }
.responsible-delete-form { display: block; }
.responsible-empty { border: 1px dashed #d9e0e9; border-radius: 12px; padding: 22px 16px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.competitor-manager-modal { width: min(1180px, calc(100% - 30px)); }
.competitor-account-edit-modal { width: min(560px, calc(100% - 30px)); }
.competitor-direct-video-modal, .competitor-direct-video-edit-modal { width: min(620px, calc(100% - 30px)); }
.competitor-direct-video-modal form, .competitor-direct-video-edit-modal form { padding: 30px 32px 32px; }
.competitor-direct-video-modal label, .competitor-direct-video-edit-modal label { margin-top: 17px; font-size: 13px; }
.competitor-direct-video-modal input, .competitor-direct-video-modal select, .competitor-direct-video-edit-modal select { min-height: 46px; font-size: 14px; }
.competitor-direct-video-modal .hint, .competitor-direct-video-edit-modal .hint { margin: 16px 0 0; border: 1px solid #dce6f6; border-radius: 12px; background: #f4f7fc; padding: 12px 14px; font-size: 11px; }
.competitor-direct-video-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.competitor-direct-video-actions button { min-width: 112px; min-height: 42px; }
.direct-video-remark { color: #4f75bc !important; font-weight: 750; }
.competitor-account-edit-modal form { padding: 30px 32px 32px; }
.competitor-account-edit-modal .modal-head { margin-bottom: 22px; }
.competitor-account-edit-modal label { margin-top: 16px; font-size: 13px; }
.competitor-account-edit-modal input, .competitor-account-edit-modal select { min-height: 46px; font-size: 14px; }
.competitor-account-edit-modal .hint { margin-top: 16px; font-size: 12px; line-height: 1.65; }
.competitor-edit-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.competitor-edit-modal-actions button { min-width: 96px; min-height: 42px; font-size: 13px; }
.competitor-categories-modal { width: min(860px, calc(100% - 30px)); }
.competitor-modal-shell { max-height: min(90vh, 960px); overflow-y: auto; padding: 32px 34px 36px; }
.competitor-manager-modal form, .competitor-categories-modal form { padding: 0; }
.competitor-manager-modal .modal-head h2 { font-size: 24px; }
.competitor-manager-modal .eyebrow { font-size: 11px; letter-spacing: .2em; }
.modal-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.competitor-add-form { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(300px, 1.5fr) minmax(190px, .8fr) auto; align-items: end; gap: 12px; border: 1px solid #dfe7f2; border-radius: 18px; background: linear-gradient(135deg, #f7f9fd, #f1f5fb); padding: 18px !important; }
.competitor-add-form label, .competitor-account-settings label { margin: 0; }
.competitor-add-form label, .competitor-account-settings label { gap: 9px; font-size: 13px; }
.competitor-add-form input, .competitor-add-form select { min-height: 46px; border-radius: 12px; padding: 11px 13px; font-size: 14px; }
.competitor-add-form .primary { min-height: 46px; padding-inline: 20px; font-size: 13px; white-space: nowrap; }
.competitor-account-list { margin-top: 28px; }
.competitor-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.competitor-list-head div strong, .competitor-list-head div small { display: block; }
.competitor-list-head div strong { font-size: 18px; }
.competitor-list-head div small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.competitor-list-head > span, .category-account-count { border-radius: 999px; background: #edf2f8; padding: 6px 11px; color: #708097; font-size: 12px; font-weight: 750; white-space: nowrap; }
.competitor-account-row { border-top: 1px solid #e7ebf1; padding: 16px 0; }
.competitor-account-identity { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(110px, auto); align-items: center; gap: 11px; }
.competitor-account-identity div strong, .competitor-account-identity div small { display: block; }
.competitor-account-identity div small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-avatar { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid #dbe3ee; border-radius: 13px; background: linear-gradient(145deg, #edf2fa, #e1e8f4); color: #4f6fa8; font-size: 11px; font-weight: 800; }
.competitor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.competitor-account-settings { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) auto; align-items: end; gap: 9px; margin: 12px 0 0; padding-left: 53px !important; }
.competitor-account-settings input, .competitor-account-settings select { min-height: 39px; padding: 9px 10px; }
.competitor-account-settings .ghost { min-height: 39px; }
.competitor-account-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.competitor-account-actions form { display: block; }
.competitor-account-table { overflow: hidden; border: 1px solid #dfe5ee; border-radius: 16px; background: #fff; }
.competitor-account-table-head, .competitor-account-data { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(100px, .7fr) 54px 62px 100px minmax(170px, 1fr) minmax(198px, auto); align-items: center; gap: 12px; }
.competitor-account-table-head { border-bottom: 1px solid #e2e7ef; background: #f5f7fa; padding: 13px 16px; color: #6f7e93; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.competitor-account-table-head span:last-child { text-align: center; }
.competitor-account-row { border-top: 1px solid #e8ecf2; padding: 0; }
.competitor-account-row:first-of-type { border-top: 0; }
.competitor-account-data { min-height: 88px; padding: 14px 16px; transition: background .16s; }
.competitor-account-row:hover > .competitor-account-data { background: #fafbfd; }
.competitor-account-identity { grid-template-columns: 48px minmax(0, 1fr); gap: 13px; }
.competitor-account-identity .account-avatar { width:48px; height:48px; border-radius:14px; }
.competitor-account-identity div { min-width: 0; }
.competitor-account-identity div strong { font-size: 15px; }
.competitor-account-identity div small { margin-top: 5px; font-size: 12px; }
.competitor-avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 13px; }
.competitor-account-category, .competitor-account-number, .competitor-account-favorites, .competitor-account-time { min-width: 0; }
.competitor-account-category small, .competitor-account-number small, .competitor-account-favorites small, .competitor-account-time small { display: none; }
.competitor-account-category strong { display: block; overflow: hidden; color: #42516a; font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.competitor-account-number strong { color: #365276; font-size: 19px; font-variant-numeric: tabular-nums; }
.competitor-account-number strong i { margin-left: 3px; color: #8492a6; font-size: 11px; font-style: normal; font-weight: 650; }
.competitor-account-favorites strong { display: inline-flex; align-items: center; gap: 4px; color: #986a18; font-size: 18px; font-variant-numeric: tabular-nums; }
.competitor-account-favorites strong i { color: #d49a2d; font-size: 14px; font-style: normal; }
.competitor-account-favorites strong em { color: #9c8a67; font-size: 11px; font-style: normal; font-weight: 650; }
.competitor-account-time time { color: #596a82; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.competitor-account-data > .status { display: block; max-width: 100%; overflow: hidden; padding: 8px 11px; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.competitor-account-data > .competitor-collection-status { display:flex; min-width:0; width:100%; text-align:left; white-space:normal; gap:4px; }
.competitor-collection-status small[data-account-status-message] { display:-webkit-box; max-width:100%; overflow:hidden; overflow-wrap:anywhere; white-space:normal; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:11px; line-height:1.5; }
.competitor-collection-status strong[data-account-status-label] { font-size:12px; }
.competitor-account-data .competitor-account-actions { display: flex; justify-content: center; gap: 6px; margin: 0; }
.competitor-account-data .competitor-account-actions .ghost { min-height: 36px; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.competitor-account-settings[hidden] { display: none !important; }
.competitor-account-settings { grid-template-columns: minmax(200px, .8fr) minmax(240px, 1fr) auto; margin: 0; border-top: 1px solid #e2e8f1; background: linear-gradient(135deg, #f8faff, #f2f6fc); padding: 17px 18px 19px 78px !important; }
.competitor-account-settings input, .competitor-account-settings select { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.competitor-editor-actions { display: flex; align-items: flex-end; gap: 7px; }
.competitor-editor-actions button { min-height: 44px; padding-inline: 14px; font-size: 12px; white-space: nowrap; }
.competitor-empty { border: 1px dashed #d4ddea; border-radius: 14px; padding: 26px 18px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.competitor-categories-modal { max-height: calc(100dvh - 32px); overflow: hidden; }
.category-manager-shell { max-height: calc(100dvh - 34px); overflow-y: auto; padding: 28px 30px 24px; scrollbar-width: thin; scrollbar-color: #d1daea transparent; }
.category-manager-head { align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.category-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.category-heading-icon, .category-folder { display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #dce5ff; border-radius: 14px; background: #eff4ff; color: #4a73d8; }
.category-heading-icon { width: 48px; height: 48px; }
.category-heading-icon svg, .category-folder svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.category-heading h2 { margin-top: 4px; font-size: 22px; }
.category-heading .modal-subtitle { margin-top: 6px; font-size: 12px; line-height: 1.6; }
.category-manager-head .close { flex-shrink: 0; }
.competitor-root-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; border: 1px solid #e0e7f5; border-radius: 16px; background: linear-gradient(120deg, #f6f9ff, #f9fbff); padding: 16px !important; }
.competitor-root-add.has-owner { grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr) auto; }
.competitor-root-add label, .competitor-child-add label { min-width: 0; margin: 0; gap: 8px; color: #66758e; font-size: 11px; overflow-wrap: anywhere; }
.competitor-root-add input, .competitor-root-add select, .competitor-child-add input { min-width: 0; height: 44px; padding: 10px 12px; font-size: 13px; }
.category-owner-field .ui-field { width: 100%; }
.category-owner-field .ui-control { min-height: 44px; }
.competitor-root-add > button, .competitor-child-add > button { height: 44px; padding: 10px 16px; font-size: 12px; white-space: nowrap; }
.category-list-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 24px 0 12px; }
.category-list-heading strong { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.category-list-heading strong span { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 7px; background: #edf2fb; padding-inline: 6px; color: #607aa6; font-size: 11px; }
.category-list-heading small { color: #8a96aa; font-size: 11px; }
.competitor-category-groups { display: grid; gap: 12px; }
.competitor-category-group { min-width: 0; overflow: hidden; border: 1px solid #e1e7f1; border-radius: 15px; background: #fff; }
.category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 16px; }
.category-summary { display: flex; align-items: center; gap: 11px; min-width: 0; }
.category-folder { width: 40px; height: 40px; border: 0; border-radius: 11px; }
.category-folder svg { width: 20px; height: 20px; }
.category-name-copy { display: grid; min-width: 0; gap: 5px; }
.category-name-copy strong, .category-name-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-name-copy strong { color: #293b58; font-size: 14px; font-weight: 750; }
.category-name-copy small { color: #8a97aa; font-size: 10px; }
.competitor-categories-modal .category-account-count { background: #f3f6fb; padding: 6px 9px; font-size: 11px; font-weight: 600; }
.category-row-actions { display: flex; align-items: center; gap: 3px; }
.category-text-button { min-height: 32px; border: 0; border-radius: 8px; background: transparent; padding: 6px 9px; color: #5873a7; font-size: 11px; white-space: nowrap; cursor: pointer; transition: background .15s; }
.category-text-button:hover { background: #edf3ff; }
.category-text-button.danger { color: #c87773; }
.category-text-button.danger:hover { background: #fff0ee; color: #ba4941; }
.competitor-categories-modal .competitor-category-rename { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; border-top: 1px solid #eef1f7; padding-top: 12px; }
.competitor-category-rename input { min-width: 0; height: 40px; padding: 9px 11px; font-size: 13px; }
.competitor-category-rename button { min-height: 40px; padding: 9px 14px; font-size: 11px; }
.category-expand-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-top: 1px solid #eef2f8; background: #fafbfe; padding: 11px 17px; color: #617594; font-size: 11px; text-align: left; cursor: pointer; }
.category-expand-button:hover { background: #f2f6ff; }
.category-expand-button > span { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.category-expand-button b { color: #4568ab; font-size: 11px; font-variant-numeric: tabular-nums; }
.category-expand-button small { margin-left: 7px; color: #99a4b6; font-size: 10px; }
.category-expand-button svg { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .18s; }
.category-expand-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.competitor-child-list { display: grid; gap: 0; border-top: 1px solid #eef2f8; padding: 0 16px 16px; background: #fcfdff; }
.competitor-child-row { gap: 10px; border-bottom: 1px solid #edf1f7; padding: 14px 0; }
.category-child-mark { flex: 0 0 29px; color: #b1c1da; font-size: 20px; text-align: center; }
.competitor-child-row .category-name-copy strong { font-size: 13px; font-weight: 650; }
.competitor-child-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 15px; }
.category-manager-note { margin: 16px 0 0; color: #8c99ad; font-size: 10px; line-height: 1.7; }
.category-empty-state { display: grid; justify-items: center; gap: 9px; border: 1px dashed #d8e1ef; border-radius: 15px; background: #fafcff; padding: 30px 16px; text-align: center; }
.category-empty-state > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #edf3ff; color: #6a88c2; font-size: 24px; }
.category-empty-state strong { color: #5a6c87; font-size: 13px; }
.category-empty-state p { margin: 0; color: #91a0b5; font-size: 11px; }
.competitor-categories-modal [hidden] { display: none !important; }
.warning-hint { border: 1px solid #f0d8a9; border-radius: 10px; background: #fff8e9; padding: 10px 12px; color: #8a5e18; }
.cookie-modal { width: min(720px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow-y: auto; }
.cookie-modal-body { padding: 28px 30px 30px; }
.cookie-modal .modal-head { margin-bottom: 18px; }
.cookie-modal-status { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; border: 1px solid #dfe5ed; border-radius: 13px; background: #f6f8fb; padding: 13px 15px; color: var(--ink-soft); }
.cookie-modal-status > i { margin-top: 6px; }
.cookie-modal-status span, .cookie-modal-status strong, .cookie-modal-status small { display: block; }
.cookie-modal-status strong { margin-bottom: 4px; font-size: 12px; }
.cookie-modal-status small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.cookie-modal-status.ok { border-color: #cde6d5; background: #eff9f2; }
.cookie-modal-status.ok strong { color: #307143; }
.cookie-modal-status.error { border-color: #efd0cc; background: #fff3f1; }
.cookie-modal-status.error strong { color: #a23f34; }
.cookie-modal-status.unknown { border-color: #eadcb9; background: #fffaed; }
.cookie-modal-status.unknown strong { color: #89631a; }
.cookie-guide { border: 1px solid #dfe6f1; border-radius: 14px; background: #f7f9fd; padding: 16px 18px; }
.cookie-guide h3 { color: #34435b; font-size: 13px; }
.cookie-guide ol { margin: 10px 0 0; padding-left: 20px; color: #657184; font-size: 10px; line-height: 1.75; }
.cookie-guide li + li { margin-top: 4px; }
.cookie-guide a { color: var(--green-700); font-weight: 750; }
.cookie-guide kbd, .cookie-guide code { border: 1px solid #d8dfeb; border-radius: 5px; background: #fff; padding: 1px 5px; color: #485874; font: inherit; font-weight: 700; }
.douyin-login-progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; border: 1px solid #dfe5ed; border-radius: 12px; background: #f7f9fc; padding: 12px 14px; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.douyin-login-progress i { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #8995a6; }
.douyin-login-progress.waiting i { background: #d49b32; box-shadow: 0 0 0 4px rgba(212, 155, 50, .13); animation: collection-pulse .9s ease-in-out infinite; }
.douyin-login-progress.received i, .douyin-login-progress.success i { background: #43a163; box-shadow: 0 0 0 4px rgba(67, 161, 99, .12); }
.douyin-login-progress.error i, .douyin-login-progress.expired i { background: #c85e52; box-shadow: 0 0 0 4px rgba(200, 94, 82, .12); }
.douyin-login-window-card { display: grid; gap: 5px; margin-top: 12px; border: 1px solid #dce4ef; border-radius: 12px; background: linear-gradient(145deg, #f7f9fc, #fff); padding: 12px 14px; color: #53627a; }
.douyin-login-window-card strong { color: #34435b; font-size: 11px; }
.douyin-login-window-card small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.douyin-login-window-card + .warning-hint { margin-top: 12px; }
.cookie-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.cookie-modal-actions button { min-width: 112px; }

.comment-drawer-open { overflow: hidden; }
.comment-drawer-backdrop { position: fixed; z-index: 80; inset: 0; visibility: hidden; border: 0; background: rgba(8, 14, 27, .48); opacity: 0; backdrop-filter: blur(3px); pointer-events: none; transition: opacity .22s, visibility 0s linear .22s; }
.comment-drawer-backdrop.open { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.comment-drawer { position: fixed; z-index: 81; top: 0; right: 0; visibility: hidden; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; width: min(520px, 100vw); height: 100vh; border-left: 1px solid rgba(218, 226, 238, .9); background: #f8fafc; box-shadow: -24px 0 70px rgba(16, 28, 50, .2); transform: translateX(104%); pointer-events: none; transition: transform .24s ease, visibility 0s linear .24s; }
.comment-drawer.open { visibility: visible; transform: translateX(0); pointer-events: auto; transition-delay: 0s; }
.comment-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); }
.comment-drawer-head h2 { max-width: 390px; margin-top: 3px; overflow: hidden; font-size: 20px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.comment-drawer-head > div > p:last-child { margin-top: 6px; color: var(--muted); font-size: 10px; }
.comment-drawer-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 18px 28px 12px; }
.comment-drawer-summary span { border: 1px solid #e2e8f1; border-radius: 14px; background: #fff; padding: 13px 15px; }
.comment-drawer-summary small, .comment-drawer-summary strong { display: block; }
.comment-drawer-summary small { margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.comment-drawer-summary strong { color: var(--ink); font-size: 21px; }
.comment-fetch-status { display: flex; align-items: center; gap: 8px; margin: 0 28px 12px; border-radius: 10px; background: #edf2ff; padding: 10px 12px; color: #526b9f; font-size: 10px; line-height: 1.5; }
.comment-fetch-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #6f8edb; }
.comment-fetch-status.loading i { animation: collection-pulse 1s ease-in-out infinite; }
.comment-fetch-status.success { background: #eaf7ef; color: #397456; }
.comment-fetch-status.success i { background: #4c9b70; }
.comment-fetch-status.cached { background: #f0f3f7; color: #657184; }
.comment-fetch-status.cached i { background: #8995a6; }
.comment-fetch-status.error { background: #fff0ee; color: #a45046; }
.comment-fetch-status.error i { background: #c86a5e; }
.comment-list { overflow-y: auto; padding: 0 28px 24px; }
.comment-thread { width: 100%; border-bottom: 1px solid #e5eaf1; }
.comment-thread:last-child { border-bottom: 0; }
.comment-main { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; width: 100%; padding: 16px 0 13px; }
.comment-item-body { min-width: 0; }
.comment-avatar { position: relative; display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border: 1px solid #e0e6ef; border-radius: 50%; background: #edf2fa; color: #526fae; font-size: 12px; font-weight: 800; }
.comment-avatar img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.comment-avatar.reply-avatar { width: 28px; height: 28px; background: #eef1f5; color: #778294; font-size: 9px; }
.comment-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.comment-item-head strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.comment-item-head time { flex: 0 0 auto; color: #9aa4b4; font-size: 8px; }
.comment-content { margin: 7px 0 9px; color: #354154; font-size: 12px; line-height: 1.68; overflow-wrap: anywhere; }
.comment-content.placeholder { color: #9aa4b4; font-style: italic; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 7px; color: #8994a5; }
.comment-meta span { padding: 0; background: none; color: inherit; font-size: 8px; line-height: 1.3; }
.comment-meta span + span::before { margin: 0 6px; color: #c0c7d2; content: '·'; }
.comment-meta .reply-count { color: #657daa; }
.comment-replies { width: auto; margin: 0 0 13px 49px; padding-left: 11px; border-left: 2px solid #dfe5ef; }
.comment-replies::before { display: none; }
.comment-replies-head { display: flex; align-items: center; gap: 6px; padding: 1px 9px 7px; color: #788598; font-size: 9px; font-weight: 700; }
.comment-replies-head i { width: 5px; height: 5px; border-radius: 50%; background: #91a3c9; }
.comment-reply { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; margin-bottom: 5px; border-radius: 10px; background: #f5f7fa; padding: 10px; }
.comment-reply:last-child { margin-bottom: 0; }
.comment-reply + .comment-reply { border-top: 0; }
.comment-reply .comment-item-head strong { font-size: 11px; }
.comment-reply .comment-content { margin: 5px 0 7px; font-size: 11px; line-height: 1.62; }
.comment-orphan-thread { background: transparent; }
.comment-orphan-title { padding: 11px 14px 0; color: #8591a2; font-size: 9px; font-weight: 700; }
.comment-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; max-width: 360px; margin: 9px 0 4px; }
.comment-images.count-1 { grid-template-columns: minmax(0, 240px); }
.comment-images.count-2 { grid-template-columns: repeat(2, minmax(0, 150px)); }
.comment-images.sticker { grid-template-columns: minmax(0, 116px); max-width: 116px; }
.comment-images.sticker a { border: 0; background: transparent; }
.comment-images.sticker img { object-fit: contain; }
.comment-images a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid #dfe5ee; border-radius: 11px; background: linear-gradient(145deg, #edf1f7, #e4e9f1); }
.comment-images img { width: 100%; height: 100%; object-fit: cover; transition: transform .22s, opacity .2s; }
.comment-images a:hover img { transform: scale(1.04); }
.comment-images a.failed img { opacity: 0; }
.comment-images a.failed::after { content: "图片加载失败"; position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; color: #8c97a8; font-size: 9px; text-align: center; }
.comment-loading, .comment-empty { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 220px; color: var(--muted); text-align: center; }
.comment-loading i { width: 26px; height: 26px; border: 3px solid #dce5f7; border-top-color: #5f7fd1; border-radius: 50%; animation: comment-spin .8s linear infinite; }
.comment-empty strong { color: var(--ink-soft); font-size: 13px; }
.comment-empty span { max-width: 280px; font-size: 10px; line-height: 1.6; }
.comment-empty.error strong { color: #a45046; }
.comment-drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: #fff; padding: 16px 28px; }
.comment-drawer-foot p { color: var(--muted); font-size: 9px; line-height: 1.5; }
.comment-drawer-foot button { flex: 0 0 auto; }
@keyframes comment-spin { to { transform: rotate(360deg); } }

.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 32px 18px;
  background-color: #071426;
  background-image: linear-gradient(180deg, rgba(5, 14, 30, .08), rgba(5, 14, 30, .2)), url('/assets/login-background-xingmou.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.login-card { width: min(420px, 100%); border: 1px solid rgba(255, 255, 255, .88); border-radius: 26px; background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(243, 247, 255, .96)); padding: 40px; box-shadow: 0 28px 80px rgba(0, 8, 26, .42), 0 0 0 5px rgba(157, 189, 255, .08); backdrop-filter: blur(16px); }
.login-card .brand-mark { margin-bottom: 24px; box-shadow: 0 10px 26px rgba(63, 111, 229, .2); }
.login-card h1 { margin-top: 10px; font-size: clamp(27px, 5vw, 34px); line-height: 1.3; }
.login-card .muted { margin: 10px 0 28px; color: #71809a; font-size: 13px; }
.login-card label { color: #52627c; font-size: 12px; }
.login-card input { min-height: 46px; border-color: #d9e2f0; background: #fff; font-size: 14px; }
.login-card .primary { width: 100%; min-height: 46px; margin-top: 22px; font-size: 14px; }
@media (max-width: 620px) {
  .login-page { padding: 28px 20px; background-position: 24% center; }
  .login-card { padding: 30px 24px; border-radius: 22px; }
}

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .account-row { grid-template-columns: 44px minmax(150px, 1fr) minmax(126px, .75fr) 94px minmax(84px, auto); }
  .video-filter-toolbar { align-items: flex-start; flex-direction: column; gap: 13px; }
  .video-filter-toolbar form { width: 100%; }
}

@media (max-width: 1100px) {
  .competitor-account-table-head { display: none; }
  .competitor-account-data { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) 64px 72px 112px; }
  .competitor-account-category small, .competitor-account-number small, .competitor-account-favorites small, .competitor-account-time small { display: block; margin-bottom: 5px; color: #8794a7; font-size: 11px; font-weight: 750; }
  .competitor-account-data > .status { grid-column: 1 / span 2; width: max-content; min-width: 90px; }
  .competitor-account-data .competitor-account-actions { grid-column: 3 / span 3; }
}

@media (max-width: 860px) {
  aside { position: relative; inset: auto; z-index: 70; width: 100%; height: auto; min-height: 70px; max-height: none; overflow: visible; gap: 7px; row-gap: 9px; padding: 10px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  aside::after { display: none; }
  .logo { flex: 0 0 auto; margin: 0 auto 0 0; }
  .logo span { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }
  .logo { gap: 10px; }
  .logo div { display: block; }
  nav { display: flex; min-width: 0; flex: 1 1 auto; gap: 3px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav .nav-separator { width: 1px; height: 28px; margin: 5px 2px; }
  nav a { flex: 0 0 auto; padding: 10px 11px; font-size: 10px; }
  nav a.active::before { inset: auto 12px -10px; width: auto; height: 3px; border-radius: 5px 5px 0 0; }
  nav i { display: none; }
  aside > nav { display: grid; order: 1; flex: 1 0 100%; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 3px; padding: 8px; overflow-x: hidden; border: 1px solid rgba(120, 165, 255, .2); border-radius: 14px; background: #142039; }
  aside[data-mobile-menu-ready="true"] > nav { display: none; position: absolute; z-index: 80; top: var(--mobile-menu-top, 60px); right: var(--mobile-menu-right, 16px); width: min(244px, calc(100% - 32px)); max-height: calc(100dvh - 76px); margin: 0; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 18px 42px rgba(4, 11, 26, .35); }
  aside[data-mobile-menu-ready="true"][data-mobile-menu-open="true"] > nav { display: grid; }
  aside > nav a { min-width: 0; min-height: 42px; gap: 10px; padding: 10px 12px; font-size: 13px; }
  aside > nav i { display: block; flex: 0 0 18px; width: 18px; font-size: 16px; }
  aside > nav .nav-separator { grid-column: 1 / -1; width: auto; height: 1px; margin: 4px 6px; }
  aside > nav a.active::before { inset: auto 10px -1px; height: 2px; }
  aside[data-mobile-menu-ready="true"] .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(120, 165, 255, .25); border-radius: 11px; background: rgba(63, 111, 229, .12); color: #d3e1fc; font-size: 12px; font-weight: 650; cursor: pointer; }
  aside .mobile-menu-toggle[aria-expanded="true"] { border-color: rgba(120, 165, 255, .55); background: rgba(63, 111, 229, .28); color: #fff; }
  .side-foot { display: block; order: 2; flex: 1 0 100%; margin: 0; padding: 0; }
  .side-foot > :not(.sidebar-expiry) { display: none; }
  .sidebar-expiry, .sidebar-expiry.is-admin-expiry { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; }
  .sidebar-expiry-date { margin: 0; font-size: 16px; }
  .sidebar-expiry-note { display: none; }
  .mobile-logout-form { display: block; }
  .mobile-menu-actions { display: grid; gap: 4px; margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
  #sidebar-navigation .contact-mobile-button, #sidebar-navigation .mobile-logout-button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #bfcee7; font-size: 13px; font-weight: 600; cursor: pointer; }
  #sidebar-navigation .mobile-logout-button { color: #f0aaa4; }
  #sidebar-navigation .contact-mobile-button:hover, #sidebar-navigation .mobile-logout-button:hover { background: rgba(255, 255, 255, .075); }
  .workspace { margin: 0; padding: 28px 18px 42px; }
  .page-header { align-items: flex-end; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .live-chip { display: flex; padding: 8px 10px; white-space: nowrap; }
  .live-chip [data-collection-status-text] { min-width: 0; }
  .competitor-category-menu { max-height: calc(100vh - 140px); overflow-y: auto; }
  .competitor-category-submenu { position: static; display: grid; width: auto; margin: 4px 0 7px 14px; box-shadow: none; }
  .competitor-category-submenu::before { display: none; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  nav a { padding: 10px 7px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 20px; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .header-actions form, .header-actions form .ghost, .header-actions > .ghost, .header-actions .primary, .header-actions .cookie-status-button { width: 100%; justify-content: center; }
  .live-chip, .competitor-live-chip { display: flex; width: 100%; justify-content: center; }
  .stats { gap: 10px; }
  .stats article { min-height: 132px; padding: 19px; }
  .stats article strong { font-size: 28px; }
  .panel { padding: 20px; }
  .account-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 14px 0; }
  .account-row > .status { grid-column: 3; grid-row: 1; }
  .account-row .overview-owner { grid-column: 1 / 3; }
  .account-row .overview-video-total { grid-column: 3; }
  .video-filter-toolbar { width: 100%; align-items: stretch; flex-direction: column; gap: 13px; padding: 15px; }
  .video-filter-toolbar::after { right: 0; }
  .video-filter-toolbar form { width: 100%; flex-wrap: wrap; }
  .filter-result { width: max-content; margin: 0 0 2px auto; }
  .filter-account-field { width: 100%; }
  .filter-responsible-field { width: 100%; }
  .filter-date-field { min-width: 0; flex: 1; }
  .filter-select-wrap { min-width: 0; }
  .video-filter-toolbar select { width: 100%; }
  .filter-date-wrap { width: 100%; }
  .competitor-category-field, .competitor-category-trigger { width: 100%; }
  .competitor-category-menu { right: 0; width: 100%; }
  .date-popover { right: auto; left: 0; }
  .responsible-modal-shell { padding: 24px 18px; }
  .responsible-list article { grid-template-columns: 1fr; }
  .responsible-delete-form .ghost { width: 100%; }
  .competitor-modal-shell { padding: 24px 18px 26px; }
  .competitor-add-form, .competitor-account-settings { grid-template-columns: 1fr; padding-left: 15px !important; }
  .competitor-account-settings { padding: 14px !important; }
  .competitor-account-identity { grid-template-columns: 48px minmax(0, 1fr); }
  .competitor-account-data { grid-template-columns: minmax(0, 1fr) 90px; gap: 11px; padding: 14px; }
  .competitor-account-data .competitor-account-identity { grid-column: 1 / span 2; }
  .competitor-account-data > .status { grid-column: 1; }
  .competitor-account-data .competitor-account-actions { grid-column: 1 / span 2; justify-content: stretch; flex-wrap: wrap; }
  .competitor-account-actions { justify-content: stretch; flex-wrap: wrap; }
  .competitor-account-actions form { flex: 1; }
  .competitor-account-actions button { width: 100%; }
  .category-manager-shell { padding: 22px 16px 18px; }
  .category-manager-head { gap: 8px; margin-bottom: 20px; }
  .category-heading { gap: 10px; }
  .category-heading-icon { width: 40px; height: 40px; border-radius: 12px; }
  .category-heading .eyebrow { font-size: 8px; letter-spacing: .13em; }
  .category-heading h2 { font-size: 20px; }
  .category-heading .modal-subtitle { font-size: 10px; }
  .competitor-root-add, .competitor-root-add.has-owner { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px !important; }
  .category-list-heading { margin-top: 20px; }
  .category-list-heading small { font-size: 10px; }
  .category-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; padding: 13px; }
  .category-summary { gap: 8px; }
  .category-folder { width: 32px; height: 34px; border-radius: 9px; }
  .category-name-copy strong { font-size: 13px; }
  .competitor-categories-modal .category-account-count { padding: 5px 7px; font-size: 10px; }
  .category-row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .competitor-categories-modal .competitor-category-rename { grid-template-columns: minmax(0, 1fr) auto; }
  .competitor-category-rename input { grid-column: 1 / -1; }
  .competitor-category-rename button { min-width: 60px; }
  .competitor-category-rename [data-category-edit-cancel] { justify-self: end; }
  .category-expand-button { padding: 10px 13px; }
  .competitor-child-list { padding: 0 12px 14px; }
  .competitor-child-row { padding: 13px 0; }
  .category-child-mark { flex-basis: 22px; }
  .competitor-child-add { grid-template-columns: minmax(0, 1fr); }
  .video-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; }
  .video-toolbar-badges { width: 100%; flex-wrap: wrap; }
  .competitor-view-switch { width: 100%; }
  .competitor-view-switch a { flex: 1; justify-content: center; }
  .competitor-favorites-refresh-form, .favorite-refresh-button, .direct-video-add-button { width: 100%; }
  .video-grid { grid-template-columns: 1fr; }
  .video-pagination { align-items: stretch; flex-direction: column; gap: 10px; }
  .pagination-summary { text-align: center; }
  .pagination-links { justify-content: center; flex-wrap: wrap; }
  .pagination-arrow { min-width: 92px; }
  .cover { aspect-ratio: 16 / 10; }
  .table-panel { margin-inline: -2px; }
  .toast { top: 80px; right: 16px; }
  .comment-drawer { top: 70px; height: calc(100vh - 70px); }
  .comment-drawer-head, .comment-drawer-summary, .comment-list, .comment-drawer-foot { padding-right: 18px; padding-left: 18px; }
  .comment-main { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 14px 0 11px; }
  .comment-avatar { width: 34px; height: 34px; }
  .comment-replies { margin: 0 0 11px 43px; padding-left: 8px; }
  .comment-reply { padding: 9px; }
  .comment-fetch-status { margin-right: 18px; margin-left: 18px; }
  .comment-drawer-foot { align-items: stretch; flex-direction: column; }
  .comment-drawer-foot button { width: 100%; }
  .cookie-modal-body { padding: 24px 20px; }
  .cookie-modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .cookie-modal-actions button { width: 100%; }
}

@media (max-width: 410px) {
  nav a { font-size: 9px; }
  .logo span { width: 34px; height: 34px; flex-basis: 34px; }
  .stats { grid-template-columns: 1fr; }
  .stats article { min-height: auto; }
  .stats article strong { margin: 8px 0 5px; }
}

.tenant-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 18px; padding:16px 20px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(110deg,#fff,#f5f8ff); }
.tenant-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.tenant-avatar { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid #dce6ff; border-radius:14px; background:#eaf0ff; color:#3f6fe5; font-size:19px; font-weight:700; }
.tenant-identity-copy { display:grid; gap:3px; min-width:0; }
.tenant-identity-copy > small { color:var(--muted); font-size:10px; letter-spacing:.06em; }
.tenant-identity-name { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.tenant-identity-name strong { color:var(--ink); font-size:15px; overflow-wrap:anywhere; }
.tenant-role { padding:3px 8px; border-radius:6px; background:#edf0f5; color:var(--ink-soft); font-size:10px; white-space:nowrap; }
.tenant-role.is-admin { background:#eaf0ff; color:#3f6fe5; }
.tenant-username,.owner-username { display:block; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.tenant-scope-form { display:flex; align-items:center; gap:12px; min-width:0; }
.tenant-scope-form > label { margin:0; color:var(--muted); font-size:12px; white-space:nowrap; }
.tenant-scope-form select { width:280px; max-width:100%; min-height:40px; background:#fff; }
.tenant-scope-note { color:var(--muted); font-size:12px; }
.tenant-notice { margin:-6px 0 18px; padding:10px 14px; border:1px solid #f0d7a4; border-radius:12px; background:#fff8e8; color:#835d13; font-size:13px; }
.user-context-chip { padding:9px 13px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--muted); font-size:12px; }
.profile-panel { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.45fr); max-width:960px; padding:0; }
.profile-security-summary { display:flex; flex-direction:column; min-width:0; padding:32px 28px; border-right:1px solid #e1e8f5; border-radius:18px 0 0 18px; background:linear-gradient(155deg,#eef3ff,#f7f9fe); }
.profile-security-heading { display:flex; align-items:center; gap:12px; }
.profile-security-heading > div { min-width:0; }
.profile-security-heading .eyebrow { font-size:8px; letter-spacing:.16em; }
.profile-security-heading h3 { margin-top:5px; color:#263f70; font-size:18px; }
.profile-security-icon { display:grid; place-items:center; width:46px; height:46px; flex:0 0 46px; border:1px solid #d4e1ff; border-radius:14px; background:#fff; color:var(--green-700); box-shadow:0 6px 16px rgba(63,111,229,.06); }
.profile-security-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.profile-account-details { display:grid; gap:26px; margin:32px 0; }
.profile-account-details dt { color:#71819c; font-size:12px; }
.profile-account-details dd { margin:8px 0 0; overflow-wrap:anywhere; }
.profile-account-details dd strong { display:block; color:#29436f; font-size:18px; line-height:1.5; }
.profile-account-details dd span { display:block; margin-top:4px; color:#71819c; font-size:12px; }
.profile-account-expiry { color:#355589; font-size:15px; font-weight:700; font-variant-numeric:tabular-nums; }
.profile-security-note { margin:auto 0 0; padding-top:20px; border-top:1px solid #dfe7f6; color:#71819c; font-size:12px; line-height:1.8; }
.profile-password-content { min-width:0; padding:32px; }
.profile-password-heading h2 { font-size:22px; }
.profile-password-heading p { margin:9px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.user-admin-panel .panel-title { align-items:flex-start; gap:18px; }
.user-admin-panel .panel-title h2 { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.user-admin-panel .panel-title > button { flex-shrink:0; }
.user-table-wrap { border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.user-table th,.user-table td { padding:16px 12px; white-space:normal; }
.user-table th { color:#748198; background:#f6f8fc; font-size:11px; }
.user-account-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.user-account-identity > div { min-width:0; }
.user-account-identity strong { display:block; color:var(--ink); font-size:13px; overflow-wrap:anywhere; }
.user-account-identity small { display:block; margin-top:4px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.user-list-avatar { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:12px; background:#eaf0ff; color:#3f6fe5; font-weight:700; }
.user-state { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border-radius:7px; font-size:11px; white-space:nowrap; }
.user-state::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; }
.user-state.active { background:#eaf7ef; color:#29834e; }
.user-state.disabled { background:#f0f2f6; color:#7c879b; }
.user-state.expired { background:#fff2e6; color:#a56825; }
.user-state.archived { background:#f0edf7; color:#7d6b98; }
.user-admin-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.panel-title .user-scope-link { padding:10px 14px; color:#617294; }
.user-list-actions form { margin:0; }
.user-edit-actions { flex-wrap:wrap; }
.archive-user-inline { margin-right:auto; }
.archive-user-name { margin:20px 0 14px; color:var(--ink-soft); overflow-wrap:anywhere; }
.archive-user-note { border:1px solid #eed6c5; border-radius:14px; padding:16px; background:#fff8f1; color:#95633b; font-size:12px; line-height:1.8; }
.archive-user-note strong { display:block; font-size:13px; }
.archive-user-note p { margin:8px 0 0; }
.primary.archive-confirm-button { background:linear-gradient(135deg,#ba7346,#915130); box-shadow:0 6px 16px rgba(145,81,48,.14); }
.user-table-time { display:block; max-width:118px; color:var(--ink-soft); font-size:11px; line-height:1.7; }
.user-list-actions { display:flex; flex-wrap:wrap; gap:6px; }
.user-list-actions .ghost { min-height:32px; padding:7px 9px; white-space:nowrap; }
.user-manage-modal { width:min(520px,calc(100% - 30px)); max-height:calc(100vh - 30px); overflow-y:auto; }
.user-manage-form { padding:26px; }
.user-manage-form label { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.user-manage-form input,.user-manage-form select { min-width:0; }
.user-modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.account-filter-toolbar { align-items:flex-start; flex-direction:column; gap:12px; }
.account-filter-toolbar::after { display:none; }
.account-filter-toolbar form { flex-wrap:wrap; width:100%; }
.account-filter-toolbar .filter-field { flex:1 1 118px; min-width:0; margin:0; }
.account-filter-toolbar .account-remark-filter { flex:1.2 1 150px; }
.account-filter-toolbar select { width:100%; appearance:auto; padding-right:12px; }
.account-filter-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.account-list-panel { scroll-margin-top:20px; }
.account-list-heading { flex-wrap:wrap; gap:14px; }
.account-list-intro { margin-right:auto; }
.account-reminders { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.panel-title a.account-reminder { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:7px 10px; border:1px solid #e4e9f1; border-radius:11px; color:#8290a5; background:#f8fafd; font-size:12px; white-space:nowrap; transition:background .15s,border-color .15s,box-shadow .15s; }
.account-reminder i { width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.7; }
.account-reminder b { display:inline-flex; align-items:center; justify-content:center; min-width:23px; padding:3px 6px; border-radius:7px; background:rgba(127,144,168,.09); font-size:12px; line-height:1.3; font-variant-numeric:tabular-nums; }
.panel-title .account-reminder--video_idle_1d.has-alert { --reminder-line:#e8c177; color:#a36613; background:#fff8e9; border-color:#f1ddb3; }
.panel-title .account-reminder--video_idle_3d.has-alert { --reminder-line:#e5a4a4; color:#b14e4e; background:#fff2f2; border-color:#f0d1d1; }
.panel-title .account-reminder--no_leads_5d.has-alert { --reminder-line:#bca9df; color:#7754aa; background:#f6f1fd; border-color:#e2d5f3; }
.account-reminder.has-alert b { background:rgba(255,255,255,.78); }
.panel-title a.account-reminder:hover { border-color:#aebbd0; }
.panel-title a.account-reminder.has-alert:hover,.panel-title a.account-reminder.has-alert[aria-current="true"] { border-color:var(--reminder-line); box-shadow:0 0 0 2px color-mix(in srgb,var(--reminder-line) 20%,transparent); }
.account-reminder:focus-visible { outline:3px solid #8ba9f3; outline-offset:3px; }
.account-list-heading > .count-badge { flex-shrink:0; }
@media (max-width:600px) {
  .account-list-heading .account-list-intro { flex:1 1 100%; }
  .account-reminders { width:100%; gap:6px; }
  .panel-title a.account-reminder { flex:1 1 auto; gap:5px; padding:8px; }
}
.profile-password-form { display:grid; gap:18px; margin:26px 0 0; }
.profile-password-form label { display:grid; min-width:0; gap:8px; margin:0; color:var(--ink-soft); font-size:13px; }
.profile-password-form input:not([type="hidden"]) { min-width:0; min-height:48px; padding:12px 14px; border-color:#dce3ef; border-radius:12px; background:#fafbfe; font-size:14px; transition:border-color .18s,box-shadow .18s,background .18s; }
.profile-password-form input::placeholder { color:#99a5b8; font-weight:400; }
.profile-password-form input:focus { border-color:#7596e7; background:#fff; box-shadow:0 0 0 4px rgba(63,111,229,.1); }
.profile-password-hint { margin:-6px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.profile-password-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-top:18px; border-top:1px solid var(--line); }
.profile-password-actions > span { color:var(--muted); font-size:11px; }
.profile-password-actions .primary { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:12px 24px; border-radius:12px; font-size:14px; }
.profile-password-actions .primary svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.profile-password-actions .primary:focus-visible { outline:3px solid #93b0ff; outline-offset:3px; }

@media (max-width: 700px) {
  .profile-panel { grid-template-columns:minmax(0,1fr); }
  .profile-security-summary { padding:22px; border-right:0; border-bottom:1px solid #e1e8f5; border-radius:18px 18px 0 0; }
  .profile-account-details { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; margin:22px 0 0; }
  .profile-account-details dd strong { font-size:16px; }
  .profile-security-note { display:none; }
  .profile-password-content { padding:24px 22px; }
  .profile-password-heading h2 { font-size:20px; }
  .profile-password-form input:not([type="hidden"]) { font-size:16px; }
  .profile-password-actions { flex-direction:column; align-items:stretch; }
  .profile-password-actions > span { text-align:center; }
  .profile-password-actions .primary { width:100%; min-height:48px; }
}

@media (max-width: 900px) {
  .tenant-toolbar { align-items:stretch; flex-direction:column; }
  .tenant-toolbar { gap:14px; padding:15px 16px; }
  .tenant-scope-form { border-top:1px solid var(--line); padding-top:12px; }
  .tenant-scope-form select { flex:1; width:0; min-width:0; }
  .user-table,.user-table tbody,.user-table tr,.user-table td { display:block; width:100%; }
  .user-table thead { display:none; }
  .user-table tr { padding:14px; border-bottom:1px solid var(--line); }
  .user-table tr:last-child { border-bottom:0; }
  .user-table td { border:0; padding:7px 0; }
  .user-table td[data-label] { display:grid; grid-template-columns:80px minmax(0,1fr); align-items:center; gap:8px; }
  .user-table td[data-label]::before { content:attr(data-label); color:var(--muted); font-size:11px; }
  .user-table td > .tenant-role,.user-table td > .user-state { justify-self:start; }
  .user-table-time { max-width:none; }
  .user-admin-panel .panel-title { flex-wrap:wrap; }
  .user-manage-form { padding:22px 18px; }
  .account-filter-toolbar .filter-field { flex-basis:100%; width:100%; }
}
