/* ═══════════════════════════════════════════════════════════════
   La2cheOS Design System v2.0
   A unified CSS foundation for all dashboard pages

   Fonts: Clash Display (headings) + Satoshi (body)
   Palette: Deep green-black + amber/gold accents
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts Import ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  /* Brand palette — refined */
  --primary: #2D5016;
  --primary-light: #4A7C23;
  --primary-lighter: #5B9A2B;
  --accent: #D4940A;
  --accent-light: #F5B731;
  --accent-glow: rgba(212, 148, 10, 0.15);

  /* Surfaces — deeper, richer */
  --bg-dark: #060B03;
  --bg-body: #0A0F05;
  --bg-card: #0F1A08;
  --bg-card-hover: #162210;
  --bg-elevated: #1A2E12;
  --bg-input: #0B1306;
  --bg-nav: rgba(10, 15, 5, 0.85);

  /* Borders */
  --border-subtle: rgba(74, 124, 35, 0.12);
  --border-default: rgba(74, 124, 35, 0.22);
  --border-strong: rgba(74, 124, 35, 0.38);
  --border-accent: rgba(212, 148, 10, 0.35);

  /* Text */
  --text: #E8E8E4;
  --text-bright: #FAFAF9;
  --text-muted: #8A9880;
  --text-dim: #7E7E7E; /* 4.77:1 on dark bg, 4.50:1 on status-chip dismissed blended bg — WCAG AA */

  /* Semantic colors */
  --success: #22C55E;
  --warning: #EAB308;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Channel colors */
  --amazon: #FF9900;
  --shopify: #96BF48;
  --etsy: #F1641E;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-glow-green: 0 0 20px rgba(74, 124, 35, 0.15);
  --shadow-glow-amber: 0 0 20px rgba(212, 148, 10, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.4s;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient Background ──────────────────────────────────────── */
.gradient-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(45, 80, 22, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(212, 148, 10, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(10, 15, 5, 0.5) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise texture overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 1000;
}

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 max(var(--space-lg), env(safe-area-inset-right)) 0 max(var(--space-lg), env(safe-area-inset-left));
  position: relative;
  z-index: 1;
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.page-title,
.section-title,
.card-value,
.logo {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: -12px;
  margin-bottom: var(--space-xl);
}

.page-header {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  letter-spacing: -0.01em;
}

.highlight {
  background: linear-gradient(135deg, var(--primary-lighter), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ──────────────────────────────────────────────── */
nav {
  padding: var(--space-md) 0;
  padding-top: max(var(--space-md), env(safe-area-inset-top));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-nav);
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
  padding-left: max(var(--space-lg), env(safe-area-inset-left));
  padding-right: max(var(--space-lg), env(safe-area-inset-right));
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  min-width: 0;
  overflow: hidden;
}

.nav-links {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
  padding: 2px 0;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--duration-fast), background var(--duration-fast);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link:active,
.nav-link:focus-visible {
  color: var(--text-bright);
  background: rgba(74, 124, 35, 0.08);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(212, 148, 10, 0.08);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.last-updated {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Primary — amber/gold fill */
.btn-primary,
.btn {
  background: linear-gradient(135deg, var(--accent), #B87A08);
  color: #0A0F05;
  box-shadow: 0 2px 8px rgba(212, 148, 10, 0.2);
}

.btn-primary:hover,
.btn:hover:not(:disabled),
.btn-primary:active,
.btn:active:not(:disabled) {
  box-shadow: 0 4px 16px rgba(212, 148, 10, 0.3);
}

/* Secondary — outline */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:active {
  border-color: var(--border-strong);
  background: var(--bg-card);
  transform: none;
  box-shadow: none;
}

/* Ghost / Refresh / Small */
.refresh-btn,
.logout-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
}

.refresh-btn:hover,
.refresh-btn:active {
  border-color: var(--border-default);
  background: var(--bg-card-hover);
  color: var(--text);
}

.logout-btn {
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.logout-btn:hover,
.logout-btn:active {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}

/* Copy button */
.copy-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.copy-btn:hover,
.copy-btn:active {
  border-color: var(--border-default);
  color: var(--text);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* ── Cards & Surfaces ────────────────────────────────────────── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--duration-normal);
}

.section-card:hover,
.section-card:focus-within {
  border-color: var(--border-default);
}

.section-card.full-width {
  grid-column: 1 / -1;
}

.revenue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.revenue-card:hover,
.revenue-card:active {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.revenue-card.total {
  background: linear-gradient(135deg, rgba(45, 80, 22, 0.2), var(--bg-card));
  border-color: var(--border-strong);
}

/* ── Grid Layouts ────────────────────────────────────────────── */
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* ── Form Inputs ─────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238A9880' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

/* ── Tables ──────────────────────────────────────────────────── */
.products-table,
.runway-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th,
.runway-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.products-table td,
.runway-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text);
}

.products-table tr:last-child td,
.runway-table tr:last-child td {
  border-bottom: none;
}

.products-table tr:hover td,
.runway-table tr:hover td,
.products-table tr:active td,
.runway-table tr:active td {
  background: rgba(74, 124, 35, 0.04);
}

/* Table sub-elements */
.product-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-sku {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.channel-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.channel-tag.amazon { background: rgba(255, 153, 0, 0.12); color: var(--amazon); }
.channel-tag.shopify { background: rgba(150, 191, 72, 0.12); color: var(--shopify); }
.channel-tag.etsy { background: rgba(241, 100, 30, 0.12); color: var(--etsy); }

.revenue-cell {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

/* ── Revenue Card Sub-elements ───────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.channel-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.channel-badge.amazon { background: rgba(255, 153, 0, 0.12); }
.channel-badge.shopify { background: rgba(150, 191, 72, 0.12); }
.channel-badge.etsy { background: rgba(241, 100, 30, 0.12); }
.channel-badge.total { background: linear-gradient(135deg, var(--primary-light), var(--accent)); }

.card-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.card-value.amazon { color: var(--amazon); }
.card-value.shopify { color: var(--shopify); }
.card-value.etsy { color: var(--etsy); }

.card-change {
  font-size: 0.8rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.card-change.positive { color: var(--success); }
.card-change.negative { color: var(--danger); }

/* ── Alert Items ─────────────────────────────────────────────── */
.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: rgba(74, 124, 35, 0.04);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-fast);
}

.alert-item:last-child {
  margin-bottom: 0;
}

.alert-item:hover,
.alert-item:active {
  border-color: var(--border-default);
}

.alert-item.critical {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.alert-item.warning {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.2);
}

.alert-item.good {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}

.alert-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.alert-item.critical .alert-icon { background: rgba(239, 68, 68, 0.12); }
.alert-item.warning .alert-icon { background: rgba(234, 179, 8, 0.12); }
.alert-item.good .alert-icon { background: rgba(34, 197, 94, 0.12); }

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-title {
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--text);
}

.alert-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stock-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.stock-badge.critical { background: var(--danger); color: white; }
.stock-badge.warning { background: var(--warning); color: #1a1a1a; }
.stock-badge.good { background: var(--success); color: white; }

/* ── Alerts (info/error boxes) ───────────────────────────────── */
.alert {
  padding: 14px var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 0.88rem;
  line-height: 1.5;
}

.alert.info {
  background: rgba(74, 124, 35, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

.alert.error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

/* ── Content Box ─────────────────────────────────────────────── */
.content-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  min-height: 100px;
  color: var(--text);
  line-height: 1.6;
}

.content-box.empty {
  color: var(--text-dim);
  font-style: italic;
}

/* ── Bullet List ─────────────────────────────────────────────── */
.bullet-list {
  list-style: none;
  padding-left: 0;
}

.bullet-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
  line-height: 1.5;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Comparison Header ───────────────────────────────────────── */
.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* ── Chart Placeholder ───────────────────────────────────────── */
.chart-placeholder {
  height: 200px;
  background: linear-gradient(135deg, rgba(74, 124, 35, 0.06), rgba(212, 148, 10, 0.03));
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 20px 30px;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}

.chart-bar {
  width: 18px;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s var(--ease-out);
}

.chart-bar.amazon { background: var(--amazon); }
.chart-bar.shopify { background: var(--shopify); }
.chart-bar.etsy { background: var(--etsy); }

.chart-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: var(--space-md);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.amazon { background: var(--amazon); }
.legend-dot.shopify { background: var(--shopify); }
.legend-dot.etsy { background: var(--etsy); }

/* ── Activity Feed ───────────────────────────────────────────── */
.activity-feed {
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 124, 35, 0.2) transparent;
}

.activity-feed::-webkit-scrollbar { width: 5px; }
.activity-feed::-webkit-scrollbar-track { background: transparent; }
.activity-feed::-webkit-scrollbar-thumb { background: rgba(74, 124, 35, 0.2); border-radius: 3px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: rgba(74, 124, 35, 0.02);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-fast);
}

.activity-item:hover,
.activity-item:active {
  background: rgba(74, 124, 35, 0.06);
  border-color: var(--border-default);
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-icon.sync_complete { background: rgba(34, 197, 94, 0.12); }
.activity-icon.new_order { background: rgba(245, 158, 11, 0.12); }
.activity-icon.low_stock { background: rgba(239, 68, 68, 0.12); }
.activity-icon.login { background: rgba(139, 92, 246, 0.12); }
.activity-icon.fulfillment { background: rgba(59, 130, 246, 0.12); }
.activity-icon.export { background: rgba(168, 85, 247, 0.12); }

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.9rem;
}

.activity-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.activity-channel {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-channel.amazon { background: rgba(255, 153, 0, 0.12); color: var(--amazon); }
.activity-channel.shopify { background: rgba(150, 191, 72, 0.12); color: var(--shopify); }
.activity-channel.etsy { background: rgba(241, 100, 30, 0.12); color: var(--etsy); }

/* ── Seasonal Card ───────────────────────────────────────────── */
.seasonal-card {
  background: linear-gradient(135deg, rgba(212, 148, 10, 0.08), rgba(74, 124, 35, 0.06));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}

.seasonal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.seasonal-multiplier {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--success);
  margin: 12px 0;
  font-family: 'Space Grotesk', sans-serif;
}

.seasonal-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.next-season {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

/* ── Runway Badges ───────────────────────────────────────────── */
.runway-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

.runway-badge.critical { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.runway-badge.high { background: rgba(234, 179, 8, 0.12); color: var(--warning); }
.runway-badge.medium { background: rgba(245, 158, 11, 0.12); color: var(--accent); }
.runway-badge.low { background: rgba(34, 197, 94, 0.12); color: var(--success); }

/* ── Reorder Recommendations ─────────────────────────────────── */
.reorder-item {
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: rgba(74, 124, 35, 0.03);
  border: 1px solid var(--border-subtle);
}

.reorder-item.critical {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.reorder-item.high {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.2);
}

.reorder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.reorder-name { font-weight: 600; }
.reorder-details { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.reorder-action { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* ── Spinner / Loading ───────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border-subtle);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.6;
}

/* ── Badges & Status ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--accent);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Error Message (login) ───────────────────────────────────── */
.error-message {
  display: none;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 12px var(--space-md);
  color: var(--danger);
  font-size: 0.88rem;
  margin-bottom: var(--space-lg);
}

.error-message.visible { display: block; }

/* ── Toast ───────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 9999;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Polsia Inbox Specific ───────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.filter-tabs button,
.filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-family: 'DM Sans', sans-serif;
}

.filter-tabs button:hover,
.filter-tab:hover,
.filter-tabs button:active,
.filter-tab:active {
  border-color: var(--border-default);
  color: var(--text);
}

.filter-tabs button.active,
.filter-tab.active {
  background: rgba(212, 148, 10, 0.1);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ── Request Card (Inbox) ────────────────────────────────────── */
.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all var(--duration-fast);
  animation: fadeInUp 0.3s var(--ease-out);
}

.request-card:hover,
.request-card:active {
  border-color: var(--border-default);
}

.request-card.dismissed {
  opacity: 0.4;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Type & Priority Badges ──────────────────────────────────── */
.type-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.type-badge.bug { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.type-badge.feature { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.type-badge.improvement { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.type-badge.research { background: rgba(168, 85, 247, 0.1); color: #A855F7; }

.priority-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.priority-badge.high { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.priority-badge.medium { background: rgba(234, 179, 8, 0.1); color: var(--warning); }
.priority-badge.low { background: rgba(34, 197, 94, 0.1); color: var(--success); }

/* ── Status Chip ─────────────────────────────────────────────── */
.status-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-chip.pending { background: rgba(234, 179, 8, 0.08); color: var(--warning); }
.status-chip.pending .dot { background: var(--warning); }

.status-chip.sent { background: rgba(59, 130, 246, 0.08); color: var(--info); }
.status-chip.sent .dot { background: var(--info); }

.status-chip.completed { background: rgba(34, 197, 94, 0.08); color: var(--success); }
.status-chip.completed .dot { background: var(--success); }

.status-chip.dismissed { background: rgba(168, 181, 160, 0.08); color: var(--text-dim); }
.status-chip.dismissed .dot { background: var(--text-dim); }

.status-chip.failed { background: rgba(239, 68, 68, 0.08); color: var(--danger); }
.status-chip.failed .dot { background: var(--danger); }

/* ── Mobile Nav: Hamburger Button ──────────────────────────────── */
/* Hidden on desktop, shown on mobile via 768px media query */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background var(--duration-fast);
}

.nav-hamburger:hover,
.nav-hamburger:active {
  background: rgba(74, 124, 35, 0.1);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  margin-bottom: 5px;
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-hamburger span:last-child {
  margin-bottom: 0;
}

/* Hamburger → X when open */
.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

/* ── Mobile Nav: Overlay backdrop ─────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 3, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.nav-overlay.visible {
  display: block;
  opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────────── */

/* ── Tablet: 768px – 1200px ──────────────────────────────────── */
@media (max-width: 1200px) {
  .revenue-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .main-grid {
    grid-template-columns: 1fr !important;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Mobile: ≤ 768px ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* ─ Spacing tokens ─ */
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
  }

  /* ─ Container padding tightened ─ */
  .container {
    padding: 0 12px;
  }

  /* ─ Named layout grids — use !important to override page inline styles ─ */
  .revenue-grid,
  .main-grid,
  .two-col,
  .three-col,
  .four-col,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid,
  .module-grid,
  .form-row,
  .summary-grid,
  .side-by-side,
  .preview-grid,
  .generator-grid,
  .pages-grid,
  .bp-grid,
  .comp-grid,
  /* ─ Page-specific grids discovered in full audit (Apr 30 2026) ─ */
  .main-layout,
  .charts-grid,
  .chart-grid,
  .movers-grid,
  .kpi-grid,
  .campaign-metrics,
  .campaign-grid,
  .scenario-grid,
  .calc-grid,
  .timeline-summary,
  .timeline-milestones,
  .segment-card,
  .ad-type-grid,
  .amz-products-grid,
  .amz-features-grid,
  .preview-stats,
  .card-grid-2,
  .do-dont-grid,
  .spec-grid,
  .cost-grid,
  .gonogo-grid,
  .totals-strip,
  .alert-grid,
  .milestone-grid,
  .metric-row,
  .heatmap-grid,
  .contacts-grid,
  .docs-grid,
  .metrics-grid,
  .image-grid,
  .preview-pages-grid,
  .assets-grid,
  .product-variants-grid,
  .alert-card-body {
    grid-template-columns: 1fr !important;
  }

  /* ─ Filter inputs: remove min-width that causes overflow on narrow screens ─ */
  .filter-input {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* 2-up grids that benefit from 2 columns on mobile are overridden below */
  .stats-strip,
  .values-grid,
  .benefits-grid,
  .usage-steps,
  .type-grid,
  .style-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ─ Tables: horizontal scroll in container, never blow page width ─ */
  .section-card,
  .table-card,
  [class*="table-wrap"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Generic table wrapper — use this class on any overflowing table */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Tables don't force page width */
  table {
    min-width: 0;
  }

  /* Prevent individual wide tables from breaking layout */
  .section-card table,
  .table-card table {
    min-width: 480px; /* scroll before this */
  }

  /* ─ Charts and canvas scale to container ─ */
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  .chart-container,
  .chart-wrap,
  [class*="chart"] {
    max-width: 100%;
    overflow-x: auto;
  }

  /* ─ Forms: full-width on mobile ─ */
  input,
  textarea,
  select,
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    font-size: 16px; /* prevent iOS zoom */
    min-height: 44px; /* touch target */
  }

  /* ─ Buttons: minimum 44px touch target (Apple HIG) ─ */
  button,
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-danger,
  a.btn,
  [role="button"] {
    min-height: 44px;
    font-size: 0.95rem;
  }

  /* ─ Nav: single row, logo + hamburger + right actions ─ */
  nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    /* Fix: match negative margins to container padding (12px) to prevent overflow */
    margin-left: -12px !important;
    margin-right: -12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .nav-left {
    min-width: 0;
    overflow: visible;
    flex-shrink: 0;
    gap: var(--space-sm);
    flex-direction: row;
    align-items: center;
  }

  /* Show hamburger on mobile */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }

  /* Hide nav-menu by default on mobile */
  .nav-menu {
    display: none;
    position: fixed;
    top: 65px; /* nav height: 16px padding + 32px logo + 16px padding + 1px border */
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-md);
    z-index: 101;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 65px);
    overflow-y: auto;
  }

  .nav-menu.open {
    display: block;
    animation: slideDown var(--duration-normal) var(--ease-out);
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Nav links as vertical stack in mobile menu */
  .nav-menu .nav-links {
    flex-direction: column;
    flex-wrap: wrap;
    overflow-x: hidden;
    overflow-y: visible;
    padding-bottom: 0;
  }

  /* Touch-friendly nav links — full-width vertical items */
  .nav-menu .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-menu .nav-link:last-child {
    border-bottom: none;
  }

  .nav-right {
    flex-shrink: 0;
  }

  /* ─ Cards and sections ─ */
  .section-card {
    padding: var(--space-md);
  }

  /* ─ Tables: hide low-priority columns ─ */
  .products-table th:nth-child(3),
  .products-table td:nth-child(3) {
    display: none;
  }

  /* ─ Modals: full-screen on mobile ─ */
  .modal-content,
  .modal-box,
  .dialog-content,
  [class*="modal"] .modal-inner {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto;
  }

  /* ─ Page header row: stack action buttons below title ─ */
  .page-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .page-header .btn,
  .page-header button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Mobile containment — catch overflow from any element ───── */
@media (max-width: 768px) {
  img, video, iframe, embed, object, svg {
    max-width: 100% !important;
    height: auto;
  }

  /* Prevent any inline-styled element from blowing out the viewport */
  [style*="width"] {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Ensure the Aymon widget doesn't overflow */
  #aymon-widget-root,
  .aymon-widget-container {
    max-width: 100vw !important;
  }
}

/* ── Small mobile: ≤ 480px ───────────────────────────────────── */
@media (max-width: 480px) {
  .stats-strip,
  .values-grid,
  .benefits-grid,
  .usage-steps {
    grid-template-columns: 1fr !important;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  /* ─ Page title shrinks a bit more ─ */
  .page-title {
    font-size: 1.35rem;
    margin-bottom: var(--space-md);
  }

  /* ─ Reduce card padding further ─ */
  .section-card {
    padding: 12px;
  }
}

/* ── Utility Classes ─────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ── Scrollbar Global ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(74, 124, 35, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 124, 35, 0.35);
}

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background: rgba(212, 148, 10, 0.25);
  color: var(--text-bright);
}

/* ── Links ───────────────────────────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast);
}

a:hover,
a:active {
  color: var(--accent-light);
}

/* ── Login-specific ──────────────────────────────────────────── */
.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

.footer-link {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── Feature Cards (index) ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.3s var(--ease-out);
}

.feature-card:hover,
.feature-card:active {
  border-color: var(--border-default);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(74, 124, 35, 0.12), rgba(212, 148, 10, 0.08));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-bright);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Stats Section (index) ───────────────────────────────────── */
.stats {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-xl);
  text-align: center;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── Channel Logos (index) ───────────────────────────────────── */
.channel-logos {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  align-items: center;
}

.channel-logo {
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: border-color var(--duration-fast);
}

.channel-logo:hover,
.channel-logo:active {
  border-color: var(--border-default);
}

/* ── Hero (index) ────────────────────────────────────────────── */
.hero {
  padding: var(--space-3xl) 0 80px;
  text-align: center;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
  color: var(--text-bright);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

.cta-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Channels Section (index) ────────────────────────────────── */
.channels {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.channels h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  margin-bottom: var(--space-md);
  color: var(--text-bright);
}

.channels-subtitle {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

footer a {
  color: var(--accent);
}

/* ── Features Section ────────────────────────────────────────── */
.features {
  padding: var(--space-3xl) 0;
}

/* Debug info (login) */
.debug-info {
  display: none;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #60a5fa;
  font-size: 0.72rem;
  font-family: monospace;
  margin-bottom: var(--space-md);
  word-break: break-all;
}

.debug-info.visible { display: block; }

/* ── Submit form wrap (inbox) ────────────────────────────────── */
.submit-form-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out);
}

.submit-form-wrap.open {
  max-height: 600px;
}

/* ══════════════════════════════════════════════════════════════
   HAMBURGER SLIDE-OUT NAV (shared-nav.js — all auth pages)
   Replaces old horizontal nav-links on all screen sizes.
   ══════════════════════════════════════════════════════════════ */

/* ── Hamburger toggle button ─────────────────────────────────── */
.hamburger-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
  z-index: 101;
  line-height: 1;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger-menu-btn:hover,
.hamburger-menu-btn:active {
  background: rgba(74, 124, 35, 0.15);
}
.hamburger-menu-btn.active {
  background: rgba(74, 124, 35, 0.25);
}

/* ── Backdrop overlay ────────────────────────────────────────── */
.hamburger-nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
}
.hamburger-nav-overlay.active {
  display: block;
}

/* ── Slide-out panel ─────────────────────────────────────────── */
.hamburger-nav-panel {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height for iOS Safari */
  background: var(--bg-card);
  border-right: 1px solid rgba(74, 124, 35, 0.22);
  z-index: 201;
  overflow-y: auto;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-left: max(24px, env(safe-area-inset-left));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  flex-direction: column;
  gap: 20px;
  animation: hamburgerSlideIn 0.28s var(--ease-out);
}
.hamburger-nav-panel.active {
  display: flex;
}
.hamburger-nav-panel.closing {
  animation: hamburgerSlideOut 0.25s ease-in forwards;
}

@keyframes hamburgerSlideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes hamburgerSlideOut {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}

/* ── Panel header ────────────────────────────────────────────── */
.hamburger-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 124, 35, 0.15);
  flex-shrink: 0;
}
.hamburger-nav-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger-nav-close:hover,
.hamburger-nav-close:active {
  color: var(--text);
  background: rgba(74, 124, 35, 0.1);
}

/* ── Nav links inside panel ──────────────────────────────────── */
.hamburger-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
}
.hamburger-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--duration-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}
.hamburger-nav-link:hover,
.hamburger-nav-link:active {
  background: rgba(74, 124, 35, 0.12);
  color: var(--text);
  border-color: rgba(74, 124, 35, 0.2);
}
.hamburger-nav-link.active {
  background: rgba(212, 148, 10, 0.12);
  border-color: rgba(212, 148, 10, 0.28);
  color: var(--accent);
  font-weight: 600;
}

/* ── Divider inside panel ────────────────────────────────────── */
.hamburger-nav-divider {
  height: 1px;
  background: rgba(74, 124, 35, 0.15);
  margin: 8px 0;
  flex-shrink: 0;
}

/* ── Hide old horizontal nav-links on all screens ───────────── */
nav .nav-links,
nav .nav-menu {
  display: none !important;
}
/* Hide old 3-bar hamburger; new ☰ btn is always visible */
nav .nav-hamburger {
  display: none !important;
}
/* Hide old nav-overlay inside nav (shared-nav uses its own) */
nav .nav-overlay {
  display: none !important;
}

/* ── Product Name Cell Utility ──────────────────────────────────
   Prevents long product names from overflowing table cells.
   Usage: add class="product-name-cell" to <td> or inner <span>.
───────────────────────────────────────────────────────────────── */
.product-name-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* ── ASIN Display Component ─────────────────────────────────────
   Used by catalogService.renderAsinDisplay() across all modules.
   Shows product name as primary identifier + ASIN in muted text.
───────────────────────────────────────────────────────────────── */
.asin-display {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.asin-display__name {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.asin-display__code {
  font-family: monospace;
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.asin-display__link {
  color: var(--accent);
  text-decoration: none;
}
.asin-display__link:hover,
.asin-display__link:active {
  text-decoration: underline;
}
/* Fallback: name unknown — show ASIN in normal (not muted) size */
.asin-display--fallback .asin-display__code {
  font-size: 0.88rem;
  color: var(--text);
}

/* ── Custom Scrollbars ───────────────────────────────────────────
   Dark-themed scrollbars matching the La2cheOS design system.
   Webkit (Chrome/Safari/Edge) + Firefox.
───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
  background: #3a3a5c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a5a7c;
}
::-webkit-scrollbar-corner {
  background: #1a1a2e;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #3a3a5c #1a1a2e;
}

/* ── Skip-to-content link ────────────────────────────────────────
   Accessibility: visually hidden until focused, then snaps into view.
───────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 99999;
  background: var(--accent);
  color: #060B03;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* ── Focus rings ─────────────────────────────────────────────────
   WCAG AA: 2px visible focus indicator on all interactive elements.
───────────────────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Remove focus ring from mouse/touch interactions (keyboard only) */
*:focus:not(:focus-visible) {
  outline: none;
}

/* ── Global Responsive Breakpoints ──────────────────────────────
   Applied globally; page-specific overrides live in each page's
   <style> block. These handle nav, container, section-card, and
   table overflow — the most common cross-page layout needs.
───────────────────────────────────────────────────────────────── */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-md);
  }

  nav {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* KPI / stats grids: 4 → 2 columns */
  .kpi-grid,
  .metrics-grid,
  .revenue-grid,
  .stats-bar:not(.stats-bar--ppc) {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Side-by-side 2-col layouts → stack */
  .main-grid,
  .comparison-grid,
  .two-col-grid {
    grid-template-columns: 1fr !important;
  }

  /* Last-updated text can hide to save nav space */
  .last-updated {
    display: none;
  }
}

/* Mobile landscape ≤ 768px */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }

  nav {
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    flex-wrap: nowrap;
  }

  /* KPI / stats grids: 4 → 2 columns */
  .kpi-grid,
  .metrics-grid,
  .revenue-grid,
  .stats-bar:not(.stats-bar--ppc) {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Section cards get tighter padding */
  .section-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  /* Tables become horizontally scrollable */
  .table-wrap,
  .campaign-table-wrap,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent tables from being crushed */
  table {
    min-width: 480px;
  }

  /* Page titles smaller */
  .page-title {
    font-size: 1.35rem;
  }

  /* Header action rows stack */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .header-actions {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

/* Mobile portrait ≤ 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  /* KPI / stats grids → single column */
  .kpi-grid,
  .metrics-grid,
  .revenue-grid,
  .stats-bar:not(.stats-bar--ppc) {
    grid-template-columns: 1fr !important;
  }

  /* Tighter nav */
  .nav-right .refresh-btn span,
  .nav-right .logout-btn span {
    display: none;
  }

  /* Chart wrapper height reduced for small screens */
  .chart-wrapper {
    height: 220px !important;
  }

  /* Section card full-bleed feel */
  .section-card {
    padding: var(--space-sm) var(--space-md);
  }

  /* Tabs wrap naturally */
  .tabs,
  .date-range-tabs,
  .filter-tabs {
    flex-wrap: wrap;
  }

  /* Modal full-screen on portrait mobile */
  .modal {
    width: 100% !important;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    margin: 0;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}
