:root {
  --navy: #0d1526;
  --navy-2: #121d33;
  --bg: #f2f6f7;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #dfe7eb;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #0f9f6e;
  --green-soft: #e8f7f1;
  --amber: #d97706;
  --amber-soft: #fff6e6;
  --red: #dc2626;
  --red-soft: #fff0f0;
  --shadow: 0 8px 30px rgba(14, 30, 48, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #07101d;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

body.app-open { overflow: hidden; }

button, input, select { font: inherit; }
button { cursor: pointer; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 460px at 10% 0%, rgba(25, 61, 111, .28), transparent 60%),
    radial-gradient(900px 520px at 95% 100%, rgba(20, 52, 92, .2), transparent 55%);
}

.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 390px;
  align-content: center;
  gap: 60px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 34px;
}

.login-brand {
  position: fixed;
  top: 22px;
  left: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8da5c9;
  font-size: 11px;
  letter-spacing: 1.2px;
}

.login-brand b { color: #6d9cf5; font-size: 12px; letter-spacing: 1.8px; }

.brand-square {
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(59, 130, 246, .55);
}

.login-hero { align-self: center; color: #f5f8ff; }

.login-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.12;
  letter-spacing: -1px;
}

.login-hero h1 span {
  background: linear-gradient(90deg, #5b8def, #38bdf8 50%, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-hero p {
  margin: 18px 0 0;
  color: #8fa3c7;
  letter-spacing: 2px;
  font-size: 13px;
}

.login-card {
  align-self: center;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

.login-card h2 { margin: 0; font-size: 21px; }
.login-note { margin: 5px 0 20px; color: var(--muted); font-size: 12px; }
.login-card label { display: block; margin: 0 0 6px; color: #4b5563; font-size: 12px; }

.login-card input {
  width: 100%;
  height: 42px;
  margin-bottom: 15px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--ink);
  outline: none;
}

.login-card input:focus {
  border-color: #7aa5f8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.login-error {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}

.login-foot { margin: 14px 0 0; text-align: center; color: #8a96a8; font-size: 11px; }

.app-shell {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  width: auto;
  height: auto;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.sidebar {
  width: 174px;
  flex: 0 0 174px;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #a8b7ce;
  padding: 13px 11px 12px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 2px 8px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.side-brand b {
  display: block;
  color: #f1f5ff;
  font-size: 13px;
  letter-spacing: 1.5px;
}

.side-brand small {
  display: block;
  margin-top: 1px;
  color: #62708a;
  font-size: 8px;
  letter-spacing: 1.1px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.nav-list::-webkit-scrollbar { width: 5px; }
.nav-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9eacc2;
  text-align: left;
  font-size: 12px;
}

.nav-item:hover { background: rgba(255, 255, 255, .05); color: #dbe6f8; }

.nav-item.active {
  background: rgba(59, 130, 246, .15);
  color: #dbe8ff;
  box-shadow: inset 2px 0 0 #5b8def;
}

.nav-icon {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: #7695c8;
  font-size: 13px;
}

.nav-item.active .nav-icon { color: #73a2ff; }

.nav-item .mini-badge {
  margin-left: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #dc2626;
  color: white;
  font-size: 9px;
  line-height: 17px;
  text-align: center;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-caret { margin-left: auto; color: #53647e; font-size: 12px; }
.nav-children { display: none; padding: 1px 0 4px 27px; }
.nav-children.open { display: flex; flex-direction: column; gap: 1px; }

.nav-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 31px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #71819b;
  text-align: left;
  font-size: 10px;
}

.nav-child:hover { background: rgba(255, 255, 255, .04); color: #c8d5e8; }
.nav-child.active { background: rgba(59, 130, 246, .12); color: #a9c4ff; }
.nav-child .mini-badge { margin-left: auto; }

.side-foot {
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.agent-pulse {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7993b9;
  font-size: 10px;
}

.agent-pulse span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .1);
}

.current-user {
  margin-top: 9px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}
.current-user b { display: block; color: #d5e0f2; font-size: 9px; }
.current-user small { display: block; margin-top: 2px; color: #7890b5; font-size: 8px; }

.text-btn {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7186a6;
  font-size: 10px;
}

.text-btn:hover { color: #d1dcf0; }

.main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 63px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  min-width: 0;
  flex-wrap: nowrap;
}

.topbar-left, .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-left { flex: 1 1 auto; }
.topbar-left > div { min-width: 0; }
.topbar-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
.topbar h1 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar h1 {
  margin: 1px 0 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.2px;
}

.eyebrow {
  margin: 0;
  color: #8a96a7;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7a8799;
  font-size: 10px;
  white-space: nowrap;
}

.sync-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.store-select {
  height: 31px;
  padding: 0 26px 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #3f4b5f;
  font-size: 11px;
}

.notification-btn {
  position: relative;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #526176;
  font-size: 14px;
  line-height: 1;
}
.notification-btn b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  line-height: 16px;
  text-align: center;
}
.notification-panel {
  position: fixed;
  z-index: 60;
  top: 57px;
  right: 28px;
  width: min(370px, calc(100vw - 30px));
  max-height: min(520px, calc(100vh - 80px));
  overflow: hidden;
  border: 1px solid #dfe7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(14, 30, 48, .22);
}
.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f3;
}
.notification-head b { font-size: 11px; }
.notification-head .ghost-btn { height: 26px; font-size: 8px; }
.notification-list { max-height: 460px; overflow-y: auto; padding: 4px 10px 8px; }
.notification-item {
  display: flex;
  gap: 8px;
  padding: 10px 2px;
  border-bottom: 1px solid #f0f3f5;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #f8fbff; }
.notification-kind {
  height: 18px;
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 4px;
  background: #eef3f7;
  color: #687386;
  font-size: 8px;
  line-height: 18px;
}
.notification-item > div { min-width: 0; }
.notification-item b { display: block; color: #344054; font-size: 9px; }
.notification-item p { margin: 3px 0 0; color: #7c8798; font-size: 8px; line-height: 1.5; }
.notification-item time { display: block; margin-top: 4px; color: #9aa5b2; font-size: 8px; }

.primary-btn, .ghost-btn, .danger-btn {
  height: 31px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.primary-btn {
  border: 1px solid #1d4ed8;
  background: var(--blue);
  color: white;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .2);
}

.primary-btn:hover { background: #1d4ed8; }
.primary-btn:disabled { opacity: .5; cursor: default; }

.ghost-btn {
  border: 1px solid var(--line);
  background: white;
  color: #4b5563;
}

.ghost-btn:hover { border-color: #c6d2da; background: #f8fafb; }

.danger-btn {
  border: 1px solid #f0cccc;
  background: #fff;
  color: #b91c1c;
}

.wide { width: 100%; height: 40px; }

.content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  padding: 17px 22px 26px;
}

.content::-webkit-scrollbar, .run-drawer::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb, .run-drawer::-webkit-scrollbar-thumb {
  background: #cbd6dc;
  border-radius: 4px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 { margin: 0; font-size: 15px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.overview-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 14px;
}
.overview-hero h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.4px; }
.overview-hero p { margin: 6px 0 0; color: #7b8798; font-size: 10px; }
.overview-hero-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.overview-priority-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f3f5;
}
.overview-priority-row:last-child { border-bottom: 0; }
.overview-priority-main { min-width: 0; flex: 1; }
.overview-priority-main > div { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.overview-priority-main b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-priority-main small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: #8a95a5;
  font-size: 8px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.overview-priority-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.overview-priority-actions .ghost-btn { height: 25px; padding: 0 7px; font-size: 8px; }
.overview-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 11px 14px;
}
.overview-health-grid > div {
  padding: 9px 10px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}
.overview-health-grid span { display: block; color: #8a95a5; font-size: 8px; }
.overview-health-grid b { display: block; margin-top: 3px; color: #344054; font-size: 16px; }
.overview-health-grid small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }
.overview-links { display: flex; gap: 7px; padding: 0 14px 14px; }
.overview-run-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #f0f3f5;
  background: transparent;
  color: inherit;
  text-align: left;
}
.overview-run-row:last-child { border-bottom: 0; }
.overview-run-row > span:nth-child(2) { min-width: 0; flex: 1; }
.overview-run-row b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-run-row small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }
.overview-device-list { padding: 5px 14px; }
.overview-device-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f3f5;
  color: #596579;
  font-size: 9px;
}
.overview-device-row:last-child { border-bottom: 0; }
.overview-device-row small { margin-left: auto; color: #9aa5b2; font-size: 8px; }
.overview-task-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 14px 14px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f5f8fa;
  color: #687386;
  font-size: 9px;
}
.overview-task-summary b { color: #2563eb; font-size: 16px; }

.monitor-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 9px 4px;
  border: 1px solid #e3eaee;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
}

.monitor-stat {
  min-width: 0;
  padding: 0 13px;
  border-left: 1px solid #e8edf0;
}

.monitor-stat:first-child { border-left: 0; }
.monitor-stat span { display: block; color: #7d8999; font-size: 9px; }
.monitor-stat b { display: inline-block; margin-top: 2px; font-size: 17px; letter-spacing: -.3px; }
.monitor-stat em {
  display: inline-block;
  margin-left: 7px;
  color: #8a95a5;
  font-size: 8px;
  font-style: normal;
}
.monitor-stat em.warn { color: #b45309; }
.monitor-stat em.ok { color: #047857; }

.metric-card {
  min-height: 92px;
  padding: 14px 15px;
  background: var(--card);
  border: 1px solid #e6ecef;
  border-radius: 11px;
  box-shadow: 0 2px 10px rgba(20, 40, 60, .025);
}

.metric-label { color: #778294; font-size: 10px; }
.metric-value { margin-top: 7px; font-size: 23px; font-weight: 700; letter-spacing: -.6px; }
.metric-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 10px; }
.metric-foot.positive { color: var(--green); }
.metric-foot.warning { color: var(--amber); }
.metric-foot.neutral { color: #6b7280; }
.metric-note { color: #9aa4b2; }

.competitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 14px;
  align-items: stretch;
  height: calc(100vh - 238px);
  min-height: 460px;
}

.card {
  min-width: 0;
  background: var(--card);
  border: 1px solid #e3eaee;
  border-radius: 11px;
  box-shadow: 0 3px 14px rgba(20, 40, 60, .035);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 47px;
  padding: 9px 14px;
  border-bottom: 1px solid #edf1f3;
}

.card-head h3 { margin: 0; font-size: 12px; font-weight: 650; }
.card-head p { margin: 2px 0 0; color: #8a95a5; font-size: 9px; }

.tab-row {
  display: flex;
  gap: 4px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf1f3;
}

.tab {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6f7b8d;
  font-size: 10px;
}

.tab.active { background: var(--blue-soft); color: #1d4ed8; font-weight: 650; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f3;
}

.filter-pill {
  height: 26px;
  padding: 0 9px;
  border: 1px solid #e0e7eb;
  border-radius: 6px;
  background: #fff;
  color: #687386;
  font-size: 9px;
}

.filter-pill.active { border-color: #b9cffb; background: #f1f6ff; color: #2563eb; }

.search-box {
  width: 160px;
  height: 26px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid #e0e7eb;
  border-radius: 6px;
  outline: none;
  font-size: 9px;
}

.sort-select {
  width: 104px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid #e0e7eb;
  border-radius: 6px;
  background: #fff;
  color: #687386;
  font: inherit;
  font-size: 9px;
  outline: none;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f3;
  background: #fbfcfd;
}
.bulk-bar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #687386;
  font-size: 8px;
}
.bulk-bar span { color: #8a95a5; font-size: 8px; }
.bulk-bar .ghost-btn { height: 25px; font-size: 8px; }
.bulk-bar .danger-btn { height: 25px; font-size: 8px; }
.bulk-bar .ghost-btn:disabled { opacity: .45; cursor: not-allowed; }
.bulk-bar .danger-btn:disabled { opacity: .45; cursor: not-allowed; }
.signal-select {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  accent-color: #2563eb;
  cursor: pointer;
}

.signal-list { padding: 8px; }

.competitor-layout > .card:first-child {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.competitor-layout > .card:first-child .signal-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.signal-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 11px 11px 11px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.signal-item + .signal-item { margin-top: 3px; }
.signal-item:hover { background: #f8fafb; }
.signal-item.active { border-color: #cfdff8; background: #f3f7ff; }

.signal-item::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 5px;
  width: 3px;
  border-radius: 2px;
  background: #cbd5e1;
}

.signal-item.high::before { background: var(--red); }
.signal-item.medium::before { background: var(--amber); }
.signal-item.low::before { background: var(--green); }

.signal-top { display: flex; align-items: center; gap: 6px; }
.signal-mini-thumb {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #e3eaee;
  border-radius: 5px;
  background: #f7f9fa;
  object-fit: cover;
  cursor: zoom-in;
}
.signal-asin { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 650; }
.price-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 650;
}
.price-chip.down { background: var(--red-soft); color: #b91c1c; }
.price-chip.up { background: var(--green-soft); color: #047857; }
.price-chip.flat { background: #f1f4f6; color: #6b7280; }
.signal-item h4 { margin: 5px 0 4px; font-size: 11px; line-height: 1.35; font-weight: 600; }
.signal-item p { margin: 0; color: #7c8798; font-size: 9px; line-height: 1.45; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.badge.high { background: var(--red-soft); color: #b91c1c; }
.badge.medium { background: var(--amber-soft); color: #b45309; }
.badge.low { background: var(--green-soft); color: #047857; }
.badge.blue { background: var(--blue-soft); color: #1d4ed8; }
.badge.gray { background: #f1f4f6; color: #6b7280; }

.signal-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  color: #9aa4b2;
  font-size: 8px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 10px 10px;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 9px;
}

.data-table th {
  padding: 9px 8px;
  border-bottom: 1px solid #e8edf0;
  color: #8a95a5;
  font-size: 8px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f0f3f5;
  color: #465369;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fbfcfd; }
.data-table td small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }
.cell-title {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: #263244;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-cell > div { min-width: 0; }

.product-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #e4eaee;
  border-radius: 6px;
  background: #f7f9fa;
  object-fit: cover;
  cursor: zoom-in;
}

.product-thumb.placeholder {
  display: grid;
  place-items: center;
  color: #9aa5b2;
  font-size: 13px;
}

.agent-main-image {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #e2e9ed;
  border-radius: 8px;
  background: #f7f9fa;
  object-fit: cover;
  cursor: zoom-in;
}

.agent-gallery {
  display: flex;
  gap: 6px;
  padding: 9px 15px;
  overflow-x: auto;
  border-bottom: 1px solid #edf1f3;
  background: #fbfcfd;
}
.agent-gallery-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #f7f9fa;
  object-fit: cover;
  cursor: zoom-in;
}
.agent-gallery-thumb.active { border-color: #8db0f6; }
.agent-gallery-thumb:hover { border-color: #b9cffb; }

.monitor-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.monitor-meta-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e7edf0;
  border-radius: 6px;
  background: #fbfcfd;
}
.monitor-meta-grid span { display: block; color: #8a95a5; font-size: 8px; }
.monitor-meta-grid b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-meta-grid b.danger { color: #c52525; }
.monitor-meta-grid b.positive { color: #047857; }

.competitor-rule-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 9px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}
.competitor-rule-box .block-title { grid-column: 1 / -1; margin-bottom: 1px; }
.competitor-rule-box label { color: #8a95a5; font-size: 8px; }
.competitor-rule-box input {
  display: block;
  width: 100%;
  height: 26px;
  margin-top: 3px;
  padding: 0 6px;
  border: 1px solid #dfe7eb;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 9px;
  outline: none;
}
.competitor-rule-box .ghost-btn { height: 26px; padding: 0 7px; font-size: 8px; }

.table-link {
  color: #2563eb;
  font-size: 9px;
  text-decoration: none;
  white-space: nowrap;
}

.table-link:hover { text-decoration: underline; }

.delta { color: #778496; font-size: 9px; font-weight: 600; }
.delta.positive { color: #0f9f6e; }
.delta.negative { color: #dc2626; }

.arrival-progress { min-width: 100px; }
.arrival-progress span { display: block; color: #687487; font-size: 8px; white-space: nowrap; }
.arrival-progress > div {
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf2f5;
}
.arrival-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b8def, #38bdf8);
}

.review-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  min-width: 46px;
}
.review-spark i {
  display: block;
  width: 4px;
  min-height: 3px;
  border-radius: 2px 2px 0 0;
  background: #5b8def;
}

.task-table { padding: 2px 12px 10px; }
.task-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto 72px auto;
  align-items: center;
  gap: 9px;
  padding: 11px 4px;
  border-bottom: 1px solid #f0f3f5;
}
.task-row:last-child { border-bottom: 0; }
.task-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f9f6e;
}
.task-dot.failed { background: #dc2626; }
.task-main { min-width: 0; }
.task-main b { display: block; font-size: 10px; font-weight: 600; }
.task-main span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #8793a3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-row time { color: #9aa5b2; font-size: 8px; text-align: right; white-space: nowrap; }
.task-actions { display: flex; justify-content: flex-end; gap: 4px; }
.task-actions .ghost-btn { height: 24px; padding: 0 7px; font-size: 8px; }
.task-cancelling { color: #d97706; font-size: 8px; white-space: nowrap; }

.device-card { margin-bottom: 12px; }
.device-list { padding: 4px 14px 10px; }
.device-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f5;
}
.device-row:last-child { border-bottom: 0; }
.device-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #c4ccd6;
}
.device-dot.online { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.device-main { min-width: 0; flex: 1; }
.device-main b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-main small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }
.device-progress { width: 58px; color: #687386; font-size: 8px; text-align: right; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.platform-report-card { margin-bottom: 12px; }
.platform-report-actions { display: flex; align-items: center; gap: 7px; }
.platform-report-body { padding: 12px 14px 14px; }
.platform-report-body > p {
  margin: 0;
  color: #44536a;
  font-size: 10px;
  line-height: 1.65;
}
.platform-report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.platform-report-columns h4 { margin: 0 0 5px; color: #344054; font-size: 9px; }
.platform-report-gaps {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 7px;
  background: #fffaf1;
  color: #8a6a2f;
  font-size: 8px;
  line-height: 1.55;
}
.platform-report-gaps b { flex: 0 0 auto; color: #b45309; }
.platform-report-body time { display: block; margin-top: 8px; color: #9aa5b2; font-size: 8px; }

.data-quality-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.quality-missing { max-width: 250px; color: #8a95a5; font-size: 8px; line-height: 1.5; }

.band-list { padding: 12px 14px 15px; }
.band-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: #69768a;
  font-size: 9px;
}
.band-row b { color: #3d4a5e; font-size: 10px; text-align: right; }
.band-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf2f5;
}
.band-track i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b8def, #38bdf8);
}

.platform-gaps {
  margin: 0;
  padding: 12px 14px 14px 30px;
  color: #6e7b8d;
  font-size: 9px;
  line-height: 1.7;
}

.discount-list { padding: 2px 14px 10px; }
.discount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f5;
}
.discount-row:last-child { border-bottom: 0; }
.discount-row > div { min-width: 0; }
.discount-row b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discount-row small { color: #9aa5b2; font-size: 8px; }
.discount-row > span { color: #6b7889; font-size: 9px; white-space: nowrap; }
.discount-row s { margin-right: 5px; color: #9aa5b2; }
.discount-row strong { color: #0f9f6e; font-size: 11px; }
.badge.warning { color: #b45309; background: var(--amber-soft); }

.settings-form { padding: 8px 14px 15px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f3f5;
}
.setting-row:last-of-type { border-bottom: 0; }
.setting-row b { display: block; color: #344054; font-size: 10px; }
.setting-row small { display: block; margin-top: 2px; color: #8a95a5; font-size: 8px; }
.setting-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2563eb; }
.setting-number, .setting-time {
  width: 92px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.setting-number:focus, .setting-time:focus { border-color: #8db0f6; background: #fff; }
.setting-text {
  width: min(280px, 48vw);
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.setting-select {
  width: 150px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.setting-text:focus, .setting-select:focus { border-color: #8db0f6; background: #fff; }
.deepseek-settings-card { margin-top: 12px; }
.monitoring-settings-card { margin-top: 12px; }
.setting-toggle-group { display: flex; gap: 10px; flex-wrap: wrap; }
.setting-toggle-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #596579;
  font-size: 9px;
}
.setting-toggle-group input { accent-color: #2563eb; }
.deepseek-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.user-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 150px auto;
  gap: 8px;
  align-items: end;
  padding: 12px 14px 14px;
}
.user-create-grid label { color: #596579; font-size: 9px; }
.user-create-grid input,
.user-create-grid select {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.user-create-grid input:focus,
.user-create-grid select:focus { border-color: #8db0f6; background: #fff; }
.user-role-select {
  height: 27px;
  padding: 0 6px;
  border: 1px solid #dfe7eb;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 9px;
}
.user-enabled { display: inline-flex; align-items: center; gap: 5px; color: #596579; font-size: 9px; }
.user-enabled input { accent-color: #2563eb; }
.user-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.user-actions .ghost-btn,
.user-actions .danger-btn { height: 24px; padding: 0 7px; font-size: 8px; }
.email-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 8px;
}
.email-settings-grid label { color: #596579; font-size: 9px; }
.email-settings-grid input {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.email-settings-grid input:focus { border-color: #8db0f6; background: #fff; }
.email-toggles { padding: 4px 14px 6px; }
.setting-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: #8a95a5;
  font-size: 8px;
}
.settings-note {
  margin: 12px 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f5f8fa;
  color: #6e7b8d;
  font-size: 9px;
  line-height: 1.55;
}

.plugin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 12px;
}
.plugin-hero h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.3px; }
.plugin-hero p { max-width: 700px; margin: 6px 0 0; color: #788495; font-size: 10px; line-height: 1.55; }
.plugin-strip { margin-bottom: 12px; }
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.plugin-card { min-width: 0; }
.plugin-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #edf1f3;
}
.plugin-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf3ff;
  color: #2563eb;
  font-size: 16px;
}
.plugin-card-title { min-width: 0; flex: 1; }
.plugin-card-title h3 { margin: 0; color: #263244; font-size: 13px; }
.plugin-card-title p { margin: 4px 0 0; color: #7c8798; font-size: 9px; line-height: 1.5; }
.plugin-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 11px 14px;
}
.plugin-meta > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e7edf0;
  border-radius: 6px;
  background: #fbfcfd;
}
.plugin-meta span { display: block; color: #8a95a5; font-size: 8px; }
.plugin-meta b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}
.plugin-download { display: inline-flex; align-items: center; text-decoration: none; }
.plugin-sha {
  min-width: 0;
  overflow: hidden;
  color: #9aa5b2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-help { margin-top: 12px; }
.plugin-help-list {
  margin: 0;
  padding: 10px 14px 16px 32px;
  color: #596579;
  font-size: 10px;
  line-height: 1.9;
}
.plugin-help-list code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f1f4f6;
  color: #344054;
  font-size: 9px;
}

.agent-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.agent-module-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 12px;
}
.agent-module-head h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.3px; }
.agent-module-head p { max-width: 680px; margin: 6px 0 0; color: #788495; font-size: 10px; line-height: 1.55; }
.agent-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.agent-tab {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #e0e7eb;
  border-radius: 7px;
  background: #fff;
  color: #687386;
  font-size: 9px;
}
.agent-tab.active { border-color: #b9cffb; background: #f1f6ff; color: #2563eb; font-weight: 650; }

.agent-chat-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.agent-session-card { overflow: hidden; }
.agent-session-list { max-height: 520px; overflow-y: auto; padding: 6px; }
.agent-session-row {
  display: flex;
  align-items: flex-start;
  border-radius: 8px;
}
.agent-session-row + .agent-session-row { margin-top: 3px; }
.agent-session-row.active { background: #f3f7ff; }
.agent-session-main {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.agent-session-main b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-session-main small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 7px; }
.agent-session-main span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #8a95a5;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-session-delete {
  width: 22px;
  height: 22px;
  margin: 6px 4px 0 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #9aa5b2;
  font-size: 14px;
  line-height: 1;
}
.agent-session-delete:hover { background: var(--red-soft); color: var(--red); }
.agent-chat-card { display: flex; flex-direction: column; min-height: 520px; }
.agent-chat-messages {
  flex: 1;
  min-height: 330px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 14px;
  background: #fbfcfd;
}
.agent-chat-welcome {
  max-width: 540px;
  margin: 42px auto;
  padding: 24px;
  border: 1px dashed #dce5ea;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}
.agent-chat-orb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #edf3ff;
  color: #2563eb;
  font-size: 20px;
}
.agent-chat-welcome h4 { margin: 0; font-size: 14px; }
.agent-chat-welcome p { margin: 6px 0 14px; color: #8a95a5; font-size: 9px; line-height: 1.55; }
.agent-chat-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.agent-chat-suggestions button {
  padding: 6px 9px;
  border: 1px solid #e0e7eb;
  border-radius: 7px;
  background: #f8fafb;
  color: #596579;
  font-size: 9px;
}
.agent-chat-suggestions button:hover { border-color: #b9cffb; color: #2563eb; background: #f3f7ff; }
.agent-message {
  max-width: 86%;
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px solid #e7edf0;
  border-radius: 9px;
  background: #fff;
}
.agent-message.user {
  margin-left: auto;
  border-color: #d5e3fb;
  background: #f3f7ff;
}
.agent-message-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #8a95a5;
  font-size: 8px;
}
.agent-message-head b { color: #344054; font-size: 9px; }
.agent-message-head .badge { margin-left: auto; height: 16px; font-size: 7px; }
.agent-message-content { color: #465369; font-size: 10px; line-height: 1.65; word-break: break-word; }
.agent-message-run {
  margin-top: 7px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: #2563eb;
  font-size: 8px;
}
.agent-typing { display: flex; gap: 4px; padding: 5px 0; }
.agent-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa5b2;
  animation: agent-typing 1s infinite ease-in-out;
}
.agent-typing i:nth-child(2) { animation-delay: .15s; }
.agent-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes agent-typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.agent-chat-form { padding: 11px 14px 14px; border-top: 1px solid #e9eef1; background: #fff; }
.agent-chat-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 14px 0;
}
.agent-chat-tools > span { color: #8a95a5; font-size: 8px; }
.agent-chat-tools button {
  height: 24px;
  padding: 0 7px;
  border: 1px solid #e0e7eb;
  border-radius: 6px;
  background: #f8fafb;
  color: #596579;
  font-size: 8px;
}
.agent-chat-tools button:hover { border-color: #b9cffb; color: #2563eb; background: #f3f7ff; }
.agent-chat-form textarea {
  width: 100%;
  min-height: 54px;
  max-height: 130px;
  padding: 8px 9px;
  border: 1px solid #dfe7eb;
  border-radius: 7px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 9px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}
.agent-chat-form textarea:focus { border-color: #8db0f6; background: #fff; }
.agent-chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }

.agent-skills-card { overflow: hidden; }
.skill-catalog-list { padding: 7px; }
.skill-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.skill-choice + .skill-choice { margin-top: 3px; }
.skill-choice:hover { background: #f8fafb; }
.skill-choice.active { border-color: #cfdff8; background: #f3f7ff; }
.skill-choice-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #edf3ff;
  color: #2563eb;
  font-size: 12px;
}
.skill-choice-main { min-width: 0; }
.skill-choice-main b {
  display: block;
  color: #344054;
  font-size: 10px;
  line-height: 1.35;
}
.skill-choice-main small {
  display: block;
  margin-top: 3px;
  color: #8a95a5;
  font-size: 8px;
  line-height: 1.45;
}

.agent-console { min-width: 0; }
.agent-skill-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 12px;
}
.agent-skill-meta > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}
.agent-skill-meta span { display: block; color: #8a95a5; font-size: 8px; }
.agent-skill-meta p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #596579;
  font-size: 8px;
  line-height: 1.55;
  text-overflow: ellipsis;
}
.agent-form { padding: 0 14px 14px; }
.agent-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.agent-form label { display: block; color: #596579; font-size: 9px; }
.agent-form select,
.agent-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 9px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 9px;
  outline: none;
}
.agent-form textarea { min-height: 68px; resize: vertical; line-height: 1.55; }
.agent-form select:focus,
.agent-form textarea:focus { border-color: #8db0f6; background: #fff; }
.agent-ai-toggle {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #596579 !important;
  font-size: 9px !important;
}
.agent-ai-toggle input { accent-color: #2563eb; }
.agent-ai-toggle input:disabled + span { color: #9aa5b2; }
.agent-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.agent-form-foot span { color: #8a95a5; font-size: 8px; line-height: 1.45; }
.agent-form-foot .primary-btn { flex: 0 0 auto; }
.agent-empty {
  margin: 0 14px 14px;
  padding: 20px 14px;
  border: 1px dashed #dce5ea;
  border-radius: 8px;
  background: #fbfcfd;
  color: #8a95a5;
  font-size: 9px;
  text-align: center;
}

.agent-report {
  margin: 0 14px 14px;
  overflow: hidden;
  border: 1px solid #e5edf1;
  border-radius: 9px;
  background: #fff;
}
.agent-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-bottom: 1px solid #edf1f3;
  background: #f8fafb;
}
.agent-report-head h4 { margin: 2px 0 0; color: #263246; font-size: 12px; }
.agent-report-head p { margin: 3px 0 0; color: #8a95a5; font-size: 8px; }
.agent-report-summary {
  margin: 0;
  padding: 12px 13px 0;
  color: #44536a;
  font-size: 10px;
  line-height: 1.65;
}
.agent-ai-block {
  margin: 10px 13px 0;
  padding: 10px 11px;
  border: 1px solid #dbe9ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f9ff, #fbfdff);
}
.agent-ai-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #2563eb;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
}
.agent-ai-head span:last-child { color: #8a95a5; font-weight: 500; letter-spacing: 0; }
.agent-ai-block > p {
  margin: 6px 0 0;
  color: #344054;
  font-size: 9px;
  line-height: 1.65;
}
.agent-ai-block ul,
.agent-ai-block ol {
  margin: 6px 0 0;
  padding-left: 17px;
  color: #596579;
  font-size: 9px;
  line-height: 1.6;
}
.agent-ai-actions b { display: block; margin-top: 7px; color: #344054; font-size: 8px; }
.agent-ai-risk {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #dbe9ff;
  color: #b45309;
  font-size: 8px;
  line-height: 1.55;
}
.agent-ai-error {
  margin: 10px 13px 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff7ed;
  color: #b45309;
  font-size: 8px;
  line-height: 1.55;
}
.agent-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 13px;
}
.agent-metric {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}
.agent-metric span { display: block; color: #8a95a5; font-size: 8px; }
.agent-metric b {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 9px;
  line-height: 1.45;
}
.agent-metric.warn b, .agent-metric.danger b { color: #b45309; }
.agent-metric.good b { color: #0f9f6e; }
.agent-report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 13px 10px;
}
.agent-report-columns h4,
.agent-next h4 {
  margin: 8px 0 5px;
  color: #344054;
  font-size: 9px;
}
.agent-report-columns .evidence-list { margin: 0; }
.agent-next {
  margin: 0 13px 13px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f5f8fa;
}
.agent-next ol {
  margin: 0;
  padding-left: 17px;
  color: #596579;
  font-size: 9px;
  line-height: 1.65;
}

.agent-run-list { padding: 4px 14px 10px; }
.agent-run-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #f0f3f5;
  background: transparent;
  color: inherit;
  text-align: left;
}
.agent-run-row:last-child { border-bottom: 0; }
.agent-run-row:hover { background: #fbfcfd; }
.agent-run-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #f59e0b;
}
.agent-run-dot.completed { background: var(--green); }
.agent-run-dot.failed { background: var(--red); }
.agent-run-main { min-width: 0; flex: 1; }
.agent-run-main b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-run-main small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }

.shop-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.store-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shop-list { padding: 7px; }
.shop-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.shop-list-item + .shop-list-item { margin-top: 3px; }
.shop-list-item:hover { background: #f8fafb; }
.shop-list-item.active { border-color: #cfdff8; background: #f3f7ff; }
.shop-list-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #edf3ff;
  color: #2563eb;
  font-size: 11px;
}
.shop-list-main { min-width: 0; flex: 1; }
.shop-list-main b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-list-main small { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }

.shop-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f3;
}
.shop-detail-stats div {
  padding: 8px 9px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}
.shop-detail-stats span { display: block; color: #8a95a5; font-size: 8px; }
.shop-detail-stats b { display: block; margin-top: 2px; color: #344054; font-size: 12px; }
.shop-products-head { border-top: 0; }

.agent-panel {
  position: static;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.agent-panel > .agent-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.agent-panel-head {
  padding: 13px 15px;
  border-bottom: 1px solid #e8edf0;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .075), rgba(45, 212, 191, .055)),
    #fff;
}

.agent-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agent-title-row > div { flex: 1; min-width: 0; }

.agent-title-row h3 { margin: 0; font-size: 13px; line-height: 1.35; }
.agent-sub { margin: 5px 0 0; color: #7b8798; font-size: 9px; }

.agent-body { padding: 13px 15px 16px; }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.variation-block {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e3eaee;
  border-radius: 8px;
  background: #fbfcfd;
}
.variation-block .block-title { margin-bottom: 7px; }
.variation-group + .variation-group { margin-top: 8px; }
.variation-group > b {
  display: block;
  margin-bottom: 5px;
  color: #596579;
  font-size: 8px;
}
.variation-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.variation-chip {
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f1f4f6;
  color: #687386;
  font-size: 8px;
  line-height: 1.35;
}
.variation-chip.selected {
  border-color: #b9cffb;
  background: #eef5ff;
  color: #1d4ed8;
  font-weight: 650;
}

.change-timeline {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e3eaee;
  border-radius: 8px;
  background: #fbfcfd;
}
.change-timeline .block-title { margin-bottom: 5px; }
.change-event {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f4;
}
.change-event:last-child { border-bottom: 0; }
.change-kind {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef3f7;
  color: #687386;
  font-size: 8px;
}
.change-event > div { min-width: 0; }
.change-event b { display: block; color: #465369; font-size: 9px; line-height: 1.45; }
.change-event time { display: block; margin-top: 2px; color: #9aa5b2; font-size: 8px; }

.review-topic-block {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e3eaee;
  border-radius: 8px;
  background: #fbfcfd;
}
.review-topic-block .block-title { margin-bottom: 5px; }
.review-topic-row {
  display: grid;
  grid-template-columns: minmax(70px, .7fr) minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f4;
}
.review-topic-row:last-child { border-bottom: 0; }
.review-topic-row b { color: #465369; font-size: 9px; }
.review-topic-row span { color: #7c8798; font-size: 8px; text-align: right; }
.review-topic-row small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #9aa5b2;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-analysis {
  margin-top: 7px;
  padding: 8px 9px;
  border-radius: 7px;
  background: #f5f9ff;
}
.review-analysis b { color: #2563eb; font-size: 8px; text-transform: uppercase; }
.review-analysis p { margin: 4px 0 5px; color: #44536a; font-size: 9px; line-height: 1.55; }
.review-analysis span { display: block; color: #687386; font-size: 8px; line-height: 1.55; }
.review-analysis-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.review-analysis-actions span { color: #9aa5b2; font-size: 8px; }
.review-analysis-actions .ghost-btn { height: 25px; font-size: 8px; }

.skill-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe6fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #f3f7ff, #f8fbff);
}

.skill-strip > div { min-width: 0; }
.skill-kicker {
  display: block;
  color: #6d8fc8;
  font-size: 7px;
  letter-spacing: 1.3px;
}
.skill-strip b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #2f4b74;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.assessment-grid div {
  padding: 7px 9px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}

.assessment-grid span { display: block; color: #8a95a5; font-size: 8px; }
.assessment-grid b { display: block; margin-top: 2px; color: #465369; font-size: 9px; }

.data-gaps {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #f0dfc4;
  border-radius: 8px;
  background: #fffaf1;
}

.data-gaps .block-title { color: #9a610c; }
.data-gaps .block-title span:last-child {
  color: #b45309;
  font-size: 8px;
  font-weight: 600;
}

.fact {
  padding: 8px 9px;
  border: 1px solid #e7edf0;
  border-radius: 7px;
  background: #fbfcfd;
}

.fact span { display: block; color: #8a95a5; font-size: 8px; }
.fact b { display: block; margin-top: 3px; font-size: 11px; }
.fact b.danger { color: #c52525; }
.fact b.warning { color: #b45309; }
.fact b.positive { color: #047857; }
.fact b.neutral { color: #475569; }

.status-note {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f6f8fa;
  color: #667386;
  font-size: 9px;
}

.quote-box {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  background: #f6fbf8;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quote-grid div { min-width: 0; }
.quote-grid span { display: block; color: #789189; font-size: 8px; }
.quote-grid b { display: block; margin-top: 2px; color: #166044; font-size: 10px; }
.quote-box p {
  margin: 8px 0 0;
  color: #416b5a;
  font-size: 9px;
  line-height: 1.5;
}

.history-block {
  margin-top: 10px;
  padding: 9px 10px 8px;
  border: 1px solid #e3eaee;
  border-radius: 8px;
  background: #fbfcfd;
}
.history-block .block-title { margin-bottom: 6px; }
.history-spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 42px;
  padding: 2px 2px 0;
}
.history-spark i {
  flex: 1;
  min-width: 4px;
  max-width: 18px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7aa5f8, #3b82f6);
  opacity: .85;
}
.history-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: #9aa5b2;
  font-size: 8px;
}

.supplement-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 9px;
}

.supplement-row .ghost-btn,
.supplement-row .danger-btn { height: 28px; }

.run-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #e3eaee;
  border-radius: 7px;
  background: #fff;
  color: #687386;
  font-size: 9px;
}

.run-chip b { color: #2f3b4e; font-size: 9px; }

.evidence-block {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #e4eaee;
  border-radius: 8px;
  background: #fbfcfd;
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 650;
}

.evidence-list { margin: 0; padding: 0; list-style: none; }
.evidence-list li {
  position: relative;
  padding-left: 13px;
  color: #596579;
  font-size: 9px;
  line-height: 1.55;
}

.evidence-list li + li { margin-top: 4px; }
.evidence-list li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8ea4c7;
}

.recommendation {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  background: #f3f7ff;
  color: #34445e;
  font-size: 9px;
  line-height: 1.55;
}

.recommendation strong { display: block; margin-bottom: 3px; color: #1d4ed8; font-size: 9px; }

.action-row {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.action-row .primary-btn { flex: 1; }

.empty-state {
  padding: 34px 20px;
  color: #8b96a6;
  text-align: center;
  font-size: 10px;
}

.run-drawer {
  position: fixed;
  z-index: 40;
  top: 15px;
  right: 15px;
  bottom: 15px;
  width: min(390px, calc(100vw - 30px));
  display: flex;
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 17px 14px;
  border-bottom: 1px solid #e9eef1;
}

.drawer-head h3 { margin: 3px 0 0; font-size: 14px; }
.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e0e7eb;
  border-radius: 7px;
  background: #fff;
  color: #607086;
  font-size: 17px;
  line-height: 1;
}

.run-status {
  padding: 12px 17px 0;
  color: #687386;
  font-size: 10px;
}

.run-steps {
  margin: 14px 0 0;
  padding: 0 17px 20px;
  list-style: none;
}

.run-steps li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  min-height: 52px;
}

.step-dot {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid #d3dde3;
  border-radius: 50%;
  background: #fff;
  color: #9aa4b2;
  font-size: 8px;
  line-height: 16px;
  text-align: center;
}

.run-steps li:not(:last-child) .step-dot::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 8px;
  width: 1px;
  height: 34px;
  background: #e2e8ec;
}

.run-steps li.running .step-dot { border-color: #93b4fb; color: #2563eb; background: #eff5ff; }
.run-steps li.completed .step-dot { border-color: var(--green); color: white; background: var(--green); }
.run-steps li.completed .step-dot::after { background: #bfe8d9; }

.step-label { color: #596579; font-size: 10px; line-height: 1.5; }
.run-steps li.running .step-label { color: #1d4ed8; font-weight: 650; }
.step-state { display: block; margin-top: 2px; color: #9aa4b2; font-size: 8px; }

.drawer-foot {
  margin-top: auto;
  padding: 13px 17px;
  border-top: 1px solid #e9eef1;
  background: #fbfcfd;
  color: #8a95a5;
  font-size: 9px;
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 11, 22, .62);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 90px rgba(0, 0, 0, .45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #e8edf0;
}

.modal-head h3 { margin: 2px 0 0; font-size: 14px; }

.modal-note {
  margin: 13px 18px 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f5f8fa;
  color: #677487;
  font-size: 9px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 14px 18px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #5e6b7d;
  font-size: 9px;
}

.form-grid .full-field { grid-column: 1 / -1; }

.form-grid input {
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dfe7eb;
  border-radius: 7px;
  background: #fbfcfd;
  color: #263244;
  outline: none;
  font-size: 10px;
}

.form-grid input:focus {
  border-color: #8cb0f7;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 17px;
}

.modal-actions .primary-btn,
.modal-actions .ghost-btn { height: 34px; }

.image-lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(3, 9, 18, .88);
  backdrop-filter: blur(5px);
}

.image-lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  max-width: 420px;
  padding: 10px 15px;
  border-radius: 8px;
  background: #111827;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  font-size: 11px;
}

.placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
}

.placeholder h2 { margin: 0; font-size: 16px; }
.placeholder p { max-width: 420px; margin: 7px 0 0; color: #788495; font-size: 11px; }

.mobile-only { display: none; }

.selection-filter-card { margin-bottom: 14px; }
.selection-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr)) auto auto;
  gap: 9px;
  align-items: end;
  padding: 12px 14px 14px;
}
.selection-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: #697587;
  font-size: 9px;
}
.selection-form input,
.selection-form select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dfe7eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #344054;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.selection-form input:focus,
.selection-form select:focus { border-color: #8db0f6; background: #fff; }
.selection-form .primary-btn { height: 32px; align-self: end; }
.selection-ai-toggle {
  flex-direction: row !important;
  align-items: center;
  padding-bottom: 8px;
  white-space: nowrap;
}
.selection-ai-toggle input { width: 14px; height: 14px; }
.selection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, .78fr);
  gap: 14px;
  align-items: start;
}
.selection-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.selection-list { display: flex; flex-direction: column; gap: 9px; padding: 9px; }
.selection-candidate {
  padding: 12px;
  border: 1px solid #e4ebef;
  border-radius: 9px;
  background: #fff;
}
.selection-candidate:hover { border-color: #cbdcf6; background: #fbfdff; }
.selection-candidate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.selection-candidate-head .product-cell { flex: 1; }
.selection-rank { margin-bottom: 2px; color: #2563eb; font-size: 8px; font-weight: 700; }
.selection-score { flex: 0 0 54px; text-align: right; }
.selection-score b { color: #0f6b4f; font-size: 22px; letter-spacing: -1px; }
.selection-score span { color: #9aa5b2; font-size: 9px; }
.selection-candidate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.selection-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 9px;
}
.selection-metrics > div,
.selection-econ > div {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #edf1f3;
  border-radius: 6px;
  background: #fbfcfd;
}
.selection-metrics span,
.selection-econ span { display: block; color: #8a95a5; font-size: 8px; }
.selection-metrics b,
.selection-econ b { display: block; margin-top: 2px; overflow: hidden; color: #344054; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.selection-note { margin: 8px 0 0; color: #6b7789; font-size: 9px; line-height: 1.5; }
.selection-gaps { display: flex; align-items: flex-start; gap: 7px; margin-top: 7px; color: #8a95a5; font-size: 8px; }
.selection-gaps > b { flex: 0 0 auto; color: #b45309; }
.selection-gaps em {
  display: inline-block;
  margin: 0 4px 3px 0;
  padding: 2px 5px;
  border-radius: 4px;
  background: #fff7e8;
  color: #a15c07;
  font-style: normal;
}
.selection-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.selection-actions .ghost-btn { height: 26px; padding: 0 9px; font-size: 8px; }
.selection-econ { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px 12px 0; }
.selection-assumptions,
.selection-conditions,
.selection-method { margin: 9px 14px 13px; padding-left: 17px; color: #6b7789; font-size: 9px; line-height: 1.65; }
.selection-assumptions li,
.selection-conditions li,
.selection-method li { margin-bottom: 3px; }
.selection-topics,
.selection-release { display: flex; flex-direction: column; gap: 6px; padding: 9px 12px 12px; }
.selection-topics > div,
.selection-release > div { padding: 7px 8px; border: 1px solid #edf1f3; border-radius: 6px; background: #fbfcfd; }
.selection-topics b,
.selection-release b { display: block; color: #344054; font-size: 9px; }
.selection-topics span,
.selection-release span { display: block; margin-top: 2px; color: #8a95a5; font-size: 8px; }
.selection-topics small,
.selection-release small { display: block; margin-top: 4px; color: #6b7789; font-size: 8px; line-height: 1.5; }
.selection-ai-card > p { margin: 10px 13px 0; color: #596579; font-size: 10px; line-height: 1.6; }
.selection-ai-card ul,
.selection-ai-card ol { margin: 8px 13px 12px; padding-left: 17px; color: #596579; font-size: 9px; line-height: 1.6; }
.selection-risk { margin: 0 13px 13px; padding: 7px 8px; border-radius: 6px; background: #fff7e8; color: #a15c07; font-size: 9px; line-height: 1.5; }
.selection-method-card { margin-top: 14px; }
.selection-gap-list { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 14px; }
.selection-gap-list span { padding: 4px 7px; border-radius: 4px; background: #fff7e8; color: #a15c07; font-size: 8px; }

@media (max-width: 1366px) {
  .topbar { padding: 9px 16px; gap: 12px; }
  .content { padding: 14px 16px 22px; }
  .competitor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
    gap: 12px;
  }
  .filter-row { gap: 5px; }
  .search-box { width: 140px; }
}

@media (max-width: 1180px) {
  .app-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .sidebar {
    position: absolute;
    z-index: 30;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: 20px 0 50px rgba(0, 0, 0, .35);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-flex; align-items: center; justify-content: center; }
  .metrics-grid, .monitor-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-hero { align-items: flex-start; flex-direction: column; }
  .competitor-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .competitor-layout > .card:first-child .signal-list { max-height: 360px; flex: none; }
  .agent-panel { height: auto; }
  .agent-panel > .agent-body { overflow: visible; }
  .agent-panel { position: static; }
  .agent-workspace { grid-template-columns: 1fr; }
  .agent-chat-layout { grid-template-columns: 1fr; }
  .agent-session-list { max-height: 220px; }
  .agent-module-head { align-items: flex-start; flex-direction: column; }
  .agent-tabs { justify-content: flex-start; }
  .plugin-grid { grid-template-columns: 1fr; }
  .login-view { grid-template-columns: 1fr; max-width: 520px; gap: 30px; }
  .login-hero h1 { font-size: 38px; }
  .topbar { flex-wrap: wrap; }
  .topbar-actions { max-width: 100%; justify-content: flex-end; }
  .data-table { min-width: 760px; }
  .selection-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .selection-layout { grid-template-columns: 1fr; }
  .selection-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 780px) and (min-width: 1181px) {
  .topbar { min-height: 54px; padding-top: 7px; padding-bottom: 7px; }
  .content { padding-top: 12px; padding-bottom: 18px; }
  .competitor-layout {
    height: calc(100vh - 190px);
    height: calc(100dvh - 190px);
    min-height: 360px;
  }
  .overview-hero { padding-bottom: 8px; }
}

@media (max-width: 600px) {
  .topbar { align-items: flex-start; padding: 10px 12px; }
  .topbar h1 { font-size: 15px; }
  .topbar-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .sync-state, .store-select { display: none; }
  .notification-panel { right: 10px; top: 54px; }
  .content { padding: 12px; }
  .metrics-grid { gap: 8px; }
  .overview-hero-actions { justify-content: flex-start; }
  .overview-priority-row { flex-wrap: wrap; }
  .overview-priority-actions { width: 100%; justify-content: flex-end; }
  .monitor-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 0; }
  .monitor-stat:nth-child(3) { border-left: 0; }
  .metric-card { padding: 11px; min-height: 82px; }
  .metric-value { font-size: 19px; }
  .login-view { padding: 70px 18px 30px; }
  .login-brand { left: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .platform-report-columns { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discount-row { grid-template-columns: 1fr; gap: 5px; }
  .agent-skill-meta, .agent-report-columns { grid-template-columns: 1fr; }
  .agent-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-form-foot { align-items: flex-start; flex-direction: column; }
  .agent-message { max-width: 100%; }
  .agent-chat-foot { align-items: flex-start; flex-direction: column; }
  .competitor-rule-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competitor-rule-box .block-title { grid-column: 1 / -1; }
  .user-create-grid { grid-template-columns: 1fr; }
  .email-settings-grid { grid-template-columns: 1fr; }
  .selection-form { grid-template-columns: 1fr; }
  .selection-side { display: flex; }
  .selection-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
