:root {
  --bg: #f4efe4;
  --panel: #fffdf8;
  --ink: #1f2e17;
  --muted: #68725f;
  --line: #dde3d4;
  --green-950: #1a3216;
  --green-900: #25411d;
  --green-700: #4f7d39;
  --green-500: #87ad61;
  --green-200: #dce7ca;
  --gold: #d89d3d;
  --danger: #b24d3d;
  --shadow: 0 24px 60px rgba(22, 42, 16, 0.12);
  --shadow-soft: 0 12px 24px rgba(22, 42, 16, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: radial-gradient(circle at top, #fffdf9, var(--bg) 58%); color: var(--ink); font: 16px/1.5 "Segoe UI", system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent 20%), radial-gradient(circle at 20% 10%, rgba(216,157,61,0.10), transparent 24%), radial-gradient(circle at 80% 0%, rgba(79,125,57,0.10), transparent 26%); }
a { color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1240px, calc(100% - 32px)); margin: 0 auto; position: relative; z-index: 1; }
.topbar { background: var(--green-950); color: #eef4df; font-size: 0.92rem; }
.topbar-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(244, 239, 228, 0.82); border-bottom: 1px solid rgba(79, 125, 57, 0.08); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 122px; padding: 2px 0; }
.brand { display: inline-flex; align-items: center; justify-content: flex-start; text-decoration: none; flex: 0 0 auto; width: 310px; height: 118px; overflow: hidden; line-height: 0; margin: 0; }
.brand img, .brand-logo { display: block; height: 194px; width: auto; max-width: none; filter: drop-shadow(0 10px 20px rgba(37,65,29,0.08)); transform: translateX(-56px) scaleX(1.10); transform-origin: left center; }
.brand img { margin: 0; }
.brand-logo svg { width: auto; height: 180px; display: block; margin: 0; }
.nav-pill { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: nowrap; min-width: 0; width: auto; margin-left: auto; overflow: visible; }
.nav-pill a { text-decoration: none; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,0.82); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(37,65,29,0.06); white-space: nowrap; font-size: 0.92rem; flex: 0 0 auto; }
.nav-user { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px; background: rgba(37,65,29,0.92); color: #fff; box-shadow: 0 8px 24px rgba(37,65,29,0.16); font-weight: 700; white-space: nowrap; font-size: 0.92rem; flex: 0 0 auto; }
.hero { padding: 42px 0 20px; }
.hero-shell { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: stretch; }
.hero-copy, .hero-card, .panel, .card, .search-panel, .collection-card, .store-card, .ad-card, .product-card, .review-card, .stats-card, .newsletter-band, .story-band { background: var(--panel); border: 1px solid rgba(79,125,57,0.12); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.hero-copy { padding: 44px; background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(233,243,218,0.95)); }
.hero-kicker { display: inline-flex; padding: 8px 14px; border-radius: 999px; background: rgba(79,125,57,0.12); color: var(--green-900); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { margin: 18px 0 12px; font: 700 clamp(2.4rem, 4vw, 4.4rem)/0.98 Georgia, serif; letter-spacing: -0.03em; }
.hero p { color: var(--muted); max-width: 64ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn, button, input, select, textarea { font: inherit; }
.btn, button.btn, button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; padding: 14px 20px; border-radius: 999px; font-weight: 700; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.btn:hover, button.btn:hover, button[type="submit"]:hover { transform: translateY(-1px); }
.btn-primary, button[type="submit"] { background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; box-shadow: 0 12px 30px rgba(37,65,29,0.22); }
.btn-secondary { background: #fff; color: var(--green-900); border: 1px solid var(--line); }
.hero-card { padding: 24px; display: grid; gap: 18px; background: linear-gradient(180deg, #fffef8, #eef6df); }
.hero-showcase { display: grid; gap: 16px; }
.showcase-row { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.showcase-card { padding: 20px; border-radius: var(--radius-lg); background: rgba(255,255,255,0.82); border: 1px solid rgba(79,125,57,0.10); box-shadow: var(--shadow-soft); display: grid; gap: 8px; text-align: center; justify-items: center; }
.showcase-card strong { font: 700 2.5rem/1 Georgia, serif; color: var(--green-900); }
.showcase-card span { color: var(--muted); }
.showcase-card-lg { min-height: 210px; align-content: start; background: linear-gradient(145deg, rgba(37,65,29,0.96), rgba(111,153,82,0.9)); color: #fff; }
.showcase-card-lg h3, .showcase-card-lg p { margin: 0; color: #fff; }
.search-panel { padding: 22px; margin-top: 24px; background: rgba(255,253,248,0.92); }
.search-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 14px; align-items: end; }
.route-planner { margin-bottom: 22px; background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237,244,225,0.94)); }
.route-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.route-step { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; padding: 16px; border-radius: 20px; background: rgba(79,125,57,0.08); }
.route-step strong { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 999px; background: var(--green-900); color: #fff; font: 700 1.2rem/1 Georgia, serif; }
.route-step span { color: var(--muted); }
.route-step em { font-style: normal; color: var(--green-900); font-weight: 700; }
.route-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.route-stop-list { display: grid; gap: 12px; margin-bottom: 16px; }
.route-stop-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,0.8); border: 1px solid rgba(79,125,57,0.10); }
.route-stop-meta { display: flex; align-items: center; gap: 12px; }
.route-stop-index { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--green-200); color: var(--green-900); font-weight: 700; }
.route-stop-item strong { display: block; margin-bottom: 4px; }
.route-stop-item span { color: var(--muted); }
.route-toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-route { background: rgba(79,125,57,0.10); color: var(--green-900); border: 1px solid rgba(79,125,57,0.20); }
.btn-route.is-active { background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; box-shadow: 0 12px 30px rgba(37,65,29,0.22); }
.store-card.route-selected { border-color: rgba(79,125,57,0.34); box-shadow: 0 28px 66px rgba(37,65,29,0.18); }
.store-card-actions { align-items: stretch; }
.route-remove { border: 0; background: transparent; color: var(--danger); font-weight: 700; cursor: pointer; padding: 6px 0; }
.field label { display: block; font-size: 0.92rem; font-weight: 700; margin-bottom: 8px; }
.field input, .field select, .field textarea, .auth-form input, .auth-form select, .auth-form textarea, .dashboard-form input, .dashboard-form select, .dashboard-form textarea { width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: #fff; color: var(--ink); outline: none; }
.field textarea, .auth-form textarea, .dashboard-form textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus, .dashboard-form input:focus, .dashboard-form select:focus, .dashboard-form textarea:focus { border-color: rgba(79,125,57,0.55); box-shadow: 0 0 0 4px rgba(129,168,96,0.12); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.section { padding: 34px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font: 700 clamp(1.8rem, 2vw, 2.8rem)/1.04 Georgia, serif; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 64ch; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.collection-card { padding: 24px; background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,247,229,0.95)); }
.collection-card h3 { margin: 14px 0 8px; font: 700 1.45rem/1.1 Georgia, serif; }
.collection-card p { color: var(--muted); }
.text-link { color: var(--green-900); font-weight: 700; text-decoration: none; }
.store-card, .ad-card, .product-card, .review-card, .stats-card { overflow: hidden; }
.store-card img, .ad-card img, .product-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.store-card-body, .ad-card-body, .stats-card, .review-card, .product-card-body { padding: 22px; }
.store-card h3, .product-card h3, .ad-card h3 { margin: 10px 0 8px; font: 700 1.35rem/1.12 Georgia, serif; }
.store-meta, .muted { color: var(--muted); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.chip { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: var(--green-200); color: var(--green-900); font-size: 0.88rem; font-weight: 700; }
.flash-stack { margin-top: 18px; display: grid; gap: 12px; }
.flash { padding: 14px 18px; border-radius: 18px; font-weight: 700; }
.flash.success { background: #e5f5dc; color: #21401c; }
.flash.error { background: #fbe2dd; color: #762b22; }
.auth-shell, .dashboard-shell, .detail-shell { display: grid; gap: 22px; grid-template-columns: 1fr 360px; }
.panel, .card, .story-band, .newsletter-band { padding: 28px; }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.feature-list li { padding: 14px 16px; border-radius: 16px; background: rgba(79,125,57,0.08); }
.auth-spotlight { background: linear-gradient(180deg, #fffef8, #eef6df); align-content: start; }
.dashboard-welcome-panel { margin-bottom: 20px; background: linear-gradient(135deg, rgba(37,65,29,0.98), rgba(97,141,66,0.96)); color: #fff; }
.dashboard-welcome-panel h1, .dashboard-welcome-panel p { color: #fff; }
.order-settings-box { display: grid; gap: 14px; padding: 18px; margin: 18px 0; border-radius: 22px; background: rgba(79,125,57,0.08); }
.checkbox-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.checkbox-row input[type="checkbox"] { width: 20px; height: 20px; }
.order-notice { display: grid; gap: 6px; padding: 16px 18px; margin-bottom: 16px; border-radius: 20px; background: rgba(79,125,57,0.08); border: 1px solid rgba(79,125,57,0.12); }
.order-notice strong { color: var(--green-900); }
.product-builder { display: grid; gap: 18px; }
.product-entry { padding: 20px; border-radius: 24px; background: rgba(255,255,255,0.7); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.product-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.preview-shell { display: grid; gap: 16px; margin-top: 18px; }
.preview-cover { min-height: 220px; padding: 22px; border-radius: 24px; color: #fff; display: flex; align-items: end; background: linear-gradient(135deg, rgba(37,65,29,0.96), rgba(119,161,86,0.92)); box-shadow: var(--shadow-soft); background-size: cover; background-position: center; overflow: hidden; position: relative; }
.preview-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,20,8,0.08), rgba(8,20,8,0.55)); }
.preview-cover > div { position: relative; z-index: 1; }
.preview-cover h3 { margin: 10px 0 6px; font: 700 1.8rem/1.05 Georgia, serif; }
.preview-cover p { margin: 0; color: rgba(255,255,255,0.86); }
.preview-copy { padding: 18px 20px; border-radius: 20px; background: rgba(255,255,255,0.66); border: 1px solid rgba(79,125,57,0.10); }
.preview-copy strong { display: block; margin-bottom: 8px; }
.preview-copy p { margin: 0; color: var(--muted); }
.preview-products { display: grid; gap: 14px; }
.preview-product-card { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: 20px; background: rgba(255,255,255,0.72); border: 1px solid rgba(79,125,57,0.10); }
.preview-product-card img { width: 112px; height: 96px; border-radius: 16px; object-fit: cover; }
.preview-product-card strong, .preview-product-card b { display: block; }
.preview-product-card span { display: inline-block; margin: 6px 0; color: var(--muted); font-size: 0.92rem; }
.preview-product-card p { margin: 0 0 8px; color: var(--muted); }
.preview-cover-live::before { background: linear-gradient(180deg, rgba(8,20,8,0.06), rgba(8,20,8,0.6)); }
.dashboard-summary { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; margin-bottom: 22px; }
.dashboard-summary img { width: 100%; border-radius: 22px; aspect-ratio: 16 / 10; object-fit: cover; }
.mini-stats { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-stats article { padding: 18px; border-radius: 20px; background: rgba(79,125,57,0.08); display: grid; gap: 6px; }
.mini-stats strong { font: 700 1.8rem/1 Georgia, serif; color: var(--green-900); }
.store-linkbox { padding: 16px; border-radius: 18px; background: rgba(79,125,57,0.08); overflow-wrap: anywhere; }
.store-qr-code { display: grid; justify-items: center; gap: 8px; margin-top: 18px; padding: 18px; border-radius: 20px; text-align: center; background: rgba(255,255,255,0.7); border: 1px solid rgba(79,125,57,0.12); }
.store-qr-code img { width: 220px; max-width: 100%; height: auto; padding: 8px; background: #fff; border-radius: 12px; }
.store-qr-code strong { color: var(--green-900); }
.store-qr-code .muted { font-size: 0.9rem; }
.detail-hero { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.detail-gallery { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { font: 700 2rem/1 Georgia, serif; color: var(--green-900); }
.products-table, .table { width: 100%; border-collapse: collapse; }
.products-table th, .products-table td, .table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.products-table th, .table th { font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.product-management-grid, .product-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card-manage form { margin: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: rgba(216,157,61,0.16); color: #825612; }
.badge.pending { background: rgba(178,77,61,0.12); color: var(--danger); }
.review-stars { color: var(--gold); letter-spacing: 0.12em; }
.review-card-large { display: grid; gap: 10px; min-height: 220px; }
.owner-review-scroll { display: grid; gap: 14px; max-height: 650px; overflow-y: auto; padding-right: 8px; }
.owner-review-card { display: grid; gap: 12px; }
.owner-review-card p { margin: 0; }
.owner-review-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.owner-review-head strong, .owner-review-head .muted { display: block; }
.owner-review-head .muted { margin-top: 4px; font-size: 0.9rem; }
.route-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.story-band, .newsletter-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(135deg, rgba(37,65,29,0.98), rgba(97,141,66,0.96)); color: #fff; }
.story-band h2, .newsletter-band h2, .story-band p, .newsletter-band p { color: #fff; margin: 0; }
.story-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-width: 360px; }
.story-metrics article { background: rgba(255,255,255,0.12); border-radius: 20px; padding: 18px; display: grid; gap: 6px; }
.story-metrics strong { font: 700 2rem/1 Georgia, serif; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 30px 0 60px; }
.site-footer { margin-top: 40px; border-top: 1px solid rgba(79,125,57,0.12); }
.empty-state { padding: 22px; border-radius: var(--radius-lg); background: rgba(79,125,57,0.06); color: var(--muted); }
@media (max-width: 1080px) {
  .hero-shell, .auth-shell, .dashboard-shell, .detail-shell, .search-grid, .card-grid, .footer-grid, .grid-2, .collection-grid, .story-metrics, .showcase-row, .dashboard-summary, .mini-stats, .detail-gallery, .route-steps { grid-template-columns: 1fr; }
  .header-row, .topbar-row, .story-band, .newsletter-band { align-items: flex-start; flex-direction: column; }
  .header-row { display: flex; min-height: auto; gap: 14px; padding: 6px 0; overflow: visible; }
  .brand { width: auto; height: 108px; margin-left: 0; }
  .brand img, .brand-logo { height: 150px; width: auto; max-width: none; }
  .brand img { margin-top: -21px; margin-bottom: -21px; }
  .brand-logo svg { width: auto; height: 150px; margin-top: -21px; margin-bottom: -21px; }
  .nav-pill { display: flex; justify-content: flex-start; flex-wrap: wrap; width: 100%; }
  .detail-hero { flex-direction: column; }
  .preview-product-card { grid-template-columns: 1fr; }
  .preview-product-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .route-statusbar, .route-stop-item { flex-direction: column; align-items: flex-start; }
}
