@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --app-background: #020617;
  --bg-gradient-start: #040308;
  --bg-gradient-end: #1b1034;
  --card-bg: linear-gradient(150deg, rgba(15, 23, 42, 0.95), rgba(7, 11, 22, 0.82));
  --card-highlight: rgba(76, 29, 149, 0.38);
  --card-border: rgba(148, 163, 184, 0.3);
  --surface-muted: rgba(148, 163, 184, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: rgba(226, 232, 240, 0.72);
  --accent: #38f5b8;
  --accent-soft: rgba(56, 245, 184, 0.18);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --neutral-soft: rgba(148, 163, 184, 0.25);
  --shadow-color: rgba(15, 23, 42, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  background-color: var(--app-background);
  background-image: radial-gradient(circle at 20% 20%, rgba(56, 245, 184, 0.05), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.04), transparent 55%),
    linear-gradient(140deg, var(--bg-gradient-start), var(--bg-gradient-end));
  display: block;
  padding: clamp(0.25rem, 1vw, 0.75rem) clamp(1rem, 2vw, 2.5rem) clamp(1.5rem, 3vw, 3rem);
  position: relative;
}

.sidebar-toggle {
  display: none;
}

.app-shell {
  width: 100%;
  max-width: 2200px;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
  position: relative;
  margin: 0 auto;
}

.views {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  width: 100%;
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

.view {
  display: none;
  flex-direction: column;
}

.view.is-active {
  display: flex;
}

.view[data-loading='true'] {
  opacity: 0.6;
}

.sidebar {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.78);
  padding: clamp(1rem, 2vw, 1.75rem) clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 2rem);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.6);
  position: relative;
  width: 100%;
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
}

.sidebar__brand-subtitle {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.25rem;
  color: var(--text-secondary);
}

.sidebar__user {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  position: relative;
}

.sidebar__user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__user-email {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.sidebar__avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.sidebar__user-name {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar__user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(248, 250, 252, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 0;
}

.sidebar__user-toggle:hover,
.sidebar__user-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.sidebar__user-caret {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sidebar__user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  width: clamp(240px, 30vw, 320px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(160% 160% at 100% 0%, rgba(12, 211, 202, 0.12), rgba(12, 211, 202, 0.02)),
    rgba(2, 6, 23, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 0.85rem;
  z-index: 8;
}

.sidebar__user-meta {
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar__user-label {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar__user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar__user-value {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.sidebar__user-value[data-status='inactive'] {
  color: #fca5a5;
}

.sidebar__user-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.sidebar__user-link {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
}

.sidebar__user-link--danger {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.sidebar__user-link:hover,
.sidebar__user-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.sidebar__brand {
  order: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.sidebar__brand-logo {
  width: 135px;
  max-height: 108px;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.sidebar {
  align-items: center;
}
.alerts-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(248, 250, 252, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease;
  order: 2;
  margin-left: auto;
  flex-shrink: 0;
}
.alerts-indicator:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--text-primary);
}
.alerts-indicator__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.alerts-indicator__label {
  font-size: 0.95rem;
}
.alerts-indicator__count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.alerts-indicator__number {
  font-weight: 700;
  font-size: 1rem;
}
.alerts-indicator__count-label {
  color: var(--text-secondary);
}
.alerts-indicator--danger .alerts-indicator__dot {
  background: var(--danger);
  box-shadow: 0 0 0 6px var(--danger-soft);
}
.alerts-indicator--danger {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}
.alerts-indicator--danger .alerts-indicator__count-label {
  color: #fecdd3;
}

.sidebar__nav {
  order: 1;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.sidebar__user {
  order: 3;
}

.sidebar__nav-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-secondary);
  border-radius: 18px;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar__nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sidebar__nav-badge {
  color: #fbbf24;
  font-size: 0.85em;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
}

.sidebar__nav-item.is-active {
  border-color: rgba(56, 245, 184, 0.6);
  color: var(--text-primary);
  background: rgba(56, 245, 184, 0.12);
  box-shadow: 0 12px 26px rgba(56, 245, 184, 0.15);
}

.sidebar__nav-item:focus-visible,
.sidebar__nav-item:hover {
  border-color: rgba(56, 245, 184, 0.4);
}

.sidebar__nav-dropdown {
  position: relative;
}

.sidebar__nav-dropdown-toggle {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  margin: 0;
  font: inherit;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.sidebar__nav-caret {
  font-size: 0.85rem;
  opacity: 0.8;
}

.sidebar__nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 220px;
  padding: 0.65rem;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 46px rgba(2, 6, 23, 0.55);
  flex-direction: column;
  gap: 0.35rem;
  z-index: 10;
}

.sidebar__nav-dropdown[data-open='true'] .sidebar__nav-menu,
.sidebar__nav-dropdown:focus-within .sidebar__nav-menu {
  display: flex;
}

.sidebar__nav-subitem {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.65);
}

.sidebar__nav-subitem:hover,
.sidebar__nav-subitem:focus-visible {
  border-color: rgba(56, 245, 184, 0.4);
  color: var(--text-primary);
}

.sidebar__nav-subitem.is-active,
.sidebar__nav-dropdown.is-active {
  border-color: rgba(56, 245, 184, 0.6);
  color: var(--text-primary);
  background: rgba(56, 245, 184, 0.12);
  box-shadow: 0 12px 26px rgba(56, 245, 184, 0.15);
}

.sidebar__user {
  order: 2;
  margin-left: auto;
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  body {
    padding: 1.25rem;
  }
}

.dashboard {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 28px 60px var(--shadow-color);
  position: relative;
}

.dashboard--finance {
  width: min(100%, 1400px);
  margin-inline: auto;
}

.dashboard::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(56, 245, 184, 0.15), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.dashboard__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.dashboard__titles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 280px;
  position: relative;
  z-index: 2;
}

.dashboard__subtitle {
  text-transform: uppercase;
  letter-spacing: 0.28rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.8rem;
  margin: 0;
}

.dashboard__title {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 600;
}

.dashboard__context {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
  flex: 1 1 360px;
  margin-left: auto;
  max-width: min(100%, 520px);
  position: relative;
  z-index: 1;
}

.dashboard__update {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
}

.dashboard__update-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  color: var(--accent);
  font-size: 0.7rem;
}

.dashboard__update-content {
  color: var(--text-secondary);
}

.dashboard__description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
}

.period-control {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.65);
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.period-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.period-control__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.period-control__options {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.period-control__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
}

.period-control__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.period-control__option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  min-width: 3.25rem;
}

.period-control__option input:checked + span {
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: rgba(56, 245, 184, 0.45);
  box-shadow: 0 8px 18px rgba(56, 245, 184, 0.22);
}

.period-control__option--live span {
  font-weight: 600;
  letter-spacing: 0.04rem;
}

.period-control__option--live input:checked + span {
  background: var(--accent);
  color: #0f172a;
  border-color: rgba(56, 245, 184, 0.6);
  box-shadow: 0 12px 22px rgba(56, 245, 184, 0.32);
}

.period-control__option:hover span,
.period-control__option span:focus-visible {
  border-color: rgba(56, 245, 184, 0.3);
}

.range-control {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.range-control::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(56, 245, 184, 0.08), transparent 65%);
  pointer-events: none;
}

.range-control__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.range-control__fields {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.range-control__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

.range-control__field span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06rem;
}

.range-control__field input {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  color-scheme: dark;
}

.range-control__field select {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  color-scheme: dark;
}

.range-control__field select:focus-visible {
  outline: none;
  border-color: rgba(56, 245, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 245, 184, 0.2);
}

.range-control__field input:focus-visible {
  outline: none;
  border-color: rgba(56, 245, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 245, 184, 0.2);
}

.range-control__field input::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  opacity: 0.75;
  cursor: pointer;
}

.range-control__submit {
  border: none;
  border-radius: 12px;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, rgba(56, 245, 184, 0.9), rgba(14, 165, 233, 0.9));
  color: #020617;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.range-control__submit:focus-visible {
  outline: 2px solid rgba(56, 245, 184, 0.5);
  outline-offset: 2px;
}

.comparison-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  grid-column: 1 / -1;
}

.comparison-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 210px;
}

.comparison-form__field span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06rem;
}

.comparison-form__field input {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.comparison-form__field input:focus-visible {
  outline: none;
  border-color: rgba(56, 245, 184, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(56, 245, 184, 0.25),
    0 0 0 3px rgba(56, 245, 184, 0.2);
}

.comparison-form__field input::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  opacity: 0.75;
  cursor: pointer;
}

.comparison-form__hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.comparison-form__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: stretch;
}

.stats--finance,
.summary--finance,
.seller-breakdown--finance,
.dashboard__status--finance {
  width: 100%;
  max-width: min(100%, 1120px);
  margin-inline: auto;
}

.stat-card {
  position: relative;
  border-radius: 22px;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  overflow: hidden;
}

.stat-card--highlight {
  background: var(--card-bg);
  border-color: rgba(125, 211, 252, 0.35);
}

.stat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.stat-card__label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.stat-card__chip {
  font-size: 0.7rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.24);
  color: var(--text-secondary);
}

.stat-card__value {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.1;
  letter-spacing: -0.005em;
  word-break: break-word;
}

.stat-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.stat-card__change[data-state='up'] {
  color: var(--accent);
}

.stat-card__change[data-state='down'] {
  color: var(--danger);
}

.stat-card__baseline {
  color: rgba(226, 232, 240, 0.6);
}

.stat-card__progress {
  position: relative;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.stat-card__progress-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), transparent 60%);
}

.stat-card__progress-bar {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--progress-scale, 0));
  background: linear-gradient(90deg, rgba(56, 245, 184, 0.85), rgba(34, 211, 238, 0.9));
}

.stat-card__progress-bar[data-direction='down'] {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.9), rgba(239, 68, 68, 0.85));
}

.stat-card__progress-bar[data-direction='neutral'] {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.65), rgba(148, 163, 184, 0.35));
}

.stat-card.is-positive,
.stat-card.is-negative,
.stat-card.is-neutral {
  border-color: var(--card-border);
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 3vw, 1.6rem);
}

@media (min-width: 1100px) {
  .dashboard__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: start;
    gap: clamp(2rem, 3.5vw, 3.5rem);
  }

  .dashboard__titles {
    gap: 0.6rem;
  }

  .dashboard__context {
    align-items: flex-end;
    gap: 1.1rem;
    justify-self: end;
    width: 100%;
  }

  .period-controls {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }

  .period-control {
    flex: none;
  }

  .range-control {
    flex: none;
    justify-content: flex-end;
    min-width: unset;
  }

  .range-control__fields {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .range-control__field {
    min-width: 140px;
  }

  .ranking__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }

  .ranking__form {
    flex: 1;
  }

  .ranking__form .range-control__fields {
    justify-content: flex-end;
  }

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

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

.summary-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}

.summary-card__title {
  margin: 0;
  color: inherit;
}

.summary-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.summary-card__value {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.summary-card__meta,
.summary-card__baseline {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.summary-card__change[data-state='up'] {
  color: var(--accent);
}

.summary-card__change[data-state='down'] {
  color: var(--danger);
}

.seller-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.seller-breakdown[hidden] {
  display: none;
}

.seller-breakdown__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.seller-breakdown__subtitle {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18rem;
  color: var(--text-secondary);
}

.seller-breakdown__title {
  margin: 0.2rem 0 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.seller-breakdown__control {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.seller-breakdown__control select {
  margin-top: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-primary);
  padding: 0.35rem 0.95rem;
  font-size: 0.9rem;
}

.seller-breakdown__empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.seller-breakdown__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.seller-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.82);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.45);
}

.seller-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.seller-card__label {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.16rem;
  color: var(--text-secondary);
}

.seller-card__title {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
}

.seller-card__share {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
}

.seller-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.seller-card__metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.seller-card__metric {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 0.5rem;
}

.seller-card__metric dt {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.seller-card__metric dd {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.dashboard__status {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(253, 224, 71, 0.95);
  background: rgba(120, 53, 15, 0.35);
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.ranking {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 24px 46px rgba(2, 6, 23, 0.5);
  gap: 1.5rem;
}

.ranking__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ranking__titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ranking__eyebrow {
  margin: 0;
  letter-spacing: 0.3rem;
  font-size: 0.8rem;
  color: var(--accent);
}

.ranking__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.ranking__subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.ranking__form .range-control__fields {
  justify-content: flex-start;
}

.ranking__product-bar {
  margin: 1rem 0 0.6rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.product-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-filter__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-filter__field span {
  font-size: 0.82rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.product-filter__controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.product-filter__controls input {
  flex: 1;
  min-width: 180px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text-primary);
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  letter-spacing: 0.04rem;
  outline: none;
}

.product-filter__controls input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 245, 184, 0.18);
}

.product-filter__controls button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(56, 245, 184, 0.08);
  color: var(--text-primary);
  padding: 0.6rem 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
  cursor: pointer;
}

.product-filter__controls button:hover {
}

.product-filter__controls button:active {
}

.product-filter__controls button[type='button'] {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.3);
}

.ranking__limit {
  min-width: 160px;
}

.ranking__status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.ranking-table-wrapper {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
  background: rgba(2, 6, 23, 0.35);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ranking-table th,
.ranking-table td {
  padding: 0.85rem 1rem;
  text-align: left;
}

.ranking-table thead th {
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.8rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ranking-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.3);
}

.ranking-table tbody tr td {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-table tbody tr:first-child td {
  border-top: none;
}

.ranking-table__slots {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ranking-table__slot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
}

.ranking-table__slot-icon {
  font-size: 1rem;
}

.ranking-table__slot-value {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.ranking-table__slot-value.is-empty {
  font-weight: 400;
  color: rgba(226, 232, 240, 0.75);
}

.ranking-table__slot-value.is-hint {
  font-weight: 500;
  color: #facc15;
}

.ranking-table__product {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ranking-table__product strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.ranking-table__product span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ranking-table__photo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ranking-table__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ranking-table__photo-placeholder {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ranking-pagination {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.ranking-pagination__controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ranking-pagination__controls button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
}

.ranking-pagination__controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ranking-pagination__page {
  font-weight: 600;
}

.ranking-pagination__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

[data-loading='true'] .stat-card,
[data-loading='true'] .summary-card {
  opacity: 0.55;
  filter: saturate(0.6);
}

@media (max-width: 1200px) {
  .sidebar {
    flex-wrap: wrap;
  }

  .alerts-indicator {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  body {
    padding: clamp(0.5rem, 3vw, 1.25rem) clamp(0.75rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2.5rem);
  }

  .sidebar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    position: relative;
    flex-wrap: wrap;
  }

  .sidebar__nav {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .alerts-indicator {
    order: 2;
    margin-left: 0;
  }

  .sidebar__nav-item {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  .sidebar__user {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard__context {
    align-items: flex-start;
  }

  .dashboard__update {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding: clamp(1.5rem, 5vw, 2.2rem);
  }

  .dashboard__header {
    align-items: flex-start;
  }

  .period-control {
    width: 100%;
    justify-content: space-between;
    align-self: stretch;
  }

  .period-control__options {
    flex: 1;
    justify-content: space-around;
  }

  .period-controls {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .range-control {
    width: 100%;
    align-self: stretch;
  }

  .sidebar__brand {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .sidebar__brand-logo {
    width: 108px;
    max-height: 90px;
  }

  .comparison-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .comparison-form__actions {
    justify-content: flex-end;
  }

  .ranking__form .range-control__fields {
    flex-direction: column;
    align-items: stretch;
  }

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

  .product-filter__controls button {
    width: 100%;
  }

  .ranking-table-wrapper {
    overflow-x: auto;
  }

  .ranking-table thead {
    display: none;
  }

  .ranking-table tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .ranking-table tbody tr {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
  }

  .ranking-table tbody tr td {
    padding: 0.35rem 0;
    border: none;
  }

  .ranking-table tbody tr td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
  }

  .sales-table-wrapper {
    overflow-x: visible;
  }
  .sales-table {
    table-layout: auto;
    border-collapse: separate;
  }
  .sales-table thead {
    display: none;
  }
  .sales-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .sales-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.85rem;
    background: rgba(2, 6, 23, 0.7);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
  }
  .sales-table tbody tr td {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
  .sales-table tbody tr td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 118px;
  }
  .sales-thumb-cell {
    grid-column: 1 / -1;
  }
  .sales-thumb-wrapper {
    width: 92px;
    height: 92px;
  }
  .sales-title-cell {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
  .sales-copy-button {
    margin-left: auto;
  }
  .sales-table td:last-child {
    text-align: left;
  }

  .seller-breakdown__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Metrics analysis view */

.metrics-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  color: var(--text-primary);
  background: rgba(2, 6, 23, 0.82);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 64px rgba(2, 6, 23, 0.65);
}

.metrics-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.8), rgba(15, 23, 42, 0.95));
  box-shadow: 0 26px 48px rgba(2, 6, 23, 0.65);
}

.metrics-header__titles {
  max-width: 560px;
}

.metrics-header__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: rgba(191, 219, 254, 0.85);
  margin-bottom: 0.5rem;
}

.metrics-header__title {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.metrics-header__subtitle {
  color: rgba(226, 232, 240, 0.85);
  margin: 0 0 0.5rem;
}

.metrics-header__period {
  font-size: 0.95rem;
  color: rgba(191, 219, 254, 0.85);
  margin: 0;
}

.metrics-header__range .range-control__fields {
  gap: 0.75rem;
}

.metrics-header__range .range-control__field span {
  color: rgba(226, 232, 240, 0.75);
}

.metrics-header__range input[type='date'] {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-primary);
}

.metrics-header__range input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.range-control__reset {
  background: transparent;
  border: none;
  color: #4f46e5;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

.range-control__actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.metrics-summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metrics-summary__card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 20px 38px rgba(2, 6, 23, 0.6);
  color: var(--text-primary);
}

.metrics-summary__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.metrics-summary__value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.metrics-summary__hint {
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.metrics-view .stat-card {
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.65);
  color: var(--text-primary);
}

.metrics-view .stat-card__label,
.metrics-view .stat-card__chip {
  color: var(--text-secondary);
}

.metrics-view .stat-card__value {
  color: var(--text-primary);
}

.metrics-view .stat-card__meta,
.metrics-view .stat-card__meta span {
  color: var(--text-secondary);
}

.metrics-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(2, 6, 23, 0.65);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.6);
}

.metrics-toolbar__left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metrics-toolbar__title {
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.metrics-export button {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #e0e7ff;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 0.65rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.metrics-export button:last-child {
  margin-right: 0;
}

.metrics-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.metrics-toggle-group {
  display: inline-flex;
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.metrics-toggle {
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.8);
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.metrics-toggle.is-active {
  background: #4f46e5;
  color: #fff;
}

.metrics-search label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.75);
}

.metrics-search input {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  min-width: 220px;
  background: rgba(15, 23, 42, 0.35);
  color: var(--text-primary);
}

.metrics-search input::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

.metrics-table-wrapper {
  background: rgba(2, 6, 23, 0.4);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow-x: auto;
  box-shadow: 0 24px 46px rgba(2, 6, 23, 0.6);
}

.metrics-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.metrics-table th,
.metrics-table td {
  padding: 0.75rem 0.65rem;
  text-align: left;
  vertical-align: middle;
}

.metrics-table td:not(:first-child) {
  white-space: nowrap;
}

.metrics-table thead th {
  color: rgba(248, 250, 252, 0.85);
  font-weight: 600;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.metrics-table thead {
  background: rgba(15, 23, 42, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.metrics-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.3);
}

.metrics-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.15);
}

.metrics-table tbody tr + tr {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.metrics-table th button {
  background: transparent;
  border: none;
  font: inherit;
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.metrics-table th button::after {
  content: '⇅';
  font-size: 0.85rem;
  color: #cbd5f5;
}

.metrics-table th button[data-active-sort='desc']::after {
  content: '↓';
  color: #4f46e5;
}

.metrics-table th button[data-active-sort='asc']::after {
  content: '↑';
  color: #4f46e5;
}

.metrics-listing {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metrics-listing__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.45);
}

.metrics-listing__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.3);
}

.metrics-listing__thumb img + span {
  display: none;
}

.metrics-listing__thumb span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metrics-listing__title {
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.metrics-listing__code {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metrics-metric {
  display: flex;
  flex-direction: column;
}

.metrics-metric__value {
  font-weight: 600;
}

.metrics-metric__rate {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metrics-empty {
  text-align: center;
  color: var(--text-secondary);
  margin: 0;
}

.metrics-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.metrics-pagination__controls button {
  border: 1px solid rgba(79, 70, 229, 0.5);
  background: rgba(79, 70, 229, 0.15);
  color: #c7d2fe;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-right: 0.5rem;
}

.metrics-pagination__controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.metrics-pagination__hint {
  color: var(--text-secondary);
  margin: 0;
}

.dashboard.metrics-view,
.dashboard.ranking-view {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px var(--shadow-color);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.metrics-view,
.ranking-view {
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.metrics-view .stat-card,
.ranking-view .stat-card {
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: 0 26px 48px rgba(2, 6, 23, 0.45);
  color: var(--text-primary);
}

.metrics-view .stat-card__label,
.ranking-view .stat-card__label,
.metrics-view .stat-card__chip,
.ranking-view .stat-card__chip,
.metrics-view .stat-card__meta,
.ranking-view .stat-card__meta {
  color: var(--text-secondary);
}

.metrics-toolbar {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.45);
  border-radius: 18px;
  padding: 1rem 1.5rem;
}

.metrics-toolbar__title {
  color: var(--text-primary);
}

.metrics-search label {
  color: var(--text-secondary);
}

.metrics-search input {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-primary);
}

.metrics-table-wrapper {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 26px 50px rgba(2, 6, 23, 0.5);
}

.metrics-table thead th,
.metrics-table th button {
  color: rgba(248, 250, 252, 0.85);
}

@media (max-width: 1024px) {
  .metrics-table {
    min-width: 960px;
    font-size: 0.9rem;
  }

  .metrics-table th,
  .metrics-table td {
    padding: 0.65rem 0.55rem;
  }

  .metrics-listing {
    gap: 0.75rem;
  }

  .metrics-listing__thumb {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .metrics-header__titles {
    max-width: 100%;
  }

  .metrics-toolbar__left,
  .metrics-toolbar__right {
    width: 100%;
  }
}
.metrics-view__status {
  margin-top: 0.5rem;
  justify-content: flex-end;
}

.operational-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.operational-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.82);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.55);
}

@media (min-width: 768px) {
  .operational-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.operational-card__content {
  flex: 2 1 340px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.operational-card__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 0.7rem;
  color: var(--accent);
}

.operational-card__title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.operational-card__description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.operational-card__notice {
  margin: 0;
  color: rgba(248, 250, 252, 0.85);
  font-size: 0.9rem;
  line-height: 1.5;
}

.operational-card__checklist {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.operational-card__checklist li {
  margin-bottom: 0.25rem;
}

.operational-card__actions {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.operational-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 18px;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(130deg, #06b6d4, #38f5b8);
  color: #020617;
  cursor: pointer;
}

.operational-card__action:focus-visible:not(:disabled) {
  outline: 2px solid rgba(6, 182, 212, 0.5);
  outline-offset: 2px;
}

.operational-card__action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.operational-card__action-icon {
  font-size: 1.2rem;
}

.operational-card__status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.products-view {
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.costs-view {
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.costs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}

.costs-table .is-numeric {
  text-align: right;
  white-space: nowrap;
}

.costs-table .products-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

.products-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(4, 7, 18, 0.78));
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.products-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.products-card__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.28rem;
  font-size: 0.7rem;
  color: var(--accent);
}

.products-card__title {
  margin: 0.1rem 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.products-card__description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.products-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(56, 245, 184, 0.12);
  border: 1px solid rgba(56, 245, 184, 0.35);
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
}

.products-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.products-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.products-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding: 0.85rem 0.95rem;
  font-size: 0.98rem;
}

.products-field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #0f172a;
  padding: 0.85rem 0.95rem;
  font-size: 0.98rem;
}

.products-field input:focus {
  outline: 2px solid rgba(56, 245, 184, 0.45);
  border-color: rgba(56, 245, 184, 0.6);
}

.modal-panel--light .products-field span {
  color: #0f172a;
  font-weight: 600;
}

.modal-panel--light .products-field input,
.modal-panel--light .products-field select {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.modal-panel--light .products-field input::placeholder,
.modal-panel--light .products-field select:placeholder-shown {
  color: #94a3b8;
}

.modal-panel--light .products-form__status {
  color: #475569;
}

.modal-panel--light .products-card__description {
  color: #475569;
}

.products-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.products-btn {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 0.8rem 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.products-btn:active {
  transform: translateY(1px);
}

.products-btn--primary {
  background: linear-gradient(130deg, #06b6d4, #38f5b8);
  color: #020617;
  border: none;
  box-shadow: 0 10px 30px rgba(56, 245, 184, 0.25);
}

.products-btn--secondary {
  border-color: rgba(56, 245, 184, 0.6);
  background: rgba(56, 245, 184, 0.1);
}

.products-btn--danger {
  background: var(--danger);
  color: #fff;
  border: none;
  box-shadow: 0 10px 28px rgba(248, 113, 113, 0.25);
}

.products-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.products-form__status {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.products-form__status[data-state='error'] {
  color: #fecdd3;
}

.products-form__status[data-state='edit'] {
  color: var(--accent);
}

.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.products-search {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 320px;
}

.products-search input {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 7, 18, 0.75);
  color: var(--text-primary);
  padding: 0.85rem 0.95rem;
}

.products-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.products-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(56, 245, 184, 0.12);
  border: 1px solid rgba(56, 245, 184, 0.35);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
}

.products-chip--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.products-chip--danger {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecdd3;
}

.products-table-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow-x: auto;
  background: rgba(2, 6, 23, 0.48);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.products-table th,
.products-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.products-thumb-cell {
  width: 72px;
}

.products-thumb-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.products-thumb-cell img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.products-thumb-fallback {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0 auto;
}

.products-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.products-table th[data-sort-key] {
  cursor: pointer;
  user-select: none;
}

.products-table tbody tr:hover {
  background: rgba(56, 245, 184, 0.04);
}

.products-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.products-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-secondary);
}

.products-empty__hint {
  margin: 0.25rem 0 0;
  color: rgba(226, 232, 240, 0.7);
}

.products-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.products-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.products-page-label {
  color: var(--text-secondary);
  font-weight: 700;
}

.products-page-size label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
}

.products-page-size select {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  padding: 0.35rem 0.55rem;
}

@media (max-width: 960px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .products-card__header {
    flex-direction: column;
  }
  .products-search {
    flex-direction: column;
    align-items: stretch;
  }
  .products-search input {
    width: 100%;
  }
  .products-btn {
    width: fit-content;
  }
}

.sales-view {
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.sales-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}

.sales-card {
  padding: 1rem 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(4, 7, 18, 0.8));
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 142px;
  box-shadow: 0 20px 45px var(--shadow-color);
}

.sales-card--approved {
  border-color: rgba(56, 245, 184, 0.45);
  background: linear-gradient(130deg, rgba(15, 23, 42, 0.96), rgba(56, 245, 184, 0.08));
}

.sales-card--warning {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(130deg, rgba(15, 23, 42, 0.94), rgba(251, 191, 36, 0.08));
}

.sales-card--muted {
  border-color: rgba(148, 163, 184, 0.3);
}

.sales-card__label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.sales-card__value {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700;
}

.sales-card__meta {
  margin: 0;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

.sales-card__meta strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.sales-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.3fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}
.sales-operations {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.5);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  grid-column: 1 / -1;
}
.sales-operations__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sales-operations__header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sales-operations__header h3 {
  margin: 0;
}
.sales-operations__hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sales-filters,
.sales-chart-card,
.sales-table-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.5);
}

.sales-filters {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sales-filters h3,
.sales-chart-card h3 {
  margin: 0;
}

.sales-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.sales-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sales-filter input,
.sales-filter select {
  width: 100%;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.sales-filter--action {
  align-self: end;
  justify-content: end;
}
.sales-filter__submit {
  border: 1px solid rgba(56, 245, 184, 0.6);
  background: rgba(56, 245, 184, 0.15);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  height: 100%;
  min-width: 120px;
}

.sales-chart-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 380px;
}
.sales-chart-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.sales-chart-card__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
}
.sales-chart-card__total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  min-width: 160px;
}
.sales-chart-card__total span {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
}
.sales-chart-card__total strong {
  font-size: 1.1rem;
  margin-top: 0.15rem;
}
.sales-chart {
  display: grid;
  grid-template-columns: minmax(360px, 1.8fr) minmax(120px, 0.35fr);
  gap: 0.8rem;
  align-items: center;
}
.sales-chart__canvas {
  position: relative;
  min-height: 320px;
  overflow: visible;
}
.sales-chart__canvas canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 380px;
}
.sales-chart__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  color: var(--text-secondary);
  border-radius: 14px;
  border: 1px dashed var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}
.sales-chart__legend {
  display: flex;
  flex-direction: column;
  max-width: 180px;
  justify-self: start;
}
.sales-chart__legend-item {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
}
.sales-chart__legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-flex;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.sales-chart__legend-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.sales-chart__legend-label {
  font-weight: 600;
  color: var(--text-secondary);
}
.sales-chart__note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sales-export {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.sales-export__group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.sales-export__group--left {
  justify-content: flex-start;
}
.sales-export__group--right {
  margin-left: auto;
  justify-content: flex-end;
}

.sales-export-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.sales-export__label {
  color: var(--text-secondary);
  font-weight: 600;
}

.sales-export button {
  border: 1px solid rgba(56, 245, 184, 0.6);
  background: rgba(56, 245, 184, 0.15);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.sales-sort {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  padding: 0;
}
.sales-sort[data-active='true'] {
  color: var(--text-primary);
}

/* Alerts modal */
.alerts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1100;
}
.alerts-modal-overlay[hidden] {
  display: none;
}
.alerts-modal {
  width: min(980px, 95vw);
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.65);
  padding: 1.5rem;
}
.alerts-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.alerts-modal__eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.alerts-modal__title {
  margin: 0.15rem 0;
  font-size: 1.4rem;
}
.alerts-modal__hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.alerts-modal__close {
  background: rgba(248, 250, 252, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
}
.alerts-modal__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.alerts-summary__item {
  background: rgba(148, 163, 184, 0.08);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.alerts-summary__item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.alerts-summary__item strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.4rem;
  color: var(--text-primary);
}
.alerts-modal__status {
  min-height: 1.25rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.alerts-modal__status[data-status='error'] {
  color: var(--danger);
}
.alerts-modal__status[data-status='success'] {
  color: var(--accent);
}
.alerts-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.alerts-empty {
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
}
.alerts-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.85rem 1rem;
}
.alerts-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.alerts-card__account {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}
.alerts-card__meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.alerts-card__issues {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.alerts-issue {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.65rem 0.5rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.alerts-issue__main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.alerts-issue__sku {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.alerts-issue__description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.alerts-issue__badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.alerts-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(248, 250, 252, 0.06);
}
.alerts-badge--warning {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.6);
  background: var(--danger-soft);
}
.alerts-badge--accent {
  color: #bbf7d0;
  border-color: rgba(56, 245, 184, 0.4);
  background: var(--accent-soft);
}
.alerts-issue__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.alerts-action {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
}
.alerts-action--ghost {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--text-secondary);
}
.alerts-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* Leveling modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-panel {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.5);
}
.modal-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.modal-panel__title {
  margin: 0;
  font-size: 1.25rem;
}
.modal-panel__close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}
.modal-panel--light {
  background: #f8fafc;
  color: #0f172a;
  max-width: 720px;
}
.level-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.level-hint {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}
.level-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.level-row--top {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
}
.level-row--dates,
.level-row--values {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.level-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: #0f172a;
}
.level-field input,
.level-field select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
}
.level-field input[type='checkbox'] {
  width: 18px;
  height: 18px;
}
.level-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.level-checkbox--inline {
  align-self: start;
}
.level-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.level-apply {
  background: #4c1d95;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
}
.level-cancel {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-weight: 700;
}

.sales-table-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sales-table-wrapper {
  overflow-x: auto;
}

.sales-table td,
.sales-table th {
  font-size: 0.85rem;
  padding: 0.5rem 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-table th {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}
.sales-table {
  width: 100%;
  table-layout: fixed;
  min-width: 1400px;
}
.sales-table th:nth-child(2),
.sales-table td:nth-child(2) {
  width: 360px;
  min-width: 320px;
}
.sales-thumb-cell {
  width: 76px;
  position: relative;
}
.sales-thumb-wrapper {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  position: relative;
}
.sales-thumb-cell img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sales-thumb-fallback {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.sales-ads-badge {
  position: absolute;
  bottom: -6px;
  right: -8px;
  font-size: 1.4rem;
  line-height: 1;
}
.sales-title-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 320px;
  max-width: 520px;
  flex: 1 1 360px;
}
.sales-title-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.sales-table td:last-child,
.sales-table th:last-child {
  padding-right: 0.8rem;
  text-align: right;
}
.sales-copy-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
}
.sales-copy-button:hover,
.sales-copy-button:focus-visible {
  border-color: rgba(56, 245, 184, 0.6);
  outline: none;
}

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

.sales-empty {
  margin: 0;
  color: var(--text-secondary);
}

.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  min-width: 260px;
  max-width: 360px;
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
  font-weight: 600;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--success {
  border-color: rgba(56, 245, 184, 0.7);
  color: #c8ffe9;
}
.toast--error {
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecdd3;
}
.toast--info {
  border-color: rgba(148, 163, 184, 0.6);
  color: #e2e8f0;
}

.products-wip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.products-wip__card {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.15), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(56, 189, 248, 0.12), transparent 45%),
    rgba(2, 6, 23, 0.8);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.products-wip__icon {
  font-size: 2.8rem;
  display: inline-flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: hourglass-dash 0.9s ease-in-out infinite alternate;
}
.products-wip__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.products-wip__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
}
.products-wip__title {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.products-wip__description {
  margin: 0;
  color: var(--text-secondary);
}

@keyframes hourglass-dash {
  0% {
    transform: translateX(-14px) rotate(-6deg) scale(1);
  }
  50% {
    transform: translateX(10px) rotate(4deg) scale(1.05);
  }
  100% {
    transform: translateX(18px) rotate(-5deg) scale(0.98);
  }
}

@media (max-width: 1200px) {
  .sales-grid {
    grid-template-columns: 1fr;
  }

  .sales-chart {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sales-chart-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sales-chart-card__total {
    width: 100%;
    align-items: flex-start;
  }
}
