:root {
  color: #101a2f;
  background: #f8fbff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 20%, #e8f1ff, transparent 30%), #f8fbff;
}

.login-card,
.panel,
.watch-card,
.match-card,
.stat-card,
.product-focus {
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(26, 42, 71, 0.08);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
}

.login-card form,
.search-panel,
.profile-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #344461;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  padding: 0 12px;
  color: #101a2f;
  background: #fff;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100svh;
  padding: 24px 18px;
  color: #d8e7ff;
  background: linear-gradient(180deg, #071730, #0c1f3c);
}

.brand,
.topbar,
.section-heading,
.top-actions,
.watch-card footer,
.match-card,
.metric-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  margin-bottom: 32px;
  color: #fff;
  font-size: 22px;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0b63f6, #1fb6ff);
  font-weight: 900;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar button,
.mobile-nav button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.sidebar button.active,
.mobile-nav button.active {
  color: #0b63f6;
  background: #eaf2ff;
}

.sidebar button.active {
  color: #fff;
  background: rgba(35, 113, 255, 0.24);
}

.sidebar button span {
  float: right;
  min-width: 20px;
  border-radius: 999px;
  color: #fff;
  background: #0b63f6;
  text-align: center;
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.content {
  display: grid;
  gap: 24px;
  align-content: start;
  padding: 28px;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: 0;
}

.eyebrow,
.muted,
small {
  color: #536684;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.primary,
.ghost,
.avatar,
.link-button,
.section-heading button {
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: #0b63f6;
  background: #fff;
  font-weight: 800;
}

.primary {
  border-color: #0b63f6;
  color: #fff;
  background: #0b63f6;
}

.small {
  min-height: 34px;
  padding: 0 12px;
}

.avatar {
  width: 44px;
  padding: 0;
  border-radius: 50%;
}

.link-button {
  border-color: transparent;
  background: transparent;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.form-success,
.notice {
  margin: 0;
  color: #116329;
  font-size: 13px;
  font-weight: 700;
}

.notice {
  border: 1px solid #bfebcb;
  border-radius: 8px;
  padding: 12px 14px;
  background: #effaf2;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-panel {
  grid-template-columns: 1fr auto;
  align-items: end;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.stats-grid,
.split-grid,
.two-pane,
.match-layout {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.stat-card strong {
  font-size: 28px;
}

.split-grid {
  grid-template-columns: 1fr 1fr;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading h2,
.product-focus h2,
.profile-grid h2 {
  margin: 0;
}

.watch-card {
  display: grid;
  grid-template-columns: 86px 1fr 120px;
  gap: 18px;
  padding: 16px;
}

.watch-card h3,
.match-card h3 {
  margin: 0 0 6px;
}

.watch-card p,
.match-card p {
  margin: 0 0 8px;
}

.watch-card footer {
  grid-column: 1 / -1;
  gap: 18px;
  color: #536684;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a954;
}

.price {
  color: #0b63f6;
  font-size: 24px;
  font-weight: 900;
}

.product-art {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f2f6fb, #e7eef8);
}

.product-art.small {
  width: 72px;
  height: 90px;
}

.product-art.large {
  width: min(240px, 100%);
  aspect-ratio: 1;
}

.device {
  position: relative;
  width: 42%;
  height: 72%;
  border: 5px solid #101a2f;
  border-radius: 12px;
  background: linear-gradient(180deg, #101a2f, #263a5d);
}

.device span {
  position: absolute;
  inset: 18% 18%;
  border-radius: 6px;
  background: linear-gradient(135deg, #2acb79, #0b63f6);
}

.device i {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #dbe8ff;
}

.mini-chart,
.chart {
  display: flex;
  align-items: end;
  gap: 5px;
}

.mini-chart span,
.chart span {
  width: 12px;
  border-radius: 999px 999px 0 0;
  background: #22a954;
}

.mini-chart span:nth-child(1) { height: 30px; }
.mini-chart span:nth-child(2) { height: 45px; }
.mini-chart span:nth-child(3) { height: 24px; }
.mini-chart span:nth-child(4) { height: 36px; }

.match-card {
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.success {
  color: #087443;
  background: #dff7e8;
}

.match-price {
  display: grid;
  justify-items: end;
}

.two-pane {
  grid-template-columns: 320px 1fr;
}

.watch-list,
.detail-panel,
.product-focus,
.panel {
  padding: 18px;
}

.metric-row {
  flex-wrap: wrap;
  gap: 12px;
}

.metric-row .stat-card {
  flex: 1 1 150px;
}

.chart {
  height: 260px;
  margin-top: 18px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.chart span {
  flex: 1;
  background: #0b63f6;
}

.match-layout {
  grid-template-columns: minmax(260px, 420px) 1fr;
}

.product-focus {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}

.reason-list {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 20px;
  color: #1c6a3a;
}

.profile-grid {
  max-width: 720px;
}

.mobile-nav {
  display: none;
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    padding-bottom: 74px;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    align-items: start;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .search-panel,
  .stats-grid,
  .split-grid,
  .two-pane,
  .match-layout,
  .product-focus {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watch-card {
    grid-template-columns: 72px 1fr;
  }

  .watch-card .mini-chart {
    display: none;
  }

  .match-card {
    align-items: start;
  }

  .product-focus .product-art {
    justify-self: center;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid #dfe7f2;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    min-height: 58px;
    padding: 0;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 16px;
  }

  .login-card {
    width: calc(100vw - 96px);
    max-width: none;
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .top-actions .ghost {
    display: none;
  }
}
