:root {
  --bg: #f7f1e8;
  --panel: rgba(255, 250, 244, 0.9);
  --panel-strong: #fff8ef;
  --text: #1f1c16;
  --muted: #6b6256;
  --line: rgba(48, 35, 20, 0.12);
  --accent: #d76442;
  --accent-deep: #9d3f26;
  --accent-soft: rgba(215, 100, 66, 0.14);
  --alt: #0b8f87;
  --alt-soft: rgba(11, 143, 135, 0.14);
  --gold: #c48a1f;
  --danger: #8c3c34;
  --success: #2f7d53;
  --shadow: 0 22px 60px rgba(95, 70, 37, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 168, 0.75), transparent 30%),
    radial-gradient(circle at top right, rgba(92, 197, 181, 0.35), transparent 24%),
    linear-gradient(180deg, #f9f2e7 0%, #f2ece4 58%, #efe4d6 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.menu-overlay {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 247, 239, 0.78);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: grid;
  gap: 10px;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 700;
}

.brand-block h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 2.4vw, 2.8rem);
  line-height: 0.95;
}

.brand-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.account-chip {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 229, 0.95));
  border: 1px solid rgba(215, 100, 66, 0.15);
  box-shadow: var(--shadow);
}

.account-row,
.mini-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-label,
.mini-label,
.section-copy,
.muted,
.support-copy {
  color: var(--muted);
}

.account-value,
.mini-value {
  font-weight: 700;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(196, 138, 31, 0.12);
  color: #815b11;
  font-weight: 700;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line);
  outline: none;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(215, 100, 66, 0.24);
  box-shadow: var(--shadow);
}

.nav-name {
  font-weight: 700;
}

.nav-hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.main-shell {
  padding: 28px;
}

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

.menu-toggle {
  display: none;
}

.topbar-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: 0.98;
}

.page-subtitle {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.55;
}

.headline-panel {
  display: grid;
  gap: 10px;
  min-width: 280px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(11, 143, 135, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(223, 245, 241, 0.92));
}

.headline-panel strong {
  font-size: 1.15rem;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.content-grid.columns-2 {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
}

.panel,
.hero-panel,
.card,
.list-card,
.notice,
.inline-panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel,
.panel {
  padding: 24px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 239, 0.98)),
    linear-gradient(180deg, rgba(255, 223, 189, 0.48), rgba(205, 244, 237, 0.28));
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 100, 66, 0.18), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: stretch;
}

.hero-copy {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  line-height: 1.05;
}

.pill-row,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.pill.is-active,
.segment.is-active {
  background: var(--accent);
  color: #fff8f3;
  border-color: var(--accent);
}

.pill.alt.is-active {
  background: var(--alt);
  border-color: var(--alt);
}

.pill:hover,
.segment:hover,
.action-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.hero-summary {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(19, 23, 25, 0.94), rgba(52, 41, 32, 0.92));
  color: #fdf2e5;
}

.hero-summary strong {
  font-size: 2rem;
  line-height: 1;
}

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

.section-title {
  margin: 0;
  font-size: 1.25rem;
}

.section-copy {
  margin: 6px 0 0;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.field-label {
  font-size: 0.93rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(48, 35, 20, 0.15);
  border-radius: var(--radius-sm);
  background: #fffdf9;
  color: var(--text);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid rgba(215, 100, 66, 0.28);
  border-color: rgba(215, 100, 66, 0.42);
}

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

.action-btn,
.secondary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.action-btn {
  background: var(--accent);
  color: #fff7f3;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(48, 35, 20, 0.12);
  color: var(--text);
}

.ghost-btn {
  background: transparent;
  border-color: rgba(48, 35, 20, 0.16);
  color: var(--text);
}

.small-btn {
  min-height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(48, 35, 20, 0.12);
}

.action-btn.alt {
  background: var(--alt);
}

.search-results,
.card-grid,
.list-grid,
.alert-grid,
.stats-grid {
  display: grid;
  gap: 14px;
}

.card-grid.products,
.list-grid.products {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-box,
.notice,
.inline-panel {
  padding: 16px;
}

.amazon-feedback {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.amazon-feedback.warn {
  border-color: rgba(196, 138, 31, 0.28);
  background: rgba(255, 248, 225, 0.92);
}

.amazon-feedback.danger {
  border-color: rgba(140, 60, 52, 0.22);
  background: rgba(255, 239, 236, 0.92);
}

.stat-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.stat-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.product-card,
.tracking-card,
.alert-card,
.channel-card,
.account-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.product-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 16px;
  padding: 16px;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
}

.product-thumb::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.product-thumb span {
  position: relative;
  z-index: 1;
  font-size: 3rem;
}

.product-thumb small {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.card-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card-meta,
.info-list {
  display: grid;
  gap: 8px;
}

.meta-row,
.info-row,
.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meta-row strong,
.summary-row strong {
  text-align: right;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-dot.ok {
  background: rgba(47, 125, 83, 0.14);
  color: var(--success);
}

.status-dot.wait {
  background: rgba(196, 138, 31, 0.14);
  color: #815b11;
}

.status-dot.off {
  background: rgba(140, 60, 52, 0.14);
  color: var(--danger);
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(11, 143, 135, 0.18);
  background: rgba(225, 246, 242, 0.88);
  color: #085851;
  box-shadow: var(--shadow);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed rgba(48, 35, 20, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 300px;
  gap: 16px;
}

.support-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-list li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(48, 35, 20, 0.08);
}

.support-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(11, 143, 135, 0.12);
  color: #09605a;
  font-size: 0.86rem;
  font-weight: 700;
}

.tag.warn {
  background: rgba(196, 138, 31, 0.12);
  color: #815b11;
}

.tag.soft {
  background: rgba(215, 100, 66, 0.12);
  color: var(--accent-deep);
}

.progress-wrap {
  display: grid;
  gap: 10px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(48, 35, 20, 0.1);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f3a253);
}

.copy-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fffdf9;
  overflow: hidden;
}

.copy-box code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(31, 28, 22, 0.28);
    opacity: 0;
    pointer-events: none;
    border: 0;
  }

  .menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: min(86vw, 340px);
    height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: none;
    pointer-events: none;
    overflow-y: auto;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow);
    pointer-events: auto;
  }

  .main-shell {
    padding-top: 18px;
  }

  .content-grid.columns-2,
  .hero-grid,
  .split-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-shell,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .section-head,
  .meta-row,
  .summary-row {
    flex-direction: column;
  }

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

  .toast {
    border-radius: var(--radius-lg);
    align-items: flex-start;
  }

  .topbar {
    gap: 12px;
  }

  .headline-panel {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 1120px) {
  .menu-toggle {
    display: inline-flex;
    align-self: flex-start;
  }
}
