:root {
  --ink: #101727;
  --muted: #697184;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #e2e5eb;
  --blue: #3264dc;
  --blue-dark: #1946b0;
  --yellow: #f6c844;
  --red: #e54b4b;
  --green: #168665;
  --shadow: 0 14px 34px rgba(18, 31, 60, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand strong {
  color: var(--yellow);
}

.brand-mark {
  width: 32px;
  height: 32px;
  position: relative;
  display: inline-block;
  border: 2px solid white;
  border-radius: 50%;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
}

.brand-mark::before {
  top: 0;
  height: 50%;
  background: var(--red);
  border-bottom: 2px solid white;
}

.brand-mark::after {
  top: 13px;
  height: 2px;
  background: var(--ink);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.source-link {
  color: #cbd2e2;
  text-decoration: none;
  font-size: 13px;
}

.source-link:hover {
  color: white;
}

.theme-toggle {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #dce5ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.theme-toggle:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(126, 162, 255, 0.5);
  outline-offset: 2px;
}

.theme-toggle-icon {
  width: 15px;
  height: 15px;
  display: block;
  border: 2px solid #f6c844;
  border-radius: 50%;
  background: linear-gradient(90deg, #f6c844 50%, transparent 50%);
  transform: rotate(-25deg);
}

.hero {
  min-height: 390px;
  padding: 64px clamp(24px, 8vw, 120px) 56px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 78% 20%, rgba(50, 100, 220, 0.85), transparent 25%),
    linear-gradient(125deg, #111928 15%, #162645 65%, #17387e);
}

.hero::before {
  content: "";
  width: 410px;
  height: 410px;
  position: absolute;
  right: 9%;
  top: -215px;
  border: 100px solid rgba(246, 200, 68, 0.95);
  border-radius: 50%;
}

.hero-copy {
  z-index: 1;
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.hero h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--yellow);
}

.hero-description {
  max-width: 580px;
  margin: 28px 0 0;
  color: #ccd5e8;
  font-size: 16px;
  line-height: 1.65;
}

.hero-number {
  position: absolute;
  right: clamp(20px, 7vw, 105px);
  bottom: -45px;
  color: rgba(255, 255, 255, 0.06);
  font-size: clamp(180px, 25vw, 350px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.12em;
  user-select: none;
}


.catalog {
  width: min(1200px, calc(100% - 40px));
  margin: 52px auto 96px;
}

.catalog-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.catalog-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--blue);
}

.filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-field {
  height: 42px;
  min-width: 220px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.search-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.1);
}

.search-field input {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.category-filter {
  min-width: 220px;
}

.category-filter select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  font-size: 12px;
  cursor: pointer;
}

.category-filter select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.1);
}

.language-filter {
  padding: 4px;
  display: flex;
  background: #e9ecf2;
  border-radius: 10px;
}

.filter-button {
  height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 8px rgba(16, 23, 39, 0.08);
}

.status-message {
  margin: 12px 0 20px;
  padding: 12px 15px;
  color: #40506f;
  background: #eaf0ff;
  border: 1px solid #d8e3ff;
  border-radius: 9px;
  font-size: 13px;
}

.status-message:empty {
  display: none;
}

.status-message.error {
  color: #8a2a2a;
  background: #fff0f0;
  border-color: #ffd1d1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 34, 62, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card.product-unavailable {
  border-color: #efb8b8;
}

.product-unavailable .product-image {
  filter: grayscale(0.45);
  opacity: 0.72;
}

.product-image-wrap {
  height: 220px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), transparent),
    #eef1f6;
}

.product-image-wrap::after {
  content: "";
  width: 140px;
  height: 140px;
  position: absolute;
  right: -70px;
  bottom: -70px;
  border: 28px solid rgba(50, 100, 220, 0.08);
  border-radius: 50%;
}

.product-image {
  width: 86%;
  height: 188px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-placeholder {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 900;
}

.language-badge {
  padding: 6px 9px;
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  color: white;
  background: #102451;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.language-badge.pt {
  color: #133729;
  background: #a7e9ce;
}

.availability-badge {
  padding: 6px 9px;
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  color: white;
  background: #c43f3f;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.product-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-category {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-name {
  min-height: 62px;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.price-row {
  margin: 18px 0 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.price-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.current-price {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.current-price.unavailable {
  max-width: 180px;
  display: block;
  color: #b43737;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.suggested-price-row {
  margin: 0 0 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5d4a12;
  background: #fff8dc;
  border: 1px solid #f2e2a4;
  border-radius: 7px;
  font-size: 9px;
}

.suggested-price-row > span {
  font-weight: 750;
}

.suggested-price-row > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggested-price-row strong {
  color: var(--ink);
  font-size: 11px;
}

.suggested-price-row a {
  color: #715b12;
  font-weight: 800;
  text-decoration: none;
}

.price-change {
  padding: 5px 7px;
  color: var(--muted);
  background: #eef0f4;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.price-change.down {
  color: var(--green);
  background: #e4f7f0;
}

.price-change.up {
  color: #b43737;
  background: #ffebeb;
}

.history-panel {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-title {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.history-count {
  color: var(--muted);
  font-size: 10px;
}

.price-chart {
  width: 100%;
  height: 62px;
  margin-top: 8px;
  display: block;
  overflow: visible;
}

.chart-grid {
  stroke: #edf0f4;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.chart-area {
  fill: url(#chart-fill);
  opacity: 0.16;
}

.chart-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 2;
}

.history-empty {
  height: 62px;
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}





.offer-price {
  flex: 0 0 auto;
  color: #ef5a29;
  font-size: 13px;
  font-weight: 850;
}

.offer-price-graphic {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.offer-price-graphic > span:first-child {
  margin-right: 2px;
}

.price-glyph {
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
}

.price-separator {
  width: 3px;
  margin-left: -1px;
  color: #ef5a29;
}


.product-error {
  margin-top: 10px;
  color: #a13f3f;
  font-size: 10px;
}

.empty-state {
  padding: 70px 20px;
  color: var(--muted);
  text-align: center;
  background: white;
  border: 1px dashed #cbd0da;
  border-radius: 14px;
}

footer {
  min-height: 90px;
  padding: 24px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #aeb7ca;
  background: var(--ink);
  font-size: 11px;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.product-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-detail-link {
  padding: 9px 11px;
  color: white;
  background: var(--blue);
  border-radius: 6px;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
}

.product-detail-link:hover {
  background: var(--blue-dark);
}


.detail-main {
  width: min(1320px, calc(100% - 40px));
  min-height: calc(100vh - 162px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.detail-breadcrumb {
  margin-bottom: 18px;
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.detail-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.detail-product-hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-image-wrap {
  min-height: 390px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(246, 200, 68, 0.42), transparent 25%),
    linear-gradient(145deg, #edf2ff, #f8f9fb);
}

.detail-image-wrap::after {
  content: "";
  width: 260px;
  height: 260px;
  position: absolute;
  right: -130px;
  bottom: -145px;
  border: 48px solid rgba(50, 100, 220, 0.12);
  border-radius: 50%;
}

.detail-image {
  width: 84%;
  height: 330px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.detail-image-wrap .product-placeholder {
  width: 130px;
  height: 130px;
  font-size: 40px;
}

.detail-product-copy {
  padding: clamp(32px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-product-copy .section-kicker {
  margin-bottom: 12px;
  color: var(--blue);
}

.detail-product-copy h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.detail-current-price {
  margin-top: 30px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.detail-current-price > span {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-current-price strong {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.055em;
}

.detail-current-price strong.unavailable {
  color: #b43737;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.detail-current-price small {
  color: var(--muted);
  font-size: 11px;
}

.detail-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-source-button {
  padding: 11px 14px;
  color: white;
  background: var(--ink);
  border-radius: 7px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.detail-source-button:hover {
  background: var(--blue);
}

.detail-availability {
  padding: 7px 9px;
  color: var(--muted);
  background: #eff1f5;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.detail-availability.available {
  color: #126348;
  background: #ddf5eb;
}

.detail-availability.unavailable {
  color: #9c3030;
  background: #ffebeb;
}

.detail-metrics {
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.detail-metrics > div {
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
}

.detail-metrics > div:last-child {
  border-right: 0;
}

.detail-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-metrics strong {
  overflow: hidden;
  font-size: clamp(17px, 2vw, 24px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggested-metric {
  background: #fff9e3;
}

.suggested-metric a {
  color: #765f13;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.detail-metrics strong.down,
.variation.down {
  color: var(--green);
}

.detail-metrics strong.up,
.variation.up {
  color: var(--red);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.detail-history-card,
.manual-price-card,
.detail-records-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.detail-section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.detail-section-heading .section-kicker,
.manual-price-card .section-kicker {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 10px;
}

.detail-section-heading h2,
.manual-price-card h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.chart-period {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.detail-history-tools {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.history-filters {
  display: flex;
  gap: 8px;
}

.history-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-filters select,
.history-filters input {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  font-size: 10px;
  text-transform: none;
}

.history-filters select {
  max-width: 210px;
  padding-right: 28px;
}

.history-filters select:focus,
.history-filters input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.1);
}

.detail-chart {
  min-height: 320px;
  overflow-x: auto;
}

.detail-chart svg {
  width: 100%;
  min-width: 650px;
  display: block;
}

.detail-chart-grid {
  stroke: #e8ebf0;
  stroke-width: 1;
}

.detail-chart-axis {
  fill: var(--muted);
  font-size: 10px;
}

.detail-chart-area {
  fill: url("#detail-chart-fill");
}

.detail-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.detail-chart-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 3;
}

.detail-chart-point {
  cursor: pointer;
}

.detail-chart-point:focus {
  outline: none;
  stroke-width: 5;
}

.detail-chart-tooltip {
  position: fixed;
  z-index: 20;
  max-width: min(300px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.detail-chart-tooltip.below {
  transform: translateX(-50%);
}

.detail-chart-point.manual {
  fill: var(--yellow);
  stroke: #9b6e00;
}


.detail-chart-empty {
  min-height: 300px;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f8f9fb;
  border: 1px dashed #cbd0da;
  border-radius: 9px;
  font-size: 13px;
}

.chart-legend {
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}


.chart-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 18px;
  height: 3px;
  display: inline-block;
  background: var(--blue);
  border-radius: 4px;
}


.chart-legend .legend-manual {
  width: 10px;
  height: 10px;
  background: var(--yellow);
  border: 2px solid #9b6e00;
  border-radius: 50%;
}

.manual-price-card {
  position: sticky;
  top: 20px;
  box-shadow: 0 10px 28px rgba(18, 31, 60, 0.07);
}

.manual-price-card > p:not(.section-kicker, .manual-price-language) {
  margin: 13px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.manual-price-card > p.manual-price-language {
  margin: -14px 0 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.manual-price-card form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.manual-price-card label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.manual-store-input {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #ccd2de;
  border-radius: 8px;
  outline: 0;
  font-size: 13px;
}

.manual-store-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.12);
}

.manual-price-card select {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #ccd2de;
  border-radius: 8px;
  outline: 0;
  font-size: 13px;
}

.manual-price-card select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.12);
}

.price-input-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: white;
  border: 1px solid #ccd2de;
  border-radius: 8px;
}

.price-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.12);
}

.price-input-wrap span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.price-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 13px 12px 13px 7px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 17px;
  font-weight: 800;
}

.manual-price-card button {
  margin-top: 4px;
  padding: 13px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.manual-price-card button:hover {
  background: var(--blue-dark);
}

.manual-price-card button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.manual-price-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.manual-price-status.success {
  color: var(--green);
}

.manual-price-status.error {
  color: #a13f3f;
}

.detail-records-card {
  margin-top: 22px;
}


.history-table-wrap {
  overflow-x: auto;
}

.detail-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.detail-history-table th,
.detail-history-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
}

.detail-history-table th {
  color: var(--muted);
  background: #f8f9fb;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-history-table th:last-child,
.detail-history-table td:last-child {
  text-align: right;
}



.variation {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.variation small {
  margin: 0;
  color: inherit;
}

.variation.neutral {
  color: var(--muted);
}

.history-table-empty {
  padding: 40px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.store-history-details > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.store-history-details > summary::-webkit-details-marker {
  display: none;
}

.store-history-details > summary::after {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--blue);
  background: rgba(50, 100, 220, 0.1);
  border-radius: 50%;
  content: "+";
  font-size: 18px;
  font-weight: 800;
}

.store-history-details[open] > summary::after {
  content: "−";
}

.store-history-summary-copy {
  min-width: 0;
  display: block;
}

.store-history-summary-copy .section-kicker {
  display: block;
  margin-bottom: 7px;
}

.store-history-title {
  display: block;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.store-history-summary-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.store-history-content {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.store-history-details:not([open]) .store-history-content {
  display: none;
}

.store-history-filters {
  margin-bottom: 14px;
  justify-content: flex-end;
}

.store-history-table {
  min-width: 980px;
}

.store-history-table td:nth-child(2) strong {
  display: block;
}

.store-history-table td:nth-child(2) small {
  margin-top: 3px;
  display: block;
  color: #947000;
  font-size: 9px;
}

.store-history-table .offer-price {
  display: inline-flex;
  align-items: center;
}

.store-history-link {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.store-price-unreadable {
  color: var(--muted);
  font-size: 9px;
}


@media (max-width: 1020px) {
  .detail-product-hero {
    grid-template-columns: 340px 1fr;
  }

  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .manual-price-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .detail-main {
    width: min(100% - 28px, 1320px);
    padding-top: 22px;
  }

  .detail-back-link {
    font-size: 11px;
  }

  .detail-product-hero {
    grid-template-columns: 1fr;
  }

  .detail-image-wrap {
    min-height: 310px;
  }

  .detail-image {
    height: 270px;
  }

  .detail-metrics {
    grid-template-columns: 1fr 1fr;
  }


  .detail-metrics > div {
    border-bottom: 1px solid var(--line);
  }

  .detail-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .detail-metrics > div:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .product-actions {
    align-items: stretch;
    flex-direction: column;
  }


  .detail-product-copy {
    padding: 28px 22px 32px;
  }

  .detail-product-copy h1 {
    font-size: 31px;
  }

  .detail-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-history-tools {
    width: 100%;
    align-items: stretch;
  }

  .history-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .history-filters select,
  .history-filters input {
    width: 100%;
    min-width: 0;
  }

  .detail-history-card,
  .manual-price-card,
  .detail-records-card {
    padding: 20px 15px;
  }

  .detail-history-table th,
  .detail-history-table td {
    padding: 11px 9px;
    white-space: nowrap;
  }
}

@media (max-width: 1020px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .search-field {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .source-link {
    font-size: 0;
  }

  .source-link span {
    font-size: 20px;
  }

  .header-links {
    gap: 13px;
  }

  .admin-header-link::after {
    content: "Admin";
    font-size: 11px;
  }

  .detail-back-link::after {
    content: "←";
    font-size: 18px;
  }

  .hero {
    min-height: 350px;
    padding-top: 52px;
  }

  .hero::before {
    right: -175px;
  }

  .hero-description {
    font-size: 14px;
  }


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

  .catalog {
    width: calc(100% - 28px);
    margin-top: 58px;
  }

  .filters {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    min-width: 0;
  }

  .category-filter {
    width: 100%;
    min-width: 0;
  }

  .language-filter {
    justify-content: space-between;
  }

  .filter-button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 0 18px;
  }

  .hero {
    padding-inline: 20px;
  }

  .hero h1 {
    font-size: 50px;
  }


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

  .product-image-wrap {
    height: 245px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.admin-main {
  width: min(1380px, calc(100% - 40px));
  min-height: calc(100vh - 162px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.admin-hero {
  min-height: 230px;
  padding: clamp(30px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 86% 5%, rgba(246, 200, 68, 0.72), transparent 21%),
    linear-gradient(125deg, #111928, #17387e);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.admin-hero .section-kicker {
  margin-bottom: 10px;
}

.admin-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.055em;
}

.admin-hero p:not(.section-kicker) {
  max-width: 650px;
  margin: 16px 0 0;
  color: #ccd5e8;
  line-height: 1.55;
  font-size: 13px;
}

.admin-local-badge {
  padding: 9px 12px;
  flex: 0 0 auto;
  color: #554000;
  background: var(--yellow);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-refresh-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.admin-refresh-button:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.admin-refresh-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.admin-refresh-button.loading .refresh-icon {
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.admin-metrics {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.admin-metrics > div {
  padding: 19px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-right: 1px solid var(--line);
}

.admin-metrics > div:last-child {
  border-right: 0;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-metrics strong {
  font-size: 25px;
}

.admin-tabs {
  padding: 5px;
  display: inline-flex;
  gap: 3px;
  background: #e7eaf0;
  border-radius: 10px;
}

.admin-tabs button {
  padding: 10px 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.admin-tabs button.active {
  color: white;
  background: var(--ink);
  box-shadow: 0 3px 9px rgba(16, 23, 39, 0.18);
}

.admin-main > .status-message {
  margin: 16px 0;
}

.admin-section {
  margin-top: 22px;
}

.admin-section[hidden] {
  display: none;
}

.admin-section-heading {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-section-heading .section-kicker {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 10px;
}

.admin-section-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.admin-section-heading select {
  max-width: 360px;
  padding: 10px 34px 10px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}

.admin-store-history-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-store-history-filters select {
  min-width: 180px;
}

.admin-store-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-store-history-actions button {
  padding: 8px 10px;
  color: #a33434;
  background: #fff0f0;
  border: 0;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.admin-store-history-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-store-history-table th:first-child,
.admin-store-history-table td:first-child {
  min-width: 44px;
  width: 44px;
  padding-inline: 10px;
  text-align: center;
}

#admin-store-history-body input[type="checkbox"],
#admin-select-all-store-history {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.admin-products-layout {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-form-card,
.admin-table-card {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.admin-form-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 10px 28px rgba(18, 31, 60, 0.06);
}

.admin-form-card h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.admin-form-card > p {
  margin: -5px 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.admin-form-card label,
.admin-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.admin-form-card input,
.admin-form-card select,
.admin-dialog input,
.admin-dialog textarea {
  min-width: 0;
  width: 100%;
  padding: 11px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd4de;
  border-radius: 7px;
  outline: 0;
  font-size: 12px;
  font-weight: 500;
}

.admin-form-card input:focus,
.admin-form-card select:focus,
.admin-dialog input:focus,
.admin-dialog textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.11);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-form-card .admin-checkbox {
  align-items: center;
  flex-direction: row;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.admin-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.admin-form-card > button {
  padding: 12px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.admin-form-card > button:hover {
  background: var(--blue-dark);
}

.admin-form-card > button:disabled {
  opacity: 0.6;
}

.admin-table-toolbar {
  min-height: 62px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.admin-table-toolbar input,
.admin-table-toolbar select {
  width: min(260px, 55%);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-size: 11px;
}

.admin-catalog-filters {
  width: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-catalog-filters .search-field,
.admin-catalog-filters .category-filter {
  min-width: 170px;
}

.admin-catalog-filters .search-field input {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-catalog-filters .filter-button {
  padding-inline: 8px;
}

.admin-log-toolbar {
  align-items: center;
}

.admin-log-filters {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-log-filters input,
.admin-log-filters select {
  min-height: 36px;
  width: auto;
  min-width: 145px;
  padding: 8px 30px 8px 10px;
  color: var(--ink);
  background-color: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-size: 10px;
}

.admin-log-filters input {
  width: min(230px, 100%);
  padding-right: 10px;
}

#admin-log-product-filter {
  width: 240px;
  max-width: 100%;
}

#admin-log-store-filter {
  width: 180px;
  max-width: 100%;
}

.admin-log-filters input:focus,
.admin-log-filters select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.1);
}

.admin-log-table {
  min-width: 1180px;
}

.admin-log-source,
.admin-log-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.admin-log-source {
  padding: 5px 7px;
  color: #1f4f3b;
  background: #dff6ea;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 850;
}

.admin-log-source.manual {
  color: #604900;
  background: #fff0b8;
}

.admin-log-change {
  font-weight: 850;
}

.admin-log-change.down {
  color: var(--green);
}

.admin-log-change.up {
  color: var(--red);
}

.admin-log-change small {
  margin: 0;
  color: inherit;
}

.admin-approval-table {
  min-width: 1040px;
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.admin-table th,
.admin-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  background: #f8f9fb;
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td:first-child {
  min-width: 190px;
}

.admin-table td strong {
  display: block;
  line-height: 1.35;
}

.admin-table td small {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.admin-table code {
  color: #35415a;
  font-size: 10px;
}

.admin-language {
  padding: 5px 7px;
  color: white;
  background: var(--ink);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 850;
}

.admin-language.pt {
  color: #133729;
  background: #a7e9ce;
}

.admin-row-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
}

.admin-products-layout .admin-row-actions {
  align-items: center;
  white-space: nowrap;
}

.admin-row-actions button {
  padding: 7px 9px;
  color: var(--blue);
  background: #edf2ff;
  border: 0;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.admin-row-actions button.danger {
  color: #a33434;
  background: #fff0f0;
}


.admin-empty {
  padding: 45px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.admin-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 25px 70px rgba(10, 18, 35, 0.26);
}

.product-edit-dialog {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

.admin-dialog::backdrop {
  background: rgba(9, 15, 29, 0.62);
  backdrop-filter: blur(3px);
}

.admin-dialog form {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-delete-selection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
}

.admin-delete-selection-list {
  max-height: 180px;
  margin: 0;
  padding-left: 18px;
  overflow-y: auto;
}

.admin-delete-selection-list li + li {
  margin-top: 8px;
}

.admin-delete-selection-list strong,
.admin-delete-selection-list span {
  display: block;
}

.admin-delete-selection-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.admin-dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.admin-dialog-heading .section-kicker {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 9px;
}

.admin-dialog-heading h2 {
  margin: 0;
  font-size: 25px;
}

.dialog-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f0f2f6;
  border: 0;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

.admin-dialog-product {
  margin: -3px 0 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.admin-dialog textarea {
  min-height: 130px;
  resize: vertical;
}

.admin-dialog-actions {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-dialog-actions button {
  padding: 10px 13px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.admin-dialog-actions button.secondary {
  color: var(--muted);
  background: #edf0f4;
}

@media (max-width: 900px) {
  .admin-products-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .admin-main {
    width: calc(100% - 28px);
    padding-top: 20px;
  }

  .admin-hero {
    min-height: 210px;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-metrics > div:last-child {
    border-bottom: 0;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tabs button {
    padding-inline: 8px;
    flex: 1;
  }

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

  .admin-log-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-log-filters {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-log-filters input,
  .admin-log-filters select,
  #admin-log-product-filter,
  #admin-log-store-filter {
    width: 100%;
    min-width: 0;
  }

  .admin-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-section-heading select {
    max-width: none;
    width: 100%;
  }

  .admin-store-history-filters {
    flex-direction: column;
  }

  .admin-store-history-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-store-history-filters select {
    width: 100%;
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.session-user {
  max-width: 180px;
  overflow: hidden;
  color: #dce5ff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-user::before {
  content: "●";
  margin-right: 7px;
  color: #5dd6ae;
  font-size: 8px;
}

.logout-button {
  padding: 8px 12px;
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.logout-button:hover,
.logout-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  outline: none;
}

.auth-required-note {
  padding: 13px 14px;
  color: var(--muted);
  background: #f4f7ff;
  border: 1px solid #dce5fa;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.auth-required-note a {
  color: var(--blue-dark);
  font-weight: 850;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 20%, rgba(50, 100, 220, 0.12), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(246, 200, 68, 0.13), transparent 26%),
    var(--paper);
}

.login-main {
  min-height: calc(100vh - 72px);
  padding: clamp(32px, 7vw, 82px) 20px;
  display: grid;
  place-items: start center;
}

.login-card {
  width: min(100%, 440px);
  padding: clamp(28px, 5vw, 44px);
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 23, 39, 0.14);
}

.login-card::before {
  width: 180px;
  height: 180px;
  position: absolute;
  top: -115px;
  right: -90px;
  background: var(--yellow);
  border-radius: 50%;
  content: "";
}

.login-lock {
  width: 48px;
  height: 42px;
  margin-bottom: 28px;
  position: relative;
  background: var(--blue);
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(50, 100, 220, 0.24);
}

.login-lock::before {
  width: 24px;
  height: 23px;
  position: absolute;
  left: 12px;
  top: -14px;
  border: 5px solid var(--ink);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  content: "";
}

.login-lock::after {
  width: 5px;
  height: 11px;
  position: absolute;
  left: 22px;
  top: 15px;
  background: white;
  border-radius: 4px;
  content: "";
}

.login-card h1 {
  margin: 7px 0 9px;
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: -0.045em;
}

.login-intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

#login-form {
  display: flex;
  flex-direction: column;
}

#login-form > label {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#login-form > input,
.password-field {
  margin-bottom: 18px;
}

#login-form input {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid #cfd5df;
  border-radius: 9px;
  outline: none;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

#login-form input:focus {
  background: white;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 100, 220, 0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 80px !important;
}

.password-field button {
  height: 32px;
  padding: 0 9px;
  position: absolute;
  top: 7px;
  right: 7px;
  color: var(--blue-dark);
  background: #eef3ff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.login-submit {
  min-height: 47px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 10px 20px rgba(50, 100, 220, 0.2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.login-submit:hover {
  background: var(--blue-dark);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.login-status.error {
  color: #a13f3f;
}

.login-status.success {
  color: var(--green);
}


.login-security-note {
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.5;
}

.login-security-note strong {
  color: var(--ink);
  font-size: 10px;
}

@media (max-width: 620px) {
  .login-header .detail-back-link {
    display: none;
  }

  .login-main {
    padding: 24px 14px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 14px;
  }

  .session-user {
    display: none;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf2ff;
  --muted: #a8b2c7;
  --paper: #0b101c;
  --card: #141c2b;
  --line: #2b3548;
  --blue: #7ea2ff;
  --blue-dark: #9ab7ff;
  --red: #ff7777;
  --green: #55d1a7;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] footer {
  background: #080d18;
}

html[data-theme="dark"] .brand-mark span {
  background: #edf2ff;
}

html[data-theme="dark"] .brand-mark::after {
  background: #edf2ff;
  border-color: #080d18;
}

html[data-theme="dark"] .theme-toggle-icon {
  border-color: #dce5ff;
  background: linear-gradient(90deg, #dce5ff 50%, transparent 50%);
}

html[data-theme="dark"] .dashboard,
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .category-filter select,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .detail-product-hero,
html[data-theme="dark"] .detail-metrics,
html[data-theme="dark"] .detail-history-card,
html[data-theme="dark"] .manual-price-card,
html[data-theme="dark"] .detail-records-card,
html[data-theme="dark"] .manual-store-input,
html[data-theme="dark"] .manual-price-card select,
html[data-theme="dark"] .price-input-wrap,
html[data-theme="dark"] .history-filters select,
html[data-theme="dark"] .history-filters input,
html[data-theme="dark"] .admin-metrics,
html[data-theme="dark"] .admin-section-heading select,
html[data-theme="dark"] .admin-form-card,
html[data-theme="dark"] .admin-table-card,
html[data-theme="dark"] .admin-table-toolbar input,
html[data-theme="dark"] .admin-log-filters select,
html[data-theme="dark"] .admin-dialog,
html[data-theme="dark"] .admin-form-card input,
html[data-theme="dark"] .admin-form-card select,
html[data-theme="dark"] .admin-dialog input,
html[data-theme="dark"] .admin-dialog textarea,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] #login-form input,
html[data-theme="dark"] #login-form input:focus {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}

html[data-theme="dark"] .language-filter,
html[data-theme="dark"] .admin-tabs,
html[data-theme="dark"] .detail-chart-empty,
html[data-theme="dark"] .detail-history-table th,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .dialog-close,
html[data-theme="dark"] .admin-dialog-actions button.secondary,
html[data-theme="dark"] .auth-required-note,
html[data-theme="dark"] .password-field button {
  color: var(--muted);
  background: #1b2537;
  border-color: var(--line);
}

html[data-theme="dark"] .filter-button.active {
  color: var(--ink);
  background: #26334a;
  box-shadow: none;
}

html[data-theme="dark"] .status-message {
  color: #c6d5ff;
  background: #172541;
  border-color: #294575;
}

html[data-theme="dark"] .status-message.error {
  color: #ffb0b0;
  background: #391d28;
  border-color: #6e3445;
}

html[data-theme="dark"] .suggested-price-row,
html[data-theme="dark"] .suggested-metric {
  color: #e8d995;
  background: #342d18;
  border-color: #625328;
}

html[data-theme="dark"] .suggested-price-row a,
html[data-theme="dark"] .suggested-metric a {
  color: #f4dc74;
}

html[data-theme="dark"] .price-change {
  background: #202a3b;
}

html[data-theme="dark"] .price-change.down,
html[data-theme="dark"] .detail-availability.available {
  color: #72dfbb;
  background: #17382e;
}

html[data-theme="dark"] .price-change.up,
html[data-theme="dark"] .detail-availability.unavailable {
  color: #ff9a9a;
  background: #40202a;
}

html[data-theme="dark"] .detail-availability {
  background: #202a3b;
}

html[data-theme="dark"] .detail-source-button,
html[data-theme="dark"] .admin-tabs button.active,
html[data-theme="dark"] .admin-language {
  color: white;
  background: #080d18;
}

html[data-theme="dark"] .chart-grid,
html[data-theme="dark"] .detail-chart-grid {
  stroke: var(--line);
}

html[data-theme="dark"] .chart-point,
html[data-theme="dark"] .detail-chart-point {
  fill: var(--card);
}

html[data-theme="dark"] .detail-history-table th,
html[data-theme="dark"] .detail-history-table td,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {
  border-color: var(--line);
}

html[data-theme="dark"] .admin-delete-selection {
  background: var(--paper);
}

html[data-theme="dark"] .admin-table code {
  color: var(--muted);
}

html[data-theme="dark"] .admin-row-actions button {
  color: #b8caff;
  background: #1d2d4d;
}

html[data-theme="dark"] .admin-row-actions button.danger {
  color: #ffaaaa;
  background: #40202a;
}

html[data-theme="dark"] .admin-store-history-actions button {
  color: #ffaaaa;
  background: #40202a;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #78849b;
}

@media (max-width: 760px) {
  .theme-toggle {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle-label {
    display: none;
  }
}

html[data-theme="dark"] .admin-catalog-filters .search-field input {
  background: transparent;
  border: 0;
}
