:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-subdued: #f3f4f6;
  --text: #111827;
  --text-secondary: #374151;
  --text-body: #4b5563;
  --text-subdued: #6b7280;
  --text-placeholder: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #9ca3af;
  --primary: #047857;
  --primary-hover: #065f46;
  --info: #eff6ff;
  --success: #ecfdf5;
  --warning: #fffbeb;
  --critical: #fef2f2;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 12px;
  --sidebar-width: 340px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.1), transparent 32%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.05), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.app-content {
  padding: 24px 32px 32px;
}

.topbar {
  min-height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(249, 250, 251, 0.92);
  backdrop-filter: blur(8px);
}

.topbar-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  padding: 14px 0;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #047857;
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.topbar-nav {
  display: inline-flex;
  gap: 0;
  align-items: stretch;
  align-self: stretch;
  flex-wrap: nowrap;
  min-width: 0;
}

.topbar-nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 24px 4px 22px;
  margin-right: 32px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-subdued);
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 550;
  white-space: nowrap;
  transition:
    color 120ms ease;
}

.topbar-nav-tab.active {
  color: var(--text);
  font-weight: 600;
  background: transparent;
  border: none;
  box-shadow: none;
}

.topbar-nav-tab.active::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
}

.topbar-nav-tab:hover {
  color: var(--text);
  background: transparent;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-subdued);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.topbar-pricing-link {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  cursor: pointer;
}

.topbar-pricing-link:hover {
  background: #ffffff;
  border-color: #e5e7eb;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.user-chip-name,
.user-chip-plan,
.user-chip-divider {
  white-space: nowrap;
}

.user-chip:hover .user-chip-plan {
  background: #d1fae5;
}

.user-chip-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-plan {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 650;
}

.topbar-actions .button.secondary {
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border-color: #d1d5db;
  border-radius: 8px;
  box-shadow: none;
}

.topbar-actions .button.secondary:hover {
  background: var(--surface);
  border-color: #9ca3af;
}

.topbar.signed-out .topbar-nav,
.topbar.signed-out #user-chip,
.topbar.signed-out #sign-out-button {
  display: none !important;
}

.topbar.signed-out .topbar-main,
.topbar.signed-out .topbar-left {
  gap: 0;
}

.topbar h1 {
  margin: 0;
}

.topbar .eyebrow,
.topbar > h1 {
  display: none;
}

.sidebar-header h2,
.overview-head h2,
.modal-head h2,
.empty-state h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  color: var(--text);
}

.banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-body);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 16px 0 8px;
}

.auth-hero {
  min-width: 0;
}

.auth-kicker {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-subdued);
}

.auth-panel h2 {
  margin: 0;
  max-width: 560px;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.auth-lead {
  max-width: 560px;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-body);
}

.auth-panel p:last-child {
  margin-bottom: 0;
  color: var(--text-body);
}

.auth-value-list {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.auth-value-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 560px;
}

.auth-value-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: #ecfdf5;
  box-shadow: inset 0 0 0 6px #047857;
}

.auth-value-item strong {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-value-item p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-subdued);
}

.auth-preview {
  width: min(520px, 100%);
  margin-top: 36px;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.auth-preview-head,
.auth-preview-store,
.auth-preview-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-preview-head {
  margin-bottom: 18px;
}

.auth-preview-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

.auth-preview-label {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subdued);
}

.auth-preview-store {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.auth-preview-store span:first-child {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
}

.auth-preview-store span:last-child,
.auth-preview-metric span {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-subdued);
}

.auth-preview-metrics {
  align-items: stretch;
}

.auth-preview-metric {
  flex: 1 1 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.auth-preview-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.auth-column {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 620px;
}

.auth-visual {
  position: relative;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 620px;
  width: 100%;
}

.auth-visual-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.auth-visual-orb-primary {
  width: 420px;
  height: 420px;
  top: 110px;
  right: 8px;
  background: rgba(16, 185, 129, 0.1);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: 0;
  position: relative;
  z-index: 2;
  padding: 34px;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  transform: translateY(-12px);
}

.auth-card-copy h3 {
  margin: 12px 0 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-card-copy p:last-child {
  margin: 10px 0 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-subdued);
}

.auth-google-button {
  width: 100%;
  min-height: 48px;
  margin-top: 28px;
  border: none;
  border-radius: 12px;
  background: #047857;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.auth-google-button:hover {
  background: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(4, 120, 87, 0.22);
}

.auth-google-button:active {
  transform: translateY(0);
}

.auth-footnote {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-placeholder);
  text-align: center;
}

.landing-page {
  padding: 80px 0 0;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  gap: 64px;
  align-items: center;
  padding-bottom: 88px;
}

.landing-hero-copy {
  min-width: 0;
}

.landing-eyebrow {
  margin: 0;
  color: #047857;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.landing-hero h2 {
  max-width: 620px;
  margin: 14px 0 0;
  color: #111827;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.landing-lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.landing-primary-cta,
.landing-secondary-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.landing-secondary-cta {
  padding: 0 18px;
  color: #374151;
}

.landing-secondary-cta:hover {
  background: #f9fafb;
  text-decoration: none;
}

.landing-trust-note {
  margin: 16px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-preview-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.preview-topline,
.preview-list-head,
.preview-product-row,
.preview-stats {
  display: flex;
  align-items: center;
}

.preview-topline {
  justify-content: space-between;
  gap: 16px;
}

.preview-label {
  margin: 0;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.preview-topline h3 {
  margin: 4px 0 2px;
  color: #111827;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
}

.preview-topline span:not(.landing-status-badge),
.preview-list-head span,
.preview-product-row span,
.preview-stats span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.preview-stats {
  align-items: stretch;
  gap: 10px;
  margin-top: 22px;
}

.preview-stats div {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.preview-stats strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 30px;
  font-weight: 750;
  line-height: 1;
}

.preview-list {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.preview-list-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-list-head h4 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.preview-product-row {
  gap: 12px;
  min-height: 66px;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
}

.preview-product-row:first-of-type {
  border-top: 0;
}

.preview-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f3f4f6 0%, #ffffff 100%);
}

.preview-product-row div {
  min-width: 0;
  flex: 1 1 auto;
}

.preview-product-row strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-product-row em {
  flex: 0 0 auto;
  color: #111827;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.landing-section {
  padding: 72px 0 0;
}

.landing-section-head {
  max-width: 680px;
}

.landing-section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.landing-section-head p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
  font-weight: 800;
}

.feature-card h3 {
  margin: 18px 0 0;
  color: #111827;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}

.feature-card p {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.landing-pricing-section {
  scroll-margin-top: 80px;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.landing-pricing-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.landing-pricing-card.recommended {
  border-color: #a7f3d0;
}

.landing-pricing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-pricing-card h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.landing-pricing-card p {
  margin: 14px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.landing-pricing-card p strong {
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
}

.landing-pricing-card ul {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.landing-pricing-card li {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.landing-pricing-card .button {
  width: 100%;
  justify-content: center;
}

.landing-pricing-link {
  display: inline-flex;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #047857;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  cursor: pointer;
}

.landing-pricing-link:hover {
  text-decoration: underline;
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.state-card {
  min-height: 148px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.state-card p {
  margin: 18px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.state-card.checking {
  border-color: #bfdbfe;
}

.state-card.active {
  border-color: #a7f3d0;
}

.state-card.unsupported {
  border-color: #fde68a;
}

.state-card.sync-issue {
  border-color: #fecdca;
}

.landing-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.landing-status-badge.checking {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.landing-status-badge.active {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.landing-status-badge.unsupported {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.landing-status-badge.sync-issue {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.landing-final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 80px;
  padding: 40px;
  border-radius: 28px;
  background: #111827;
  color: #ffffff;
}

.landing-final-cta h2 {
  margin: 0;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.landing-final-cta p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.6;
}

.landing-final-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.landing-final-button:hover {
  background: #f3f4f6;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.landing-footer strong {
  color: #374151;
}

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

.workspace.history-mode .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 24px;
  padding: 16px;
  height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.store-limit-summary {
  margin: 6px 0 0;
  display: grid;
  gap: 4px;
}

.store-limit-usage,
.store-limit-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.store-limit-usage {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.store-limit-usage.near-limit {
  color: #b45309;
}

.store-limit-note {
  width: fit-content;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.store-limit-note.limit-reached {
  padding: 2px 8px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fffbeb;
  color: #b45309;
}

.store-limit-link,
.inline-link-button,
.plans-back {
  padding: 0;
  border: 0;
  background: transparent;
  color: #047857;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.store-limit-link:hover,
.inline-link-button:hover,
.plans-back:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--text-subdued);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-actions,
.empty-actions,
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.subtle,
.field-hint,
.store-domain,
.mini-empty,
.empty-state p,
.tab-empty p,
.event-copy p,
.event-meta span,
.stat-label,
.banner {
  color: var(--text-subdued);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.banner.info {
  background: var(--info);
}

.banner.success {
  background: var(--success);
}

.banner.warning {
  background: var(--warning);
}

.banner.critical {
  background: var(--critical);
}

#shop-banner-slot:empty {
  display: none;
}

#shop-banner-slot .banner {
  margin: 0;
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.store-search {
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.store-list-items {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: min-content;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.store-search-empty {
  padding: 8px 4px 0;
  color: var(--text-subdued);
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}

.skeleton-list,
.skeleton-events {
  display: grid;
  gap: 12px;
}

.skeleton-events {
  margin-top: 16px;
}

.skeleton-card,
.skeleton-title,
.skeleton-date,
.skeleton-pill,
.skeleton-event {
  position: relative;
  overflow: hidden;
  background: var(--surface-subdued);
  border-radius: 12px;
}

.skeleton-card::after,
.skeleton-title::after,
.skeleton-date::after,
.skeleton-pill::after,
.skeleton-event::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.65) 50%,
    transparent 100%
  );
  animation: shimmer 1.4s infinite;
}

.skeleton-card {
  height: 104px;
  border: 1px solid var(--border);
}

.skeleton-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.skeleton-title {
  width: min(220px, 100%);
  flex: 1 1 220px;
  height: 36px;
}

.skeleton-date {
  width: min(180px, 100%);
  flex: 0 1 180px;
  height: 44px;
}

.skeleton-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skeleton-pill {
  width: min(148px, 100%);
  flex: 1 1 148px;
  height: 44px;
}

.skeleton-event {
  height: 96px;
  border: 1px solid var(--border);
}

.store-item {
  position: relative;
  width: 100%;
  max-width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  min-height: 88px;
  overflow: hidden;
}

.store-item-layout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.store-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-subdued);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.store-icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-icon-fallback {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  color: #047857;
}

.store-item-wrap {
  position: relative;
  min-width: 0;
}

.store-info {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 84px;
}

.store-info .queue-info-block {
  max-width: 100%;
}

.add-store-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-style: dashed;
  background: var(--surface-subdued);
}

.add-store-copy {
  min-width: 0;
  padding-right: 0;
}

.add-store-copy .store-domain {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.add-store-item:hover {
  background: var(--surface);
  border-color: #9ca3af;
}

.add-store-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-subdued);
  font-size: 20px;
  line-height: 20px;
  flex-shrink: 0;
}

.store-item.active {
  border-color: #059669;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.12);
  background: #f0fdf4;
}

.store-item:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.store-item:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.store-item:disabled:hover {
  border-color: var(--border);
  background: var(--surface-subdued);
}

.store-remove-button {
  position: absolute;
  bottom: 12px;
  right: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-subdued);
  padding: 4px 10px;
  font-size: 12px;
  line-height: 18px;
  opacity: 0;
  pointer-events: none;
  display: grid;
  justify-items: start;
  gap: 2px;
  text-align: left;
  transition: opacity 120ms ease;
}

.store-item-wrap:hover .store-remove-button,
.store-item-wrap:focus-within .store-remove-button {
  opacity: 1;
  pointer-events: auto;
}

.store-remove-button:hover {
  color: #8e1f0b;
  border-color: #e3b8a9;
  background: var(--critical);
}

.store-remove-button.locked,
.store-state-remove.locked {
  color: #9ca3af;
  cursor: not-allowed;
}

.store-remove-button.locked {
  min-width: 0;
  padding: 4px 10px;
}

.store-remove-button.locked:hover {
  color: #9ca3af;
  border-color: var(--border);
  background: var(--surface);
}

.store-state-remove.locked {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 2px;
  white-space: normal;
  text-align: left;
}

.store-remove-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 650;
}

.store-remove-sub {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.store-remove-lock {
  position: relative;
  width: 12px;
  height: 12px;
  color: transparent;
  font-size: 0;
  flex: 0 0 auto;
}

.store-remove-lock::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 8px;
  height: 6px;
  border: 1.5px solid #9ca3af;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.store-remove-lock::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 10px;
  height: 7px;
  border-radius: 2px;
  background: #9ca3af;
}

.remove-lock-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: 260px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.store-remove-button .remove-lock-tooltip {
  right: -8px;
  bottom: calc(100% + 10px);
}

.remove-lock-tooltip strong,
.remove-lock-tooltip span,
.remove-lock-tooltip em {
  display: block;
}

.remove-lock-tooltip strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.remove-lock-tooltip span {
  margin-top: 4px;
}

.remove-lock-tooltip em {
  margin-top: 6px;
  color: #9ca3af;
  font-style: normal;
}

.store-remove-button.locked:hover .remove-lock-tooltip,
.store-remove-button.locked:focus-visible .remove-lock-tooltip,
.store-state-remove.locked:hover .remove-lock-tooltip,
.store-state-remove.locked:focus-visible .remove-lock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.store-item-head,
.event-meta,
.events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-name,
.event-copy h3 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-domain,
.event-meta,
.field-hint {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-subdued);
}

.store-domain {
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-info-block {
  width: min(520px, 100%);
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

.queue-info-block.running {
  border-color: #bfdbfe;
  background: #ffffff;
}

.queue-info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.queue-info-row + .queue-info-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dbeafe;
}

.queue-info-row span,
.queue-info-block p {
  margin: 0;
  color: var(--text-subdued);
  font-size: 13px;
  line-height: 1.45;
}

.queue-info-row strong {
  color: #1d4ed8;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  text-align: right;
}

.queue-info-row.secondary strong {
  color: var(--text);
}

.queue-info-block p {
  margin-top: 8px;
}

.queue-info-block.compact {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.queue-info-block.compact .queue-info-row {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.queue-info-block.compact .queue-info-row span,
.queue-info-block.compact .queue-info-row strong,
.queue-info-block.compact p {
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
}

.queue-info-block.compact .queue-info-row span {
  color: var(--text-subdued);
}

.queue-info-block.compact .queue-info-row strong {
  color: #1d4ed8;
}

.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: #b42318;
}

.field-error.info {
  color: #1d4ed8;
}

.status-pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  border: 1px solid var(--border);
  text-transform: capitalize;
}

.store-item > .status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
}

.status-pill.ready,
.status-pill.demo {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-pill.error {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.status-pill.warning,
.status-pill.scanning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.status-pill.active {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-pill.checking {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-pill.unsupported {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.status-pill.sync_issue {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecaca;
}

.content,
.dashboard {
  display: grid;
  gap: 16px;
}

.plans-page {
  background: #f9fafb;
}

.plans-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
}

.plans-back {
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.45;
}

.plans-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.plans-hero h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 760;
}

.plans-hero p:last-child {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.55;
}

.plans-sign-in-cta {
  flex: 0 0 auto;
}

.checkout-shell {
  max-width: 760px;
}

.checkout-card {
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 30px rgba(17, 24, 39, 0.06);
}

.checkout-card h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 32px;
  line-height: 1.16;
}

.checkout-subtitle {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.checkout-summary div {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.checkout-summary span,
.checkout-summary strong {
  display: block;
}

.checkout-summary span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.checkout-summary strong {
  margin-top: 4px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.checkout-notice,
.checkout-error,
.checkout-renewal-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.checkout-notice,
.checkout-renewal-note {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.checkout-renewal-note {
  color: #1f2937;
}

.checkout-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.checkout-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.billing-success-shell {
  max-width: 720px;
  min-height: min(620px, calc(100vh - 160px));
  display: grid;
  align-items: center;
  position: relative;
}

.billing-success-shell::before {
  content: "";
  position: absolute;
  inset: 24px 32px auto;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14), transparent 68%);
  pointer-events: none;
}

.billing-success-card {
  position: relative;
  padding: 34px;
  text-align: left;
  overflow: hidden;
}

.billing-success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #059669;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.24);
  animation: successScaleIn 480ms cubic-bezier(0.18, 0.89, 0.32, 1.2) both;
}

.billing-success-icon span {
  font-size: 32px;
  line-height: 1;
  font-weight: 760;
}

.billing-success-note {
  margin: 14px 0 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.55;
}

.billing-success-summary {
  margin-top: 24px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d1fae5;
  border-radius: 18px;
  background: #f0fdf4;
}

.billing-success-summary div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.billing-success-summary span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

.billing-success-summary strong {
  color: #047857;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 720;
  text-align: right;
}

@keyframes successScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  70% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.plans-summary-card,
.pricing-card,
.fair-use-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 30px rgba(17, 24, 39, 0.06);
}

.plans-summary-card {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.plans-summary-label {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.plans-summary-card h3 {
  margin: 6px 0 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

.plans-summary-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plans-summary-grid div {
  min-width: 0;
}

.plans-summary-grid dt {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.plans-summary-grid dd {
  margin: 4px 0 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
}

.plans-custom-limit {
  grid-column: 1 / -1;
  width: fit-content;
  margin: -6px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.subscription-ending-note,
.plans-billing-error,
.plans-summary-actions {
  grid-column: 1 / -1;
}

.subscription-ending-note {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.plans-billing-error {
  margin-top: -4px;
}

.plans-summary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: -4px;
}

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

.pricing-card {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.pricing-card.recommended {
  border-color: #a7f3d0;
}

.pricing-card-head {
  display: grid;
  gap: 12px;
  min-height: 112px;
  align-content: start;
}

.pricing-card h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
}

.pricing-card p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.pricing-card p strong {
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
}

.recommended-badge {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 750;
}

.pricing-card ul {
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.pricing-card li {
  position: relative;
  padding-left: 20px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.pricing-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #047857;
}

.pricing-action {
  width: 100%;
  margin-top: auto;
  justify-content: center;
}

.fair-use-card {
  margin-top: 24px;
  padding: 24px;
}

.fair-use-card h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 20px;
  line-height: 1.25;
}

.fair-use-card p {
  margin: 6px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid #d1fae5;
  border-radius: 14px;
  background: #064e3b;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.limit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.38);
}

.limit-modal {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.limit-modal h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

.limit-modal p {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.limit-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.panel-card,
.events-card,
.empty-state {
  padding: 28px 32px;
}

.history-card {
  padding: 20px;
}

.tab-count {
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
}

.store-detail-header {
  display: grid;
  gap: 22px;
}

.store-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.store-meta .eyebrow {
  margin-bottom: 10px;
}

.store-meta h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.store-toolbar {
  display: grid;
  gap: 18px;
  align-items: start;
}

.store-state-panel {
  margin-top: 30px;
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.store-state-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.store-state-copy h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--text);
}

.store-state-copy p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.store-state-note {
  color: var(--text-subdued);
}

.store-state-error {
  color: #92400e;
  font-weight: 500;
}

.store-state-icon,
.store-state-spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.store-state-icon {
  font-size: 18px;
  font-weight: 700;
}

.store-state-icon.info {
  color: #1d4ed8;
  background: #eff6ff;
}

.store-state-icon.warning {
  color: #b45309;
  background: #fffbeb;
}

.store-state-icon.critical {
  color: #b42318;
  background: #fef3f2;
}

.store-state-spinner {
  border: 3px solid #dbeafe;
  border-top-color: #1d4ed8;
  animation: spin 0.9s linear infinite;
}

.store-state-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.events-tabs {
  flex: 0 0 auto;
  display: flex;
  white-space: nowrap;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.search-field {
  display: grid;
  gap: 6px;
  max-width: 360px;
  position: relative;
}

.search-field-inline {
  width: clamp(240px, 28vw, 360px);
  min-width: 180px;
  max-width: 360px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-placeholder);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.search-clear-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2f5597;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  font-weight: 650;
}

.search-clear-button:hover {
  background: #f3f4f6;
  color: #1f3f79;
}

.search-clear-button[hidden] {
  display: none;
}

.search-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--text-subdued);
}

.search-input {
  width: 100%;
  border: 1px solid var(--border);
  min-height: 44px;
  border-radius: 12px;
  padding: 0 14px 0 44px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

.search-field.has-value .search-input {
  padding-right: 46px;
}

.search-input::placeholder {
  color: var(--text-placeholder);
}

.search-input:focus {
  outline: 2px solid rgba(0, 128, 96, 0.16);
  outline-offset: 1px;
  border-color: var(--primary);
}

.panel-tabs {
  margin-top: 16px;
}

.history-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.history-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.history-filter {
  display: grid;
  gap: 6px;
  min-width: 200px;
  color: var(--text-subdued);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.date-range-field {
  position: relative;
}

.export-disabled-reason {
  max-width: 220px;
  margin: 6px 0 0;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.4;
}

.export-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.42);
  display: grid;
  place-items: center;
}

.export-modal {
  width: 520px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.export-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.export-modal-head h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.export-modal-head p,
.export-modal-muted {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.export-modal-muted {
  font-size: 13px;
}

.export-modal-section {
  margin-top: 22px;
}

.export-modal-section h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}

.export-type-grid {
  display: grid;
  gap: 10px;
}

.export-type-card {
  width: 100%;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
}

.export-type-card:hover:not(:disabled) {
  border-color: #d1d5db;
  background: #f9fafb;
}

.export-type-card.selected {
  border-color: #059669;
  background: #ecfdf5;
}

.export-type-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.export-type-mark {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
}

.export-type-card.selected .export-type-mark {
  border: 5px solid #059669;
}

.export-type-card strong,
.export-type-card span span,
.export-type-card em {
  display: block;
}

.export-type-card strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}

.export-type-card span span {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.export-type-card em {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.4;
  font-style: normal;
  font-weight: 600;
}

.export-limit-panel,
.export-preparing,
.export-modal-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
}

.export-limit-panel {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.export-limit-panel strong,
.export-limit-panel span,
.export-preparing strong,
.export-preparing span span {
  display: block;
}

.export-limit-panel strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.export-limit-panel span {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.export-limit-panel .inline-link-button {
  display: inline;
  margin-left: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.export-preparing {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: #eff6ff;
  color: #1d4ed8;
}

.export-preparing strong {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.export-preparing span span {
  margin-top: 4px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.export-spinner {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #bfdbfe;
  border-top-color: #1d4ed8;
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.export-modal-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.export-modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.42);
  display: grid;
  place-items: center;
}

.confirm-modal {
  width: 420px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.confirm-modal h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.confirm-modal p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.confirm-modal-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #b42318 !important;
  font-weight: 500;
}

.confirm-modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.date-range-picker {
  position: relative;
}

.date-range-trigger {
  min-width: 150px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.date-range-trigger:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(760px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.range-controls {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
}

.range-presets {
  display: grid;
  gap: 8px;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}

.range-preset {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-subdued);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  text-align: left;
}

.range-preset:hover {
  color: var(--text);
  background: var(--surface-subdued);
}

.range-preset.active {
  border-color: var(--border);
  background: var(--surface-subdued);
  color: var(--text);
}

.range-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.calendar-range-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.calendar-range-label {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-range-nav {
  display: inline-flex;
  gap: 8px;
}

.calendar-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.range-calendar-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.range-calendar-card .calendar-head {
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.range-calendar-card .calendar-head strong {
  flex: 1 1 auto;
}

.range-calendar-card .calendar-range-nav {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.range-calendar-card .calendar-range-nav.align-right {
  order: 2;
}

.range-calendar-card .calendar-grid,
.range-calendar-card .calendar-weekdays {
  width: 100%;
}

.date-input-group {
  display: grid;
  gap: 6px;
  min-width: 152px;
  color: var(--text-subdued);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.date-input-group input {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  padding: 0 14px;
}

.date-input-group input:focus {
  outline: 2px solid rgba(0, 128, 96, 0.16);
  outline-offset: 1px;
  border-color: var(--primary);
}

.date-range-error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: #b42318;
}

.range-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.category-filter {
  position: relative;
  width: 220px;
  min-width: 170px;
  max-width: 220px;
}

.category-filter-trigger {
  width: 100%;
  height: 44px;
  min-width: 170px;
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-filter-trigger:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.category-filter-trigger:focus-visible {
  outline: 2px solid rgba(4, 120, 87, 0.18);
  outline-offset: 2px;
  border-color: var(--primary);
}

.category-filter-label,
.category-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-filter-label {
  flex: 1 1 auto;
  text-align: left;
}

.category-filter-chevron {
  flex: 0 0 auto;
  color: var(--text-subdued);
  font-size: 16px;
  line-height: 1;
  transition: transform 120ms ease;
}

.category-filter.open .category-filter-chevron {
  transform: rotate(180deg);
}

.category-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.category-option {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  text-align: left;
}

.category-option:hover,
.category-option:focus-visible {
  outline: none;
  background: #f3f4f6;
  color: #111827;
}

.category-option.selected {
  background: #ecfdf5;
  color: #047857;
  font-weight: 650;
}

.category-option-check {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.date-picker {
  position: relative;
}

.date-picker-trigger {
  width: 160px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.date-picker-chevron {
  color: var(--text-subdued);
  font-size: 12px;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
}

.calendar-card {
  min-width: 296px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.range-calendar-card.calendar-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calendar-head,
.pagination-bar,
.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-head {
  margin-bottom: 10px;
}

.calendar-head strong {
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  font-weight: 600;
}

.calendar-nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-subdued);
  font-size: 18px;
  line-height: 18px;
}

.calendar-nav[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  line-height: 16px;
  color: var(--text-subdued);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-day {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.calendar-day.in-range {
  background: #f0fdf4;
  border-color: #d1fae5;
}

.calendar-day.active {
  border-color: var(--primary);
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

.calendar-day:disabled,
.calendar-day.muted {
  border-color: transparent;
  background: transparent;
  color: var(--border-strong);
  cursor: not-allowed;
}

.calendar-empty {
  min-width: 220px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--text-subdued);
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface-subdued);
  padding: 4px;
  min-height: 48px;
  border-radius: 14px;
  gap: 4px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 0;
  min-height: 40px;
  border-radius: 10px;
  padding: 0 16px;
  color: var(--text-subdued);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.event-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pagination-bar {
  margin-top: 4px;
  padding-top: 4px;
}

.pagination-summary,
.pagination-page {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-subdued);
}

.run-history {
  margin-top: 16px;
}

.trend-panel-head {
  display: grid;
  gap: 6px;
}

.trend-panel-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

.trend-panel-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
}

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

.trend-summary-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  gap: 10px;
  min-width: 0;
}

.trend-summary-card span {
  color: var(--text-subdued);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.trend-summary-card strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.trend-chart-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.trend-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.trend-chart-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

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

.trend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.trend-dot.new {
  background: #047857;
}

.trend-dot.price {
  background: #2563eb;
}

.trend-chart-scroll {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.trend-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 900 / 320;
  overflow: visible;
}

.trend-grid line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.trend-grid text,
.trend-x-labels text {
  fill: var(--text-subdued);
  font-size: 12px;
  font-weight: 600;
}

.trend-axis {
  stroke: #d1d5db;
  stroke-width: 1;
}

.trend-bar-new {
  fill: rgba(4, 120, 87, 0.24);
}

.trend-bar-price {
  fill: rgba(37, 99, 235, 0.22);
}

.trend-hover-zone {
  fill: transparent;
  cursor: crosshair;
}

.trend-cursor {
  stroke: #9ca3af;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  pointer-events: none;
}

.trend-active-dot {
  fill: #ffffff;
  stroke-width: 3;
  opacity: 0;
  pointer-events: none;
}

.trend-active-dot.new {
  stroke: #047857;
}

.trend-active-dot.price {
  stroke: #2563eb;
}

.trend-line-new,
.trend-line-price {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line-new {
  stroke: #047857;
}

.trend-line-price {
  stroke: #2563eb;
}

.trend-chart-day:hover .trend-bar-new {
  fill: rgba(4, 120, 87, 0.38);
}

.trend-chart-day:hover .trend-bar-price {
  fill: rgba(37, 99, 235, 0.36);
}

.trend-chart-day:hover .trend-cursor,
.trend-chart-day:hover .trend-active-dot {
  opacity: 1;
}

.trend-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 190px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  color: var(--text-body);
  display: grid;
  gap: 7px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 100ms ease,
    transform 100ms ease;
}

.trend-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.trend-tooltip strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
}

.trend-tooltip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trend-loading {
  display: grid;
  gap: 12px;
}

.trend-empty {
  min-height: 220px;
}

.run-table {
  display: grid;
  gap: 8px;
}

.run-table-head,
.run-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr 1fr 0.8fr;
  gap: 12px;
  align-items: start;
}

.run-table-head {
  padding: 0 12px;
  color: var(--text-subdued);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.run-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.run-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.run-cell strong,
.run-cell span {
  overflow-wrap: anywhere;
}

.run-cell strong {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
}

.run-cell span {
  color: var(--text-subdued);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.history-empty {
  padding: 24px 0 8px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.product-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image-wrap img,
.product-image-placeholder {
  width: 100%;
  height: 100%;
}

.product-image-wrap img {
  object-fit: contain;
  display: block;
}

.product-image-placeholder {
  background: linear-gradient(180deg, #f3f4f6 0%, #f8fafc 100%);
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

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

.product-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 24px;
  max-width: 100%;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-subdued);
  color: var(--text-body);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 10px;
}

.product-price {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 750;
  color: var(--text);
}

.product-first-seen {
  color: var(--text-subdued);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.product-first-seen.unknown {
  color: var(--text-placeholder);
}

.product-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: #005bd3;
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

.empty-state,
.tab-empty,
.mini-empty {
  gap: 12px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state {
  min-height: 480px;
  padding: 48px 24px;
}

.tab-empty {
  min-height: 300px;
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 16px;
}

.empty-state h2,
.tab-empty h3,
.history-empty h3 {
  color: var(--text);
}

.empty-state h2 {
  font-size: 30px;
  font-weight: 700;
}

.tab-empty h3,
.history-empty h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
}

.empty-state p,
.tab-empty p,
.mini-empty p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-subdued);
}

.empty-illustration {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 104px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-subdued);
}

.empty-illustration span {
  display: block;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f7 100%);
}

.empty-illustration span:nth-child(2) {
  transform: translateY(10px);
}

.empty-illustration.compact {
  width: 88px;
  padding: 10px;
}

.empty-illustration.compact span {
  height: 36px;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.danger {
  background: #b42318;
  color: #ffffff;
}

.button.danger:hover:not(:disabled) {
  background: #912018;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button.secondary,
.button.ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.button-small {
  padding: 8px 10px;
  font-size: 13px;
}

.export-button {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border-color: #e5e7eb;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: #111827;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-button.button.secondary:hover:not(:disabled) {
  background: var(--bg);
  border-color: #d1d5db;
  color: var(--text);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 1;
}

.mobile-only {
  display: none;
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(32, 34, 35, 0.5);
}

.modal-card {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(22, 29, 37, 0.16);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

#add-store-modal .modal-card {
  width: min(560px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 18px;
}

#add-store-modal .modal-head {
  margin-bottom: 24px;
}

#add-store-modal .modal-head .eyebrow {
  margin-bottom: 6px;
}

#add-store-modal .modal-head h2 {
  font-size: 28px;
  line-height: 1.15;
}

#add-store-modal .field {
  gap: 8px;
}

#add-store-modal label,
#add-store-modal .field-hint,
#add-store-modal .field-error {
  margin: 0;
}

#add-store-modal input {
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
}

#add-store-modal .field-hint {
  margin-top: 8px;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.45;
}

#add-store-modal .field-error:not(.hidden) {
  margin-top: 4px;
}

#add-store-modal .monitor-lock-notice {
  margin-top: 18px;
}

#add-store-modal .modal-actions {
  margin-top: 16px;
  gap: 10px;
}

.monitor-lock-notice {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text-secondary);
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

select {
  font-weight: 500;
}

input::placeholder {
  color: var(--text-placeholder);
}

input:focus-visible,
select:focus-visible,
.button:focus-visible,
.store-item:focus-visible,
.tab:focus-visible,
.icon-button:focus-visible {
  outline: 2px solid #2c6ecb;
  outline-offset: 2px;
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 24px;
  color: var(--text-subdued);
  cursor: pointer;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

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

a {
  color: #005bd3;
  text-decoration: none;
}

#selected-store-name {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .landing-page {
    padding-top: 56px;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-bottom: 64px;
  }

  .landing-hero h2 {
    max-width: 720px;
    font-size: 46px;
  }

  .dashboard-preview-card {
    max-width: 680px;
  }

  .feature-grid,
  .state-grid,
  .landing-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-final-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-final-button {
    width: fit-content;
  }

  .auth-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    min-height: auto;
    padding: 8px 0 0;
  }

  .auth-column,
  .auth-visual {
    min-height: auto;
    max-width: 100%;
    justify-content: stretch;
  }

  .auth-visual-orb {
    opacity: 0.7;
  }

  .auth-card {
    max-width: 100%;
    margin-right: 0;
    transform: none;
  }

  .auth-preview {
    width: 100%;
  }

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

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .mobile-only {
    display: inline-flex;
  }

  .run-table-head {
    display: none;
  }

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

  .store-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .search-field-inline {
    flex: 1 1 220px;
    max-width: none;
  }

  .store-state-actions {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .plans-shell {
    padding: 28px 24px;
  }

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

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

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

@media (max-width: 640px) {
  .app-content {
    padding: 24px 20px 24px;
  }

  .landing-page {
    padding-top: 38px;
  }

  .landing-hero {
    gap: 30px;
    padding-bottom: 46px;
  }

  .landing-hero h2 {
    font-size: 38px;
    letter-spacing: -0.04em;
  }

  .landing-lead {
    font-size: 16px;
  }

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

  .landing-primary-cta,
  .landing-secondary-cta {
    width: 100%;
  }

  .dashboard-preview-card {
    padding: 18px;
    border-radius: 20px;
  }

  .preview-topline {
    align-items: flex-start;
  }

  .preview-stats {
    flex-direction: column;
  }

  .preview-product-row strong {
    white-space: normal;
  }

  .landing-section {
    padding-top: 54px;
  }

  .landing-section-head h2,
  .landing-final-cta h2 {
    font-size: 28px;
  }

  .feature-grid,
  .state-grid,
  .landing-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plans-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .plans-sign-in-cta {
    width: 100%;
    justify-content: center;
  }

  .landing-final-cta {
    margin-top: 60px;
    padding: 28px;
    border-radius: 24px;
  }

  .landing-final-button {
    width: 100%;
  }

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

  .auth-panel h2 {
    font-size: 34px;
  }

  .auth-lead {
    font-size: 16px;
  }

  .auth-card {
    margin-right: 0;
    padding: 24px;
    border-radius: 20px;
    transform: none;
  }

  .auth-visual-orb {
    display: none;
  }

  .auth-preview {
    display: none;
  }

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

  .skeleton-title,
  .skeleton-date,
  .skeleton-pill {
    width: 100%;
  }

  .sidebar-header,
  .modal-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-main {
    gap: 12px;
    min-height: 72px;
  }

  .topbar-left {
    gap: 12px;
    min-width: 0;
  }

  .topbar-brand {
    min-width: 0;
    padding: 14px 0;
  }

  .brand-subtitle {
    display: none;
  }

  .topbar-nav {
    gap: 0;
  }

  .topbar-nav-tab {
    margin-right: 20px;
    padding: 24px 2px 22px;
  }

  .topbar-nav-tab[data-content-tab="plans"] {
    display: none;
  }

  .topbar-nav-tab {
    margin-right: 16px;
  }

  .topbar-actions {
    width: auto;
  }

  .user-chip {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-chip-name {
    max-width: 100px;
  }

  .overview-actions,
  .modal-actions,
  .empty-actions {
    width: 100%;
  }

  .topbar-actions .button {
    flex: 0 0 auto;
  }

  .overview-actions .button,
  .modal-actions .button,
  .empty-actions .button {
    flex: 1 1 auto;
  }

  .store-meta {
    align-items: start;
  }

  .store-toolbar,
  .toolbar-actions,
  .history-head {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    max-width: none;
  }

  .search-field-inline,
  .category-filter {
    width: 100%;
    max-width: none;
  }

  .category-filter-trigger,
  .category-filter-panel {
    width: 100%;
    max-width: none;
  }

  .plans-shell {
    padding: 24px 0;
  }

  .plans-hero h2 {
    font-size: 30px;
  }

  .plans-summary-grid,
  .pricing-grid,
  .checkout-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .plans-summary-card,
  .pricing-card,
  .fair-use-card,
  .limit-modal {
    border-radius: 20px;
  }

  .limit-modal-actions .button {
    flex: 1 1 auto;
  }

  .checkout-actions .button {
    flex: 1 1 auto;
  }

  .billing-success-shell {
    min-height: auto;
  }

  .billing-success-card {
    padding: 26px;
  }

  .billing-success-summary div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .billing-success-summary strong {
    text-align: left;
  }

  .date-range-field,
  .date-range-picker,
  .date-range-trigger {
    width: 100%;
  }

  .date-range-popover {
    left: 0;
    right: 0;
    width: 100%;
  }

  .range-controls {
    grid-template-columns: 1fr;
  }

  .range-presets {
    width: 100%;
  }

  .calendar-range-grid {
    grid-template-columns: 1fr;
  }

  .date-input-group {
    min-width: 0;
    width: 100%;
  }

  .store-state-copy {
    grid-template-columns: 1fr;
  }

  .store-state-actions .button {
    width: 100%;
  }

  .history-filter {
    min-width: 0;
  }

  .calendar-card,
  .calendar-empty {
    min-width: 0;
    width: 100%;
  }

  .date-picker {
    width: 100%;
  }

  .date-picker-trigger {
    width: 100%;
  }

  .date-picker-popover {
    left: 0;
    right: 0;
  }

  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pagination-bar,
  .pagination-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    width: 100%;
  }

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

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

  .trend-summary-grid {
    grid-template-columns: 1fr;
  }

  .trend-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
