:root {
  --cream: #fffaf4;
  --cream-2: #f8efe4;
  --surface: #ffffff;
  --surface-2: #fff7ee;
  --ink: #3b261f;
  --muted: #826f67;
  --line: #eadccf;
  --caramel: #bd6d32;
  --caramel-dark: #8f4c20;
  --caramel-soft: #f4d6bc;
  --green: #4f8a64;
  --green-soft: #e8f4ec;
  --red: #b94a48;
  --red-soft: #fceae9;
  --yellow: #9a6a18;
  --yellow-soft: #fff4d8;
  --shadow: 0 18px 55px rgba(83, 52, 35, .10);
  --shadow-soft: 0 8px 24px rgba(83, 52, 35, .08);
  --radius: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.modal-open { overflow: hidden; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: .98; }
.brand strong { font-size: .82em; font-weight: 700; letter-spacing: .03em; }
.brand b { font-size: 1.28em; font-weight: 900; letter-spacing: -.04em; color: var(--caramel-dark); }
.brand-mark { width: 42px; height: 42px; border-radius: 50% 50% 46% 46%; background: linear-gradient(#d88646 0 27%, #f4cc95 27% 100%); box-shadow: inset 0 -5px 0 rgba(119,60,22,.12), 0 7px 14px rgba(137,75,29,.15); position: relative; flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; width: 25px; height: 7px; background: #9c521f; border-radius: 50%; top: 8px; left: 8px; opacity: .65; }
.brand-mark::after { content: ""; position: absolute; width: 31px; height: 6px; background: rgba(255,255,255,.52); border-radius: 50%; bottom: 5px; left: 5px; }
.brand-mark.large { width: 58px; height: 58px; }
.brand-mark.large::before { width: 34px; height: 9px; left: 12px; top: 11px; }
.brand-mark.large::after { width: 42px; height: 8px; left: 8px; bottom: 7px; }

.btn { border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; transition: .2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .58; cursor: wait; transform: none; }
.btn-primary { background: var(--caramel-dark); color: white; box-shadow: 0 9px 22px rgba(143, 76, 32, .2); }
.btn-primary:hover { background: #7d3f19; }
.btn-outline { background: transparent; border: 1px solid #d7c4b5; color: var(--ink); }
.btn-ghost { background: #fff4e9; color: var(--caramel-dark); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-soft { background: var(--cream-2); color: var(--ink); }
.btn-small { padding: 8px 12px; font-size: 13px; }
.full { width: 100%; }

/* Landing */
.landing-body { overflow-x: hidden; }
.landing-header { max-width: 1200px; margin: 0 auto; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 700; }
.landing-nav a { color: #6f5a50; }
.landing-nav a:hover { color: var(--caramel-dark); }
.hero { max-width: 1200px; min-height: 640px; margin: 0 auto; padding: 42px 30px 76px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
.hero-copy { max-width: 620px; }
.eyebrow { display: inline-block; font-size: 11px; letter-spacing: .18em; font-weight: 900; color: var(--caramel); margin-bottom: 14px; }
.hero h1 { font-size: clamp(48px, 7vw, 86px); line-height: .94; letter-spacing: -.065em; margin: 0 0 26px; max-width: 720px; }
.hero h1 em { color: var(--caramel); font-style: normal; display: block; }
.hero-copy > p { font-size: 18px; line-height: 1.65; max-width: 560px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; font-weight: 700; color: #755f56; }
.hero-visual { min-height: 510px; display: grid; place-items: center; position: relative; }
.pudding-card { width: min(460px, 90vw); height: 500px; border-radius: 46% 46% 28% 28% / 38% 38% 22% 22%; background: linear-gradient(145deg, #f7dfc4, #f3cfa8); position: relative; box-shadow: 0 38px 80px rgba(136, 82, 39, .18); display: grid; place-items: center; }
.pudding-card::before { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(139,78,31,.15); border-radius: inherit; }
.pudding { width: 236px; height: 282px; border-radius: 18px 18px 72px 72px; background: rgba(255,255,255,.52); box-shadow: inset 0 0 0 4px rgba(255,255,255,.4), 0 25px 45px rgba(92,50,23,.18); padding-top: 18px; overflow: hidden; position: relative; transform: rotate(-2deg); }
.caramel { height: 62px; width: 84%; margin: 0 auto -4px; background: linear-gradient(#a4531d, #d9843e); border-radius: 50% 50% 38% 38%; box-shadow: 0 8px 0 #c76e2d; }
.cream { width: 78%; height: 122px; margin: 0 auto; background: linear-gradient(#fff0c7, #f1c280); border-radius: 24px 24px 64px 64px; }
.cup-label { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: 145px; text-align: center; background: #fffaf4; border-radius: 14px; padding: 12px; font-size: 14px; line-height: 1.05; color: #63402e; box-shadow: 0 7px 18px rgba(92,50,23,.08); }
.cup-label b { font-size: 18px; color: var(--caramel-dark); }
.hero-sticker { position: absolute; right: -18px; top: 62px; width: 116px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; background: #fffaf4; border-radius: 50%; transform: rotate(9deg); box-shadow: var(--shadow-soft); font-size: 11px; color: #7a5540; }
.hero-sticker b { color: var(--caramel-dark); }
.spark { position: absolute; color: #fffaf4; font-size: 35px; text-shadow: 0 6px 18px rgba(91,49,22,.15); }
.spark-a { left: 46px; top: 84px; transform: rotate(18deg); }
.spark-b { right: 72px; bottom: 60px; font-size: 22px; }
.section { padding: 90px max(30px, calc((100vw - 1140px)/2)); }
.section-soft { background: #fff7ee; border-top: 1px solid #f1e3d7; border-bottom: 1px solid #f1e3d7; }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 36px; }
.section-head h2 { margin: 0; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; }
.section-head > p { max-width: 420px; color: var(--muted); line-height: 1.6; }
.section-head.centered { justify-content: center; text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.public-product { min-height: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; align-items: flex-start; }
.product-icon { width: 62px; height: 62px; border-radius: 19px; background: #fff0df; display: grid; place-items: center; font-size: 30px; margin-bottom: 28px; }
.mini-label { font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--caramel); }
.public-product h3 { font-size: 24px; margin: 5px 0 8px; }
.public-product p { color: var(--muted); line-height: 1.55; flex: 1; }
.public-product strong { color: var(--caramel-dark); font-size: 22px; }
.skeleton-card div { height: 18px; width: 72%; border-radius: 8px; background: #f4e8dc; margin-bottom: 16px; animation: pulse 1.3s infinite; }
.skeleton-card div:first-child { width: 58px; height: 58px; border-radius: 18px; margin-bottom: 30px; }
.skeleton-card div:last-child { width: 40%; }
@keyframes pulse { 50% { opacity: .45; } }
.steps { background: var(--cream); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-grid article { padding: 28px 10px 10px; border-top: 1px solid #d9c7b9; }
.step-grid span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--caramel-soft); color: var(--caramel-dark); font-weight: 900; }
.step-grid h3 { font-size: 24px; margin: 22px 0 8px; }
.step-grid p { color: var(--muted); line-height: 1.6; }
.landing-footer { padding: 34px max(30px, calc((100vw - 1140px)/2)); background: #34251f; color: #f9ece2; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; }
.landing-footer .brand b { color: #f3b67e; }
.landing-footer p { color: #d8c7bd; }
.landing-footer small { color: #a99286; }

/* Forms + modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(40,26,20,.48); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 18px; }
.modal { width: min(470px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border-radius: 28px; box-shadow: 0 30px 100px rgba(43,27,20,.32); padding: 34px; position: relative; }
.admin-modal { width: min(1040px, 100%); }
.modal-close { position: absolute; right: 18px; top: 16px; width: 38px; height: 38px; border: 0; background: #f5eee8; color: #6b554a; border-radius: 50%; font-size: 25px; line-height: 1; }
.login-symbol { margin-bottom: 18px; }
.login-modal h2 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.04em; }
.login-modal > p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.form-stack { display: grid; gap: 16px; }
.form-stack label, .field { display: grid; gap: 7px; font-size: 12px; font-weight: 800; color: #675249; }
input, select, textarea { width: 100%; border: 1px solid #ddcec1; background: #fffdfa; border-radius: 12px; padding: 12px 13px; color: var(--ink); outline: none; transition: .15s; }
input:focus, select:focus, textarea:focus { border-color: #c78655; box-shadow: 0 0 0 4px #f7e8db; }
textarea { min-height: 92px; resize: vertical; }
.form-error { margin: -3px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal h2 { margin: 0 0 6px; letter-spacing: -.035em; }
.modal-subtitle { margin: 0 0 24px; color: var(--muted); }

/* Admin */
.admin-body { background: #f8f4ef; min-height: 100vh; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #34251f; color: #f8eee8; padding: 22px 16px; display: flex; flex-direction: column; z-index: 30; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.admin-brand { padding: 6px 9px 20px; }
.admin-brand b { color: #f3b67e; }
.admin-nav { display: grid; gap: 5px; margin-top: 18px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #cdbdb4; padding: 12px 13px; border-radius: 12px; display: flex; align-items: center; gap: 11px; text-align: left; font-weight: 750; }
.nav-item .nav-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.06); }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: #f0b479; color: #38241b; }
.nav-item.active .nav-icon { background: rgba(255,255,255,.38); }
.sidebar-foot { margin-top: auto; display: grid; gap: 5px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.side-link { border: 0; background: transparent; color: #cdbdb4; padding: 10px 12px; text-align: left; border-radius: 9px; font-weight: 700; font-size: 13px; }
.side-link:hover { color: white; background: rgba(255,255,255,.06); }
.danger-link { color: #efb2ad; }
.mobile-close, .menu-btn { display: none; }
.admin-main { min-width: 0; }
.topbar { min-height: 92px; padding: 18px 30px; border-bottom: 1px solid #eadfd5; background: rgba(255,250,246,.82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.top-kicker { font-size: 9px; font-weight: 900; letter-spacing: .15em; color: var(--caramel); }
.topbar h1 { margin: 3px 0 0; font-size: 27px; letter-spacing: -.04em; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 1px solid #e5d8cd; background: white; border-radius: 999px; padding: 7px 12px 7px 7px; }
.user-avatar { width: 33px; height: 33px; border-radius: 50%; background: var(--caramel-soft); color: var(--caramel-dark); display: grid; place-items: center; font-weight: 900; }
.user-chip div { display: grid; line-height: 1.12; }
.user-chip small { color: var(--muted); font-size: 9px; }
.user-chip b { font-size: 12px; }
.admin-content { padding: 30px; max-width: 1500px; margin: 0 auto; }
.loading-state { min-height: 360px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #eadbce; border-top-color: var(--caramel); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-actions p { margin: 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid #eadfd5; border-radius: 18px; box-shadow: 0 5px 18px rgba(75,48,33,.04); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { padding: 20px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -34px; top: -42px; background: #f8ede4; }
.metric-label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-value { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.055em; font-weight: 900; margin: 9px 0 4px; }
.metric-note { font-size: 11px; color: #9b8880; }
.metric-card.positive .metric-value { color: var(--green); }
.metric-card.negative .metric-value { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.card-head { padding: 20px 20px 0; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.card-head h3 { margin: 0; font-size: 17px; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.chart-wrap { padding: 22px 20px 20px; }
.bar-chart { height: 240px; display: flex; align-items: end; gap: 12px; border-bottom: 1px solid #eadfd5; padding: 10px 0 0; }
.bar-group { flex: 1; height: 100%; display: flex; align-items: end; gap: 4px; position: relative; padding-bottom: 30px; }
.bar { flex: 1; min-width: 7px; border-radius: 7px 7px 2px 2px; min-height: 2px; position: relative; }
.bar.sales { background: #c9854e; }
.bar.expenses { background: #decabc; }
.bar-group small { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; gap: 15px; font-size: 11px; color: var(--muted); margin-top: 12px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.legend-dot.sales { background: #c9854e; }
.legend-dot.expenses { background: #decabc; }
.recent-list { padding: 12px 20px 18px; }
.recent-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f0e7e0; }
.recent-row:last-child { border-bottom: 0; }
.recent-row strong { font-size: 13px; }
.recent-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.recent-row > span { font-weight: 900; color: var(--caramel-dark); font-size: 13px; }
.table-card { overflow: hidden; }
.table-tools { padding: 16px; border-bottom: 1px solid #eee3da; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-input { max-width: 360px; position: relative; }
.search-input input { padding-left: 38px; background: #fff; }
.search-input::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9d8980; z-index: 1; font-size: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid #f0e7e0; text-align: left; vertical-align: middle; }
th { background: #fffaf6; font-size: 10px; color: #8d766b; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 13px; }
tbody tr:hover { background: #fffcf9; }
.cell-title { font-weight: 850; }
.cell-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.money { font-weight: 900; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: #36734d; }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.gray { background: #f0ece8; color: #716159; }
.badge.brown { background: #f4e5d8; color: #8e4e24; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { border: 1px solid #e5d8cd; background: #fff; border-radius: 9px; padding: 7px 9px; color: #6f5a50; font-weight: 800; font-size: 11px; }
.icon-btn:hover { background: #fff8f2; border-color: #d6bda9; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0 0 18px; }
.summary-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.summary-mini { padding: 16px 18px; }
.summary-mini span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.summary-mini strong { font-size: 22px; letter-spacing: -.04em; }

.item-builder { margin-top: 8px; }
.builder-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.builder-head strong { font-size: 13px; }
.builder-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 36px; gap: 8px; align-items: end; padding: 10px; background: #fff9f4; border: 1px solid #ecdfd3; border-radius: 12px; margin-bottom: 8px; }
.builder-row.recipe { grid-template-columns: minmax(130px,1fr) 90px 80px 105px 110px 100px 36px; }
.builder-row label { display: grid; gap: 5px; font-size: 10px; font-weight: 800; color: var(--muted); }
.builder-row input, .builder-row select { padding: 9px 10px; border-radius: 9px; }
.builder-remove { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--red-soft); color: var(--red); font-weight: 900; }
.builder-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; margin-top: 12px; }
.builder-total span { color: var(--muted); font-size: 12px; }
.builder-total strong { font-size: 24px; }
.checkbox-row { display: flex !important; align-items: center; gap: 8px !important; }
.checkbox-row input { width: auto; }
.helper { color: var(--muted); font-size: 11px; line-height: 1.45; }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 15px; border-radius: 12px; box-shadow: var(--shadow); background: #34251f; color: white; font-size: 12px; font-weight: 700; animation: toastIn .2s ease; }
.toast.error { background: #8d3533; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 20px; }
  .pudding-card { transform: scale(.9); }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .landing-header { padding: 20px; }
  .landing-nav a { display: none; }
  .hero { grid-template-columns: 1fr; padding: 40px 20px 60px; }
  .hero-visual { min-height: 430px; order: -1; }
  .pudding-card { height: 430px; width: min(390px, 94vw); }
  .section { padding: 70px 20px; }
  .product-grid, .step-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .landing-footer { grid-template-columns: 1fr; gap: 12px; }

  .admin-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: .22s ease; box-shadow: 20px 0 50px rgba(43,28,21,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(43,28,21,.35); }
  .mobile-close { display: block; width: 35px; height: 35px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: white; font-size: 22px; }
  .menu-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #e1d4c9; background: white; border-radius: 10px; }
  .topbar { padding: 14px 18px; min-height: 78px; }
  .user-chip div { display: none; }
  .user-chip { padding: 5px; border: 0; background: transparent; }
  .admin-content { padding: 18px; }
  .builder-row, .builder-row.recipe { grid-template-columns: 1fr 1fr; }
  .builder-remove { align-self: end; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 52px; }
  .hero-visual { min-height: 360px; }
  .pudding-card { transform: scale(.78); margin: -34px 0; }
  .landing-header .brand { font-size: 12px; }
  .modal { padding: 28px 20px 22px; }
  .metric-grid, .summary-strip { grid-template-columns: 1fr; }
  .page-actions { align-items: flex-start; flex-direction: column; }
  .page-actions .btn { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .builder-row, .builder-row.recipe { grid-template-columns: 1fr; }
  .builder-remove { width: 100%; }
  .topbar h1 { font-size: 23px; }
}

/* ===== V2: mobile first, vitrine, pedidos em cards e menu recolhível ===== */
.public-product-with-photo { padding: 0; overflow: hidden; min-height: 0; }
.public-product-photo { width: 100%; aspect-ratio: 1.2 / 1; overflow: hidden; background: #f4e5d8; display: grid; place-items: center; font-size: 54px; }
.public-product-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.public-product-body { padding: 22px 24px 25px; width: 100%; }
.public-product-body h3 { margin-bottom: 12px; }
.placeholder-photo { background: linear-gradient(145deg, #f7dfc4, #f3cfa8); }

.sidebar, .admin-shell { transition: .2s ease; }
.sidebar-top-actions { display: flex; gap: 6px; align-items: center; }
.collapse-sidebar { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.10); border-radius: 9px; color: #ead8cc; background: rgba(255,255,255,.06); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.collapse-sidebar:hover { background: rgba(255,255,255,.12); color: white; }
.nav-label, .brand-copy, .side-label { white-space: nowrap; }
.side-link { display: flex; align-items: center; gap: 11px; }
.side-icon { width: 28px; flex: 0 0 28px; text-align: center; }
.admin-shell.sidebar-collapsed { grid-template-columns: 84px 1fr; }
.sidebar-collapsed .sidebar { padding-left: 12px; padding-right: 12px; }
.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .side-label { display: none; }
.sidebar-collapsed .admin-brand { padding-left: 5px; padding-right: 5px; }
.sidebar-collapsed .admin-brand .brand-mark { width: 38px; height: 38px; }
.sidebar-collapsed .sidebar-top { flex-direction: column; gap: 8px; }
.sidebar-collapsed .collapse-sidebar { width: 100%; }
.sidebar-collapsed .nav-item { justify-content: center; padding-left: 8px; padding-right: 8px; }
.sidebar-collapsed .nav-item .nav-icon { flex: 0 0 38px; width: 38px; height: 38px; }
.sidebar-collapsed .side-link { justify-content: center; padding-left: 6px; padding-right: 6px; }
.sidebar-collapsed .side-icon { width: 38px; flex-basis: 38px; }

.dashboard-section { margin: 25px 0 20px; }
.section-title-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 13px; }
.section-title-row .eyebrow { margin-bottom: 5px; }
.section-title-row h2 { font-size: 20px; margin: 0; letter-spacing: -.035em; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 12px; }
.avg-cost-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.avg-cost-card { padding: 16px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.avg-cost-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: #fff1e4; display: grid; place-items: center; color: var(--caramel-dark); font-weight: 900; }
.avg-cost-card > div:last-child { min-width: 0; display: grid; gap: 2px; }
.avg-cost-card span { color: var(--muted); font-size: 11px; font-weight: 800; }
.avg-cost-card strong { font-size: 19px; overflow: hidden; text-overflow: ellipsis; }
.avg-cost-card small { color: #9a877d; font-size: 9px; line-height: 1.3; }
.empty-state.compact { padding: 26px 12px; }

.catalog-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.catalog-admin-card { border: 1px solid #eadfd5; background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 5px 18px rgba(75,48,33,.04); min-width: 0; }
.catalog-admin-photo { aspect-ratio: 1.35 / 1; display: grid; place-items: center; background: #f5e8dc; font-size: 48px; overflow: hidden; }
.catalog-admin-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-admin-body { padding: 15px; }
.catalog-admin-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.catalog-admin-top h3 { margin: 0 0 5px; font-size: 17px; }
.catalog-admin-top strong { color: var(--caramel-dark); }
.catalog-admin-body > p { margin: 11px 0; color: var(--muted); font-size: 11px; }
.catalog-photo-preview { min-height: 190px; border-radius: 16px; border: 1px dashed #d8c5b7; background: #fff8f1; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; }
.catalog-photo-preview img { max-width: 100%; width: 100%; max-height: 330px; object-fit: contain; display: block; }

.order-summary { grid-template-columns: repeat(4, 1fr); }
.order-toolbar { padding: 12px; margin-bottom: 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.order-toolbar .search-input { flex: 1; max-width: 410px; }
.segmented { display: inline-flex; border: 1px solid #e2d5ca; padding: 4px; border-radius: 12px; background: #fff9f4; }
.segmented button { border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 11px; font-weight: 850; }
.segmented button.active { background: #fff; color: var(--caramel-dark); box-shadow: 0 2px 8px rgba(70,40,25,.08); }
.order-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.order-column { min-width: 285px; flex: 1 0 285px; max-width: 355px; background: #f2ebe5; border: 1px solid #e6d9cf; border-radius: 18px; padding: 10px; scroll-snap-align: start; }
.order-column > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.order-column > header h3 { margin: 0 0 2px; font-size: 14px; }
.order-column > header span { color: var(--muted); font-size: 9px; }
.order-column > header b { width: 28px; height: 28px; border-radius: 50%; background: white; display: grid; place-items: center; font-size: 10px; color: var(--caramel-dark); }
.order-column-list { display: grid; gap: 9px; }
.order-column-empty { border: 1px dashed #d8c8bc; border-radius: 12px; padding: 24px 10px; color: #9b887e; text-align: center; font-size: 11px; }
.order-card { background: white; border: 1px solid #e7dbd1; border-radius: 15px; padding: 13px; box-shadow: 0 3px 9px rgba(65,40,27,.04); }
.order-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.order-card-head h4 { margin: 3px 0 0; font-size: 14px; }
.order-card-head > strong { color: var(--caramel-dark); font-size: 14px; white-space: nowrap; }
.order-number { color: var(--muted); font-size: 9px; font-weight: 900; }
.order-card-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 8px 0; color: #9b877d; font-size: 9px; }
.order-product-list { border-top: 1px solid #f0e7e0; border-bottom: 1px solid #f0e7e0; padding: 8px 0; display: grid; gap: 5px; }
.order-product-line { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.order-product-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-product-line b { color: var(--caramel-dark); }
.quick-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.quick-status-grid label { display: grid; gap: 4px; }
.quick-status-grid label > span { font-size: 8px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.quick-status-grid select { padding: 8px 9px; border-radius: 9px; font-size: 10px; background: #fffaf5; }
.order-card-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; }
.danger-text { color: var(--red); }

.recipe-section { margin-top: 22px; }
.builder-head > div { display: grid; gap: 2px; }
.builder-head small { color: var(--muted); font-size: 9px; font-weight: 500; }
.builder-row.recipe { grid-template-columns: minmax(150px, 1.5fr) 80px 92px 90px 108px 110px 122px 36px; overflow-x: visible; }
.builder-row.recipe.unit-error { border-color: #e4a09d; background: #fff4f3; }
.extra-cost-row { display: grid; grid-template-columns: 170px minmax(150px, 1fr) 120px 36px; gap: 8px; align-items: end; padding: 10px; background: #fff9f4; border: 1px solid #ecdfd3; border-radius: 12px; margin-bottom: 8px; }
.extra-cost-row label { display: grid; gap: 5px; font-size: 10px; font-weight: 800; color: var(--muted); }
.extra-cost-row input, .extra-cost-row select { padding: 9px 10px; border-radius: 9px; }
.recipe-cost-summary { margin-top: 16px; background: #34251f; color: #f8eee8; border-radius: 16px; padding: 14px 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.recipe-cost-summary > div { display: grid; gap: 3px; min-width: 0; }
.recipe-cost-summary span { color: #cdbdb4; font-size: 9px; }
.recipe-cost-summary strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.recipe-cost-summary .recipe-grand strong { color: #f0b479; font-size: 18px; }

@media (max-width: 1180px) {
  .avg-cost-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .builder-row.recipe { grid-template-columns: repeat(4, minmax(120px,1fr)); }
  .extra-cost-row { grid-template-columns: 1fr 1fr; }
  .recipe-cost-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .collapse-sidebar { display: none; }
  .sidebar-collapsed .brand-copy, .sidebar-collapsed .nav-label, .sidebar-collapsed .side-label { display: initial; }
  .sidebar-collapsed .sidebar-top { flex-direction: row; }
  .sidebar-collapsed .nav-item, .sidebar-collapsed .side-link { justify-content: flex-start; }
  .sidebar-collapsed .nav-item .nav-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .order-toolbar { align-items: stretch; flex-direction: column; }
  .order-toolbar .search-input { max-width: none; width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .order-summary { grid-template-columns: repeat(2,1fr); }
  .order-board { display: grid; overflow: visible; scroll-snap-type: none; }
  .order-column { min-width: 0; max-width: none; width: 100%; }
  .builder-row.recipe { grid-template-columns: 1fr 1fr; }
  .extra-cost-row { grid-template-columns: 1fr 1fr; }
  .recipe-cost-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .landing-header { gap: 10px; }
  .landing-nav { gap: 8px; }
  .landing-nav .btn { padding: 9px 13px; font-size: 12px; }
  .hero-actions .btn { width: 100%; }
  .public-product-photo { aspect-ratio: 1.35 / 1; }
  .admin-content { padding: 14px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .avg-cost-grid { grid-template-columns: 1fr; }
  .section-title-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .order-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-mini { padding: 13px; }
  .summary-mini strong { font-size: 18px; }
  .quick-status-grid { grid-template-columns: 1fr; }
  .builder-row.recipe, .extra-cost-row { grid-template-columns: 1fr; }
  .recipe-cost-summary { grid-template-columns: 1fr 1fr; }
  .form-actions { position: sticky; bottom: -1px; background: rgba(255,255,255,.96); padding: 10px 0 max(2px, env(safe-area-inset-bottom)); margin-top: 14px; z-index: 2; }
  .form-actions .btn { flex: 1; }
  .modal-backdrop { padding: 8px; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; padding: 27px 16px 18px; }
  .modal-close { top: 10px; right: 12px; }
  .catalog-admin-grid { grid-template-columns: 1fr; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}
