:root {
  --bg-1: #0b1020;
  --bg-2: #141a2f;
  --panel: rgba(17, 23, 40, 0.82);
  --text: #e8ecf6;
  --muted: #a6b0cb;
  --border: rgba(255, 255, 255, 0.12);
  --primary: #5ca7ff;
  --primary-soft: rgba(92, 167, 255, 0.24);
  --ok: #3ddc84;
  --warn: #ffd166;
  --bad: #ff6b6b;
  --space: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); font-family: Inter, system-ui, sans-serif; background: linear-gradient(160deg, var(--bg-1), var(--bg-2)); min-height: 100vh; }
.bg { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 10% 10%, rgba(92,167,255,.2), transparent 30%), radial-gradient(circle at 90% 20%, rgba(140,89,255,.12), transparent 26%); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: rgba(11,16,32,.84); backdrop-filter: blur(8px); overflow-x: auto; scrollbar-width: thin; }
.topnav { display: inline-flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; min-width: max-content; }
body.has-status-strip .topbar { top: 34px; }
.brand { font-weight: 700; }
.topnav a { color: var(--muted); text-decoration: none; margin-left: 12px; padding: 8px 10px; border-radius: 8px; }
.topnav a.active,.topnav a:hover { color: var(--text); background: rgba(255,255,255,.08); }
.container { max-width: min(1900px, 98vw); margin: 24px auto; padding: 0 12px 26px; position: relative; }
.status-strip {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 13, 24, 0.95);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12px;
}
.status-strip-group { display: inline-flex; align-items: center; gap: 6px; }
.status-strip-sep { color: rgba(255,255,255,.2); }
.status-strip-label { color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
}
.status-pill.ok { color: var(--ok); border-color: rgba(61, 220, 132, .45); background: rgba(61, 220, 132, .12); }
.status-pill.warn { color: var(--warn); border-color: rgba(255, 209, 102, .45); background: rgba(255, 209, 102, .12); }
.status-pill.bad { color: var(--bad); border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .14); }
.status-pill.neutral { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: var(--space); margin-bottom: var(--space); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.toolbar, .toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.form-intro {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.edit-grid {
  grid-template-columns: repeat(2, minmax(250px, 1fr));
}
.field-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px;
}
.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.checkbox-card {
  justify-content: center;
}
.validation-message {
  display: none;
  margin: 0 0 10px;
  color: #ffb4b4;
  border: 1px solid rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .08);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}
.validation-message.show { display: block; }
.products-toolbar .input { min-width: 170px; }
.import-status {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.scheduler-problem-wrap {
  margin: 0 0 12px;
}

.scheduler-problem-details {
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
}
.scheduler-problem-details.is-resolved {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 193, 7, 0.1);
  margin-top: 8px;
}

.scheduler-problem-summary {
  cursor: pointer;
  font-weight: 700;
  color: #ff9ea2;
}
.scheduler-problem-details.is-resolved .scheduler-problem-summary {
  color: #ffe39a;
}

.scheduler-problem-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #ffd6d8;
  font-size: 13px;
}

.scheduler-problem-list li + li {
  margin-top: 8px;
}
.import-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.import-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.import-progress-wrap {
  margin-top: 10px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
}
.import-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ccf75, #5ca7ff);
  transition: width .25s ease;
}
.btn,.input,select {
  height: 38px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}
.btn { cursor: pointer; }
.btn-small { height: 28px; min-width: 28px; padding: 0 8px; }
.input { min-width: 280px; }

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232, 236, 246, 0.95) 50%),
    linear-gradient(135deg, rgba(232, 236, 246, 0.95) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 1px),
    calc(100% - 11px) calc(50% - 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select option {
  background: #16233f;
  color: #f3f7ff;
}

select option:disabled {
  color: #8391b4;
  background: #111a31;
}

select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.table-wrap { overflow-y: auto; overflow-x: hidden; max-height: 68vh; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; }
thead th { position: sticky; top: 0; z-index: 5; background: #111934; border-bottom: 1px solid var(--border); text-align: left; padding: 9px 8px; white-space: normal; }
tbody td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:nth-child(odd) td { background: rgba(255,255,255,.015); }
tbody tr:hover td { background: rgba(92,167,255,.12); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.product-title-cell {
  min-width: 0;
}

.product-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.product-title-scroll {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.product-title-meta {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.products-table col.expand-col { width: 44px; }
.products-table col.product-col { width: 30%; }
.products-table col.repricing-col { width: 72px; }
.products-table col.status-col { width: 16%; }
.products-table col.price-col { width: 19%; }
.products-table col.position-col { width: 16%; }
.products-table col.action-col { width: 11%; }
.products-table col.signal-col { width: 48px; }

.products-table td {
  word-break: break-word;
}

.repricing-state-cell {
  text-align: center;
  font-size: 18px;
  white-space: nowrap;
}

.inline-price-editor {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(64px, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.inline-price-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}

.inline-price-input {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 16, 35, 0.65);
  color: var(--text);
  padding: 6px 8px;
  font-size: 12px;
}

.inline-price-save {
  min-height: 30px;
  align-self: end;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .products-table col.product-col { width: 29%; }
  .products-table col.repricing-col { width: 64px; }
  .products-table col.status-col { width: 16%; }
  .products-table col.price-col { width: 22%; }
  .products-table col.position-col { width: 16%; }
  .products-table col.action-col { width: 11%; }
  .products-table col.signal-col { width: 48px; }
}

@media (max-width: 1080px) {
  .inline-price-editor {
    grid-template-columns: 1fr 1fr;
  }
  .inline-price-save {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.product-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
}
.product-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.product-thumb.large {
  width: 120px;
  height: 120px;
}
.badge { border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.badge.ok { color: var(--ok); }
.badge.bad { color: var(--bad); }
.badge.muted { color: var(--muted); }
.badge.info { color: #8ab4ff; }
.badge.success{color:var(--ok);} .badge.fail{color:var(--bad);} .badge.running{color:var(--warn);} .badge.cooldown{color:#69a8ff;} .badge.active{color:var(--ok);} .badge.disabled{color:var(--bad);}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(220px,1fr)); gap: 10px; margin: 10px 0; }
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #c5d0ea;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}
.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: #f3f7ff;
  font-size: 1rem;
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.form-grid input::placeholder {
  color: rgba(211, 223, 250, 0.6);
}
.form-grid input:hover,
.form-grid select:hover {
  border-color: rgba(143, 181, 255, 0.55);
}
.form-grid input:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.toggle-row {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  padding-top: 28px;
  color: var(--text) !important;
}
.toggle-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}
.drawer { position: fixed; right: 0; top: 0; height: 100%; width: min(45vw, 820px); min-width: 420px; background: #0f1730; border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .2s; padding: 14px; overflow-y: auto; z-index: 40; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin: 12px 0; }
.tab-btn { border: 0; background: transparent; color: var(--muted); padding: 10px; cursor: pointer; }
.tab-btn.active { color: var(--text); border-bottom: 2px solid var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.cards-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 8px; }
.panel-lite { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 10px;
}
.automation-card {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.automation-card.ok { border-color: rgba(61,220,132,.55); background: linear-gradient(150deg, rgba(61,220,132,.18), rgba(67,132,255,.08)); }
.automation-card.warn { border-color: rgba(255,209,102,.6); background: linear-gradient(150deg, rgba(255,209,102,.16), rgba(255,159,67,.08)); }
.automation-card.bad { border-color: rgba(255,107,107,.6); background: linear-gradient(150deg, rgba(255,107,107,.18), rgba(180,70,70,.08)); }
.automation-card.info { border-color: rgba(138,180,255,.45); background: linear-gradient(150deg, rgba(138,180,255,.14), rgba(70,95,145,.08)); }
.automation-card-title { font-weight: 700; color: #dfe9ff; }
.automation-next-label { font-size: 1.06rem; font-weight: 800; line-height: 1.25; }
.automation-next-meta { color: #d2def7; font-size: 13px; }
.automation-kv { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: baseline; }
.automation-kv span { color: var(--muted); font-size: 12px; }
.automation-kv strong { text-align: right; font-size: 13px; }
.automation-kv.signal-fixed {
  border-left: 3px solid rgba(61,220,132,.65);
  padding-left: 8px;
}
.automation-kv.signal-estimate {
  border-left: 3px solid rgba(255,209,102,.8);
  padding-left: 8px;
  background: rgba(255,209,102,.08);
  border-radius: 6px;
}
.automation-kv.signal-info {
  border-left: 3px solid rgba(138,180,255,.6);
  padding-left: 8px;
}
.automation-kpi {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.35);
  background: linear-gradient(140deg, rgba(79, 140, 255, 0.2), rgba(61, 220, 132, 0.08));
}
.automation-kpi span { color: #d2def7; font-size: 12px; }
.automation-kpi strong { font-size: clamp(1.3rem, 1.4vw + .9rem, 2rem); line-height: 1.1; }
.automation-reasons { margin: 4px 0 0 18px; color: #d7e2fa; font-size: 12px; }
.automation-timeline-card {
  border-color: rgba(92, 167, 255, 0.55);
  background: linear-gradient(145deg, rgba(92, 167, 255, 0.12), rgba(61, 220, 132, 0.08));
}
.automation-timeline-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(9, 20, 45, 0.35);
}
.automation-timeline-row span { color: #d8e4ff; font-size: 12px; }
.automation-timeline-row strong { font-size: 12px; }
.automation-countdown-pill {
  justify-self: end;
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(138, 180, 255, 0.4);
  background: rgba(138, 180, 255, 0.14);
  color: #dce8ff;
}
.automation-countdown-pill.future {
  border-color: rgba(61, 220, 132, 0.45);
  background: rgba(61, 220, 132, 0.15);
  color: #d7ffe8;
}
.automation-countdown-pill.soon {
  border-color: rgba(255, 209, 102, 0.65);
  background: rgba(255, 209, 102, 0.14);
  color: #ffeec5;
}
.automation-countdown-pill.due {
  border-color: rgba(255, 107, 107, 0.7);
  background: rgba(255, 107, 107, 0.15);
  color: #ffd6d6;
}
.repricing-operator-card { margin: 10px 0 12px; }
.jobs-live-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.jobs-summary-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); margin-bottom: 10px; }
.jobs-short-table { max-height: 40vh; }
.jobs-summary-value { font-size: clamp(1.1rem, 1vw + .9rem, 1.7rem); font-weight: 800; line-height: 1.2; }
.jobs-summary-value.ok { color: #3ddc84; }
.jobs-summary-value.warn { color: #ff9f43; }
.jobs-summary-value.bad { color: #ff6b6b; }
.jobs-summary-help { font-size: 12px; color: var(--muted); }
.panel-decision,
.panel-market-snapshot,
.panel-system-status,
.panel-problems { grid-column: span 2; }
.panel-decision {
  border-color: rgba(79, 140, 255, 0.65);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.20), rgba(67, 214, 141, 0.12));
}
.panel-problems {
  border-color: rgba(255, 107, 107, 0.6);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(255, 159, 67, 0.12));
}
.decision-content { display: grid; gap: 4px; }
.decision-label { color: var(--muted); letter-spacing: .04em; }
.decision-main { font-size: clamp(1.3rem, 1.4vw + .9rem, 2rem); font-weight: 800; line-height: 1.2; }
.decision-main.ok { color: #3ddc84; }
.decision-main.warn { color: #ff9f43; }
.decision-main.bad { color: #ff6b6b; }
.decision-target { font-size: clamp(1.1rem, 1vw + .9rem, 1.6rem); font-weight: 700; }
.learning-gate-card {
  margin-top: 6px;
  border: 1px solid rgba(92, 167, 255, 0.45);
  background: linear-gradient(140deg, rgba(92, 167, 255, 0.12), rgba(61, 220, 132, 0.08));
  border-radius: 12px;
  padding: 10px 12px;
}
.learning-gate-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.learning-gate-card.is-blocked {
  border-color: rgba(255, 107, 107, 0.45);
  background: linear-gradient(140deg, rgba(255, 107, 107, 0.14), rgba(255, 209, 102, 0.08));
}
.learning-status {
  margin: 10px 0 12px;
  display: grid;
  gap: 6px;
}
.learning-status-row {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,.03);
  font-size: 13px;
}
.drawer-table { max-height: 38vh; margin-top: 10px; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.check-pill { border: 1px solid var(--border); border-radius: 999px; padding: 8px 10px; color: var(--muted); }
.kv-grid { display: grid; grid-template-columns: 180px 1fr; gap: 8px; color: var(--muted); }
.kv-grid div:nth-child(2n) { color: var(--text); font-family: ui-monospace, monospace; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #152238; border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; z-index: 50; }
.toast.success{border-color: rgba(61,220,132,.5)} .toast.error{border-color: rgba(255,107,107,.5)}
.muted { color: var(--muted); }

@media (max-width: 980px) {
  .form-grid, .cards-grid { grid-template-columns: 1fr; }
  .automation-grid { grid-template-columns: 1fr; }
  .jobs-summary-grid { grid-template-columns: 1fr; }
  .input { min-width: unset; width: 100%; }
  .drawer { width: 100vw; min-width: 100vw; }
}

.weight-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  vertical-align: middle;
}
.weight-dot.large { width: 18px; height: 18px; }
.weighting-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.weighting-rule .weighting-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.weighting-toggle {
  margin-left: auto;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
.weighting-fields { grid-template-columns: repeat(3, minmax(200px, 1fr)); }


.country-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.country-switch-label {
  color: var(--muted);
  font-size: 13px;
  margin-right: 4px;
}
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  transition: .18s ease;
}
.country-chip:hover,
.country-chip:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.country-chip.is-active,
.country-chip[aria-current="page"] {
  border-color: color-mix(in srgb, var(--primary) 75%, #ffffff 25%);
  background: color-mix(in srgb, var(--primary-soft) 75%, rgba(255,255,255,.12) 25%);
  box-shadow: 0 0 0 1px rgba(98,155,255,.55), 0 0 18px rgba(98,155,255,.35);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-grid-3 {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.kpi-card {
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
}
.kpi-card h2 {
  margin: 0;
  font-size: 14px;
  color: #cbd7f5;
}
.kpi-value {
  font-size: clamp(1.7rem, 1.6vw + 1rem, 2.4rem);
  font-weight: 800;
  margin: 10px 0 4px;
  letter-spacing: .02em;
}
.kpi-sub {
  color: var(--muted);
  font-size: 13px;
}
.dashboard-table-wrap { max-height: 340px; }
.split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}
.ratio-meter {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  margin: 10px 0;
}
.ratio-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f8cff, #43d68d);
  transition: width .35s ease;
}
.ratio-meter.returns .ratio-fill {
  background: linear-gradient(90deg, #ff9f43, #ff5d73);
}
.ratio-legend {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .dashboard-grid-3 { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .split-panel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
}

.table-section-row td {
  background: rgba(255, 193, 7, 0.12) !important;
  color: #f8d26f;
  font-weight: 700;
  letter-spacing: .01em;
}

.out-of-stock-row td {
  opacity: 0.62;
}
.buybox-probability-card { grid-column: span 2; }
.buybox-probability-value { font-size: 32px; font-weight: 700; line-height: 1.1; }
.buybox-probability-value.danger { color: #ff6b6b; }
.buybox-probability-value.warn { color: #ff9f43; }
.buybox-probability-value.mid { color: #f6e58d; }
.buybox-probability-value.ok { color: #3ddc84; }
.help-tip { color: var(--muted); cursor: help; font-weight: 600; }

.next-price-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: help;
  color: #dbe7ff;
  border-bottom: 1px dashed rgba(219, 231, 255, 0.45);
}

.next-price-check::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: 320px;
  background: #0b1630;
  color: #e9f0ff;
  border: 1px solid rgba(129, 170, 255, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 30;
}

.next-price-check:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.buybox-probability-details { margin-top: 6px; }
.buybox-probability-details summary { cursor: pointer; color: var(--muted); }
.buybox-probability-details[open] summary { margin-bottom: 4px; }
.buybox-momentum-line { font-weight: 600; }
.buybox-momentum-line.ok { color: #3ddc84; }
.buybox-momentum-line.warn { color: #ff9f43; }
.buybox-momentum-line.danger { color: #ff6b6b; }
.buybox-momentum-guardrail { color: var(--muted); }
@media (max-width: 980px) {
  .buybox-probability-card { grid-column: span 1; }
  .panel-decision,
  .panel-market-snapshot,
  .panel-system-status,
  .panel-problems { grid-column: span 1; }
}


.listing-issues-summary-cards,
.listing-issues-group-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-issues-group-toolbar {
  display: grid;
  gap: 8px;
}

.listing-group-card {
  cursor: pointer;
  text-align: left;
}

.listing-group-card small {
  display: block;
  color: var(--muted);
}

.listing-issue-row td {
  background: transparent !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.decision-row-green td {
  background: rgba(61, 220, 132, 0.16) !important;
  border-top: 1px solid rgba(61, 220, 132, 0.28);
  border-bottom: 1px solid rgba(61, 220, 132, 0.28);
}

.decision-row-info td {
  background: rgba(122, 140, 163, 0.10) !important;
  border-top: 1px solid rgba(122, 140, 163, 0.25);
  border-bottom: 1px solid rgba(122, 140, 163, 0.25);
}

.decision-row-yellow td {
  background: rgba(255, 209, 102, 0.14) !important;
  border-top: 1px solid rgba(255, 209, 102, 0.28);
  border-bottom: 1px solid rgba(255, 209, 102, 0.28);
}

.decision-row-red td {
  background: rgba(255, 107, 107, 0.27) !important;
  border-top: 1px solid rgba(255, 107, 107, 0.44);
  border-bottom: 1px solid rgba(255, 107, 107, 0.44);
}

.price-delta-down { color: #ff8f8f; }
.price-delta-up { color: #89f2b9; }
.price-delta-flat { color: var(--muted); }
.min-price-warning-emoji { font-size: 18px; line-height: 1; display: inline-block; }

.listing-issue-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.listing-issue-hero p {
  margin: 0;
  color: var(--muted);
}

.listing-issue-count {
  font-weight: 700;
  color: #ff6b6b;
}

.listing-action {
  color: #dce8ff;
  line-height: 1.35;
}

.listing-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.learning-status { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }


.spinner::before {
  content: "⏳ ";
  display: inline-block;
  animation: pulse-spin 1.1s linear infinite;
}

@keyframes pulse-spin {
  0% { opacity: 0.55; transform: rotate(0deg); }
  50% { opacity: 1; }
  100% { opacity: 0.55; transform: rotate(360deg); }
}

/* Product-level Buy Box history */
.buybox-history-toolbar,.buybox-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.buybox-history-toolbar>div,.buybox-section-head>div{display:flex;flex-direction:column;gap:3px}.buybox-history-toolbar small,.buybox-section-head small{font-size:11px;color:var(--muted)}.buybox-history-empty{min-height:160px;border:1px dashed var(--border);border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;color:var(--muted);background:rgba(255,255,255,.025)}.buybox-history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:10px}.buybox-metric-card{padding:13px;border:1px solid var(--border);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.07),rgba(255,255,255,.025));display:flex;flex-direction:column;gap:5px}.buybox-metric-card.primary{border-color:rgba(51,209,122,.38);background:linear-gradient(145deg,rgba(51,209,122,.14),rgba(51,209,122,.025))}.buybox-metric-card span,.buybox-metric-card small{color:var(--muted);font-size:11px}.buybox-metric-card strong{font-size:20px}.buybox-advice-card{display:grid;grid-template-columns:auto 1fr;gap:14px;padding:16px;border:1px solid rgba(96,165,250,.35);border-radius:18px;background:linear-gradient(120deg,rgba(59,130,246,.15),rgba(15,23,48,.9));margin-bottom:18px}.buybox-advice-card.hot{border-color:rgba(251,146,60,.48);background:linear-gradient(120deg,rgba(249,115,22,.17),rgba(15,23,48,.92))}.buybox-advice-card.stable{border-color:rgba(51,209,122,.42);background:linear-gradient(120deg,rgba(51,209,122,.14),rgba(15,23,48,.92))}.buybox-advice-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:rgba(255,255,255,.09);font-size:26px}.buybox-eyebrow{color:#93c5fd;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.buybox-advice-card.hot .buybox-eyebrow{color:#fdba74}.buybox-advice-card.stable .buybox-eyebrow{color:#86efac}.buybox-advice-card h3{margin:4px 0 5px;font-size:17px}.buybox-advice-card p{margin:0;color:var(--muted);line-height:1.45;font-size:13px}.buybox-advice-windows{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.buybox-advice-windows span{padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.06);font-size:11px}.buybox-day-grid{display:grid;grid-template-columns:repeat(7,minmax(92px,1fr));gap:8px;overflow-x:auto;padding-bottom:8px;margin-bottom:16px}.buybox-day-card{min-width:92px;padding:10px;border:1px solid var(--border);border-radius:15px;background:rgba(255,255,255,.035)}.buybox-day-card.won{border-color:rgba(51,209,122,.4);background:rgba(51,209,122,.07)}.buybox-day-card.lost{border-color:rgba(255,92,92,.4);background:rgba(255,92,92,.07)}.buybox-day-card.mixed{border-color:rgba(250,204,21,.35);background:rgba(250,204,21,.055)}.buybox-day-head{display:flex;justify-content:space-between;gap:4px;font-size:11px}.buybox-day-ring{width:58px;height:58px;border-radius:50%;margin:12px auto;display:grid;place-items:center;background:conic-gradient(#33d17a var(--buybox-share),rgba(255,92,92,.75) 0);position:relative}.buybox-day-ring:before{content:"";position:absolute;inset:7px;border-radius:50%;background:#111a34}.buybox-day-ring span{position:relative;font-size:12px;font-weight:800}.buybox-day-stats{display:flex;flex-direction:column;gap:2px;font-size:10px}.buybox-day-stats .win{color:#86efac}.buybox-day-stats .loss{color:#fca5a5}.buybox-hour-chart{height:145px;display:grid;grid-template-columns:repeat(24,minmax(13px,1fr));gap:3px;align-items:end;padding:12px 8px 3px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.025);overflow-x:auto}.buybox-hour{height:125px;min-width:13px;display:flex;flex-direction:column;align-items:center;gap:4px}.buybox-hour-track{height:104px;width:100%;border-radius:5px;background:rgba(255,255,255,.055);display:flex;align-items:flex-end;overflow:hidden}.buybox-hour-track span{display:block;width:100%;min-height:2px;border-radius:5px;background:linear-gradient(#5eead4,#22c55e)}.buybox-hour.focus .buybox-hour-track{background:rgba(249,115,22,.16);outline:1px solid rgba(249,115,22,.3)}.buybox-hour.quiet .buybox-hour-track{background:rgba(99,102,241,.12)}.buybox-hour small{font-size:8px;color:var(--muted)}.buybox-hour-legend{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0 14px;color:var(--muted);font-size:10px}.buybox-hour-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:3px}.buybox-hour-legend i.focus{background:#f97316}.buybox-hour-legend i.quiet{background:#6366f1}.buybox-hour-legend i.normal{background:#22c55e}.buybox-safety-note{padding:9px 11px;border:1px solid rgba(96,165,250,.25);border-radius:12px;color:var(--muted);font-size:11px;background:rgba(59,130,246,.06)}
@media(max-width:760px){.buybox-history-summary{grid-template-columns:1fr}.buybox-day-grid{grid-template-columns:repeat(7,110px)}.buybox-hour-chart{grid-template-columns:repeat(24,18px)}}
.tabs{overflow-x:auto;scrollbar-width:thin}.tab-btn{white-space:nowrap}.buybox-daypart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:18px}.buybox-daypart-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;padding:10px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.035)}.buybox-daypart-card.evening{border-color:rgba(249,115,22,.36);background:rgba(249,115,22,.065)}.buybox-daypart-card.night{border-color:rgba(99,102,241,.3);background:rgba(99,102,241,.055)}.buybox-daypart-icon{font-size:20px}.buybox-daypart-card strong{display:flex;gap:5px;align-items:baseline}.buybox-daypart-card strong small{color:var(--muted);font-size:9px}.buybox-daypart-card p{margin:3px 0 0;color:var(--muted);font-size:10px}.buybox-daypart-card em{font-style:normal;font-weight:800;text-align:right}.buybox-daypart-card em small{display:block;color:var(--muted);font-size:8px;font-weight:400}@media(max-width:760px){.buybox-daypart-grid{grid-template-columns:1fr}}


/* Live-Repricing je Marktplatz */
.marketplace-operations-panel {
  margin-bottom: 1rem;
}

.marketplace-operations-totals {
  margin: .35rem 0 .85rem;
  color: var(--text);
  font-weight: 700;
}

.operation-count {
  display: inline-flex;
  min-width: 2.25rem;
  justify-content: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-weight: 800;
}

.operation-count-live,
.operation-count-ok {
  color: #86efac;
  background: rgba(34, 197, 94, .14);
  border: 1px solid rgba(34, 197, 94, .34);
}

.operation-count-problem {
  color: #fca5a5;
  background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .38);
}

.marketplace-code-link {
  color: var(--primary);
  text-decoration: none;
}

.marketplace-code-link:hover {
  text-decoration: underline;
}

.marketplace-sync-detail {
  margin-top: .3rem;
  max-width: 26rem;
  font-size: .78rem;
  line-height: 1.35;
}

.marketplace-operations-note {
  margin: .8rem 0 0;
}

/* Länder-Importstatus in den Einstellungen */
.auto-sync-monitor {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(92, 167, 255, .28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 0%, rgba(92, 167, 255, .12), transparent 32%),
    rgba(7, 12, 26, .42);
}

.auto-sync-monitor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auto-sync-monitor-header h3 {
  margin: 3px 0 5px;
  font-size: 1.25rem;
}

.auto-sync-monitor-header p { margin: 0; }

.auto-sync-monitor-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9ccaff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.auto-sync-live-dot,
.auto-sync-state-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(92, 167, 255, .12);
}

.auto-sync-live-dot { animation: auto-sync-pulse 2s ease-in-out infinite; }

.auto-sync-monitor-meta {
  margin: 12px 0;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .8rem;
}

.auto-sync-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 11px;
}

.auto-sync-status-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
}

.auto-sync-status-card.status-completed {
  border-left-color: var(--ok);
  background: linear-gradient(135deg, rgba(61, 220, 132, .10), rgba(255, 255, 255, .025));
}

.auto-sync-status-card.status-pending {
  border-left-color: var(--warn);
  background: linear-gradient(135deg, rgba(255, 209, 102, .09), rgba(255, 255, 255, .025));
}

.auto-sync-status-card.status-running {
  border-left-color: var(--primary);
  background: linear-gradient(135deg, rgba(92, 167, 255, .13), rgba(255, 255, 255, .025));
}

.auto-sync-status-card.status-error {
  border-left-color: var(--bad);
  background: linear-gradient(135deg, rgba(255, 107, 107, .12), rgba(255, 255, 255, .025));
}

.auto-sync-status-card.is-loading,
.auto-sync-status-card.is-empty { color: var(--muted); }

.auto-sync-status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auto-sync-country {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.auto-sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 800;
}

.status-completed .auto-sync-state { color: #86efac; }
.status-completed .auto-sync-state-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 132, .12); }
.status-pending .auto-sync-state { color: var(--warn); }
.status-pending .auto-sync-state-dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 209, 102, .12); }
.status-running .auto-sync-state { color: #9ccaff; }
.status-running .auto-sync-state-dot { animation: auto-sync-pulse 1.4s ease-in-out infinite; }
.status-error .auto-sync-state { color: #ffaaaa; }
.status-error .auto-sync-state-dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 107, 107, .13); }

.auto-sync-status-detail {
  min-height: 34px;
  margin: 11px 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

.auto-sync-status-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.auto-sync-status-facts > div {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.auto-sync-status-facts dt {
  color: var(--muted);
  font-size: .7rem;
}

.auto-sync-status-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: .72rem;
  font-weight: 700;
  text-align: right;
}

.auto-sync-status-error {
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 107, 107, .3);
  border-radius: 9px;
  color: #ffc2c2;
  background: rgba(255, 107, 107, .08);
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.auto-sync-refresh:disabled { opacity: .55; cursor: wait; }

@keyframes auto-sync-pulse {
  0%, 100% { opacity: .65; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 680px) {
  .auto-sync-monitor { padding: 13px; }
  .auto-sync-monitor-header { align-items: stretch; flex-direction: column; }
  .auto-sync-refresh { width: 100%; }
  .auto-sync-status-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .auto-sync-live-dot,
  .status-running .auto-sync-state-dot { animation: none; }
}

/* Kaufland adaptation: same visual system as the Amazon Repricer, with
   marketplace-specific controls and a denser operational layout. */
:root {
  --kaufland-red: #e10915;
  --kaufland-red-dark: #a80a12;
  --kaufland-blue: #003b70;
}

.brand { display:flex; align-items:center; gap:10px; }
.brand::before { content:"K"; display:grid; place-items:center; width:29px; height:29px; border-radius:8px; background:linear-gradient(145deg,var(--kaufland-red),var(--kaufland-red-dark)); color:#fff; font-weight:900; box-shadow:0 0 20px rgba(225,9,21,.35); }
.brand-sub { color:var(--muted); font-size:.72rem; font-weight:600; }
.topnav { flex-wrap:wrap; }
.topnav a.active { border-color:rgba(225,9,21,.65); background:rgba(225,9,21,.13); }
.btn.primary { border-color:rgba(225,9,21,.75); background:linear-gradient(135deg,var(--kaufland-red),var(--kaufland-red-dark)); color:#fff; }
.btn.danger { border-color:rgba(255,75,75,.65); color:#ffc5c5; }
.btn:disabled { opacity:.48; cursor:not-allowed; }

.page-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:18px; }
.page-head h1 { margin-bottom:5px; }
.toolbar-actions { flex-wrap:wrap; }
.country-switch { margin:10px 0 18px; }
.country-chip.preview::after { content:"Vorschau"; font-size:.58rem; margin-left:5px; color:#ffc078; }
.country-chip.active { border-color:rgba(225,9,21,.78); background:rgba(225,9,21,.16); }

.kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin:18px 0; }
.kpi-card { min-height:126px; }
.kpi-card .kpi-label { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }
.kpi-card .kpi-value { font-size:1.9rem; margin:12px 0 4px; }
.kpi-card.alert .kpi-value { color:#ff8787; }
.kpi-card.good .kpi-value { color:#69db7c; }

.write-gate { display:flex; align-items:center; gap:10px; padding:10px 13px; border:1px solid rgba(255,193,7,.35); border-radius:12px; background:rgba(255,193,7,.07); }
.write-gate.live { border-color:rgba(255,107,107,.6); background:rgba(255,107,107,.1); }
.write-gate strong { white-space:nowrap; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#ffd43b; box-shadow:0 0 10px currentColor; }
.write-gate.live .status-dot { background:#ff6b6b; }

.table-wrap table { min-width:900px; }
.table-wrap td { vertical-align:top; }
.money-main { font-weight:800; font-variant-numeric:tabular-nums; }
.money-sub { display:block; color:var(--muted); font-size:.72rem; margin-top:3px; }
.product-title { font-weight:800; max-width:420px; }
.product-meta { color:var(--muted); font-size:.72rem; margin-top:4px; overflow-wrap:anywhere; }
.rank { display:inline-grid; place-items:center; min-width:34px; height:28px; padding:0 8px; border-radius:999px; background:rgba(255,255,255,.08); font-weight:900; }
.rank.winner { background:rgba(105,219,124,.15); color:#8ce99a; border:1px solid rgba(105,219,124,.35); }
.badge.error { background:rgba(255,107,107,.14); color:#ffc2c2; border-color:rgba(255,107,107,.3); }
.badge.warning { background:rgba(255,212,59,.12); color:#ffe066; border-color:rgba(255,212,59,.3); }
.badge.success { background:rgba(105,219,124,.12); color:#8ce99a; border-color:rgba(105,219,124,.3); }
.badge.info { background:rgba(77,171,247,.12); color:#a5d8ff; border-color:rgba(77,171,247,.3); }

.side-panel { position:fixed; inset:0 0 0 auto; width:min(720px,96vw); z-index:80; padding:20px; overflow:auto; background:#0d1323; border-left:1px solid rgba(255,255,255,.12); box-shadow:-25px 0 80px rgba(0,0,0,.5); transform:translateX(105%); transition:transform .2s ease; }
.side-panel.open { transform:translateX(0); }
.side-panel-head { display:flex; justify-content:space-between; gap:15px; align-items:flex-start; position:sticky; top:-20px; z-index:3; padding:20px 0 14px; background:#0d1323; }
.details-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.details-grid > div { padding:12px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background:rgba(255,255,255,.025); }
.details-grid dt { color:var(--muted); font-size:.72rem; }
.details-grid dd { margin:4px 0 0; font-weight:700; overflow-wrap:anywhere; }

.form-grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.field-help { display:block; color:var(--muted); font-size:.72rem; margin-top:5px; line-height:1.4; }
.warning-box { padding:13px; border:1px solid rgba(255,212,59,.35); background:rgba(255,212,59,.06); border-radius:10px; color:#ffe8a1; }
.danger-box { padding:13px; border:1px solid rgba(255,107,107,.4); background:rgba(255,107,107,.07); border-radius:10px; color:#ffc9c9; }
.empty-state { padding:38px 18px; text-align:center; color:var(--muted); }
.loading-skeleton { min-height:70px; border-radius:10px; background:linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.08),rgba(255,255,255,.03)); background-size:220% 100%; animation:skeleton 1.4s infinite; }
@keyframes skeleton { to { background-position:-220% 0; } }

.login-shell { min-height:100vh; display:grid; place-items:center; padding:20px; }
.login-card { width:min(430px,100%); padding:30px; }
.login-brand { display:flex; align-items:center; gap:13px; margin-bottom:24px; }
.login-logo { display:grid; place-items:center; width:52px; height:52px; border-radius:14px; background:linear-gradient(145deg,var(--kaufland-red),var(--kaufland-red-dark)); color:white; font-size:1.65rem; font-weight:900; box-shadow:0 12px 35px rgba(225,9,21,.3); }
.login-card input { width:100%; }
.login-card .btn { width:100%; margin-top:14px; }

.issue-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.issue-tab { cursor:pointer; }
.issue-tab.active { border-color:rgba(225,9,21,.7); background:rgba(225,9,21,.13); }
.job-summary { max-width:520px; white-space:pre-wrap; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.7rem; color:var(--muted); }

@media (max-width:1100px) {
  .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .form-grid.cols-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:680px) {
  .page-head { flex-direction:column; }
  .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .form-grid.cols-3,.details-grid { grid-template-columns:1fr; }
  .brand-sub { display:none; }
}
