/* Ruveka AI - Design System & App Styles */
:root {
  --bg-main: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-hover: #F3F4F6;
  
  --text-main: #0F172A;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  --border-light: #E5E7EB;
  --border-subtle: #F1F3F5;
  --border-divider: #ECECEC;

  --primary-dark: #000000;
  --primary-navy: #0F1E36;
  --primary-hover: #1E293B;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 260px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Landing Page Styles - Senior Product Designer Bespoke Monochrome System */
.site-header {
  border-bottom: 1px solid #E4E4E7;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: border-color 0.2s ease;
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #09090B;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.nav-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  color: #52525B;
  font-weight: 500;
}

.nav-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #18181B;
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.15);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #09090B;
  color: #FFFFFF;
  border-color: #09090B;
}

.btn-primary:hover {
  background-color: #27272A;
  border-color: #27272A;
}

.btn-secondary {
  background-color: #FFFFFF;
  color: #18181B;
  border-color: #E4E4E7;
}

.btn-secondary:hover {
  background-color: #F4F4F5;
  border-color: #D4D4D8;
}

.btn-danger {
  background-color: #FFFFFF;
  color: #DC2626;
  border-color: #FEE2E2;
}

.btn-danger:hover {
  background-color: #FEF2F2;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* Hero Section */
.hero-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 84px 24px 64px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #71717A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding: 5px 14px;
  border-radius: 20px;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hero-title {
  font-size: 48px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #09090B;
  max-width: 860px;
  margin: 0 auto 24px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.65;
  color: #52525B;
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  background: #09090B;
  color: #FAFAFA;
  border: 1px solid #09090B;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  background: #27272A;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-hero-secondary {
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 500;
  background: #FFFFFF;
  color: #18181B;
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: #F4F4F5;
  border-color: #D4D4D8;
}

.hero-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 12.5px;
  color: #71717A;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-item svg {
  color: #18181B;
}

/* 3D Perspective Showcase */
.preview-3d-stage {
  perspective: 1200px;
  padding: 20px 24px 72px;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.preview-3d-card {
  width: 100%;
  max-width: 820px;
  background: #FFFFFF;
  border: 1px solid #D4D4D8;
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: rotateX(6deg) rotateY(-3deg);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  overflow: hidden;
  transform-style: preserve-3d;
}

.preview-3d-card:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-4px);
  box-shadow: 0 35px 80px -20px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.preview-browser-bar {
  background: #FAFAFA;
  border-bottom: 1px solid #E4E4E7;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D4D4D8;
}

.browser-address {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 6px;
  padding: 4px 16px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #71717A;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 440px;
  justify-content: center;
}

.browser-latency-badge {
  font-size: 11px;
  color: #18181B;
  background: #E4E4E7;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.preview-canvas-content {
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
}

.preview-left-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #18181B;
  font-weight: 600;
}

.preview-creator-badge span.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #18181B;
  color: #FFFFFF;
  font-size: 10px;
}

.preview-product-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: #09090B;
  letter-spacing: -0.02em;
}

.preview-product-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #71717A;
}

.preview-specs-strip {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: #52525B;
}

.preview-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F4F4F5;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid #E4E4E7;
}

.preview-checkout-card {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.checkout-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F4F4F5;
}

.checkout-price-tag {
  font-size: 28px;
  font-weight: 800;
  color: #09090B;
  letter-spacing: -0.03em;
}

.checkout-price-tag span {
  font-size: 13px;
  font-weight: 400;
  color: #71717A;
  margin-left: 4px;
}

.checkout-upi-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.upi-method-badge {
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  border-radius: 6px;
  padding: 8px 4px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #27272A;
}

.preview-pay-btn {
  width: 100%;
  padding: 12px;
  background: #09090B;
  color: #FFFFFF;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: default;
}

.checkout-instant-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: #71717A;
  margin-top: 12px;
}

/* Calculator Section */
.calc-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: #71717A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.section-title {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #09090B;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: #52525B;
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.calc-grid-box {
  background: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 16px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: #27272A;
  font-weight: 600;
}

.slider-value-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  color: #09090B;
}

.modern-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E4E4E7;
  outline: none;
  transition: background 0.2s;
}

.modern-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #09090B;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

.modern-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-results-card {
  background: #09090B;
  color: #FFFFFF;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.calc-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #27272A;
  font-size: 13.5px;
}

.calc-metric-row.highlight {
  border-bottom: none;
  padding-top: 18px;
}

.calc-metric-label {
  color: #A1A1AA;
}

.calc-metric-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: #FAFAFA;
}

.calc-metric-value.danger {
  color: #F87171;
}

.calc-savings-badge {
  background: #18181B;
  border: 1px solid #3F3F46;
  border-radius: 8px;
  padding: 16px;
  margin-top: 18px;
}

.calc-savings-label {
  font-size: 12px;
  color: #A1A1AA;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.calc-savings-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
}

/* 3 Asymmetrical Architecture Sections (Human Designed - NOT Cards) */
.architecture-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.arch-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 48px;
  border-top: 1px solid #E4E4E7;
}

.arch-index {
  font-size: 12px;
  font-weight: 700;
  color: #71717A;
  letter-spacing: 0.1em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-bottom: 10px;
}

.arch-heading {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #09090B;
  line-height: 1.25;
  margin-bottom: 14px;
}

.arch-paragraph {
  font-size: 15px;
  line-height: 1.65;
  color: #52525B;
  margin-bottom: 20px;
}

.arch-specs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: #27272A;
}

.arch-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.arch-spec-item svg {
  color: #18181B;
  flex-shrink: 0;
  margin-top: 2px;
}

.arch-interactive-graphic {
  background: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  padding: 28px;
}

/* Speed comparison graphic */
.speed-bar-row {
  margin-bottom: 20px;
}

.speed-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: #18181B;
  font-weight: 600;
}

.speed-track {
  height: 10px;
  background: #E4E4E7;
  border-radius: 5px;
  overflow: hidden;
}

.speed-fill-ruveka {
  height: 100%;
  width: 22%;
  background: #09090B;
  border-radius: 5px;
}

.speed-fill-legacy {
  height: 100%;
  width: 90%;
  background: #A1A1AA;
  border-radius: 5px;
}

/* Delivery Flow Graphic */
.delivery-flow-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flow-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #27272A;
  font-weight: 500;
}

.flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #09090B;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: monospace;
  flex-shrink: 0;
}

/* How It Works Section */
.how-it-works-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 24px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.step-card {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: #A1A1AA;
}

.step-number-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #09090B;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: #09090B;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #52525B;
}

.step-pill {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #18181B;
  background: #F4F4F5;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #E4E4E7;
}

/* Creator FAQ Section */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 10px;
  padding: 20px 24px;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: #A1A1AA;
}

.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: #09090B;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-answer {
  font-size: 14px;
  line-height: 1.65;
  color: #52525B;
}

/* Regulatory Trust Banner */
.regulatory-strip {
  max-width: 1120px;
  margin: 0 auto 60px;
  padding: 20px 24px;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.regulatory-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.regulatory-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: #09090B;
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 5px;
  font-family: monospace;
}

.regulatory-text {
  font-size: 12.5px;
  color: #52525B;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  border-top: 1px solid #E4E4E7;
  background-color: #FAFAFA;
  padding: 48px 0 36px;
}

.footer-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #71717A;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #52525B;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #09090B;
}

@media (max-width: 860px) {
  .hero-title {
    font-size: 34px;
  }
  .preview-canvas-content {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .preview-3d-card {
    transform: none !important;
  }
  .calc-grid-box {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .arch-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.auth-message {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.auth-message:empty {
  display: none !important;
}

.auth-message.error:not(:empty) {
  display: block;
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FEE2E2;
}

/* =========================================================
   APP CONTAINER & SIDEBAR
   ========================================================= */

.app-body {
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-main);
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-divider);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, width 0.2s ease;
  flex-shrink: 0;
  z-index: 30;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  border-right: none;
  position: absolute;
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
}

.sidebar-logo {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.02em;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: #111827;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-hover);
}

.sidebar-menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.menu-group {
  margin-bottom: 6px;
}

.history-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.history-menu-trigger {
  flex: 1;
}

.new-chat-icon-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 4px;
  flex-shrink: 0;
}

.new-chat-icon-btn:hover {
  background-color: var(--bg-hover);
  color: #000000;
  border-color: var(--border-light);
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #111827;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.menu-item:hover {
  background-color: var(--bg-hover);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-icon {
  color: #111827;
  flex-shrink: 0;
}

.chevron-icon {
  color: #6B7280;
  transition: transform 0.2s ease;
}

.menu-group.open .chevron-icon {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  padding: 4px 0 8px 12px;
}

.menu-group.open .submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submenu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.submenu-item:hover {
  background-color: var(--bg-hover);
  color: #000000;
}

.submenu-item.active-tool {
  background-color: var(--bg-hover);
  color: #000000;
  font-weight: 600;
}

.tool-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #000000;
  flex-shrink: 0;
  display: inline-block;
}

/* =========================================================
   HISTORY LIST WITH PIN & DELETE (HOVER & LONG PRESS)
   ========================================================= */

.history-item-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  width: 100%;
}

.history-item-row:hover,
.history-item-row.show-actions {
  background-color: var(--bg-hover);
  color: #000000;
}

.history-item-content {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  flex: 1;
  padding-right: 6px;
}

.history-pin-badge {
  font-size: 11px;
  color: #111827;
  flex-shrink: 0;
}

.history-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

/* Hover on desktop OR .show-actions via touch long press */
.history-item-row:hover .history-actions,
.history-item-row.show-actions .history-actions {
  opacity: 1;
  pointer-events: auto;
}

.history-action-btn {
  background: none;
  border: none;
  padding: 3px;
  border-radius: 4px;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.history-action-btn:hover {
  background-color: #E5E7EB;
  color: #000000;
}

.history-action-btn.delete-btn:hover {
  color: #DC2626;
  background-color: #FEE2E2;
}

.history-action-btn.is-pinned {
  color: #000000;
}

.history-empty {
  font-size: 12px;
  color: var(--text-light);
  padding: 6px 10px;
}

.menu-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 10px 12px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-divider);
}

/* =========================================================
   MAIN VIEWPORT
   ========================================================= */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background-color: var(--bg-main);
  overflow: hidden;
}

.collapsed-toggle-btn {
  position: absolute;
  top: 18px;
  left: 20px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 6px;
  color: #111827;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background-color: #FFFFFF;
}

.collapsed-toggle-btn:hover {
  background-color: var(--bg-hover);
}

.app-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Chat View */
.chat-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px 120px;
  overflow-y: auto;
  width: 100%;
}

.chat-viewport.has-messages {
  justify-content: flex-start;
}

.chat-viewport.has-messages .center-greeting {
  display: none !important;
}

.center-greeting {
  text-align: center;
  max-width: 600px;
  animation: fadeIn 0.3s ease;
}

.greeting-heading {
  font-size: 34px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.greeting-subheading {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}

.messages-container {
  width: 100%;
  max-width: 1060px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0 auto;
}

@media (min-width: 1400px) {
  .messages-container {
    max-width: 1180px;
  }
}

.message-row {
  display: flex;
  width: 100%;
  gap: 14px;
  align-items: flex-start;
  animation: messageFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.message-row.user {
  justify-content: flex-end;
}

.message-row.assistant {
  justify-content: flex-start;
}

/* Avatar Elements */
.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  user-select: none;
}

.message-avatar.assistant-avatar {
  background: #09090B;
  border: 1px solid #27272A;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.message-avatar.assistant-avatar img {
  width: 20px;
  height: 20px;
  display: block;
}

.message-avatar.user-avatar {
  background: #18181B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #27272A;
}

.message-avatar.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Bubble Content Wrapper */
.message-content-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.message-row.user .message-content-wrapper {
  max-width: 75%;
  align-items: flex-end;
}

.message-row.assistant .message-content-wrapper {
  max-width: 100%;
  width: 100%;
  flex: 1;
}

.message-bubble {
  font-size: 14.5px;
  line-height: 1.65;
  word-break: break-word;
}

.message-row.user .message-bubble {
  background-color: #F4F4F5;
  color: #09090B;
  padding: 10px 16px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  border: 1px solid #E4E4E7;
}

.message-row.assistant .message-bubble {
  background-color: transparent;
  color: #09090B;
  padding: 2px 0 4px;
  border: none;
}

/* ChatGPT & Claude Style Action Bar below Assistant Message */
.assistant-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 4px;
}

.chat-action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #71717A;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: inherit;
  font-weight: 500;
}

.chat-action-btn:hover {
  color: #09090B;
  background: #F4F4F5;
  border-color: #E4E4E7;
}

.chat-action-btn.active-action {
  color: #09090B;
  background: #E4E4E7;
  border-color: #D4D4D8;
  font-weight: 600;
}

.chat-action-btn svg {
  flex-shrink: 0;
}

/* Thinking Indicator */
.message-row.thinking .message-bubble {
  color: #52525B;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background-color: #18181B;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.35); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}

/* Code Block with Header Bar & Copy Button */
.chat-code-block-container {
  background: #09090B;
  border: 1px solid #27272A;
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-code-header {
  background: #18181B;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #27272A;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: #A1A1AA;
  letter-spacing: 0.05em;
}

.chat-code-copy-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.chat-code-copy-btn:hover {
  color: #FFFFFF;
  background: #27272A;
}

.chat-code-content {
  padding: 14px;
  margin: 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #FAFAFA;
}

.chat-inline-code {
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 500;
}

/* Claude-Style Headings */
.chat-h1 {
  font-size: 19px;
  font-weight: 800;
  color: #09090B;
  letter-spacing: -0.02em;
  margin: 18px 0 10px 0;
  line-height: 1.35;
}

.chat-h2 {
  font-size: 16.5px;
  font-weight: 750;
  color: #0F172A;
  letter-spacing: -0.015em;
  margin: 16px 0 8px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid #F1F5F9;
  line-height: 1.35;
}

.chat-h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin: 14px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.chat-h3::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  background: linear-gradient(180deg, #6366F1, #8B5CF6);
  border-radius: 2px;
  flex-shrink: 0;
}

.chat-h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 14px 0 6px 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.chat-h5 {
  font-size: 13.5px;
  font-weight: 650;
  color: #1E293B;
  margin: 12px 0 4px 0;
  line-height: 1.4;
}

.chat-h6 {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0 4px 0;
}

.chat-num-marker {
  font-weight: 700;
  color: #6366F1;
  margin-right: 4px;
}

.chat-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background-color: #6366F1;
  margin-left: 2px;
  vertical-align: middle;
  animation: cursorBlink 0.8s infinite;
}

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

/* Claude-Style Callout Boxes & Tips */
.chat-callout {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13.5px;
  line-height: 1.55;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 3.5px solid #6366F1;
  color: #334155;
}

.chat-callout.tip {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-left: 4px solid #10B981;
  color: #166534;
}

.chat-callout.warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  color: #92400E;
}

.chat-callout.note {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-left: 4px solid #0284C7;
  color: #0369A1;
}

/* Markdown Tables */
.chat-table-wrapper {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.chat-table th {
  background: #F8FAFC;
  color: #0F172A;
  font-weight: 650;
  padding: 9px 14px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}

.chat-table tr:last-child td {
  border-bottom: none;
}

.chat-table tr:hover td {
  background: #F8FAFC;
}

/* Badges & Key Highlights */
.chat-price-badge {
  display: inline-block;
  background: #DCFCE7;
  color: #166534;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid #BBF7D0;
}

.chat-tag-badge {
  display: inline-block;
  background: #EEF2FF;
  color: #4338CA;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12px;
}

.chat-hr {
  height: 1px;
  background: linear-gradient(90deg, #E2E8F0 0%, #CBD5E1 50%, #E2E8F0 100%);
  border: none;
  margin: 18px 0;
}

/* Task Checklists */
.chat-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  font-size: 14px;
}

.chat-task-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #10B981;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-task-uncheck {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #94A3B8;
  display: inline-block;
  flex-shrink: 0;
}

.chat-list, .chat-num-list {
  padding-left: 20px;
  margin: 8px 0;
}

.chat-bullet-item, .chat-num-item {
  margin-bottom: 6px;
  line-height: 1.6;
}

.chat-bullet-item::marker {
  color: #6366F1;
}

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

/* =========================================================
   INPUT BAR - ZERO BLUE RECTANGLE FOCUS & BESPOKE FOCUS STATE
   ========================================================= */

.input-wrapper,
.input-wrapper *,
.input-card,
.input-card:focus,
.input-card:focus-visible,
.input-card:active,
.chat-text-input,
.chat-text-input:focus,
.chat-text-input:focus-visible,
.chat-text-input:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.input-wrapper {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  background: transparent;
  pointer-events: none;
}

.input-card {
  pointer-events: auto;
  width: 100%;
  max-width: 1060px;
  background-color: #FFFFFF;
  border: 1.5px solid #E4E4E7;
  border-radius: 28px;
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none !important;
}

@media (min-width: 1400px) {
  .input-card {
    max-width: 1180px;
  }
}

.input-card:focus-within {
  border-color: #18181B;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.attachment-btn {
  background: none;
  border: none;
  color: #4B5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin-right: 8px;
  border-radius: 50%;
  transition: color 0.15s ease;
  outline: none !important;
}

.attachment-btn:hover {
  color: #000000;
}

.chat-text-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  font-family: inherit;
  font-size: 15px;
  color: #111827;
  background: transparent;
  -webkit-tap-highlight-color: transparent !important;
}

.chat-text-input:focus,
.chat-text-input:focus-visible,
.chat-text-input:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

#chatInput::selection,
.chat-text-input::selection {
  background-color: #E4E4E7 !important;
  color: #09090B !important;
}

#chatInput::-moz-selection,
.chat-text-input::-moz-selection {
  background-color: #E4E4E7 !important;
  color: #09090B !important;
}

/* ChatGPT & Claude Style Typing Streaming Cursor */
.chat-typing-cursor {
  display: inline-block;
  width: 2.5px;
  height: 15px;
  background-color: #6366F1;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 1px;
  animation: cursorBlink 0.75s infinite ease-in-out;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0; transform: scaleY(0.7); }
}

.chat-text-input::placeholder {
  color: #9CA3AF;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #000000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.1s ease;
  outline: none !important;
}

.send-btn:hover {
  opacity: 0.88;
}

.send-btn:active {
  transform: scale(0.96);
}

/* =========================================================
   DIGITAL LANDING & PRODUCTS VIEW
   ========================================================= */

.products-dashboard-wrapper {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 80px;
  overflow-y: auto;
  height: 100%;
}

.view-top-bar {
  margin-bottom: 20px;
}

.back-to-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.back-to-chat-btn:hover {
  background-color: var(--bg-hover);
  border-color: #CBD5E1;
}

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

.view-title {
  font-size: 26px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Metric Banner */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 34px;
  font-weight: 700;
  color: #000000;
  margin: 6px 0;
}

.metric-help {
  font-size: 12px;
  color: var(--text-light);
}

/* Products Section */
.products-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-subheading {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
}

/* Empty State */
.empty-products-card {
  border: 1px dashed var(--border-light);
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
}

.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
  margin-bottom: 8px;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.product-item-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-item-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.product-cover-thumb {
  width: 48px;
  height: 60px;
  border-radius: 6px;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-light);
  object-fit: cover;
  flex-shrink: 0;
}

.product-cover-placeholder {
  width: 48px;
  height: 60px;
  border-radius: 6px;
  background-color: var(--border-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
}

.product-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #000000;
  line-height: 1.3;
  margin-bottom: 6px;
}

.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-price-current {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.product-price-original {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.product-actions-group {
  display: flex;
  gap: 8px;
}

/* Product Modal Form */
.product-modal-card {
  max-width: 500px;
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.flex-1 {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background-color: #FFFFFF;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #000000;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* Settings Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid var(--border-light);
  animation: modalScale 0.2s ease;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6B7280;
}

.modal-body {
  padding: 20px;
}

.settings-section {
  margin-bottom: 20px;
}

.settings-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.modal-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.modal-user-initial {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #000000;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-display-name {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
}

.user-display-email {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

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

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile Top Navigation & Sliding Drawer (ChatGPT Style) */
.mobile-nav-bar {
  display: none;
  height: 52px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 40;
}

.mobile-hamburger-btn,
.mobile-header-action-btn {
  background: none;
  border: none;
  color: #0F172A;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-hamburger-btn:hover,
.mobile-header-action-btn:hover {
  background-color: #F1F5F9;
}

.mobile-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

.sidebar-mobile-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #64748B;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

@media (min-width: 769px) {
  .sidebar-mobile-close-btn {
    display: none !important;
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .mobile-nav-bar {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }

  .sidebar-mobile-close-btn {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .collapsed-toggle-btn {
    display: none !important;
  }

  .greeting-heading {
    font-size: 24px;
    padding: 0 10px;
  }

  .greeting-subheading {
    font-size: 13px;
    padding: 0 10px;
  }

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

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Mobile Chat Screen Optimization */
  .chat-viewport {
    padding: 16px 12px 100px;
  }

  .messages-container {
    gap: 18px;
  }

  .message-row {
    gap: 10px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
  }

  .message-avatar.assistant-avatar img {
    width: 16px;
    height: 16px;
  }

  .message-row.user .message-content-wrapper {
    max-width: 88%;
  }

  .message-bubble {
    font-size: 14px;
    line-height: 1.6;
  }

  .input-wrapper {
    padding: 0 10px;
    bottom: 14px;
  }

  .input-card {
    padding: 6px 8px 6px 14px;
    border-radius: 24px;
  }

  .chat-text-input {
    font-size: 14.5px;
  }

  .chat-callout {
    padding: 10px 12px;
    font-size: 13px;
  }

  .chat-table th, .chat-table td {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* Shared small-screen and keyboard accessibility safeguards. */
img { max-width: 100%; }
[hidden] { display: none !important; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #2563EB; outline-offset: 3px; }
.modal-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.main-content, .product-summary-info { min-width: 0; }
.product-summary-title, .user-display-email { overflow-wrap: anywhere; }
#payoutsView .cashout-note { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; color: #475569; font-size: 13px; line-height: 1.55; }
#payoutsView .cashout-note-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; background: #E0F2FE; color: #0369A1; font-weight: 700; }
#payoutsView .cashout-note p { margin: 0; }
#payoutsView .cashout-note strong { display: block; margin-bottom: 2px; color: #0F172A; font-weight: 650; }
#payoutsView .finance-payout-status { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
#payoutsView .finance-payout-status[data-status="pending"] { color: #A76416; }
#payoutsView .finance-payout-status[data-status="calculated"] { color: #574BD0; }
#payoutsView .finance-payout-status[data-status="paid"] { color: #16875D; }
@media (max-width: 768px) {
  .app-body, .app-container, .sidebar, .main-content { height: 100dvh; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-section { padding: 48px 20px; }
  .products-dashboard-wrapper { padding: 24px 16px 80px; }
  input, textarea, select { font-size: 16px; }
  .modal-overlay { padding: 16px; }
  .header-container { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
