:root {
  --bg: #f4efe6;
  --bg-soft: #fbf7f1;
  --paper: rgba(255, 252, 247, 0.82);
  --text: #171412;
  --muted: #665c52;
  --line: rgba(23, 20, 18, 0.12);
  --accent: #b45a2a;
  --accent-2: #1f6b57;
  --shadow: 0 24px 80px rgba(43, 29, 17, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(180, 90, 42, 0.12), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(31, 107, 87, 0.11), transparent 26%),
    linear-gradient(180deg, #f8f4ed 0%, var(--bg) 42%, #efe7da 100%);
}

.page-shell { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; }
.topbar, .status-band, .workspace, .detail-grid, .final-cta { backdrop-filter: blur(18px); }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 24px;
  background: var(--paper); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 14px; }
.topbar-links { display: flex; gap: 12px; flex-wrap: wrap; }
.topbar-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.42);
}
.topnav {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}
.topnav a {
  white-space: nowrap;
}
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--accent), #e28a58);
}
.brand h1, .hero h2, .panel h3, .detail-block h3, .final-cta h3 { font-family: Fraunces, Georgia, serif; margin: 0; }
.brand h1 { font-size: 1.8rem; }
.brand-kicker, .eyebrow, .topbar-copy, .status-band p { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; }
.topbar-copy { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 26px; align-items: stretch;
  padding: 26px 0 20px;
}
.home-hero {
  margin-top: 24px;
  padding: 34px;
}
.home-hero h2 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 0.98; max-width: 13ch; margin: 12px 0 14px; }
.home-strip {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.home-strip div {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.74);
  box-shadow: var(--shadow);
}
.home-strip strong { display: block; font-size: 1.6rem; margin-bottom: 4px; }
.home-strip span { color: var(--muted); }
.hero-copy, .hero-visual, .panel, .detail-block, .final-cta, .status-band {
  border: 1px solid var(--line); border-radius: 28px; background: rgba(255, 252, 247, 0.74); box-shadow: var(--shadow);
}
.hero-copy { padding: 40px; }
.hero h2 { font-size: clamp(2.7rem, 5vw, 5rem); line-height: 0.95; max-width: 11ch; margin: 14px 0 16px; }
.hero-text { max-width: 62ch; font-size: 1.04rem; line-height: 1.7; color: var(--muted); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0; }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 18px;
  border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid transparent;
}
.primary { background: var(--text); color: #fff; }
.secondary { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.4); }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.hero-meta div, .status-band div { padding-top: 14px; border-top: 1px solid var(--line); }
.hero-meta strong, .status-band strong { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.hero-meta span { color: var(--muted); font-size: 0.9rem; }
.hero-visual { padding: 18px; min-height: 640px; }
.visual-window {
  height: 100%; border-radius: 22px; overflow: hidden; background:
    linear-gradient(180deg, rgba(38, 28, 20, 0.94), rgba(62, 43, 29, 0.86)),
    url("https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1400&q=80") center/cover;
  position: relative;
}
.window-top { display: flex; gap: 8px; padding: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.map-surface { position: absolute; inset: 48px 0 0; }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.6; }
.zone, .pin, .route { position: absolute; }
.zone { border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; }
.zone-a { width: 240px; height: 240px; left: 16%; top: 14%; background: rgba(180, 90, 42, 0.18); }
.zone-b { width: 180px; height: 180px; right: 10%; bottom: 18%; background: rgba(31, 107, 87, 0.18); }
.pin { width: 18px; height: 18px; border-radius: 50%; background: #ffd8a8; box-shadow: 0 0 0 8px rgba(255, 216, 168, 0.18); animation: pulse 2.4s ease-in-out infinite; }
.pin::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }
.pin-1 { left: 22%; top: 22%; }
.pin-2 { right: 28%; top: 38%; animation-delay: .4s; }
.pin-3 { left: 48%; bottom: 24%; animation-delay: .8s; }
.route { left: 24%; top: 27%; width: 45%; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent); transform: rotate(23deg); transform-origin: left center; opacity: 0.75; }
.status-band {
  margin: 18px 0; padding: 20px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.status-band--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}
.dashboard-grid[data-view] { display: grid; }
.dashboard-hero {
  padding: 28px;
  margin: 18px 0;
}
.auth-shell { width: min(760px, calc(100% - 32px)); }
.auth-page { display: grid; place-items: center; min-height: calc(100vh - 120px); }
.auth-card { width: 100%; max-width: 620px; padding: 30px; }
.auth-note { margin: 14px 0 0; color: var(--muted); }
.dashboard-panel { min-height: 100%; }
.dashboard-state { display: grid; gap: 14px; }
.cta-row--compact { margin: 10px 0 0; }
.admin-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.workspace, .detail-grid { display: grid; gap: 18px; }
.workspace { grid-template-columns: 1.15fr 0.85fr; }
.access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.panel { padding: 24px; }
.panel-head { margin-bottom: 18px; }
.panel-head--compact { margin-bottom: 12px; }
.auth-form { display: grid; gap: 12px; }
.role-picker {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.45);
}
.role-picker legend { font-weight: 700; color: var(--text); padding: 0 4px; }
.role-picker label { display: flex; align-items: center; gap: 10px; color: var(--text); }
.role-picker input { width: 16px; height: 16px; }
.auth-panel { min-height: 100%; }
.auth-panel--summary { display: flex; flex-direction: column; justify-content: space-between; }
.account-card {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,0.45);
}
.account-card strong { display: block; margin-top: 6px; }
.account-note {
  margin-top: 12px; padding: 12px 14px; border-radius: 16px;
  background: rgba(31, 107, 87, 0.09); color: var(--muted); font-size: 0.92rem;
}
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
label { display: grid; gap: 8px; font-size: 0.88rem; color: var(--muted); }
input[type="range"], select {
  width: 100%; min-height: 48px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.6);
  padding: 0 14px; font: inherit; color: var(--text);
}
.list { display: grid; gap: 12px; }
.tab-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.tab-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
  color: var(--muted);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
}
.tab-btn.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.dashboard-tabs-shell { min-height: 100%; }
.dashboard-grid[hidden] { display: none !important; }
.panel-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(180, 90, 42, 0.08);
  color: var(--muted);
  line-height: 1.6;
}
.bakery {
  padding: 16px; border-radius: 20px; border: 1px solid rgba(23, 20, 18, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.4));
  display: flex; justify-content: space-between; gap: 12px; align-items: start;
}
.bakery h4, .steps strong, .detail-block h3 { margin: 0 0 6px; }
.bakery p, .steps p, .detail-block li { margin: 0; color: var(--muted); line-height: 1.6; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(180,90,42,0.12); color: var(--accent); font-size: 0.78rem; font-weight: 700; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 58px 1fr; gap: 16px; }
.steps span { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: rgba(31,107,87,0.1); color: var(--accent-2); font-weight: 800; }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.detail-block { padding: 28px; }
.detail-block ul { padding-left: 18px; margin: 14px 0 0; display: grid; gap: 10px; }
.final-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 28px; margin-top: 18px;
}
.site-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  padding: 20px 6px 0;
  color: var(--muted);
}
.site-footer strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}
.site-footer p { margin: 0; line-height: 1.6; }

.reveal { animation: rise 0.7s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { transform: translateY(-4px) scale(1.03); } }

@media (max-width: 960px) {
  .topbar, .final-cta { flex-direction: column; align-items: flex-start; }
  .topbar-links { margin-top: 6px; }
  .topnav { width: 100%; }
  .hero, .workspace, .detail-grid, .status-band, .access-grid, .dashboard-grid, .site-footer, .home-strip, .status-band--compact { grid-template-columns: 1fr; }
  .hero-copy, .hero-visual, .panel, .detail-block, .final-cta, .status-band { border-radius: 22px; }
  .hero-visual { min-height: 440px; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 18px, 1200px); padding-top: 12px; }
  .hero-copy { padding: 24px; }
  .hero h2 { font-size: 2.55rem; }
  .hero-meta, .controls { grid-template-columns: 1fr; }
  .topbar-copy { gap: 8px; }
  .home-strip { grid-template-columns: 1fr; }
}
