/* ==========================================
   ETSY PROFIT LAB â€” FINANCE DASHBOARD THEME
   Dark premium Â· 3-column layout Â· Right panel
   ========================================== */

/* â”€â”€ 1. DESIGN TOKENS â”€â”€ */
:root {
  --bg: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.045);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-solid: #151d2c;
  --bg-input: #162032;
  --border: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 255, 255, 0.28);
  --ink: #ffffff;
  --ink-secondary: #e2e8f0;
  --ink-muted: #94a3b8;
  --accent: #ff7a00;
  --accent-end: #ffb000;
  --green: #00d68f;
  --green-soft: rgba(0, 214, 143, 0.10);
  --green-border: rgba(0, 214, 143, 0.25);
  --red: #ff4d6a;
  --red-soft: rgba(255, 77, 106, 0.10);
  --red-border: rgba(255, 77, 106, 0.25);
  --amber: #ffb020;
  --amber-soft: rgba(255, 176, 32, 0.10);
  --amber-border: rgba(255, 176, 32, 0.25);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.10);
  --blue-border: rgba(59, 130, 246, 0.25);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.10);
  --purple-border: rgba(139, 92, 246, 0.25);
  --sidebar-w: 240px;
  --rpanel-w: 340px;
  --bottom-h: 62px;
  --sticky-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --transition: 0.22s cubic-bezier(.4, 0, .2, 1);
}

/* â”€â”€ 2. RESET & BASE â”€â”€ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100vh;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

strong {
  font-weight: 700;
}

::selection {
  background: rgba(255, 122, 0, 0.3);
}

/* â”€â”€ 3. APP SHELL â€” 3-Column â”€â”€ */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  margin-right: var(--rpanel-w);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* â”€â”€ 4. SIDEBAR (Left) â”€â”€ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f1520, #0a0e17);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.3);
}

.brand-mark.sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 13px;
}

.brand-text h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 10px;
  color: var(--ink-muted);
}

.sidebar-picker {
  padding: 0 12px 12px;
}

.sidebar-picker label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sidebar-picker select {
  width: 100%;
  height: 40px;
  background-color: #162032 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: var(--radius-sm);
  padding: 0 30px 0 12px;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff'%3E%3Cpath d='M6 8.5L1.5 3.5h9z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
}

.sidebar-picker select:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.25) !important;
}

.sidebar-picker select option {
  background-color: #162032 !important;
  color: #ffffff !important;
  padding: 10px 14px;
}

.picker-actions {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink-secondary);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--ink);
}

.btn-icon.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-color: transparent;
  color: #fff;
  font-weight: 800;
}

.btn-icon.accent:hover {
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.3);
  transform: translateY(-1px);
}

.sidebar-nav {
  flex: 1;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 9px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  background: rgba(255, 122, 0, 0.08);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-end));
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-item.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 122, 0, 0.3);
}

.nav-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: var(--transition);
}

.nav-item.active .nav-label {
  color: var(--ink);
  font-weight: 700;
}

.nav-item:hover .nav-label {
  color: var(--ink);
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--ink-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 214, 143, 0.5);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot.paused {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(255, 176, 32, 0.4);
  animation: none;
}

.autosave-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.autosave-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.as-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: 0.2s cubic-bezier(.4, 0, .2, 1);
}

.as-slider:before {
  position: absolute;
  content: '';
  height: 12px;
  width: 12px;
  left: 2px;
  top: 2px;
  background-color: #94a3b8;
  border-radius: 50%;
  transition: 0.2s cubic-bezier(.4, 0, .2, 1);
}

.autosave-switch input:checked+.as-slider {
  background: rgba(0, 214, 143, 0.25);
  border-color: var(--green);
}

.autosave-switch input:checked+.as-slider:before {
  transform: translateX(14px);
  background-color: var(--green);
  box-shadow: 0 0 8px rgba(0, 214, 143, 0.6);
}

.title-badges-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save-changes {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(255, 122, 0, 0.35);
  cursor: pointer;
  animation: popIn 0.2s ease;
  font-size: 11px;
}

.btn-save-changes:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.5);
}

/* â”€â”€ 5. RIGHT PANEL (Fixed) â”€â”€ */
.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--rpanel-w);
  background: linear-gradient(180deg, rgba(13, 18, 28, 0.98), rgba(10, 14, 23, 0.99));
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  gap: 12px;
}

.right-panel::before {
  content: '';
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-end), transparent);
  z-index: 1;
}

.rp-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
}

.rp-section:hover {
  border-color: var(--border-hover);
}

.rp-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rp-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Right panel donut */
.right-panel .donut-card {
  margin: 8px 0 12px;
}

.right-panel .donut-svg-wrap {
  width: 150px;
  height: 150px;
}

.right-panel .donut-hole {
  width: 95px;
  height: 95px;
}

.right-panel .donut-hole small {
  font-size: 9px;
}

.right-panel .donut-hole strong {
  font-size: 17px;
  margin: 2px 0;
}

.right-panel .donut-hole span {
  font-size: 10px;
}

/* Right panel allocation bar */
.right-panel .allocation-wrap {
  margin-top: 0;
}

.right-panel .allocation-bar {
  height: 14px;
}

.right-panel .allocation-legend {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.right-panel .allocation-legend-item {
  font-size: 10px;
}

.right-panel .allocation-legend-item i {
  height: 18px;
}

.right-panel .inline-alert {
  font-size: 10px;
  padding: 8px;
}

/* Compact profit hero in right panel */
.profit-hero-compact {
  text-align: center;
  padding: 14px 0 10px;
}

.profit-hero-compact strong {
  display: block;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.profit-hero-compact span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
  color: var(--ink-muted);
}

.profit-hero-compact.good strong {
  color: var(--green);
  text-shadow: 0 0 28px rgba(0, 214, 143, 0.25);
}

.profit-hero-compact.good span {
  color: var(--green);
  opacity: 0.7;
}

.profit-hero-compact.warn strong,
.profit-hero-compact.mid strong {
  color: var(--amber);
  text-shadow: 0 0 28px rgba(255, 176, 32, 0.2);
}

.profit-hero-compact.warn span,
.profit-hero-compact.mid span {
  color: var(--amber);
  opacity: 0.7;
}

.profit-hero-compact.danger strong {
  color: var(--red);
  text-shadow: 0 0 28px rgba(255, 77, 106, 0.25);
}

.profit-hero-compact.danger span {
  color: var(--red);
  opacity: 0.7;
}

/* Profit breakdown list */
.profit-breakdown {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.profit-breakdown>div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 2px 0;
}

.profit-breakdown span {
  color: var(--ink-muted);
}

.profit-breakdown strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-secondary);
}

.profit-breakdown .pb-total {
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed var(--border);
}

.profit-breakdown .pb-total span {
  color: var(--ink);
  font-weight: 700;
}

.profit-breakdown .pb-total strong {
  color: var(--green);
  font-weight: 800;
}

.profit-breakdown .pb-total.loss strong {
  color: var(--red);
}

/* â”€â”€ 6. MOBILE HEADER â”€â”€ */
.mobile-header {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.mobile-header h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  flex: 1;
  letter-spacing: -0.02em;
}

.mobile-product-pick {
  height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  max-width: 130px;
  color: var(--ink);
  appearance: none;
}

/* â”€â”€ 7. BOTTOM NAV (Mobile) â”€â”€ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-h);
  background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 2px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bnav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 6px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  min-width: 0;
  flex: 1;
}

.bnav-item:active {
  transform: scale(0.92);
}

.bnav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--ink-muted);
  transition: var(--transition);
}

.bnav-item.active .bnav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.3);
}

.bnav-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--ink-muted);
}

.bnav-item.active .bnav-label {
  color: var(--accent);
}

/* â”€â”€ 8. STICKY BAR (Mobile Only) â”€â”€ */
.sticky-bar-container,
.sticky-bar {
  display: none;
}

.sbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.sbar-item span {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.sbar-item strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sbar-item strong.good {
  color: var(--green);
}

.sbar-item strong.warn,
.sbar-item strong.mid {
  color: var(--amber);
}

.sbar-item strong.danger {
  color: var(--red);
}

/* â”€â”€ 9. PAGE CONTENT â”€â”€ */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  animation: pageEnter 0.38s ease-out;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title-row h1 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.035em;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--ink-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-title-row p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  max-width: 680px;
  line-height: 1.55;
  font-size: 12px;
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

/* â”€â”€ 10. PANELS â”€â”€ */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  transition: var(--transition);
  animation: cardAppear 0.42s ease-out both;
}

.panel:hover {
  border-color: var(--border-hover);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
  max-width: 700px;
}

/* â”€â”€ 11. FORM CONTROLS â”€â”€ */
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.lower-grid {
  align-items: start;
}

.form-card,
.storefront-card {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px;
  background: var(--bg-card);
}

.storefront-card {
  background: linear-gradient(180deg, rgba(255, 176, 32, 0.03), var(--bg-card));
  border-color: rgba(255, 176, 32, 0.1);
}

.storefront-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 7px 14px;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}

.segmented button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-label small {
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: none;
  letter-spacing: 0;
}

.input-wrap {
  display: flex;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
  align-items: center;
  transition: var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.10);
}

.input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 10px;
  background: transparent;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.input-wrap input::placeholder {
  color: var(--ink-muted);
}

.affix {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 12px;
  border-right: 1px solid var(--border);
}

.suffix {
  border-right: 0;
  border-left: 1px solid var(--border);
}

.field-help {
  font-size: 10px;
  line-height: 1.3;
  color: var(--ink-muted);
}

.field.is-disabled {
  opacity: 0.3;
}

.field select {
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: #162032;
  border-radius: var(--radius-sm);
  padding: 0 30px 0 10px;
  font-weight: 700;
  color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff'%3E%3Cpath d='M6 8.5L1.5 3.5h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.25);
}

.field select option {
  background-color: #162032;
  color: #ffffff;
  padding: 10px 14px;
}

.switch-row {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.switch-row input:checked+.switch {
  background: var(--green);
  box-shadow: 0 0 10px rgba(0, 214, 143, 0.3);
}

.switch-text {
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-secondary);
}

/* â”€â”€ Range Slider Field â”€â”€ */
.slider-control-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
}

.range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.range-slider:hover {
  background: rgba(255, 255, 255, 0.16);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid #fff;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(255, 122, 0, 0.8);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
  cursor: pointer;
  border: 2px solid #fff;
}

.slider-input-box {
  display: flex;
  align-items: center;
  width: 68px;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.slider-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12);
}

.slider-number-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0;
}

.slider-number-input::-webkit-outer-spin-button,
.slider-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.slider-unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-left: 2px;
}

/* â”€â”€ 12. KPI CARDS â”€â”€ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
  animation: cardAppear 0.38s ease-out both;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
  transition: var(--transition);
}

.kpi:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.kpi:hover::before {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-icon {
  font-size: 13px;
}

.kpi strong,
.kpi .kpi-value {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.kpi small {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.3;
}

.kpi-good {
  border-color: var(--green-border);
  background: var(--green-soft);
}

.kpi-good::before {
  background: linear-gradient(90deg, var(--green), transparent) !important;
}

.kpi-good strong,
.kpi-good .kpi-value {
  color: var(--green);
}

.kpi-warn,
.kpi-mid {
  border-color: var(--amber-border);
  background: var(--amber-soft);
}

.kpi-warn::before,
.kpi-mid::before {
  background: linear-gradient(90deg, var(--amber), transparent) !important;
}

.kpi-warn strong,
.kpi-mid strong,
.kpi-warn .kpi-value,
.kpi-mid .kpi-value {
  color: var(--amber);
}

.kpi-danger {
  border-color: var(--red-border);
  background: var(--red-soft);
}

.kpi-danger::before {
  background: linear-gradient(90deg, var(--red), transparent) !important;
}

.kpi-danger strong,
.kpi-danger .kpi-value {
  color: var(--red);
}

.kpi-muted {
  background: rgba(255, 255, 255, 0.02);
}

.kpi-muted strong,
.kpi-muted .kpi-value {
  color: var(--ink-muted);
}

.kpi-grid .kpi:nth-child(1) {
  animation-delay: .04s;
}

.kpi-grid .kpi:nth-child(2) {
  animation-delay: .08s;
}

.kpi-grid .kpi:nth-child(3) {
  animation-delay: .12s;
}

.kpi-grid .kpi:nth-child(4) {
  animation-delay: .16s;
}

.kpi-grid .kpi:nth-child(5) {
  animation-delay: .20s;
}

.kpi-grid .kpi:nth-child(6) {
  animation-delay: .24s;
}

/* â”€â”€ 13. BADGES â”€â”€ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-secondary);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-good {
  background: var(--green-soft);
  color: var(--green);
}

.badge-danger {
  background: var(--red-soft);
  color: var(--red);
}

.badge-warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-local {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}

.badge-soft {
  background: rgba(255, 176, 32, 0.08);
  color: var(--amber);
}

/* â”€â”€ 14. FEE TABLE â”€â”€ */
.fee-table {
  display: flex;
  flex-direction: column;
}

.fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
  transition: var(--transition);
}

.fee-row:last-child {
  border-bottom: 0;
}

.fee-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fee-name>span {
  font-weight: 600;
  color: var(--ink-secondary);
  font-size: 12px;
}

.fee-name small {
  width: 100%;
  color: var(--ink-muted);
  font-size: 9px;
}

.fee-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fee-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  font-size: 14px;
}

.fee-total strong {
  color: #fff;
}

.subhead {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--ink-muted);
  margin-top: 10px;
  padding: 7px 0 2px;
}

.source-link {
  font-size: 8px;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
  background: var(--blue-soft);
  padding: 2px 5px;
  border-radius: 4px;
  transition: var(--transition);
}

.source-link:hover {
  background: rgba(59, 130, 246, 0.2);
}

.explain-note {
  margin-top: 10px;
  background: rgba(255, 176, 32, 0.05);
  border: 1px solid rgba(255, 176, 32, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--amber);
}

/* â”€â”€ 15. BUTTONS â”€â”€ */
.btn {
  height: 38px;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 5px 18px rgba(255, 122, 0, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.btn-secondary:hover:not(:disabled) {
  background: #38bdf8;
  color: #0b1120;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-light {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--ink-secondary);
}

.btn-light:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--ink);
}

.btn-danger {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 77, 106, 0.18);
}

.link-btn,
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.link-btn:hover,
.icon-btn:hover {
  color: var(--accent-end);
}

.icon-btn {
  font-size: 16px;
}

/* â”€â”€ 16. ALLOCATION BAR & DONUT â”€â”€ */
.allocation-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  align-items: center;
}

.allocation-wrap {
  width: 100%;
}

.allocation-bar {
  height: 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.allocation-seg {
  height: 100%;
  display: block;
  transition: width 0.5s ease-out;
}

.allocation-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.allocation-legend>div {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  grid-template-areas: "dot label value" "dot label pct";
  column-gap: 6px;
  align-items: center;
  font-size: 10px;
  border-radius: 4px;
  padding: 4px;
}

.allocation-legend i {
  grid-area: dot;
  width: 7px;
  height: 20px;
  border-radius: 3px;
}

.allocation-legend span {
  grid-area: label;
  color: var(--ink-muted);
}

.allocation-legend strong {
  grid-area: value;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.allocation-legend small {
  grid-area: pct;
  text-align: right;
  color: var(--ink-muted);
}

.seg-tax {
  background: var(--purple);
}

.seg-etsy {
  background: var(--red);
}

.seg-ads {
  background: var(--amber);
}

.seg-ship {
  background: var(--blue);
}

.seg-own {
  background: #64748b;
}

.seg-profit {
  background: var(--green);
}

.seg-loss {
  background: #e11d48;
}

.donut-card {
  display: grid;
  place-items: center;
}

.donut-card.mini {
  display: inline-grid;
  margin: 0;
}

.donut-svg-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.donut-svg {
  transform: rotate(-90deg);
  overflow: visible;
}

.donut-hole {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--border);
  text-align: center;
  pointer-events: none;
  padding: 4px;
}

.donut-hole small {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  max-width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-hole strong {
  font-size: 17px;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.donut-hole span {
  font-size: 10px;
  font-weight: 800;
  color: var(--green);
}

.allocation-seg.active {
  transform: scaleY(1.2);
}

.allocation-seg.dimmed {
  opacity: 0.6 !important;
}

.allocation-legend-item.dimmed {
  opacity: 0.6 !important;
}

.allocation-legend-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.inline-alert {
  padding: 9px 10px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
}

.inline-alert.danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

/* â”€â”€ 17. PROFIT HERO (stays in calculator for standalone) â”€â”€ */
.profit-hero {
  border-radius: var(--radius);
  padding: 20px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  animation: glowPulse 3s ease-in-out infinite;
}

.profit-hero>div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.profit-hero span {
  font-weight: 800;
  color: var(--ink-secondary);
}

.profit-hero strong {
  font-size: 30px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.profit-hero small {
  font-weight: 800;
  color: var(--green);
  opacity: 0.8;
}

.profit-hero.danger {
  background: var(--red-soft);
  border-color: var(--red-border);
  animation-name: glowPulseDanger;
}

.profit-hero.danger strong,
.profit-hero.danger small {
  color: var(--red);
}

.profit-hero.warn,
.profit-hero.mid {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  animation-name: glowPulseAmber;
}

.profit-hero.warn strong,
.profit-hero.mid strong,
.profit-hero.warn small,
.profit-hero.mid small {
  color: var(--amber);
}

.profit-formula {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

/* â”€â”€ 18. RECOMMENDATIONS â”€â”€ */
.smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.recommendations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.recommendation {
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}

.recommendation:hover {
  border-color: var(--border-hover);
}

.recommendation strong {
  font-size: 12px;
  color: #fff;
}

.recommendation p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.recommendation.good {
  background: var(--green-soft);
  border-color: var(--green-border);
}

.recommendation.warn {
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

.recommendation.danger {
  background: var(--red-soft);
  border-color: var(--red-border);
}

.recommendation.info {
  background: var(--blue-soft);
  border-color: var(--blue-border);
}

/* â”€â”€ 19. MARKETING â”€â”€ */
.marketing-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.source-foot {
  font-size: 9px;
  color: var(--ink-muted);
  margin: 10px 0 0;
}

/* â”€â”€ 20. PRODUCT CARDS â”€â”€ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
  animation: cardAppear 0.38s ease-out both;
}

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

.product-card.selected {
  border-color: rgba(255, 122, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.08);
}

.product-card-head {
  display: flex;
  justify-content: space-between;
}

.name-input {
  border: 0;
  width: 100%;
  font-size: 16px;
  font-weight: 800;
  outline: 0;
  margin: 10px 0 12px;
  background: transparent;
  color: #fff;
}

.name-input::placeholder {
  color: var(--ink-muted);
}

.product-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.product-metrics>div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.product-metrics span {
  display: block;
  color: var(--ink-muted);
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-metrics strong {
  display: block;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.card-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

/* â”€â”€ 21. MONTHLY PLANNER â”€â”€ */
.planner-inputs {
  display: grid;
  grid-template-columns: 160px 200px 200px 1fr;
  gap: 12px;
  align-items: end;
}

.quick-units {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 2px;
}

.chip {
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0 11px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink-secondary);
  transition: var(--transition);
}

.chip:hover {
  border-color: var(--border-hover);
  color: var(--ink);
}

.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(255, 122, 0, 0.2);
}

.monthly-waterfall {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.monthly-row {
  display: grid;
  grid-template-columns: 130px 1fr 80px;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--ink-secondary);
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  display: block;
  border-radius: 999px;
  transition: width 0.6s ease-out;
}

.bar-fill.revenue {
  background: linear-gradient(90deg, var(--blue), #60a5fa);
}

.bar-fill.tax {
  background: var(--purple);
}

.bar-fill.etsy {
  background: var(--red);
}

.bar-fill.ads {
  background: var(--amber);
}

.bar-fill.ship {
  background: #60a5fa;
}

.bar-fill.own {
  background: #64748b;
}

.bar-fill.profit {
  background: linear-gradient(90deg, var(--green), #34d399);
}

.panel-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* â”€â”€ 22. HISTORY (Dashboard) â”€â”€ */
.history-chart {
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 6px 0;
  overflow-x: auto;
}

.history-col {
  height: 100%;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.history-bars {
  height: 220px;
  width: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hist {
  width: 16px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.5s ease-out;
}

.hist span {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--bg-card-solid);
  color: #fff;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 9px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.hist:hover span {
  display: block;
}

.hist.revenue {
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
}

.hist.profit {
  background: linear-gradient(180deg, var(--green), #34d399);
}

.hist.loss {
  background: linear-gradient(180deg, var(--red), #ff7a8a);
}

.history-col small {
  font-size: 8px;
  color: var(--ink-muted);
}

.history-table {
  overflow: auto;
}

.history-row {
  display: grid;
  grid-template-columns: 80px minmax(110px, 1.5fr) 50px repeat(6, 78px) 28px;
  gap: 6px;
  align-items: center;
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 10px;
  min-width: 880px;
  transition: var(--transition);
}

.history-row:hover:not(.head) {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 5px;
}

.history-row.head {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-weight: 700;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

/* â”€â”€ 23. SETTINGS â”€â”€ */
.settings-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

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

.source-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-card);
  transition: var(--transition);
  display: block;
}

.source-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.source-card strong {
  display: block;
  color: #fff;
  font-size: 12px;
}

.source-card p {
  font-size: 10px;
  color: var(--ink-muted);
  line-height: 1.45;
  min-height: 40px;
  margin: 5px 0;
}

.source-card span {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
}

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

.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* â”€â”€ 24. QA â”€â”€ */
.qa-table {
  overflow: auto;
}

.qa-row {
  display: grid;
  grid-template-columns: 160px 1fr 85px 85px 60px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 10px;
  min-width: 620px;
  transition: var(--transition);
}

.qa-row:hover:not(.head) {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 5px;
}

.qa-row.head {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-weight: 700;
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
  line-height: 1.7;
  font-size: 11px;
}

/* â”€â”€ 25. EMPTY STATE â”€â”€ */
.empty {
  padding: 32px;
  text-align: center;
  color: var(--ink-muted);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.01);
}

.empty strong {
  color: var(--ink);
  font-size: 14px;
}

.empty p {
  margin: 5px 0 0;
}

/* â”€â”€ 26. ANIMATIONS â”€â”€ */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popIn {
  0% {
    opacity: 0.3;
    transform: scale(0.88) translateY(3px);
  }

  60% {
    transform: scale(1.04);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pop-in {
  animation: popIn 0.3s ease-out;
}

@keyframes donutSpin {
  from {
    transform: rotate(-90deg);
    opacity: 0;
  }

  to {
    transform: rotate(0deg);
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 16px rgba(0, 214, 143, 0.07);
  }

  50% {
    box-shadow: 0 0 28px rgba(0, 214, 143, 0.16);
  }
}

@keyframes glowPulseDanger {

  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 77, 106, 0.07);
  }

  50% {
    box-shadow: 0 0 28px rgba(255, 77, 106, 0.16);
  }
}

@keyframes glowPulseAmber {

  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 176, 32, 0.07);
  }

  50% {
    box-shadow: 0 0 28px rgba(255, 176, 32, 0.16);
  }
}

/* â”€â”€ 27. SCROLLBAR â”€â”€ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* â”€â”€ 27B. COMPONENT ENHANCEMENTS (Tooltips, i18n, Currency, Edit Mode) â”€â”€ */
.app-shell.no-right-panel .main-wrap {
  margin-right: 0;
  max-width: 1400px;
}

.app-shell.no-right-panel .page {
  max-width: 1300px;
}

/* Tooltips */
.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  position: relative;
}

.field-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  outline: none;
}

.field-help-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink-secondary);
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
  user-select: none;
  line-height: 1;
}

.field-tooltip-wrap:hover .field-help-icon,
.field-tooltip-wrap:focus .field-help-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.4);
  transform: scale(1.1);
}

.field-tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: 320px;
  padding: 8px 12px;
  background: #141b29;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s cubic-bezier(.4, 0, .2, 1), transform 0.2s cubic-bezier(.4, 0, .2, 1);
  z-index: 9999;
}

.field-tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 6px;
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #141b29 transparent transparent transparent;
}

.field-tooltip-wrap:hover .field-tooltip-popup,
.field-tooltip-wrap:focus .field-tooltip-popup,
.field-tooltip-wrap:focus-within .field-tooltip-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Sidebar Brand Row & Language Trigger */
.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border);
  gap: 6px;
}

.sidebar-brand-row .sidebar-brand {
  padding: 0;
}

.lang-trigger-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
}

.lang-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.lang-flag-sm {
  font-size: 14px;
  border-radius: 2px;
}

.lang-code-text {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.lang-arrow {
  font-size: 8px;
  color: var(--ink-muted);
}

.mobile-lang-btn {
  height: 32px;
  margin-left: auto;
}

/* Language Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-card.lang-modal {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #101726;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.22s cubic-bezier(.4, 0, .2, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-title-wrap h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.modal-subtitle {
  font-size: 11px;
  color: var(--ink-muted);
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 77, 106, 0.15);
  border-color: var(--red);
  color: var(--red);
}

.modal-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.modal-search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
}

.search-clear {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 12px;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.lang-item.active {
  background: rgba(255, 122, 0, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.lang-flag {
  font-size: 22px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lang-names {
  flex: 1;
  min-width: 0;
}

.lang-names strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-names small {
  display: block;
  font-size: 10px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: 4px;
}

.lang-item.active .lang-badge {
  background: var(--accent);
  color: #fff;
}

.modal-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--ink-muted);
  background: rgba(0, 0, 0, 0.2);
}

/* Currency Live Bar & Inputs */
.currency-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 214, 143, 0.05);
  border: 1px solid rgba(0, 214, 143, 0.18);
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 12px;
  font-size: 11px;
}

.clb-rates {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clb-rates strong {
  color: var(--green);
}

.clb-rates small {
  color: var(--ink-muted);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

.input-wrap.with-select {
  display: flex;
  align-items: center;
}

.currency-select {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  height: 100%;
  cursor: pointer;
  outline: none;
}

.currency-select:focus {
  background: rgba(255, 255, 255, 0.12);
}

/* Ads Panels & Frequency Banner */
.mkt-toggles-grid {
  margin-bottom: 6px;
}

.etsy-ads-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(124, 92, 255, 0.04);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 10px;
  padding: 14px;
  box-sizing: border-box;
  width: 100%;
}

.offsite-ad-panel {
  background: rgba(56, 189, 248, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  padding: 14px;
  box-sizing: border-box;
  width: 100%;
}

.ads-freq-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

.ads-freq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.ads-freq-grid .field {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.ads-freq-grid .input-wrap {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.ads-freq-grid .input-wrap input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.ads-formula-banner {
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
}

.afb-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.afb-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.afb-chip.afb-result {
  background: rgba(0, 214, 143, 0.15);
  border-color: rgba(0, 214, 143, 0.4);
  color: var(--green);
  font-weight: 800;
}

.afb-op {
  color: var(--ink-muted);
  font-weight: 800;
  font-size: 13px;
}

.afb-sub {
  font-size: 11px;
  color: var(--ink-secondary);
  font-weight: 500;
}

.afb-hint {
  margin: 0;
  font-size: 10px;
  color: var(--ink-muted);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .ads-freq-grid {
    grid-template-columns: 1fr;
  }

  .afb-equation {
    gap: 4px;
  }
}

/* Edit Mode Banner */
.edit-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.12), rgba(255, 176, 0, 0.05));
  border: 1px solid rgba(255, 122, 0, 0.3);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

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

.emb-icon {
  font-size: 18px;
}

.emb-content strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.emb-content p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--ink-secondary);
}

.btn-edit {
  background: rgba(255, 122, 0, 0.12);
  border: 1px solid rgba(255, 122, 0, 0.3);
  color: var(--accent);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}

.btn-edit:hover {
  background: var(--accent);
  color: #fff;
}

.prod-head-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.name-input-wrap {
  margin: 8px 0 12px;
}

@media (max-width:900px) {
  .lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* â”€â”€ 28. RESPONSIVE â€” TABLET (<=1100px) â”€â”€ */
@media (max-width:1100px) {
  :root {
    --rpanel-w: 300px;
  }

  .sidebar {
    width: 68px;
  }

  .sidebar .brand-text,
  .sidebar .nav-label,
  .sidebar-picker label,
  .sidebar-footer span,
  .sidebar-picker select {
    display: none;
  }

  .sidebar-brand {
    padding: 16px 12px;
    justify-content: center;
  }

  .sidebar-picker {
    padding: 0 10px 10px;
  }

  .picker-actions {
    flex-direction: column;
  }

  .sidebar-nav {
    padding: 6px 5px;
  }

  .nav-item {
    justify-content: center;
    padding: 9px 5px;
  }

  .nav-item.active::before {
    display: none;
  }

  .sidebar-footer {
    justify-content: center;
  }

  .main-wrap {
    margin-left: 68px;
  }

  .planner-inputs {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-units {
    grid-column: 1/-1;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

/* â”€â”€ 29. RESPONSIVE â€” MOBILE (<=768px) â”€â”€ */
@media (max-width:768px) {
  .sidebar {
    display: none;
  }

  .right-panel {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .bottom-nav {
    display: flex;
  }

  .sticky-bar-container {
    display: block;
    position: fixed;
    bottom: var(--bottom-h);
    left: 0;
    right: 0;
    z-index: 95;
  }

  .sticky-bar {
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    padding: 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
  }

  .sbar-mini-bar {
    height: 5px;
    width: 100%;
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
  }

  .sbar-mini-seg {
    height: 100%;
    transition: opacity 0.2s ease;
  }

  .sbar-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    gap: 8px;
    width: 100%;
    min-height: 56px;
  }

  .sbar-chart-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .sbar-chart-preview:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .sbar-chart-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-width: 105px;
  }

  .sbar-chart-label small {
    font-size: 8px;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sbar-chart-label span {
    font-size: 11px;
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }

  .sbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
  }

  .sbar-expand-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 122, 0, 0.12);
    border: 1px solid rgba(255, 122, 0, 0.35);
    color: var(--accent);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .sbar-expand-btn:active {
    background: var(--accent);
    color: #fff;
  }

  .sbar-expand-btn.open {
    background: rgba(255, 77, 106, 0.15);
    border-color: var(--red);
    color: var(--red);
  }

  .sticky-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 94;
    animation: fadeIn 0.2s ease;
  }

  .sticky-drawer-sheet {
    position: fixed;
    bottom: calc(var(--bottom-h) + 64px);
    left: 10px;
    right: 10px;
    max-height: 75vh;
    background: #101726;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.85);
    z-index: 96;
    overflow-y: auto;
    padding: 16px;
    animation: slideUp 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sticky-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .sticky-drawer-head strong {
    font-size: 14px;
    color: #fff;
  }

  .sticky-drawer-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--ink-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
  }

  .main-wrap {
    margin-left: 0;
    margin-right: 0;
    padding-bottom: calc(var(--sticky-h) + var(--bottom-h) + 12px);
  }

  .page {
    padding: 16px 12px 28px;
  }

  .page-title-row h1 {
    font-size: 20px;
  }

  .page-title-row {
    flex-direction: column;
    gap: 6px;
  }

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

  .allocation-layout {
    grid-template-columns: 1fr;
  }

  .allocation-legend {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .panel {
    padding: 12px;
    border-radius: 12px;
  }

  .profit-hero strong {
    font-size: 26px;
  }

  .monthly-row {
    grid-template-columns: 85px 1fr 65px;
  }
}

/* â”€â”€ 30. SMALL MOBILE (<=480px) â”€â”€ */
@media (max-width:480px) {
  .page {
    padding: 12px 8px 24px;
  }

  .page-title-row h1 {
    font-size: 18px;
  }

  .sbar-item span {
    font-size: 7px;
  }

  .sbar-item strong {
    font-size: 12px;
  }

  .kpi-grid {
    gap: 7px;
  }

  .allocation-legend {
    grid-template-columns: 1fr;
  }
}

/* â”€â”€ 31. CURRENCY SETTINGS & LIVE RATES â”€â”€ */
.currency-settings-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.currency-select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.preset-apply-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  padding: 10px 14px;
}

.preset-text-wrap strong {
  display: block;
  font-size: 13px;
  color: var(--text-bright, #f8fafc);
}

.preset-text-wrap p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.preset-apply-box button {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.preset-apply-box button:hover {
  background: #38bdf8;
  color: #0b1120;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.cur-rates-overview {
  background: var(--bg-card, #131b2e);
  border: 1px solid var(--border, #1e293b);
  border-radius: 8px;
  padding: 12px 14px;
}

.cur-rates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.crh-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crh-left strong {
  font-size: 13px;
  color: var(--text-bright, #f8fafc);
}

.crh-left small {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.rates-pills-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.rate-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-surface, #0f172a);
  border: 1px solid var(--border, #334155);
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.2s ease;
}

.rate-pill strong {
  font-size: 12px;
  color: var(--text-bright, #f8fafc);
}

.rate-pill span {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, monospace);
}

.rate-pill.selected {
  border-color: var(--brand, #38bdf8);
  background: rgba(56, 189, 248, 0.08);
}

.rate-pill.selected strong {
  color: var(--brand, #38bdf8);
}

@media (max-width: 640px) {
  .currency-select-row {
    grid-template-columns: 1fr;
  }

  .preset-apply-box {
    flex-direction: column;
    align-items: flex-start;
  }
}