/* ============================================================
   LiveDukan — Aura unified theme (all pages + panels)
   Loads after app.css; aligns buttons, surfaces, typography
   ============================================================ */

:root {
  --au-bg: #faf9f7;
  --au-surface: #ffffff;
  --au-ink: #1a1a2e;
  --au-muted: #64748b;
  --au-accent: #6366f1;
  --au-accent-hover: #4f46e5;
  --au-line: rgba(0, 0, 0, 0.08);
  --au-line-strong: #e2e8f0;
  --au-radius: 14px;
  --au-radius-lg: 18px;
  --au-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --au-shadow-hover: 0 8px 28px rgba(99, 102, 241, 0.1);
  --au-success-bg: #ecfdf5;
  --au-success-ink: #166534;
  --au-error-bg: #fef2f2;
  --au-error-ink: #991b1b;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--au-ink);
}

/* Public marketing site background */
body:not(.lb-panel-mode) {
  background: var(--au-bg) !important;
}

body.lb-panel-mode {
  background: var(--au-bg);
}

/* ---------- Buttons (global) ---------- */
.btn,
button.btn,
input[type="submit"].btn,
.cta-mini {
  font-family: inherit;
  border-radius: var(--au-radius);
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.btn:not(.outline):not(.secondary):not(.light):not(.gold) {
  background: var(--au-accent) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.22);
}

.btn:not(.outline):not(.secondary):not(.light):not(.gold):hover {
  background: var(--au-accent-hover) !important;
  opacity: 1 !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28);
}

.btn.outline,
.btn.light {
  background: var(--au-surface) !important;
  color: var(--au-ink) !important;
  border: 1px solid var(--au-line-strong) !important;
  box-shadow: none;
}

.btn.outline:hover,
.btn.light:hover {
  border-color: #c7d2fe !important;
  background: #eef2ff !important;
  color: var(--au-accent) !important;
  opacity: 1 !important;
}

.btn.secondary {
  background: #334155 !important;
  color: #fff !important;
  border: none !important;
}

.btn.secondary:hover {
  background: #1e293b !important;
  opacity: 1 !important;
}

.btn.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  border: none !important;
}

.cta-mini {
  background: var(--au-accent) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.cta-mini:hover {
  background: var(--au-accent-hover) !important;
  opacity: 1 !important;
}

.btn.small,
.btn.small.outline {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 12px;
}

/* ---------- Forms ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  font-family: inherit;
  border-radius: var(--au-radius) !important;
  border-color: var(--au-line-strong) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--au-accent) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* ---------- Cards & panels ---------- */
.card,
.panel,
.-panel,
.surface,
.hero:not(.seller-hero),
.shop-banner,
.product-detail-shell .product-detail-main,
.product-detail-shell .product-detail-side {
  background: var(--au-surface) !important;
  border: 1px solid var(--au-line) !important;
  border-radius: var(--au-radius-lg) !important;
  box-shadow: var(--au-shadow) !important;
}

.card:hover,
.panel:hover,
.-panel:hover {
  box-shadow: var(--au-shadow-hover) !important;
}

.page-hero,
.section-head {
  color: var(--au-ink);
}

.page-hero.compact h1,
.section-head h1,
.section-head h2 {
  color: var(--au-ink);
  letter-spacing: -0.02em;
}

.hero-chip,
.hero-chip-row .hero-chip {
  background: #f1f5f9 !important;
  border: 1px solid var(--au-line-strong) !important;
  color: #334155 !important;
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--au-radius);
  font-weight: 600;
  font-size: 0.9rem;
}

.alert.success {
  background: var(--au-success-bg) !important;
  color: var(--au-success-ink) !important;
  border: 1px solid #bbf7d0;
}

.alert.error {
  background: var(--au-error-bg) !important;
  color: var(--au-error-ink) !important;
  border: 1px solid #fecaca;
}

/* ---------- Topbar (public) ---------- */
.topbar.topbar-area,
.lb-header-v11 {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--au-line) !important;
}

.category-pill {
  background: #f1f5f9 !important;
  border: 1px solid var(--au-line-strong) !important;
  color: #334155 !important;
  border-radius: 999px !important;
}

.category-pill:hover {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: var(--au-accent) !important;
}

.navlink:hover {
  background: #eef2ff !important;
  color: var(--au-accent) !important;
}

/* ---------- Tables ---------- */
.table th {
  color: var(--au-muted) !important;
  font-weight: 700;
}

.table td {
  border-bottom-color: var(--au-line-strong) !important;
}

/* ---------- Badges ---------- */
.badge {
  border-radius: 999px;
}

.badge.ok {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.badge.warn {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.badge.danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* ---------- Auth pages ---------- */
.ld-auth-card,
.ld-auth-card-compact {
  border-radius: var(--au-radius-lg) !important;
  border: 1px solid var(--au-line) !important;
  box-shadow: var(--au-shadow) !important;
}

.ld-auth-card .btn[type="submit"],
.ld-auth-card-compact .btn[type="submit"] {
  background: var(--au-accent) !important;
  color: #fff !important;
}

/* ---------- Settings / admin field rows ---------- */
.settings-help,
.field span {
  color: var(--au-muted);
}

/* ---------- Mobile bottom nav harmony ---------- */
.lb-mobile-appnav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-top: 1px solid var(--au-line-strong) !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.lb-mobile-appnav a {
  color: #64748b !important;
}

.lb-mobile-appnav a.is-active {
  color: var(--au-accent) !important;
}

/* ---------- Strip / dark promos on public pages — soften text ---------- */
body:not(.lb-panel-mode) .strip {
  border-radius: var(--au-radius-lg);
}

/* ---------- Reduce harsh gradients on old hero variants ---------- */
body:not(.lb-panel-mode) .hero-home {
  background: linear-gradient(135deg, #ffffff, #f8fafc 50%, #eef2ff) !important;
}

/* ---------- Panel: tables & forms inside content ---------- */
body.lb-panel-mode .btn {
  border-radius: 12px;
}

body.lb-panel-mode .admin-subnav-wrap {
  background: #fff !important;
  border-bottom: 1px solid var(--au-line) !important;
}

body.lb-panel-mode .admin-subnav-group a {
  border-radius: 999px !important;
  background: #f8fafc !important;
  border: 1px solid var(--au-line-strong) !important;
}

body.lb-panel-mode .admin-subnav-group a.is-active,
body.lb-panel-mode .admin-subnav-group a:hover {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: var(--au-accent) !important;
}

/* ---------- Admin: horizontal scroll for long quick nav ---------- */
body.lb-panel-mode .admin-subnav {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

body.lb-panel-mode .admin-subnav-group {
  flex: 0 0 auto;
}

/* ---------- Seller subnav: allow wrap but compact ---------- */
body.lb-panel-mode .seller-subnav-links {
  gap: 6px;
}

body.lb-panel-mode .seller-subnav-links a {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
}

/* ---------- Checkout flow: step progress ---------- */
.ld-checkout-progress {
  margin: 0 0 1.25rem;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius-lg);
  box-shadow: var(--au-shadow);
}

.ld-checkout-progress__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}

.ld-checkout-progress__item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--au-muted);
}

.ld-checkout-progress__item.is-done {
  color: var(--au-accent);
}

.ld-checkout-progress__item.is-current {
  color: var(--au-ink);
}

.ld-checkout-progress__item.is-current .ld-checkout-progress__num {
  background: var(--au-accent);
  color: #fff;
  border-color: var(--au-accent);
}

.ld-checkout-progress__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  margin-right: 6px;
  border: 2px solid var(--au-line-strong);
  background: #f8fafc;
  color: var(--au-muted);
}

.ld-checkout-progress__item.is-done .ld-checkout-progress__num {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--au-accent);
}

.ld-checkout-progress__link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ld-checkout-progress__link:hover {
  text-decoration: underline;
  color: var(--au-accent-hover);
}

.ld-checkout-progress__text {
  display: inline-flex;
  align-items: center;
}

.ld-checkout-progress__sep {
  width: 24px;
  height: 2px;
  background: var(--au-line-strong);
  border-radius: 1px;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .ld-checkout-progress__sep {
    display: none;
  }
  .ld-checkout-progress__list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .ld-checkout-progress__item {
    justify-content: flex-start;
  }
}

/* ---------- Ghost button (payment fallback) ---------- */
.btn.ghost {
  background: transparent !important;
  border: 1px dashed var(--au-line-strong) !important;
  color: var(--au-muted) !important;
  box-shadow: none !important;
}

.btn.ghost:hover {
  border-color: #c7d2fe !important;
  color: var(--au-accent) !important;
  background: #f8fafc !important;
}

/* ---------- Checkout page shell ---------- */
.ld-checkout-flow {
  max-width: 960px;
  margin: 0 auto;
}

.ld-checkout-flow__lead {
  margin-bottom: 1rem;
}

.ld-checkout-flow__lead h1 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--au-ink);
}

.ld-checkout-flow__lead p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--au-muted);
  line-height: 1.5;
  max-width: 52ch;
}
