:root {
  --bg: #06111a;
  --panel: #0c1b28;
  --panel2: #102638;
  --line: #244258;
  --text: #f6fbff;
  --muted: #9eb5c8;
  --green: #2ee783;
  --orange: #ff8500;
  --red: #e34b57;
  --yellow: #ffd166;
  --blue: #3ba4ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(26, 86, 136, .24) 0, transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(39, 115, 255, .16) 0, transparent 28%),
    linear-gradient(135deg, #061827 0, #020812 62%, #03060b 100%);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.glass, .panel, .metric, .server-pill, .sidebar, .login-card {
  border: 1px solid rgba(95, 141, 170, .35);
  background: linear-gradient(145deg, rgba(17, 40, 60, .88), rgba(5, 16, 26, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .04);
  border-radius: 18px;
}
.login-shell, .splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
  padding: 28px;
}
.login-logo {
  width: 190px;
  max-height: 120px;
  object-fit: contain;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}
.badge {
  display: inline-block;
  margin-top: 14px;
  color: var(--orange);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
h1, h2, h3, p { margin-top: 0; }
p, .muted { color: var(--muted); }
label {
  display: block;
  margin: 14px 0 7px;
  color: #c8d8e6;
}
input, select {
  width: 100%;
  border: 1px solid #31536b;
  border-radius: 12px;
  color: var(--text);
  background: #081722;
  padding: 13px 14px;
  outline: none;
}
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 231, 131, .12); }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: auto; }
.tabs { display: flex; gap: 8px; margin: 18px 0; }
.tab {
  flex: 1;
  border: 1px solid #31536b;
  border-radius: 12px;
  padding: 11px;
  color: var(--muted);
  background: #0b1a27;
}
.tab.active { color: #fff; border-color: var(--green); background: rgba(46, 231, 131, .14); }
.login-pane { display: none; }
.login-pane.active { display: block; }
.reset-pane {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(95, 141, 170, .35);
}
.primary, .ghost, .danger {
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 13px 18px;
  color: #fff;
  font-weight: 800;
}
.primary { background: linear-gradient(180deg, #22b864, #168945); box-shadow: 0 12px 26px rgba(34,184,100,.22); }
.ghost { background: #122b3f; border-color: #31536b; }
.danger { background: linear-gradient(180deg, #e4515d, #bd3340); }
.link-button {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 0;
  color: #9fd0ff;
  background: transparent;
  font-weight: 700;
}
.login-card .primary { width: 100%; margin-top: 12px; }
.message { margin-top: 14px; color: var(--yellow); white-space: pre-wrap; }
.splash-ring {
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--green), transparent, var(--orange), transparent);
  animation: spin 1.8s linear infinite;
  padding: 4px;
}
.splash-ring img {
  width: 208px;
  height: 208px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 22px;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.96); } }
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px 1fr;
}
.sidebar {
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  padding: 26px 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(8, 32, 56, .96), rgba(3, 13, 23, .98)),
    radial-gradient(circle at 0 0, rgba(31, 111, 255, .16), transparent 36%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.brand img {
  width: 76px;
  height: 58px;
  object-fit: contain;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
}
.brand strong { display: block; font-size: 28px; }
.brand span { color: var(--orange); font-weight: 800; font-size: 13px; }
nav { display: grid; gap: 8px; }
nav button {
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 12px;
  color: #bfd4e8;
  background: transparent;
  font-weight: 800;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  line-height: 1.15;
}
nav button.active {
  color: #fff;
  border-color: rgba(59,164,255,.34);
  background: linear-gradient(135deg, rgba(18, 94, 182, .78), rgba(14, 55, 93, .86));
  box-shadow: inset 4px 0 var(--orange), 0 12px 26px rgba(0,0,0,.20);
}
nav button:hover {
  color: #fff;
  background: rgba(59,164,255,.10);
}
.nav-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(125,190,255,.24);
  border-radius: 8px;
  color: #8ec8ff;
  background: rgba(4, 18, 30, .46);
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav button.active .nav-icon {
  color: #58b7ff;
  border-color: rgba(89, 184, 255, .44);
  background: rgba(7, 35, 62, .70);
}
nav button:hover .nav-icon {
  color: #c7e7ff;
  border-color: rgba(125,190,255,.40);
}
.server-mini {
  position: static;
  margin-top: 24px;
  padding: 14px;
  background: rgba(2, 9, 14, .35);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.server-mini span, .server-mini small { display: block; color: var(--muted); }
.server-mini strong { display: block; color: var(--orange); text-transform: uppercase; }
.content { padding: 38px 42px; overflow: hidden; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.topbar h1 { font-size: 34px; margin-bottom: 8px; }
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.server-pill {
  color: var(--green);
  padding: 20px 28px;
  font-weight: 900;
}
.ai-assistant {
  --ai-state: var(--green);
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: 86px minmax(180px, 300px);
  align-items: end;
  gap: 10px;
  pointer-events: auto;
  opacity: .74;
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .24));
  perspective: 720px;
  transition: opacity .2s ease, filter .2s ease;
}
.ai-assistant:hover,
.ai-assistant:focus-visible,
.ai-assistant.dragging { opacity: .96; }
.ai-assistant.dragging { cursor: grabbing; user-select: none; }
.ai-assistant.thinking { --ai-state: var(--blue); }
.ai-assistant.learning { --ai-state: #a35cff; }
.ai-assistant.opportunity { --ai-state: var(--yellow); }
.ai-assistant.attention { --ai-state: var(--red); }
.ai-assistant.opportunity,
.ai-assistant.attention { cursor: grab; }
.ai-assistant.opportunity:hover .ai-bubble,
.ai-assistant.attention:hover .ai-bubble {
  border-color: color-mix(in srgb, var(--ai-state) 88%, white 8%);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 0 32px color-mix(in srgb, var(--ai-state) 32%, transparent);
  transform: translateY(-2px);
}
.ai-assistant.launching { animation: aiAssistantLaunch .48s ease-out both; }
.ai-avatar {
  position: relative;
  width: 86px;
  height: 104px;
  display: grid;
  place-items: end center;
}
.ai-canvas {
  position: absolute;
  inset: -34px -48px auto auto;
  width: 156px;
  height: 156px;
  display: none;
  background: transparent;
  pointer-events: none;
}
.ai-assistant.webgl .ai-canvas { display: block; }
.ai-assistant.webgl .ai-head,
.ai-assistant.webgl .ai-dot { opacity: 0; }
.ai-assistant.webgl .ai-orbit { bottom: 3px; }
.ai-head {
  position: relative;
  width: 74px;
  height: 76px;
  border-radius: 42px 42px 34px 34px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.38), transparent 18%),
    radial-gradient(circle at 70% 68%, rgba(0,0,0,.34), transparent 38%),
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--ai-state) 30%, transparent), transparent 30%),
    linear-gradient(145deg, rgba(129, 138, 222, .98), rgba(48, 55, 120, .96) 62%, rgba(25, 31, 76, .98));
  border: 2px solid color-mix(in srgb, var(--ai-state) 82%, white 8%);
  box-shadow:
    0 0 26px color-mix(in srgb, var(--ai-state) 72%, transparent),
    10px 14px 28px rgba(0,0,0,.34),
    inset 10px 10px 18px rgba(255,255,255,.12),
    inset -16px -18px 22px rgba(0,0,0,.28),
    inset 0 0 22px rgba(0,0,0,.28);
  animation: aiFloat 3.2s ease-in-out infinite;
  transform-style: preserve-3d;
}
.ai-head::before,
.ai-head::after {
  content: "";
  position: absolute;
  top: 42px;
  width: 13px;
  height: 23px;
  border-radius: 14px;
  background: inherit;
  border: 2px solid color-mix(in srgb, var(--ai-state) 75%, white 8%);
  box-shadow: inset -5px -5px 10px rgba(0,0,0,.26), 0 0 14px color-mix(in srgb, var(--ai-state) 45%, transparent);
}
.ai-head::before { left: -10px; }
.ai-head::after { right: -10px; }
.ai-brain {
  position: absolute;
  inset: 13px 13px auto;
  height: 30px;
  opacity: .78;
  border-radius: 50%;
  background:
    radial-gradient(circle at 22% 54%, transparent 0 6px, rgba(22,25,61,.72) 7px 8px, transparent 9px),
    radial-gradient(circle at 50% 42%, transparent 0 7px, rgba(22,25,61,.72) 8px 9px, transparent 10px),
    radial-gradient(circle at 76% 55%, transparent 0 6px, rgba(22,25,61,.72) 7px 8px, transparent 9px),
    linear-gradient(90deg, transparent 8%, rgba(22,25,61,.72) 9% 13%, transparent 14% 22%, rgba(22,25,61,.72) 23% 27%, transparent 28% 40%, rgba(22,25,61,.72) 41% 45%, transparent 46% 60%, rgba(22,25,61,.72) 61% 65%, transparent 66%);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--ai-state) 45%, transparent));
}
.ai-eye {
  position: absolute;
  top: 52px;
  width: 20px;
  height: 5px;
  border-radius: 8px;
  background: rgba(26, 21, 44, .82);
  box-shadow: 0 0 7px color-mix(in srgb, var(--ai-state) 55%, transparent);
  animation: aiBlink 5.2s ease-in-out infinite;
}
.ai-eye.left { left: 15px; }
.ai-eye.right { right: 15px; }
.ai-dot {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ai-state);
  box-shadow: 0 0 18px var(--ai-state), 0 0 34px color-mix(in srgb, var(--ai-state) 70%, transparent);
  animation: aiPulse 1.8s ease-in-out infinite;
}
.ai-orbit {
  position: absolute;
  bottom: 0;
  width: 78px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--ai-state) 78%, transparent), transparent 72%);
  filter: blur(.4px);
  animation: aiOrbit 3.2s ease-in-out infinite;
}
.ai-bubble {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid color-mix(in srgb, var(--ai-state) 62%, #31536b);
  border-radius: 18px;
  color: #f6fbff;
  background: linear-gradient(145deg, rgba(9, 26, 40, .74), rgba(5, 13, 23, .82));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 0 18px color-mix(in srgb, var(--ai-state) 14%, transparent);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ai-bubble strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.ai-spark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 9px;
  transform: rotate(45deg);
  border: 2px solid var(--ai-state);
  background: radial-gradient(circle, var(--ai-state), rgba(255,255,255,.08) 38%, transparent 60%);
  box-shadow: 0 0 18px var(--ai-state);
  animation: aiSpark 2.4s linear infinite;
}
.ai-assistant.thinking .ai-head,
.ai-assistant.learning .ai-head { animation-duration: 1.8s; }
.ai-assistant.thinking .ai-spark,
.ai-assistant.learning .ai-spark { animation-duration: 1.1s; }
.ai-assistant.attention .ai-head { animation: aiAlert 1.05s ease-in-out infinite; }
@keyframes aiFloat {
  0%, 100% { transform: translateY(0) rotateX(5deg) rotateY(-8deg); }
  50% { transform: translateY(-7px) rotateX(8deg) rotateY(8deg); }
}
@keyframes aiOrbit {
  0%, 100% { transform: scaleX(.82); opacity: .48; }
  50% { transform: scaleX(1.08); opacity: .86; }
}
@keyframes aiPulse {
  0%, 100% { transform: translateX(-50%) scale(.82); opacity: .72; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}
@keyframes aiBlink {
  0%, 88%, 100% { transform: scaleY(1); }
  92% { transform: scaleY(.28); }
}
@keyframes aiSpark {
  to { transform: rotate(405deg); }
}
@keyframes aiAlert {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-5px) rotate(-1.5deg); }
  70% { transform: translateY(-2px) rotate(1.5deg); }
}
@keyframes aiAssistantLaunch {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  48% { transform: translateX(-16px) scale(1.03); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
.ai-arrived {
  animation: aiArrival 1.7s ease-out both;
}
@keyframes aiArrival {
  0% { box-shadow: 0 0 0 0 rgba(59, 164, 255, 0); }
  25% { box-shadow: 0 0 0 2px rgba(59, 164, 255, .7), 0 0 28px rgba(59, 164, 255, .28); }
  100% { box-shadow: 0 0 0 0 rgba(59, 164, 255, 0); }
}
.page { display: none; }
.page.active { display: block; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.metric { padding: 22px 24px; }
.metric span { color: #aac0d4; font-weight: 800; text-transform: uppercase; font-size: 13px; }
.metric strong { display: block; font-size: 35px; margin: 10px 0 4px; }
.metric small { color: var(--muted); }
.panel { padding: 18px; margin-bottom: 18px; }
.panel-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-head h2 { margin-bottom: 6px; }
.section-note {
  margin: 0;
  max-width: 860px;
  color: #9fb9d4;
  font-size: 14px;
  line-height: 1.45;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.card {
  border: 1px solid #27485e;
  background: #091925;
  border-radius: 14px;
  padding: 16px;
}
.growth-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
}
.growth-card h3 { margin-bottom: 0; }
.growth-card .product-name {
  color: #d9ecff;
  line-height: 1.35;
}
.growth-card.critical { border-color: rgba(227, 75, 87, .7); box-shadow: inset 0 0 0 1px rgba(227,75,87,.18); }
.growth-card.low { border-color: rgba(255, 133, 0, .72); box-shadow: inset 0 0 0 1px rgba(255,133,0,.16); }
.growth-card.ok { border-color: rgba(46, 231, 131, .45); }
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.growth-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}
.growth-card dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.growth-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}
.growth-card .good-value {
  color: var(--green);
}
.growth-card .bad-value {
  color: #ff8790;
}
.price-action {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 133, 0, .45);
  border-radius: 14px;
  background: rgba(255, 133, 0, .10);
  color: #ffd166;
  font-weight: 800;
}
.growth-card strong {
  color: var(--yellow);
  line-height: 1.35;
}
.region-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #d8ecff;
  font-size: 13px;
}
.region-list b {
  color: #9ecbff;
  margin-right: 2px;
}
.region-list span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(46, 231, 131, .35);
  background: rgba(46, 231, 131, .11);
  color: #baffd9;
  border-radius: 999px;
  padding: 5px 8px;
  font-weight: 800;
}
.region-list.muted span {
  border-color: rgba(255, 133, 0, .36);
  background: rgba(255, 133, 0, .12);
  color: #ffd59c;
}
.table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
  border: 1px solid #244258;
  border-radius: 14px;
}
table { width: 100%; border-collapse: collapse; min-width: 980px; }
#adsTable { overflow-x: hidden; }
#adsTable table {
  min-width: 0;
  table-layout: fixed;
}
#adsTable th,
#adsTable td {
  padding: 10px 8px;
  font-size: 13px;
  line-height: 1.3;
}
#adsTable th { white-space: normal; }
#adsTable th:nth-child(1),
#adsTable td:nth-child(1) { width: 9%; }
#adsTable th:nth-child(2),
#adsTable td:nth-child(2) { width: 15%; }
#adsTable th:nth-child(3),
#adsTable td:nth-child(3) { width: 8%; }
#adsTable th:nth-child(4),
#adsTable td:nth-child(4) { width: 10%; }
#adsTable th:nth-child(5),
#adsTable td:nth-child(5) { width: 18%; }
#adsTable th:nth-child(6),
#adsTable td:nth-child(6) { width: 16%; }
#adsTable th:nth-child(7),
#adsTable td:nth-child(7) { width: 17%; }
#adsTable th:nth-child(8),
#adsTable td:nth-child(8) { width: 7%; }
th, td {
  padding: 12px 13px;
  border-bottom: 1px solid #244258;
  border-right: 1px solid #1d3547;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #163047;
  color: #d8e8f5;
  white-space: nowrap;
}
tr:nth-child(even) td { background: rgba(255,255,255,.025); }
tr.ok td { background: rgba(46, 231, 131, .06); }
tr.low td { background: rgba(255, 209, 102, .10); }
tr.critical td { background: rgba(255, 133, 0, .14); }
tr.out td { background: rgba(227, 75, 87, .15); }
tr.over td { background: rgba(59, 164, 255, .12); }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 13px;
}
.pill.ok { background: rgba(46,231,131,.16); color: var(--green); }
.pill.low { background: rgba(255,209,102,.18); color: var(--yellow); }
.pill.critical { background: rgba(255,133,0,.18); color: var(--orange); }
.pill.out { background: rgba(227,75,87,.18); color: #ff8790; }
.toggle-btn {
  border: 1px solid rgba(94, 145, 178, .32);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, rgba(18, 48, 72, .86), rgba(9, 27, 42, .94));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(58px, auto) 18px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  width: 100%;
  text-align: left;
  line-height: 1.2;
  overflow: hidden;
}
.toggle-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.toggle-state {
  min-width: 54px;
  max-width: 132px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255,255,255,.11);
  font-size: 12px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toggle-btn.on {
  color: #b7ffd4;
  border-color: rgba(46,231,131,.45);
  background: linear-gradient(180deg, rgba(23, 88, 56, .72), rgba(9, 48, 34, .86));
}
.toggle-btn.off {
  color: #ffb7bd;
  border-color: rgba(227,75,87,.45);
  background: linear-gradient(180deg, rgba(94, 31, 43, .72), rgba(45, 16, 25, .88));
}
.toggle-btn.saving,
.toggle-btn.error {
  color: #ffe1a3;
  border-color: rgba(255,133,0,.55);
  background: linear-gradient(180deg, rgba(109, 72, 19, .74), rgba(55, 36, 14, .88));
}
.toggle-btn.locked,
.toggle-btn:disabled {
  color: #b8dcff;
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(23, 73, 115, .62), rgba(11, 33, 55, .88));
  border-color: rgba(59,164,255,.40);
}
.toggle-btn.info {
  color: #d3ebff;
}
.toggle-btn.setting {
  color: #d3ebff;
  cursor: pointer;
  background: rgba(59,164,255,.16);
  border-color: rgba(59,164,255,.42);
}
.toggle-btn.setting:hover {
  border-color: rgba(120,200,255,.78);
  background: rgba(59,164,255,.24);
}
.toggle-btn.wide {
  grid-column: span 2;
  border-radius: 10px;
}
.toggle-btn.wide .toggle-state {
  max-width: none;
  white-space: normal;
  text-transform: none;
  line-height: 1.25;
}
.toggle-btn.table-toggle {
  min-width: 210px;
  min-height: 44px;
  padding: 8px 10px;
}
.toggle-btn.table-toggle .toggle-state {
  max-width: 120px;
  text-transform: none;
}
.toggle-help {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
  color: #d7ebff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}
.toggle-btn[title] .toggle-help {
  pointer-events: none;
}
.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.text-box, .strategy-text {
  border: 1px solid #244258;
  border-radius: 14px;
  padding: 18px;
  background: #081722;
  min-height: 180px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.strategy-text { white-space: normal; min-height: 0; padding: 0; border: 0; background: transparent; }
.risk-impact { margin: 14px 0 18px; padding: 16px; border: 1px solid rgba(100, 152, 191, .3); border-radius: 10px; background: rgba(7, 27, 43, .48); }
.risk-impact-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.risk-impact-head span { color: #ffce78; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.risk-impact-head h3 { margin: 3px 0 0; color: #fff; font-size: 17px; }
.risk-impact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.risk-impact-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(94, 144, 181, .28); border-left: 4px solid #42a7ff; border-radius: 8px; background: rgba(2, 13, 23, .46); }
.risk-impact-card.out { border-left-color: #ff697f; }
.risk-impact-card.critical { border-left-color: #ffad3f; }
.risk-impact-card strong { display: block; margin-top: 9px; color: #fff; line-height: 1.35; }
.risk-impact-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.risk-impact-card dt { color: #94b9d8; font-size: 11px; text-transform: uppercase; }
.risk-impact-card dd { margin: 3px 0 0; color: #eaf5ff; font-weight: 800; }
.risk-impact-card p { margin: 0; color: #b9d5ee; font-size: 13px; line-height: 1.42; }
.risk-impact-empty { margin: 14px 0; padding: 14px; border: 1px dashed rgba(94, 144, 181, .34); border-radius: 8px; color: #a9c7e3; }
.strategy-briefing {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(85, 145, 188, .34);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(14, 47, 71, .78), rgba(6, 21, 33, .82));
}
.brief-lead, .brief-section-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.brief-eyebrow { color: #40e89a; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.brief-lead h3 { margin: 5px 0 8px; color: #fff; font-size: 22px; }
.brief-lead p { max-width: 810px; margin: 0; color: #aac9e5; line-height: 1.5; }
.brief-plan-button { white-space: nowrap; }
.brief-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.brief-metric { min-height: 86px; padding: 14px; border: 1px solid rgba(99, 153, 194, .28); border-radius: 9px; background: rgba(3, 14, 24, .38); }
.brief-metric span, .brief-metric small { display: block; color: #9bbddb; font-size: 12px; }
.brief-metric strong { display: block; margin: 7px 0 3px; color: #fff; font-size: 21px; }
.brief-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .85fr); gap: 16px; }
.brief-section-head { align-items: center; margin-bottom: 10px; }
.brief-section-head h3, .brief-risks h3 { margin: 0; color: #fff; font-size: 16px; }
.brief-actions { display: grid; gap: 8px; }
.brief-action { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; padding: 12px; border: 1px solid rgba(84, 137, 177, .27); border-radius: 8px; background: rgba(4, 18, 29, .48); }
.brief-action.primary { border-color: rgba(40, 223, 137, .42); background: rgba(19, 97, 70, .18); }
.brief-action > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(66, 167, 255, .16); color: #a4d5ff; font-weight: 900; }
.brief-action.primary > span { background: rgba(40, 223, 137, .18); color: #55f3aa; }
.brief-action p { margin: 3px 0 0; color: #e8f4ff; line-height: 1.42; }
.brief-risks { padding: 14px; border: 1px solid rgba(255, 173, 63, .32); border-radius: 9px; background: rgba(99, 58, 9, .12); }
.brief-risks p { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid #ffad3f; color: #f4d8a1; font-size: 13px; line-height: 1.42; }
.brief-empty { padding: 16px; color: #9bbddb; border: 1px dashed rgba(99, 153, 194, .35); border-radius: 8px; }
.settings-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#repricerMode {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}
#adsSettings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.ads-goal-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(95, 141, 170, .28);
  background: rgba(3, 12, 18, .28);
  border-radius: 8px;
}
.ads-goal-row .toggle-btn {
  min-height: 54px;
}
.ads-goal-row .goal-active {
  box-shadow: inset 0 0 0 1px rgba(46, 231, 131, .35), 0 10px 22px rgba(46,231,131,.10);
}
.ads-smart-sliders {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(95, 141, 170, .28);
  border-radius: 8px;
  background: rgba(3, 12, 18, .25);
}
.smart-slider {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 48, 72, .76), rgba(8, 25, 39, .92));
}
.smart-slider-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #d9ebff;
  font-weight: 900;
}
.smart-slider-head strong {
  min-width: 74px;
  padding: 4px 8px;
  border-radius: 7px;
  text-align: center;
  color: var(--green);
  background: rgba(46,231,131,.12);
}
.smart-slider input[type="range"] {
  width: 100%;
  margin: 12px 0 8px;
  padding: 0;
  accent-color: var(--green);
}
.smart-slider small {
  display: block;
  color: #90aec8;
  line-height: 1.35;
  min-height: 34px;
}
#adsSettings .pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}
#adsSettings .ads-note {
  grid-column: 1 / -1;
  justify-content: center;
  text-align: center;
}
.decision-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.decision-facts span {
  border: 1px solid rgba(125,190,255,.28);
  border-radius: 999px;
  padding: 4px 8px;
  color: #b9ddff;
  background: rgba(59,164,255,.09);
  font-size: 12px;
  font-weight: 800;
}
.action-log-grid {
  display: grid;
  gap: 12px;
}
.action-card {
  border: 1px solid rgba(95, 141, 170, .34);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(18, 45, 68, .88), rgba(6, 18, 29, .96)),
    radial-gradient(circle at 0 0, rgba(59,164,255,.12), transparent 34%);
  box-shadow: 0 14px 32px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.04);
}
.action-card.ok { border-left-color: var(--green); }
.action-card.warn { border-left-color: var(--orange); }
.action-card.bad { border-left-color: var(--red); }
.action-card.info { border-left-color: var(--blue); }
.action-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.action-card h3 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}
.action-time {
  color: #94b6d4;
  font-size: 12px;
  font-weight: 800;
}
.action-status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.action-status.ok { color: var(--green); background: rgba(46,231,131,.14); }
.action-status.warn { color: var(--yellow); background: rgba(255,209,102,.14); }
.action-status.bad { color: #ff8790; background: rgba(227,75,87,.16); }
.action-status.info { color: #9fd0ff; background: rgba(59,164,255,.14); }
.action-main {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr);
  gap: 10px;
  margin-top: 12px;
}
.action-main > div {
  border: 1px solid rgba(125,190,255,.20);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(2, 15, 25, .50);
}
.action-main span {
  display: block;
  margin-bottom: 5px;
  color: #8fb1cf;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.action-main strong {
  display: block;
  color: #f8fbff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.action-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.action-facts span {
  border: 1px solid rgba(125,190,255,.26);
  border-radius: 999px;
  padding: 5px 8px;
  color: #bfe1ff;
  background: rgba(59,164,255,.08);
  font-size: 12px;
  font-weight: 800;
}
.action-reason {
  margin-top: 10px;
  color: #c7dff5;
  line-height: 1.45;
}
.action-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(125,190,255,.16);
  color: #91b4d2;
  font-size: 12px;
}
.action-card-foot code {
  max-width: 55%;
  color: #8db2d2;
  overflow-wrap: anywhere;
  text-align: right;
}
.ai-hub {
  display: grid;
  gap: 16px;
}
.ai-hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(8, 31, 51, .96), rgba(4, 13, 22, .98));
}
.ai-hub-hero h2 {
  margin: 8px 0 10px;
  font-size: 24px;
}
.ai-hub-hero p {
  max-width: 820px;
  line-height: 1.45;
}
.ai-hub-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ai-hub-metrics article,
.ai-hub-section {
  border: 1px solid rgba(95, 141, 170, .30);
  border-radius: 12px;
  background: rgba(255,255,255,.028);
}
.ai-hub-metrics article {
  padding: 13px;
}
.ai-hub-metrics span {
  display: block;
  color: #9fc5e8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.ai-hub-metrics strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 22px;
}
.ai-hub-section {
  padding: 14px;
}
.marketing-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.marketing-question-row input {
  min-width: 0;
  height: 44px;
}
.marketing-answer-slot {
  margin-top: 12px;
}
.marketing-answer-card {
  border: 1px solid rgba(63, 224, 146, .32);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 14px;
  background: rgba(6, 28, 42, .82);
}
.marketing-answer-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.marketing-answer-card p {
  margin: 10px 0;
  line-height: 1.5;
}
.marketing-answer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.marketing-answer-facts span {
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 8px;
  color: #afd2ee;
  font-size: 12px;
}
.marketing-answer-facts b {
  color: #fff;
}
.marketing-answer-steps {
  margin-top: 12px;
  color: #bdd8ed;
}
.marketing-answer-steps ul {
  margin: 7px 0 0;
  padding-left: 19px;
  line-height: 1.45;
}
.marketing-decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.marketing-decision-card {
  border: 1px solid rgba(95, 141, 170, .30);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(145deg, rgba(9, 32, 50, .92), rgba(4, 13, 22, .98));
}
.marketing-decision-card h3 {
  margin: 6px 0 10px;
  font-size: 18px;
  line-height: 1.25;
}
.marketing-decision-card p {
  margin: 8px 0;
  color: #d8e8f5;
}
.marketing-action-text {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(46, 231, 131, .09);
  color: #baffd9;
  font-weight: 800;
}
.marketing-actions .action-card {
  box-shadow: none;
}
.modern-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.modern-summary div {
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(18, 45, 68, .88), rgba(6, 18, 29, .96));
}
.modern-summary span {
  display: block;
  color: #94b6d4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.modern-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: #f8fbff;
}
.modern-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.modern-item-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(95, 141, 170, .34);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(18, 45, 68, .88), rgba(6, 18, 29, .96));
  min-height: 128px;
}
.modern-item-card.low { border-left-color: var(--yellow); }
.modern-item-card.critical { border-left-color: var(--orange); }
.modern-item-card.out { border-left-color: var(--red); }
.modern-item-card.over { border-left-color: var(--blue); }
.modern-item-media {
  width: 78px;
  height: 104px;
  border: 1px solid rgba(125,190,255,.24);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(2, 15, 25, .55);
  color: #9fd0ff;
  font-weight: 900;
  text-align: center;
}
.modern-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.modern-stock-icon {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 54px;
}
.modern-item-body {
  min-width: 0;
}
.modern-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #9fd0ff;
  font-size: 12px;
  font-weight: 900;
}
.modern-item-top > span,
.modern-item-top > b {
  overflow-wrap: anywhere;
}
.modern-item-card h3 {
  margin: 8px 0 10px;
  font-size: 17px;
  line-height: 1.25;
  color: #f8fbff;
}
.modern-item-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modern-item-metrics span {
  border: 1px solid rgba(125,190,255,.22);
  border-radius: 999px;
  padding: 5px 8px;
  color: #a9cbe8;
  background: rgba(59,164,255,.08);
  font-size: 12px;
}
.modern-item-metrics b {
  color: #fff;
}
.modern-table-detail {
  margin-top: 12px;
}
.keyword-section-title {
  margin: 2px 0 10px;
  color: #d9ebff;
  font-size: 18px;
  font-weight: 900;
}
.keyword-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.keyword-card {
  border: 1px solid rgba(95, 141, 170, .34);
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(18, 45, 68, .88), rgba(6, 18, 29, .96)),
    radial-gradient(circle at 0 0, rgba(59,164,255,.10), transparent 34%);
  min-height: 168px;
}
.keyword-card.ok { border-left-color: var(--green); }
.keyword-card.out { border-left-color: var(--red); }
.keyword-card.low { border-left-color: var(--yellow); }
.keyword-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #93b6d3;
  font-size: 12px;
  font-weight: 900;
}
.keyword-card h3 {
  margin: 12px 0 8px;
  color: #f8fbff;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.keyword-card p {
  min-height: 22px;
  margin-bottom: 12px;
  color: #9fc5e8;
  overflow-wrap: anywhere;
}
.insight-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.insight-strip span {
  border: 1px solid rgba(255, 133, 0, .35);
  background: rgba(255, 133, 0, .09);
  color: #ffd8a8;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 800;
  font-size: 13px;
}
.mini-card {
  border: 1px solid #244258;
  background: rgba(13, 31, 45, .82);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.mini-card strong {
  color: #fff;
  line-height: 1.3;
}
.mini-card p {
  color: #b8d4ee;
  margin: 0;
  line-height: 1.4;
}
.seo-report {
  display: grid;
  gap: 14px;
  white-space: normal;
}
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.seo-hero {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 14px;
  align-items: stretch;
}
.seo-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid #244258;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(6, 17, 26, .98));
  overflow: hidden;
}
.seo-preview img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #fff;
}
.image-empty {
  color: #9fb9d4;
  font-weight: 800;
}
.seo-card {
  border: 1px solid #244258;
  background: linear-gradient(145deg, rgba(13, 31, 45, .95), rgba(6, 17, 26, .98));
  border-radius: 14px;
  padding: 16px;
}
.seo-card.accent { border-color: rgba(46, 231, 131, .5); }
.seo-card.danger-zone {
  border-color: rgba(227, 75, 87, .7);
  background: linear-gradient(145deg, rgba(54, 14, 20, .72), rgba(12, 20, 28, .98));
}
.seo-card.visual-zone {
  border-color: rgba(63, 159, 255, .55);
  background: linear-gradient(145deg, rgba(12, 38, 66, .72), rgba(6, 17, 26, .98));
}
.seo-card h3 { margin-bottom: 10px; }
.seo-card p, .seo-card li { color: #d8e8f5; line-height: 1.45; }
.seo-card ul { margin: 0; padding-left: 20px; }
.seo-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.seo-freshness {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.seo-freshness span {
  border: 1px solid rgba(255, 124, 0, .35);
  background: rgba(255, 124, 0, .1);
  color: #ffd59c;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}
.term-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.term-list span {
  border: 1px solid rgba(46, 231, 131, .35);
  background: rgba(46, 231, 131, .1);
  color: #baffd9;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
}
.danger-zone .term-list span {
  border-color: rgba(227, 75, 87, .55);
  background: rgba(227, 75, 87, .18);
  color: #ffb3ba;
}
.copy-box {
  border: 1px solid #31536b;
  border-radius: 12px;
  background: #06131d;
  padding: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.copy-box.description { min-height: 180px; }
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.toolbar select {
  width: min(240px, 100%);
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(200px, 320px) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.account-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px);
  gap: 16px;
  margin-top: 18px;
}
.account-main, .password-box, .setup-card, .help-grid article {
  border: 1px solid rgba(95, 141, 170, .38);
  border-radius: 14px;
  background: rgba(8, 23, 34, .72);
  padding: 18px;
}
.account-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.account-main strong {
  display: block;
  margin: 7px 0 8px;
  font-size: 22px;
}
.mini-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.password-box small, .setup-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}
.setup-grid, .help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.help-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}
.setup-card strong, .help-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}
.setup-card .primary {
  width: 100%;
  margin-top: 14px;
}
.watch-list {
  display: grid;
  gap: 14px;
}
.watch-card {
  border: 1px solid rgba(95, 141, 170, .38);
  border-radius: 14px;
  background: rgba(8, 23, 34, .72);
  padding: 18px;
}
.watch-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
}
.watch-card a {
  color: #9fd0ff;
}
.service-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .45);
  border-radius: 12px;
  background: rgba(255, 209, 102, .1);
  color: #ffe3a1;
}
.service-alert.bad {
  border-color: rgba(227, 75, 87, .5);
  background: rgba(227, 75, 87, .12);
  color: #ffb3ba;
}
.repricer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.repricer-kpi-grid article {
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 12px;
  min-width: 0;
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(14, 36, 55, .95), rgba(5, 15, 24, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.repricer-kpi-grid span {
  display: block;
  color: #9fc5e8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.repricer-kpi-grid strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.repricer-kpi-grid small {
  display: block;
  margin-top: 6px;
  color: #9fc5e8;
  font-size: 13px;
}
.repricer-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(250px, 1fr) minmax(270px, 1.08fr);
  gap: 12px;
  margin-bottom: 14px;
}
.repricer-panel {
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 12px;
  min-width: 0;
  padding: 13px;
  background: linear-gradient(145deg, rgba(10, 31, 48, .92), rgba(5, 15, 24, .98));
}
.repricer-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.repricer-settings-list {
  display: grid;
  border: 1px solid rgba(95, 141, 170, .24);
  border-radius: 10px;
  overflow: hidden;
}
.repricer-settings-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  background: rgba(255,255,255,.025);
  color: #d9ecff;
  text-align: left;
  cursor: pointer;
}
.repricer-settings-list button + button {
  border-top: 1px solid rgba(95, 141, 170, .18);
}
.repricer-settings-list button:hover {
  background: rgba(59, 164, 255, .08);
}
.repricer-settings-list strong {
  color: var(--green);
  font-weight: 900;
}
.repricer-settings-list em {
  display: grid;
  place-items: center;
  color: #9fc5e8;
}
.repricer-settings-list em svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.repricer-mode-list {
  display: grid;
  gap: 8px;
}
.repricer-mode-list button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(95, 141, 170, .28);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.repricer-mode-list button span {
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #8db3d4;
}
.repricer-mode-list button.active {
  border-color: var(--blue);
  background: rgba(28, 113, 255, .16);
}
.repricer-mode-list button.active span {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 5px var(--blue);
}
.repricer-mode-list button:disabled {
  cursor: not-allowed;
  opacity: .7;
}
.repricer-mode-list small {
  color: #9fc5e8;
}
.repricer-advice-list {
  display: grid;
  gap: 8px;
}
.repricer-advice-list article {
  border: 1px solid rgba(95, 141, 170, .25);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.035);
}
.repricer-advice-list article.ok { border-left-color: var(--green); }
.repricer-advice-list article.warn { border-left-color: var(--orange); }
.repricer-advice-list b {
  display: block;
  color: #fff;
}
.repricer-advice-list span {
  color: #9fc5e8;
}
.repricer-contour {
  border: 1px solid rgba(95, 141, 170, .34);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, rgba(10, 31, 48, .92), rgba(5, 15, 24, .98));
  width: 100%;
}
.repricer-contour-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}
.repricer-contour-head h3 {
  margin: 0;
}
.repricer-contour-head span {
  color: #b8d7f0;
}
.repricer-contour-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: stretch;
}
.repricer-contour-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.repricer-contour-side article {
  border: 1px solid rgba(95, 141, 170, .26);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.035);
}
.repricer-contour-side span {
  display: block;
  color: #9fc5e8;
  font-size: 12px;
  font-weight: 800;
}
.repricer-contour-side b {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 18px;
}
.price-line {
  position: relative;
  height: 8px;
  margin: 30px 12px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--orange), var(--red));
}
.price-line .mark {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
}
.price-line .target { background: var(--green); }
.price-line .competitor { background: var(--orange); }
.price-line .current {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(59, 164, 255, .24);
}
.price-line-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  color: #9fc5e8;
}
.price-line-labels span {
  display: grid;
  gap: 3px;
}
.price-line-labels b {
  color: #fff;
}
.repricer-row-action {
  min-width: 118px;
  border: 1px solid rgba(95, 141, 170, .36);
  border-radius: 9px;
  padding: 9px 12px;
  background: rgba(255,255,255,.045);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}
.repricer-finance-source {
  display: block;
  margin-top: 6px;
  max-width: 170px;
  color: #9fc5e8;
  font-size: 12px;
  line-height: 1.3;
}
.repricer-row-action.up {
  border-color: rgba(59, 164, 255, .5);
  color: #9fd0ff;
  background: rgba(59, 164, 255, .1);
}
.repricer-row-action.warn {
  border-color: rgba(255, 133, 0, .55);
  color: #ffd8a8;
  background: rgba(255, 133, 0, .1);
}
.repricer-row-action.hold {
  color: #c8d8e6;
}
.repricer-row-action:disabled {
  cursor: default;
  opacity: .92;
}
.search-watch-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 1fr) 150px 130px auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0 16px;
}
.search-watch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.search-watch-summary article,
.search-watch-card {
  border: 1px solid rgba(95, 141, 170, .32);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(13, 42, 62, .72), rgba(5, 22, 35, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.search-watch-summary article {
  padding: 13px 14px;
}
.search-watch-summary span,
.search-watch-facts span,
.search-watch-neighbor small {
  color: #9fc5e8;
}
.search-watch-summary strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 26px;
}
.search-watch-list {
  display: grid;
  gap: 14px;
}
.search-watch-card {
  padding: 16px;
}
.search-watch-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}
.search-watch-card h3 {
  margin: 5px 0 6px;
  font-size: 24px;
}
.search-watch-card p {
  margin: 0;
  color: #b7d5f0;
}
.search-watch-rank {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 110px;
}
.search-watch-rank > span:first-child {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}
.search-watch-status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(59, 164, 255, .12);
  color: #9fd0ff;
}
.search-watch-status.ok { background: rgba(35, 221, 125, .13); color: #32f28a; }
.search-watch-status.warn { background: rgba(255, 133, 0, .14); color: #ffd16d; }
.search-watch-status.bad { background: rgba(255, 77, 109, .16); color: #ff91a5; }
.search-watch-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin: 13px 0;
}
.search-watch-facts strong {
  color: #fff;
}
.search-watch-facts .bad {
  color: #ff91a5;
}
.search-watch-strategy {
  margin: 12px 0;
  padding: 11px 13px;
  border-left: 3px solid #37d98d;
  border-radius: 0 8px 8px 0;
  background: rgba(28, 177, 112, .08);
  color: #c8e8d8;
  line-height: 1.45;
}
.search-watch-strategy strong { color: #fff; }
.search-watch-strategy.pending {
  border-left-color: #4ba8ff;
  background: rgba(75, 168, 255, .08);
  color: #b8d7f5;
}
.search-watch-insight {
  margin: 12px 0;
  padding: 12px 13px;
  border: 1px solid rgba(89, 145, 187, .32);
  border-left: 3px solid #6fa8d8;
  background: rgba(6, 25, 39, .52);
}
.search-watch-insight.growth { border-left-color: #31da87; }
.search-watch-insight.risk { border-left-color: #ffad43; }
.search-watch-insight.explore { border-left-color: #4ba8ff; }
.search-watch-insight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
}
.search-watch-insight-head span { color: #9fc5e8; font-size: 12px; }
.search-watch-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.search-watch-metrics span {
  display: grid;
  gap: 3px;
  color: #9fc5e8;
  font-size: 12px;
}
.search-watch-metrics strong { color: #fff; font-size: 15px; }
.search-watch-source-note {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 173, 67, .38);
  background: rgba(255, 173, 67, .08);
  color: #ffd28a;
  line-height: 1.4;
}
.search-watch-neighbors {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.search-watch-neighbor {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(95, 141, 170, .25);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.035);
}
.search-watch-neighbor.own {
  border-color: rgba(35, 221, 125, .55);
  background: rgba(35, 221, 125, .08);
}
.search-watch-neighbor strong {
  display: block;
  color: #fff;
}
.neighbor-pos {
  color: #9fd0ff;
  font-weight: 900;
}
.search-watch-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 13px;
}
.search-watch-seed {
  margin: 10px 0 14px;
}
.search-watch-seed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.search-watch-seed-list span {
  border: 1px solid rgba(59, 164, 255, .35);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(59, 164, 255, .08);
  color: #cfe9ff;
  font-size: 13px;
  font-weight: 800;
}
.empty-state.compact {
  padding: 12px;
}
.journal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.journal-metric {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(95, 141, 170, .32);
  border-radius: 10px;
  background: rgba(7, 25, 39, .72);
}
.journal-metric span {
  display: block;
  color: #9fc2e4;
  font-size: 13px;
  font-weight: 800;
}
.journal-metric strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
.journal-metric.ok { border-left: 4px solid #28df89; }
.journal-metric.warn { border-left: 4px solid #ffad3f; }
.journal-metric.info { border-left: 4px solid #42a7ff; }
.journal-metric.done { border-left: 4px solid #9b7cff; }
.experiment-journal {
  display: grid;
  gap: 14px;
}
.experiment-card {
  padding: 18px;
  border: 1px solid rgba(95, 141, 170, .32);
  border-left: 4px solid #42a7ff;
  border-radius: 10px;
  background: linear-gradient(105deg, rgba(16, 48, 70, .94), rgba(6, 22, 35, .86));
}
.experiment-card.ok { border-left-color: #28df89; }
.experiment-card.warn { border-left-color: #ffad3f; }
.experiment-card.bad { border-left-color: #ff697f; }
.experiment-card.done { border-left-color: #9b7cff; }
.experiment-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.experiment-head h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 19px;
}
.experiment-product {
  margin: 14px 0;
  color: #ddecff;
  font-weight: 800;
}
.experiment-flow {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(2, 12, 20, .34);
}
.experiment-flow span {
  color: #80bdf0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.experiment-flow p {
  margin: 0;
  color: #e6f2ff;
  line-height: 1.45;
}
.experiment-result {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(95, 141, 170, .24);
  color: #b8d6f3;
}
.experiment-result strong { color: #fff; }
.experiment-result.ok strong { color: #42f09c; }
.experiment-result.warn strong { color: #ffd36e; }
.experiment-result.done strong { color: #c0aeff; }
@media (max-width: 1000px) {
  .app { display: block; }
  .sidebar { height: auto; position: static; padding: 18px; }
  .seo-hero { grid-template-columns: 1fr; }
  .server-mini { position: static; margin-top: 16px; }
  nav { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 22px 16px 80px; }
  .topbar { display: block; }
  .top-actions { justify-content: flex-start; margin-top: 14px; }
  .ai-assistant {
    right: 12px;
    bottom: 12px;
    grid-template-columns: 58px minmax(140px, 220px);
    gap: 6px;
  }
  .ai-avatar { width: 58px; height: 72px; }
  .ai-canvas { inset: -24px -38px auto auto; width: 112px; height: 112px; }
  .ai-head { width: 50px; height: 52px; border-radius: 29px 29px 22px 22px; }
  .ai-head::before,
  .ai-head::after { top: 29px; width: 9px; height: 15px; }
  .ai-head::before { left: -7px; }
  .ai-head::after { right: -7px; }
  .ai-brain { inset: 8px 9px auto; height: 22px; }
  .ai-eye { top: 35px; width: 13px; height: 4px; }
  .ai-eye.left { left: 10px; }
  .ai-eye.right { right: 10px; }
  .ai-dot { width: 10px; height: 10px; }
  .ai-orbit { width: 54px; height: 9px; }
  .ai-bubble {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .ai-bubble strong { font-size: 12px; }
  .ai-spark { width: 18px; height: 18px; flex-basis: 18px; border-radius: 7px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .account-card, .setup-grid, .help-grid { grid-template-columns: 1fr; }
  .ai-hub-hero { grid-template-columns: 1fr; }
  .ai-hub-metrics { grid-template-columns: 1fr; }
  .repricer-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repricer-dashboard-grid { grid-template-columns: 1fr; }
  .repricer-contour-body { grid-template-columns: 1fr; }
  .price-line-labels { grid-template-columns: repeat(2, 1fr); }
  .search-watch-form { grid-template-columns: 1fr; }
  .search-watch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-watch-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-body { grid-template-columns: 1fr; }
  .risk-impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-main { grid-template-columns: 1fr; }
  .action-card-foot { display: block; }
  .action-card-foot code {
    display: block;
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }
}
@media (max-width: 560px) {
  .metric-grid { grid-template-columns: 1fr; }
  .brand img { width: 64px; }
  .topbar h1 { font-size: 28px; }
  nav { grid-template-columns: 1fr; }
  .toggle-btn { grid-template-columns: minmax(0, 1fr) auto; }
  .toggle-help { display: none; }
  .action-card-head { grid-template-columns: 1fr; }
  .repricer-kpi-grid { grid-template-columns: 1fr; }
  .price-line-labels { grid-template-columns: 1fr; }
  .search-watch-summary { grid-template-columns: 1fr; }
  .search-watch-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-summary { grid-template-columns: 1fr; }
  .brief-lead { display: block; }
  .brief-plan-button { width: 100%; margin-top: 14px; }
  .brief-metrics { grid-template-columns: 1fr; }
  .risk-impact-head { display: block; }
  .risk-impact-head .compact { width: 100%; margin-top: 12px; }
  .risk-impact-grid { grid-template-columns: 1fr; }
  .experiment-head, .experiment-result { display: block; }
  .experiment-head .action-status { display: inline-flex; margin-top: 10px; }
  .experiment-result span { display: block; margin-top: 6px; }
  .experiment-flow { grid-template-columns: 1fr; gap: 4px; }
  .search-watch-card-head,
  .search-watch-neighbor { grid-template-columns: 1fr; }
  .search-watch-rank { justify-items: start; }
  .search-watch-insight-head { display: grid; }
}
