:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17343a;
  background: #eaf1f1;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at top, #d9f1ef 0, #edf3f3 45%, #e7ecec 100%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { width: min(100%, 880px); min-height: 100vh; margin: 0 auto; background: #f8fbfa; box-shadow: 0 0 50px rgba(22, 64, 70, .12); }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; color: #fff; background: linear-gradient(135deg, #0b5965, #168a85); }
.app-header h1, .app-header p { margin: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow { margin: 0 0 5px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #638087; }
.app-header .eyebrow { color: #c9e8e5; }
.demo-chip { padding: 7px 10px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.16); }
.icon-button, .back-button { border: 0; border-radius: 12px; color: inherit; background: rgba(255,255,255,.16); }
.icon-button { width: 38px; height: 38px; font-size: 20px; }
.back-button { width: 42px; height: 42px; color: #176b72; background: #e1eeee; font-size: 20px; }

main { padding: 24px; }
.screen { display: none; }
.screen.is-active { display: block; animation: appear .18s ease-out; }
@keyframes appear { from { opacity: .5; transform: translateY(4px); } }
.welcome-row, .screen-title, .section-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.welcome-row h2, .screen-title h2, .dialog-heading h2 { margin: 0; font-size: clamp(24px, 5vw, 34px); }
.staff-switch { border: 1px solid #bed2d2; border-radius: 12px; padding: 10px 12px; color: #315159; background: #fff; }

.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0 16px; }
.action-card { display: flex; gap: 14px; align-items: center; min-height: 104px; padding: 18px; text-align: left; border: 1px solid #d3e2e0; border-radius: 20px; color: #17343a; background: #fff; box-shadow: 0 8px 24px rgba(29, 69, 72, .06); }
.action-card:hover { border-color: #55a9a4; transform: translateY(-1px); }
.action-card strong, .setup-banner strong { display: block; font-size: 17px; }
.action-card small, .setup-banner small { display: block; margin-top: 4px; color: #6e8589; }
.action-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; color: #0d6d74; background: #dff1ef; font-size: 24px; }
.action-sales .action-icon { color: #805314; background: #fff0cf; }
.setup-banner { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; text-align: left; border: 0; border-radius: 18px; color: #fff; background: #173f49; }

.recent-block, .master-preview { margin-top: 28px; }
.section-heading h3 { margin: 0; }
.section-heading span { color: #799094; font-size: 13px; }
.empty-state { margin-top: 12px; padding: 22px; text-align: center; border: 1px dashed #bed2d2; border-radius: 16px; color: #789095; }
.recent-item, .master-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #e1e9e8; }
.recent-item small, .master-item small { display: block; margin-top: 3px; color: #748b8f; }
.recent-status { padding: 5px 8px; border-radius: 999px; color: #176963; background: #dff2ed; font-size: 12px; }

.screen-title { justify-content: flex-start; margin-bottom: 22px; }
.category-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.category-button { white-space: nowrap; padding: 9px 13px; border: 1px solid #cbdcda; border-radius: 999px; color: #47646a; background: #fff; }
.category-button.is-selected { border-color: #126f77; color: #fff; background: #126f77; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0 110px; }
.product-card { padding: 16px; text-align: left; border: 1px solid #d3e2e0; border-radius: 18px; color: #1c3b42; background: #fff; }
.product-card strong, .product-card small { display: block; }
.product-card small { margin-top: 5px; color: #768d91; }
.product-card .quantity { margin-top: 14px; color: #0d7475; font-weight: 700; }
.cart-panel { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid #cbdcda; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(22, 61, 66, .16); backdrop-filter: blur(12px); }
.cart-label { display: block; color: #728b8f; font-size: 12px; }

.quick-form, .dialog-form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #3c5c62; font-size: 14px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #bfd3d1; border-radius: 12px; padding: 13px 14px; color: #17343a; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #177f82; box-shadow: 0 0 0 3px rgba(23,127,130,.12); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details { border-top: 1px solid #dbe6e5; padding-top: 12px; }
summary { cursor: pointer; color: #176d74; font-weight: 700; }
.advanced-fields { display: grid; gap: 12px; margin-top: 14px; }
.primary-button, .secondary-button, .text-button { border: 0; border-radius: 12px; font-weight: 750; }
.primary-button { padding: 13px 18px; color: #fff; background: #0e7378; }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { padding: 11px 14px; color: #126970; background: #dff0ee; }
.text-button { padding: 5px; color: #126970; background: transparent; }
.full-width { width: 100%; }
.info-box, .setup-intro { padding: 14px 16px; border-radius: 14px; color: #365a61; background: #e6f2f0; }

.setup-progress { margin: 18px 0; padding: 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #153f48, #176f72); }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.progress-heading h3 { margin: 0; }
.progress-heading .eyebrow { color: #b9ddda; }
.progress-heading > strong { font-size: 28px; }
.progress-track { height: 10px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #f6c763; transition: width .25s ease; }
.next-step { margin: 12px 0 0; color: #d8edeb; }
.setup-checklist { display: grid; gap: 9px; margin-bottom: 18px; }
.checklist-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #d5e2e1; border-radius: 15px; background: #fff; }
.checklist-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-weight: 800; color: #6e868a; background: #edf2f1; }
.checklist-row.is-complete .checklist-icon { color: #16665f; background: #dff1eb; }
.checklist-row.is-attention .checklist-icon { color: #8a5d13; background: #fff0ce; }
.checklist-row strong, .checklist-row small { display: block; }
.checklist-row small { margin-top: 3px; color: #72898d; }
.status-label { white-space: nowrap; font-size: 12px; font-weight: 750; color: #6e8589; }
.checklist-row.is-complete .status-label { color: #16665f; }
.checklist-row.is-attention .status-label { color: #8a5d13; }
.setup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.setup-card { padding: 18px; border: 1px solid #d3e1e0; border-radius: 18px; background: #fff; }
.setup-card h3 { margin: 8px 0; }
.setup-card p { min-height: 54px; color: #71888c; }
.setup-count { font-size: 28px; font-weight: 800; color: #147379; }

dialog { width: min(92vw, 620px); max-height: 90vh; overflow: auto; border: 0; border-radius: 22px; padding: 0; color: #17343a; background: #f9fbfb; box-shadow: 0 25px 80px rgba(8, 42, 47, .28); }
dialog::backdrop { background: rgba(10, 35, 39, .55); backdrop-filter: blur(3px); }
.dialog-form { padding: 22px; }
.dialog-heading .icon-button { color: #31565c; background: #e6eeee; }
.recipe-builder { padding: 14px; border-radius: 16px; background: #edf4f3; }
.recipe-line { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-top: 10px; }
.remove-line { border: 0; color: #9b3b34; background: transparent; font-size: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; color: #fff; background: #173f49; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 620px) {
  .app-header, main { padding-left: 16px; padding-right: 16px; }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .action-grid, .setup-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 88px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .field-pair { grid-template-columns: 1fr; }
  .recipe-line { grid-template-columns: 1fr 1fr; }
  .recipe-line select:first-child { grid-column: 1 / -1; }
}
