:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #6f8cff;
  --blue-2: #3149d8;
  --ice: #dbeafe;
  --green: #38d996;
  --amber: #f7b84b;
  --red: #fb7185;
  --purple: #a78bfa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(111, 140, 255, 0.22), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(49, 73, 216, 0.18), transparent 32%),
    linear-gradient(135deg, #050711 0%, #08111f 48%, #050711 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 22px;
  background: #060916; border-right: 1px solid var(--line); backdrop-filter: blur(22px);
}

.brand { display: flex; align-items: center; gap: 14px; padding: 8px 8px 28px; border-bottom: 1px solid var(--line); }
.brand-logo { width: 220px; max-width: 100%; display: block; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(111,140,255,0.72));
  box-shadow: 0 0 42px rgba(111, 140, 255, 0.36); color: #071021; font-size: 27px; font-weight: 900;
}
.brand-title { font-size: 17px; font-weight: 760; letter-spacing: 0.04em; text-transform: uppercase; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }

.nav { margin-top: 28px; display: grid; gap: 9px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 18px; color: #cbd5e1; transition: 0.18s ease; }
.nav-item:hover, .nav-item.active { background: linear-gradient(135deg, rgba(111, 140, 255, 0.25), rgba(49, 73, 216, 0.18)); color: white; box-shadow: inset 0 0 0 1px rgba(111, 140, 255, 0.26); }
.nav-left { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; }
.nav-icon { width: 25px; text-align: center; opacity: 0.92; }
.badge { min-width: 26px; padding: 4px 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.16); color: #e2e8f0; font-size: 12px; text-align: center; }

.sidebar-footer { position: absolute; left: 22px; right: 22px; bottom: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(15, 23, 42, 0.72); }
.sidebar-footer strong { display: block; margin-bottom: 6px; font-size: 14px; }
.sidebar-footer p { color: var(--muted); font-size: 12px; line-height: 1.55; }

.main { padding: 32px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
h1 { margin-top: 8px; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -0.055em; }
.lead { margin-top: 14px; max-width: 760px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn { border: 1px solid rgba(148, 163, 184, 0.22); color: white; background: rgba(15, 23, 42, 0.7); border-radius: 16px; padding: 12px 16px; font-weight: 750; font-size: 14px; cursor: pointer; transition: 0.18s ease; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); border-color: rgba(111, 140, 255, 0.48); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); border-color: rgba(111, 140, 255, 0.56); box-shadow: 0 16px 40px rgba(49, 73, 216, 0.3); }
.btn-danger { color: #fecdd3; border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.1); }
.btn-success { color: #bbf7d0; border-color: rgba(56, 217, 150, 0.28); background: rgba(56, 217, 150, 0.1); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.58)); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.stat-card { padding: 20px; border-radius: var(--radius-lg); min-height: 138px; overflow: hidden; position: relative; }
.stat-card::after { content: ""; position: absolute; inset: auto -32px -42px auto; width: 120px; height: 120px; border-radius: 999px; background: rgba(111, 140, 255, 0.12); filter: blur(2px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 16px; background: rgba(111, 140, 255, 0.14); color: var(--ice); font-size: 20px; }
.stat-value { margin-top: 18px; font-size: 34px; font-weight: 820; letter-spacing: -0.04em; }
.stat-note { margin-top: 4px; color: var(--muted-2); font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr); gap: 20px; align-items: start; }
.panel { border-radius: var(--radius-xl); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 20px; font-weight: 780; letter-spacing: -0.02em; }
.panel-subtitle { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.pricewatch-hero { padding: 24px; display: grid; grid-template-columns: 1fr 280px; gap: 20px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 18% 0%, rgba(111, 140, 255, 0.18), transparent 36%), rgba(15, 23, 42, 0.28); }
.hero-number { font-size: clamp(44px, 6vw, 76px); line-height: 0.95; font-weight: 880; letter-spacing: -0.075em; }
.hero-number span { color: var(--blue); }
.hero-copy { margin-top: 14px; max-width: 650px; color: var(--muted); line-height: 1.7; font-size: 15px; }
.hero-metrics { display: grid; gap: 12px; }
.metric-mini { padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: rgba(2, 6, 23, 0.3); }
.metric-mini p:first-child { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-mini p:last-child { margin-top: 6px; font-size: 24px; font-weight: 800; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid rgba(148, 163, 184, 0.12); font-size: 13px; }
th { color: var(--muted); font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase; background: rgba(2, 6, 23, 0.18); }
td { color: #dbeafe; }
.product-title { color: white; font-weight: 760; }
.sku { display: block; margin-top: 4px; color: var(--muted-2); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid transparent; white-space: nowrap; }
.status-red { color: #fecdd3; border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.13); }
.status-green { color: #bbf7d0; border-color: rgba(56, 217, 150, 0.26); background: rgba(56, 217, 150, 0.12); }
.status-amber { color: #fde68a; border-color: rgba(247, 184, 75, 0.28); background: rgba(247, 184, 75, 0.12); }
.status-blue { color: #dbeafe; border-color: rgba(111, 140, 255, 0.3); background: rgba(111, 140, 255, 0.12); }
.diff-negative { color: var(--green); font-weight: 800; }
.diff-positive { color: var(--red); font-weight: 800; }

.module-grid { display: grid; gap: 16px; }
.module-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(15, 23, 42, 0.62); }
.module-card-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.module-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 16px; background: rgba(111, 140, 255, 0.14); font-size: 20px; }
.module-card h3 { font-size: 17px; margin-bottom: 5px; }
.module-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.module-list { display: grid; gap: 10px; margin-top: 16px; }
.module-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: rgba(2, 6, 23, 0.26); color: #cbd5e1; font-size: 13px; }
.module-row strong { color: white; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.search { min-width: 260px; flex: 1; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 16px; padding: 12px 14px; color: var(--text); background: rgba(2, 6, 23, 0.25); outline: none; }
.search:focus { border-color: rgba(111, 140, 255, 0.55); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 24px; }
.form-stack { display: grid; gap: 14px; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 16px; padding: 13px 14px; color: var(--text); background: rgba(2, 6, 23, 0.26); outline: none; }
.field textarea { min-height: 170px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(111, 140, 255, 0.55); }
.timeline { display: grid; gap: 14px; padding: 20px 24px 24px; }
.activity { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.activity-dot { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; background: rgba(111, 140, 255, 0.12); color: var(--ice); }
.activity strong { display: block; font-size: 14px; }
.activity span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-footer { position: static; margin-top: 24px; }
  .layout, .pricewatch-hero, .editor-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .main, .sidebar { padding: 20px; }
  .topbar, .panel-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
}
