@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --primary: #e0286b;
  --primary-action: #c91f5f;
  --primary-700: #b51c50;
  --primary-50: #fff1f6;
  --secondary: #f7a8c4;
  --accent: #2b1620;
  --accent-700: #1f0f17;
  --surface: #ffffff;
  --background: #fff8fb;
  --foreground: #2b1620;
  --muted: #705a63;
  --muted-bg: #fff1f6;
  --border: #f0d8e1;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --sidebar: 260px;
  --topbar: 76px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(43, 22, 32, .06);
  --shadow: 0 10px 30px rgba(82, 27, 50, .09);
  --shadow-lg: 0 24px 60px rgba(43, 22, 32, .18);
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--foreground);
  background: var(--background);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; background: var(--background); color: var(--foreground); }
button, input, select, textarea { font: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.mono { font-family: 'Fira Code', monospace; }

:focus-visible { outline: 3px solid rgba(224, 40, 107, .3); outline-offset: 2px; }

.loading-screen { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: radial-gradient(circle at 50% 30%, #ffd3e2 0, #fff8fb 46%, #fff8fb 100%); z-index: 500; }
.loading-screen strong { font-size: 24px; }
.loading-screen p { margin: 0; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #ffd3e2; border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foreground); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand--light { color: #fff; position: relative; z-index: 2; }
.brand-logo { position: relative; z-index: 2; display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo img, .brand-icon { display: block; height: auto; object-fit: contain; }
.brand-logo--auth img { width: min(300px, 72vw); }
.brand-logo--sidebar .brand-logo__full { width: 146px; }
.brand-logo__icon { display: none !important; width: 40px; }
.brand-icon--loading { width: 56px; }
.brand-icon--large { width: 64px; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(460px, .95fr); background: #fff; }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 44px 7vw 64px; color: #fff; background: #2b1620; }
.auth-visual::after { content: ''; position: absolute; inset: 120px 0 0; background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, black, transparent); }
.auth-visual__copy { position: relative; z-index: 2; max-width: 650px; margin-block: auto; }
.auth-visual__copy h1 { max-width: 620px; margin: 10px 0 18px; font-size: clamp(38px, 5vw, 68px); line-height: 1.03; letter-spacing: -.055em; }
.auth-visual__copy > p:not(.eyebrow) { max-width: 560px; margin: 0; color: #ffe8f0; font-size: 19px; line-height: 1.55; }
.eyebrow { margin: 0; color: #ffd3e2; font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow--brand { color: var(--primary-700); }
.auth-proof { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.auth-proof span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff5f8; background: rgba(255,255,255,.09); backdrop-filter: blur(12px); font-size: 13px; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(8px); background: rgba(224,40,107,.2); }
.auth-orb--one { width: 360px; height: 360px; right: -130px; top: 36%; }
.auth-orb--two { width: 240px; height: 240px; left: -100px; bottom: -40px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.auth-card { width: min(100%, 440px); }
.auth-card h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.auth-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.auth-card .button { width: 100%; justify-content: center; }
.auth-install-button { margin-top: 14px; }
.auth-footnote { margin-top: 20px !important; color: var(--muted); font-size: 13px; text-align: center; }

.workspace { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 80; display: flex; flex-direction: column; width: var(--sidebar); border-right: 1px solid var(--border); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); transition: width .22s ease, transform .22s ease; }
.sidebar__header { display: flex; align-items: center; justify-content: space-between; height: var(--topbar); padding: 0 16px 0 18px; border-bottom: 1px solid var(--border); }
.sidebar__nav { flex: 1; overflow: auto; padding: 12px 10px 20px; scrollbar-width: thin; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }
.nav-group__label { display: block; padding: 0 12px 7px; color: #705a63; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 11px; color: #5f4a53; background: transparent; text-align: left; font-size: 14px; font-weight: 500; transition: background .18s ease, color .18s ease; }
.nav-item svg { flex: 0 0 auto; width: 19px; height: 19px; stroke-width: 1.8; }
.nav-item:hover { color: var(--foreground); background: #fff1f6; }
.nav-item.active { color: var(--primary-700); background: var(--primary-50); box-shadow: inset 0 0 0 1px #ffd3e2; }
.nav-item__badge { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 999px; color: var(--primary-700); background: #ffd3e2; font-size: 11px; font-weight: 700; text-align: center; }
.sidebar__footer { padding: 12px; border-top: 1px solid var(--border); }
.install-app-button { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px; border: 1px solid #f7a8c4; border-radius: 12px; color: var(--primary-700); background: linear-gradient(135deg,#fff1f6,#fff8fb); text-align: left; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.install-app-button:hover { border-color: var(--primary); background: #fff1f6; box-shadow: var(--shadow-sm); }
.install-app-button:active { background: #ffe3ed; }
.install-app-button img { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; }
.install-app-button__copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.install-app-button__copy strong { font-size: 12px; }
.install-app-button__copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; transition: background .18s ease; }
.account-card:hover { background: var(--muted-bg); }
.account-card__copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.account-card__copy strong, .account-card__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card__copy strong { font-size: 13px; }
.account-card__copy small { color: var(--muted); font-size: 11px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 11px; color: var(--primary-700); background: #ffd3e2; font-weight: 700; }
.chevron { color: #705a63; font-size: 22px; }
.logout-button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 8px 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; }
.logout-button:hover { color: var(--danger); background: #fef2f2; }
.workspace__content { min-height: 100vh; margin-left: var(--sidebar); transition: margin .22s ease; }
.topbar { position: sticky; top: 0; z-index: 50; min-height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 12px 28px; border-bottom: 1px solid rgba(240,216,225,.9); background: rgba(248,250,252,.9); backdrop-filter: blur(16px); }
.topbar__title { min-width: 0; margin-right: auto; }
.topbar__title h1 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.topbar__title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.topbar__actions { display: flex; align-items: center; gap: 12px; }
.search-button { min-width: 250px; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: #fff; box-shadow: var(--shadow-sm); text-align: left; }
.search-button kbd { margin-left: auto; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--muted-bg); font: 10px 'Fira Code', monospace; }
.page { max-width: 1560px; margin: 0 auto; padding: 28px; }

.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 11px; color: #5f4a53; background: #fff; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.icon-button:hover { color: var(--primary-700); border-color: #f7a8c4; background: var(--primary-50); }
.icon-button svg { width: 19px; height: 19px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; font-weight: 600; font-size: 14px; text-decoration: none; transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.button svg { width: 18px; height: 18px; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--primary-action), var(--primary-700)); box-shadow: 0 8px 18px rgba(181,28,80,.24); }
.button--primary:hover { background: linear-gradient(135deg, var(--primary-700), #951442); box-shadow: 0 10px 22px rgba(181,28,80,.32); }
.button--accent { color: #fff; background: var(--accent); }
.button--accent:hover { background: var(--accent-700); }
.button--secondary { color: #4a343d; border-color: var(--border); background: #fff; }
.button--secondary:hover { color: var(--primary-700); border-color: #f7a8c4; background: var(--primary-50); }
.button--ghost { color: #5f4a53; background: transparent; }
.button--ghost:hover { color: var(--foreground); background: var(--muted-bg); }
.button--danger { color: #fff; background: var(--danger); }
.button--danger-soft { color: #b91c1c; background: #fef2f2; }
.button--sm { min-height: 34px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }

.page-stack { display: grid; gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); }
.card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.card__header h2, .card__header h3 { margin: 0; letter-spacing: -.02em; }
.card__header h2 { font-size: 18px; }
.card__header h3 { font-size: 15px; }
.card__header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.card__body { padding: 0 20px 20px; }
.card__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.metric-card { position: relative; overflow: hidden; padding: 18px; }
.metric-card::after { content: ''; position: absolute; width: 90px; height: 90px; right: -28px; bottom: -34px; border-radius: 50%; background: currentColor; opacity: .05; }
.metric-card__top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.metric-card__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-50); }
.metric-card__icon svg { width: 18px; height: 18px; }
.metric-card strong { display: block; margin-top: 13px; font-family: 'Fira Code', monospace; font-size: 25px; letter-spacing: -.04em; }
.metric-card small { display: block; margin-top: 5px; color: var(--muted); }
.metric-card--hero { grid-column: span 2; color: #fff; border: 0; background: linear-gradient(120deg, #2b1620, #7c183f 52%, #c91f5f 120%); box-shadow: 0 16px 34px rgba(181,28,80,.22); }
.metric-card--hero .metric-card__top, .metric-card--hero small { color: #ffe8f0; }
.metric-card--hero strong { font-size: 32px; }
.metric-card--success .metric-card__icon { color: #047857; background: #d1fae5; }
.metric-card--warning .metric-card__icon { color: #b45309; background: #fef3c7; }

.hero-strip { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid #f7c3d5; border-radius: var(--radius-lg); background: linear-gradient(130deg, rgba(255,241,246,.98), rgba(255,248,251,.94)); }
.hero-strip::after { content:''; position:absolute; width:220px; height:220px; right:-60px; top:-90px; border-radius:50%; background:rgba(224,40,107,.08); }
.hero-strip > * { position: relative; z-index: 1; }
.hero-strip h2 { margin: 0 0 6px; font-size: 21px; }
.hero-strip p { margin: 0; color: #5f4a53; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.quick-action { min-width: 132px; display: inline-flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; color: #4a343d; background: #fff; font-weight: 600; font-size: 13px; }
.quick-action:hover { color: var(--primary-700); border-color: #f7a8c4; background: var(--primary-50); }
.quick-action svg { width: 18px; height: 18px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .field { min-width: 180px; flex: 0 1 240px; }
.toolbar .field--grow { flex: 1 1 280px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--muted-bg); }
.segmented button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; }
.segmented button.active { color: var(--primary-700); background: #fff; box-shadow: var(--shadow-sm); }

.field { display: grid; gap: 6px; }
.field > label, .field > span:first-child { color: #4a343d; font-size: 12px; font-weight: 600; }
.field small { color: var(--muted); line-height: 1.4; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d9bdc8; border-radius: 10px; color: var(--foreground); background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.textarea { min-height: 94px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 3px rgba(224,40,107,.14); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid--3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.field--full { grid-column: 1 / -1; }
.input-group { display: flex; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .button { border-radius: 0 10px 10px 0; }
.switch-line { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; }
.switch-line strong { display:block; font-size:13px; }
.switch-line small { color:var(--muted); }
.switch { position: relative; width: 44px; height: 24px; display: inline-block; flex: 0 0 44px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d9bdc8; transition: background .18s ease; }
.switch span::before { content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:transform .18s ease; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(20px); }

.data-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--muted); background: #fff8fb; font-size: 10px; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f6e6ec; vertical-align: middle; }
.data-table tbody tr:hover { background: #fffbfc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-primary { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.table-primary__icon { width: 36px; height: 36px; display:grid; place-items:center; flex:0 0 36px; border-radius:10px; color:var(--primary); background:var(--primary-50); }
.table-primary__icon svg { width:18px; height:18px; }
.table-primary strong { display:block; }
.table-primary small { display:block; margin-top:2px; color:var(--muted); }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }
.table-actions button { width: 34px; height: 34px; display:grid; place-items:center; padding:0; border:0; border-radius:8px; color:var(--muted); background:transparent; }
.table-actions button:hover { color:var(--primary); background:var(--primary-50); }
.table-actions button.danger:hover { color:var(--danger); background:#fef2f2; }
.table-actions svg { width:16px; height:16px; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 8px; border-radius:999px; color:#5f4a53; background:#fff1f6; font-size:11px; font-weight:600; white-space:nowrap; }
.badge::before { content:''; width:6px; height:6px; border-radius:50%; background:#705a63; }
.badge--success { color:#047857; background:#ecfdf5; }.badge--success::before{background:#10b981}
.badge--warning { color:#b45309; background:#fffbeb; }.badge--warning::before{background:#f59e0b}
.badge--danger { color:#b91c1c; background:#fef2f2; }.badge--danger::before{background:#ef4444}
.badge--info { color:var(--primary-700); background:var(--primary-50); }.badge--info::before{background:var(--primary)}
.badge--violet { color:#6d28d9; background:#f5f3ff; }.badge--violet::before{background:#8b5cf6}
.empty-state { display:grid; justify-items:center; gap:10px; padding:52px 24px; text-align:center; }
.empty-state__icon { width:58px; height:58px; display:grid; place-items:center; border-radius:18px; color:var(--primary); background:var(--primary-50); }
.empty-state__icon svg { width:27px; height:27px; }
.empty-state h3 { margin:0; font-size:17px; }.empty-state p{max-width:430px;margin:0 0 6px;color:var(--muted);line-height:1.5}

.status-board { display:grid; grid-template-columns:repeat(5,minmax(220px,1fr)); gap:12px; overflow-x:auto; padding-bottom:8px; }
.status-column { min-height:300px; padding:10px; border:1px solid var(--border); border-radius:var(--radius); background:#fff8fb; }
.status-column__header { display:flex; align-items:center; justify-content:space-between; padding:6px 4px 12px; }
.status-column__header strong { font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.status-column__header span { width:24px;height:24px;display:grid;place-items:center;border-radius:999px;background:#f0d8e1;font-size:11px;font-weight:700; }
.order-card { margin-bottom:9px; padding:12px; border:1px solid var(--border); border-radius:11px; background:#fff; box-shadow:var(--shadow-sm); }
.order-card__top { display:flex; justify-content:space-between; gap:8px; }
.order-card h4 { margin:0;font-size:13px; }.order-card p{margin:6px 0 0;color:var(--muted);font-size:12px}.order-card strong{font-family:'Fira Code',monospace;font-size:12px}

.chart-bars { height:180px; display:flex; align-items:flex-end; gap:12px; padding:16px 4px 0; }
.chart-bar { min-width:36px; flex:1; display:grid; align-content:end; justify-items:center; gap:6px; height:100%; }
.chart-bar span:first-child { width:100%; max-width:56px; min-height:3px; border-radius:8px 8px 3px 3px; background:linear-gradient(to top,var(--primary-700),var(--secondary)); transition:height .3s ease; }
.chart-bar small { color:var(--muted);font-size:10px;text-align:center; }

.recipe-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr); gap:16px; }
.cost-panel { position:sticky; top:94px; align-self:start; }
.cost-total { padding:18px; border-radius:14px; color:#fff; background:linear-gradient(135deg,#2b1620,#7c183f 55%,#c91f5f); }
.cost-total span { display:block;color:#ffe8f0;font-size:12px;text-transform:uppercase;letter-spacing:.06em; }.cost-total strong{display:block;margin-top:6px;font-family:'Fira Code';font-size:30px}.cost-total small{display:block;margin-top:5px;color:#ffe8f0}
.cost-breakdown { display:grid;gap:8px;margin-top:14px; }.cost-line{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--border);font-size:12px}.cost-line:last-child{border-bottom:0}.cost-line span{color:var(--muted)}
.line-items { display:grid;gap:9px; }.line-item { display:grid; grid-template-columns:minmax(160px,1.7fr) minmax(90px,.6fr) minmax(84px,.5fr) auto; gap:8px; align-items:end; padding:10px; border:1px solid var(--border); border-radius:11px; background:#fffbfc; }.line-item--commercial{grid-template-columns:minmax(180px,1.8fr) 80px 110px 110px auto}
.remove-line { width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:9px;color:var(--danger);background:#fef2f2; }.remove-line svg{width:17px;height:17px}

.catalog-preview { overflow:hidden;border:1px solid var(--border);border-radius:18px;background:#fff;box-shadow:var(--shadow); }
.catalog-preview__hero { min-height:140px;display:flex;align-items:flex-end;padding:20px;color:#fff;background:linear-gradient(135deg,var(--catalog-color,var(--primary)),#2b1620); }
.catalog-preview__hero h3{margin:0}.catalog-preview__hero p{margin:4px 0 0;color:rgba(255,255,255,.82);font-size:12px}.catalog-preview__products{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px}.mini-product{padding:12px;border:1px solid var(--border);border-radius:11px}.mini-product strong{display:block;font-size:12px}.mini-product span{display:block;margin-top:6px;color:var(--primary);font:600 12px 'Fira Code'}

.message-categories { display:flex;gap:8px;overflow-x:auto;padding-bottom:4px; }.message-category{min-width:max-content;padding:9px 12px;border:1px solid var(--border);border-radius:10px;color:#5f4a53;background:#fff;font-size:12px;font-weight:600}.message-category.active{color:var(--primary-700);border-color:#f7a8c4;background:var(--primary-50)}.message-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.message-card{display:flex;flex-direction:column;padding:16px}.message-card h3{margin:0;font-size:14px}.message-card p{flex:1;margin:8px 0 16px;color:#5f4a53;font-size:13px;line-height:1.5;white-space:pre-wrap}.message-card__actions{display:flex;gap:8px}
.guide-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.guide-card{padding:20px}.guide-card__meta{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}.guide-card h3{margin:13px 0 8px;font-size:17px}.guide-card p{margin:0 0 18px;color:#5f4a53;font-size:13px;line-height:1.5}

.modal-overlay { position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px;background:rgba(43,22,32,.58);backdrop-filter:blur(7px);animation:fade-in .18s ease; }
.modal { width:min(100%,560px);max-height:min(90vh,900px);display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.55);border-radius:20px;background:#fff;box-shadow:var(--shadow-lg);animation:modal-in .22s ease; }
.modal--wide { width:min(100%,980px); }.modal--xwide{width:min(100%,1200px)}
.modal__header { display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 15px;border-bottom:1px solid var(--border); }.modal__header h2{margin:0;font-size:19px}.modal__header p{margin:4px 0 0;color:var(--muted);font-size:12px}.modal__body{overflow:auto;padding:20px 22px}.modal__footer{display:flex;justify-content:flex-end;gap:9px;padding:14px 22px;border-top:1px solid var(--border);background:#fff8fb;border-radius:0 0 20px 20px}.modal__close{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:9px;color:var(--muted);background:var(--muted-bg)}.modal__close:hover{color:var(--danger);background:#fef2f2}.modal__close svg{width:18px;height:18px}
@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

.toast-root { position:fixed;z-index:400;right:20px;bottom:20px;display:grid;gap:10px;pointer-events:none; }
.toast { min-width:280px;max-width:420px;display:flex;align-items:flex-start;gap:10px;padding:13px 15px;border:1px solid var(--border);border-radius:12px;color:#4a343d;background:#fff;box-shadow:var(--shadow-lg);pointer-events:auto;animation:toast-in .25s ease; }.toast svg{width:19px;height:19px;flex:0 0 auto;color:var(--success)}.toast--error svg{color:var(--danger)}.toast strong{display:block;font-size:13px}.toast p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.4}@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.toast--update svg { color: var(--primary); }
.toast__action { min-height: 36px; margin-top: 9px; padding: 7px 11px; border: 0; border-radius: 8px; color: #fff; background: var(--primary-action); font-size: 12px; font-weight: 700; }

.connection-status { position: fixed; z-index: 350; top: max(12px,env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 32px),560px); min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border: 1px solid #fcd34d; border-radius: 12px; color: #78350f; background: #fffbeb; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; text-align: center; transform: translateX(-50%); }
.connection-status__dot { width: 9px; height: 9px; flex: 0 0 9px; border: 2px solid #fff; border-radius: 50%; background: #d97706; box-shadow: 0 0 0 2px #fcd34d; }
.install-guide { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; }
.install-guide > img { width: 72px; height: 72px; border-radius: 18px; }
.install-guide p { margin: 0; color: #5f4a53; line-height: 1.6; }
.install-steps { display: grid; gap: 10px; margin: 16px 0 0; padding-left: 20px; color: #4a343d; line-height: 1.5; }

body.pwa-standalone { overscroll-behavior-y: none; }
body.pwa-standalone .topbar { padding-top: max(12px,env(safe-area-inset-top)); }
@media (display-mode: standalone) { .install-app-button { display: none !important; } }

.tabs { display:flex;gap:4px;padding:4px;border:1px solid var(--border);border-radius:12px;background:var(--muted-bg);overflow-x:auto; }.tab{min-width:max-content;padding:8px 12px;border:0;border-radius:8px;color:var(--muted);background:transparent;font-size:12px;font-weight:600}.tab.active{color:var(--primary-700);background:#fff;box-shadow:var(--shadow-sm)}
.alert { display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid #f7a8c4;border-radius:11px;color:#711239;background:var(--primary-50);font-size:13px;line-height:1.45}.alert svg{width:19px;height:19px;flex:0 0 auto}.alert--success{color:#065f46;border-color:#a7f3d0;background:#ecfdf5}.alert--warning{color:#92400e;border-color:#fde68a;background:#fffbeb}.alert--danger{color:#991b1b;border-color:#fecaca;background:#fef2f2}
.progress { height:7px;overflow:hidden;border-radius:999px;background:#f0d8e1}.progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--accent))}
.checklist { display:grid;gap:8px;margin-top:14px}.check-item{display:flex;align-items:center;gap:11px;padding:11px;border:1px solid var(--border);border-radius:10px;background:#fff;font-size:13px}.check-item.done{text-decoration:line-through;color:var(--muted);background:#fff8fb}.check-dot{width:24px;height:24px;display:grid;place-items:center;border:2px solid #d9bdc8;border-radius:50%;color:#fff}.check-item.done .check-dot{border-color:var(--accent);background:var(--accent)}.check-dot svg{width:14px;height:14px}

.catalog-body { background:linear-gradient(180deg,#fff1f6 0,#fff8fb 420px); }
.catalog-page { min-height:100vh; }.catalog-loading{min-height:100vh;display:grid;place-content:center;justify-items:center;gap:10px;color:var(--muted)}
.public-catalog__hero{padding:50px 24px 88px;color:#fff;background:linear-gradient(135deg,var(--catalog-primary,#e0286b),#2b1620)}.public-catalog__hero-inner{max-width:1120px;margin:auto}.public-catalog__brand{font-size:34px;letter-spacing:-.04em}.public-catalog__hero p{max-width:650px;margin:10px 0;color:rgba(255,255,255,.82);line-height:1.55}.catalog-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.catalog-meta span{padding:7px 10px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.1);font-size:12px}.public-catalog__content{max-width:1120px;margin:-48px auto 0;padding:0 24px 60px}.catalog-toolbar{display:flex;align-items:center;gap:10px;padding:14px;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow)}.catalog-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}.catalog-product{overflow:hidden;border:1px solid var(--border);border-radius:18px;background:#fff;box-shadow:var(--shadow-sm)}.catalog-product__image{height:170px;display:grid;place-items:center;color:var(--primary);background:linear-gradient(135deg,#fff1f6,#fff8fb)}.catalog-product__image svg{width:54px;height:54px;opacity:.45}.catalog-product__body{padding:17px}.catalog-product h3{margin:0;font-size:17px}.catalog-product p{margin:8px 0;color:var(--muted);font-size:13px;line-height:1.45}.catalog-product__bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.catalog-product__price{color:var(--catalog-primary,var(--primary));font:600 18px 'Fira Code'}.catalog-section-title{margin:34px 0 12px;font-size:22px}.testimonials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.testimonial{padding:18px;border:1px solid var(--border);border-radius:14px;background:#fff}.testimonial p{margin:0 0 12px;color:#5f4a53;line-height:1.5}.testimonial strong{font-size:13px}.stars{color:#d97706;letter-spacing:2px}.public-quote{max-width:820px;margin:40px auto;padding:0 20px}.quote-sheet{overflow:hidden;border:1px solid var(--border);border-radius:20px;background:#fff;box-shadow:var(--shadow-lg)}.quote-sheet__header{display:flex;justify-content:space-between;gap:20px;padding:28px;color:#fff;background:linear-gradient(135deg,#2b1620,#b51c50)}.quote-sheet__body{padding:26px}.quote-sheet__total{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:18px;border-top:2px solid var(--foreground);font:600 20px 'Fira Code'}

/* Public catalog and shareable quote */
.catalog-hero{padding:42px 24px 90px;color:#fff;background:linear-gradient(135deg,var(--catalog-accent,#e0286b),#2b1620)}
.catalog-hero__inner,.catalog-content{width:min(1120px,100%);margin-inline:auto}
.catalog-hero__copy{max-width:680px;margin-top:68px}.catalog-hero__copy h1{margin:5px 0 10px;font-size:clamp(34px,6vw,58px);line-height:1.02;letter-spacing:-.045em}.catalog-hero__copy>p:last-child{font-size:17px;line-height:1.6;color:rgba(255,255,255,.84)}
.catalog-hero__meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}.catalog-hero__meta span{padding:8px 11px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:rgba(255,255,255,.1);font-size:12px}
.catalog-content{margin-top:-48px;padding:0 24px 60px}.catalog-section{margin-bottom:42px}.catalog-section__heading{margin:0 0 14px}.catalog-section__heading h2{margin:4px 0 0;font-size:25px}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.catalog-product__image{display:block;width:100%;height:190px;object-fit:cover}.catalog-product__placeholder{height:190px;display:grid;place-items:center;color:var(--catalog-accent,#e0286b);background:linear-gradient(135deg,#fff1f6,#fff8fb)}.catalog-product__placeholder span{font-size:54px;font-weight:700;opacity:.38}.catalog-product__top{min-height:24px}.catalog-product__footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}.catalog-product__footer>strong{color:var(--catalog-accent,#e0286b);font:600 18px 'Fira Code'}.tag-list{display:flex;flex-wrap:wrap;gap:6px}.tag-list span{padding:5px 8px;border-radius:999px;color:#5f4a53;background:#fff1f6;font-size:11px}
.catalog-testimonials{margin-top:52px}.testimonial{margin:0}.testimonial>div{color:#d97706;letter-spacing:2px}.testimonial p{margin:12px 0}.testimonial footer{font-size:13px;font-weight:700}.catalog-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px max(24px,calc((100vw - 1120px)/2));color:var(--muted);border-top:1px solid var(--border);background:#fff;font-size:12px}.powered-by{display:inline-flex;align-items:center;gap:7px}.powered-by img{display:block;width:92px;height:auto}
.public-state{min-height:70vh;display:grid;place-content:center;justify-items:center;gap:12px;padding:24px;text-align:center}.public-state h1,.public-state h2{margin:0}.public-state p{max-width:480px;margin:0;color:var(--muted);line-height:1.6}
.quote-document{overflow:hidden;border:1px solid var(--border);border-radius:20px;background:#fff;box-shadow:var(--shadow-lg)}.quote-document__header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 28px;border-bottom:1px solid var(--border)}.quote-document__title{padding:34px 28px 16px}.quote-document__title h1{margin:5px 0 8px;font-size:30px}.quote-document__title>p:last-child{margin:0;color:var(--muted)}.quote-document .table-wrap{margin:10px 28px 0}.quote-document__totals{width:min(100%,360px);display:grid;gap:10px;margin:18px 28px 0 auto;padding:0 28px 0 0}.quote-document__totals>div{display:flex;justify-content:space-between;gap:20px}.quote-document__grand-total{margin-top:6px;padding-top:15px;border-top:2px solid var(--foreground);font:600 20px 'Fira Code'}.quote-document__notes{margin:28px;padding:18px;border-radius:12px;background:#fff8fb}.quote-document__notes h2{margin:0 0 6px;font-size:15px}.quote-document__notes p{margin:0;color:#5f4a53;line-height:1.55}.quote-document__actions{display:flex;justify-content:flex-end;gap:10px;padding:18px 28px;border-top:1px solid var(--border);background:#fff8fb}.quote-document__powered{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:10px 28px 16px;color:var(--muted);background:#fff8fb;font-size:11px}.quote-document__powered img{display:block;width:82px;height:auto}

.sidebar-backdrop { display:none; }
body.sidebar-collapsed { --sidebar: 76px; }
body.sidebar-collapsed .brand-logo__full, body.sidebar-collapsed .nav-group__label, body.sidebar-collapsed .nav-item span:not(.nav-item__badge), body.sidebar-collapsed .account-card__copy, body.sidebar-collapsed .chevron, body.sidebar-collapsed .logout-button span, body.sidebar-collapsed .install-app-button__copy { display:none; }
body.sidebar-collapsed .brand-logo__icon { display:block !important; }
body.sidebar-collapsed .nav-item { justify-content:center; padding-inline:8px; }
body.sidebar-collapsed .nav-item__badge { position:absolute;margin:0 0 23px 24px;min-width:16;padding:1px 4px;font-size:9px; }
body.sidebar-collapsed .sidebar__header { position:relative;justify-content:center;padding:0; }
body.sidebar-collapsed #sidebar-toggle { position:absolute;z-index:3;top:16px;right:-26px;display:inline-grid;color:var(--primary-700);border-color:#f7a8c4;background:#fff;box-shadow:0 8px 20px rgba(43,22,32,.14); }
body.sidebar-collapsed #sidebar-toggle:hover { border-color:var(--primary);background:var(--primary-50); }
.sidebar-collapsed .sidebar__footer{padding-inline:10px}.sidebar-collapsed .account-card{justify-content:center;padding:5px}.sidebar-collapsed .logout-button,.sidebar-collapsed .install-app-button{justify-content:center}

@media (max-width: 1200px) {
  .grid--5 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .message-grid,.guide-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .recipe-layout { grid-template-columns:1fr; }.cost-panel{position:static}.catalog-products,.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 900px) {
  .mobile-only { display:inline-grid !important; }
  .auth-shell { grid-template-columns:1fr; }.auth-visual{min-height:auto;padding:calc(28px + env(safe-area-inset-top)) 24px 38px}.auth-visual__copy{margin-top:70px}.auth-visual__copy h1{font-size:42px}.auth-panel{padding:42px 24px calc(42px + env(safe-area-inset-bottom))}
  .input,.select,.button--sm,.segmented button,.message-category,.tab{min-height:44px}
  .sidebar { transform:translateX(-100%);width:min(86vw,300px);box-shadow:var(--shadow-lg); }.sidebar.mobile-open{transform:none}.sidebar-backdrop{position:fixed;inset:0;z-index:70;background:rgba(43,22,32,.45);backdrop-filter:blur(2px)}.sidebar-backdrop.visible{display:block}.workspace__content{margin-left:0}.topbar{padding:11px 16px}.search-button{min-width:44px;width:44px;padding:0;justify-content:center}.search-button span,.search-button kbd{display:none}.page{padding:20px 16px}.topbar__title p{display:none}.topbar__actions .button span{display:none}.topbar__actions .button{width:44px;padding:0}.table-actions button{width:44px;height:44px}.grid--5{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card--hero{grid-column:span 2}.form-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}.line-item,.line-item--commercial{grid-template-columns:1fr 1fr}.line-item .field:first-child,.line-item--commercial .field:first-child{grid-column:1/-1}.line-item .remove-line,.line-item--commercial .remove-line{grid-column:2;justify-self:end}.testimonials{grid-template-columns:1fr 1fr}
}
@media (max-width: 620px) {
  .auth-visual__copy h1{font-size:34px}.auth-visual__copy>p:not(.eyebrow){font-size:16px}.auth-panel{padding:34px 18px calc(34px + env(safe-area-inset-bottom))}.auth-card h2{font-size:26px}
  .grid--2,.grid--3,.grid--4,.grid--5,.message-grid,.guide-grid,.form-grid,.form-grid--3{grid-template-columns:1fr}.metric-card--hero{grid-column:auto}.hero-strip{align-items:flex-start;flex-direction:column}.topbar__title h1{font-size:18px}.page{padding:16px 12px calc(16px + env(safe-area-inset-bottom))}.card__header{padding:16px 15px 10px}.card__body{padding:0 15px 16px}.toolbar{align-items:stretch}.toolbar .field,.toolbar .field--grow{flex:1 1 100%}.segmented{width:100%}.segmented button{flex:1}.modal-overlay{padding:0;align-items:end}.modal{width:100%;max-height:94vh;border-radius:20px 20px 0 0}.modal__header,.modal__body{padding-inline:16px}.modal__footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));}.line-item,.line-item--commercial{grid-template-columns:1fr}.line-item .field:first-child,.line-item--commercial .field:first-child,.line-item .remove-line,.line-item--commercial .remove-line{grid-column:auto}.line-item .remove-line,.line-item--commercial .remove-line{justify-self:end}.catalog-products,.catalog-preview__products,.testimonials,.catalog-grid{grid-template-columns:1fr}.public-catalog__hero{padding:34px 16px 74px}.public-catalog__content{padding:0 12px 40px}.catalog-toolbar{align-items:stretch;flex-direction:column}.quote-sheet__header{flex-direction:column}.catalog-hero{padding:28px 16px 74px}.catalog-hero__copy{margin-top:48px}.catalog-content{padding-inline:12px}.catalog-footer{flex-direction:column;padding:20px 16px}.quote-document__header,.quote-document__title,.quote-document__actions{padding-inline:18px}.quote-document .table-wrap{margin-inline:18px}.quote-document__totals{width:auto;margin-inline:18px;padding:0}.quote-document__actions{flex-direction:column}.quote-document__actions .button{width:100%}.toast-root{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom))}.toast{min-width:0;width:100%}.install-guide{grid-template-columns:1fr;justify-items:center;text-align:center}.install-steps{text-align:left}
}

@media print {
  .catalog-body{background:#fff}.public-quote{max-width:none;margin:0;padding:0}.quote-document{border:0;box-shadow:none}.quote-document__actions{display:none}
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
