/* Final consistency pass — visual only. Loaded last on preview branch. */
:root{
  --cp-line:#d2ddd7;
  --cp-line-soft:#dde6e1;
  --cp-ink:#1d2c24;
  --cp-muted:#77827c;
  --cp-green:#1c6b4e;
  --cp-green-dark:#15563f;
  --cp-surface:#f7faf8;
  --cp-shadow:0 12px 26px rgba(18,48,32,.10),0 3px 8px rgba(18,48,32,.045),inset 0 1px 0 rgba(255,255,255,.98);
  --cp-shadow-sm:0 7px 16px rgba(18,48,32,.08),inset 0 1px 0 rgba(255,255,255,.98);
}

/* Keep content safely above the floating navigation. */
html body #memberView .view-panel:not(#view-settings){padding-bottom:126px!important}
html body #view-business-costs.bc-page-v2{padding-bottom:0!important}
html body #view-business-costs .bcs-root{padding-bottom:230px!important}
html body #view-reports .sc-settlement{padding-bottom:230px!important}
html body #view-calculator .sc-settlement{padding-bottom:132px!important}

/* Bottom navigation: same tactile language, less bulky. */
html body #memberView .ns2-bottom-nav{
  left:14px!important;right:14px!important;bottom:9px!important;
  min-height:64px!important;padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important;
  border-radius:23px!important;
}
html body #memberView .ns2-bottom-nav .tab{min-height:50px!important;border-radius:16px!important}
html body #memberView .ns2-bottom-nav .tab:not(#buildMainTab)>b{font-size:.91rem!important}
html body #memberView .ns2-bottom-nav #buildMainTab>span{
  width:51px!important;height:51px!important;border-radius:17px!important;transform:translateY(-6px)!important;
}
html body #memberView .ns2-bottom-nav #buildMainTab:active>span{transform:translateY(-3px) scale(.96)!important}

/* Manage: tighter cards, clearer arrows. */
html body #view-manage .ux-manage-hero{margin:0 0 10px!important}
html body #view-manage .ux-manage-hero p{margin:0!important}
html body #view-manage .ux-manage-list{gap:10px!important}
html body #view-manage .ux-manage-card{min-height:80px!important;padding:12px 14px!important;border-radius:20px!important}
html body #view-manage .ux-manage-icon{width:44px!important;height:44px!important;border-radius:15px!important}
html body #view-manage .ux-manage-arrow{color:#65756d!important;opacity:.82!important;font-weight:900!important}
html body #view-manage .ux-manage-copy strong{font-size:1rem!important}
html body #view-manage .ux-manage-copy small{line-height:1.32!important}

/* Tables: clip all inner color bands to the outer card and keep headers inset. */
html body #ingredientList.ib-table-list,
html body #batchRecipeList.prv2-table-list,
html body #menuList.menu-table-list{
  position:relative!important;isolation:isolate!important;box-sizing:border-box!important;
  overflow:hidden!important;background-clip:padding-box!important;border-radius:22px!important;
}
html body .ib-table-count,
html body .prv2-table-count,
html body .menu-table-count{box-sizing:border-box!important;max-width:100%!important}
html body .ib-table-head,
html body .prv2-table-head,
html body .menu-table-head{
  box-sizing:border-box!important;width:calc(100% - 18px)!important;max-width:calc(100% - 18px)!important;
  margin:0 9px 6px!important;padding:8px 9px!important;border-radius:11px!important;
  overflow:hidden!important;background-clip:padding-box!important;
}
html body .ib-table-main,
html body .prv2-table-main,
html body .menu-table-main{box-sizing:border-box!important;max-width:100%!important}

/* Ingredient rows: same card depth as Prepared/Menu. */
html body #ingredientList .ib-table-row{
  width:calc(100% - 16px)!important;margin:6px 8px!important;border:1px solid #d8e2dd!important;
  border-radius:15px!important;background:linear-gradient(145deg,#fff,#f4f7f5)!important;
  box-shadow:var(--cp-shadow-sm)!important;overflow:hidden!important;
}

/* Prepared recipes: restrain the purple tray and keep rows fully inside it. */
html body #batchRecipeList.prv2-table-list{
  background:linear-gradient(180deg,rgba(244,241,251,.62),rgba(248,248,251,.86))!important;
  border-color:#d8d7e5!important;padding:0 0 7px!important;
}
html body #batchRecipeList .prv2-table-row{
  width:calc(100% - 16px)!important;margin:6px 8px!important;border:1px solid #dddce8!important;
  border-radius:15px!important;background:linear-gradient(145deg,#fff,#f7f5fb)!important;
  box-shadow:0 7px 16px rgba(69,51,113,.08),inset 0 1px 0 #fff!important;overflow:hidden!important;
}
html body .prv2-table-head{background:linear-gradient(145deg,#f6f3fb,#eeebf7)!important;border-color:#dfdbe9!important}

/* Menu was still visually flat: give it the same raised-row treatment. */
html body #menuList.menu-table-list{
  padding:0 0 7px!important;border:1px solid var(--cp-line)!important;
  background:linear-gradient(180deg,#f2f7f4,#f8faf9)!important;box-shadow:var(--cp-shadow)!important;
}
html body .menu-table-head{background:linear-gradient(145deg,#eef5f1,#f8faf9)!important;border-color:#d9e3de!important}
html body #menuList .menu-table-row{
  width:calc(100% - 16px)!important;margin:6px 8px!important;border:1px solid #d8e2dd!important;
  border-radius:15px!important;background:linear-gradient(145deg,#fff,#f4f7f5)!important;
  box-shadow:var(--cp-shadow-sm)!important;overflow:hidden!important;
}
html body #menuList .menu-table-row:last-child{margin-bottom:7px!important}
html body #menuList .menu-table-row:active{transform:translateY(1px)!important;box-shadow:inset 0 2px 5px rgba(18,48,32,.09)!important}

/* Filters and tabs share one control depth. */
html body #view-ingredients .ita-tabs,
html body #view-ingredients .ingredient-tab-actions,
html body #view-menu>.filters select,
html body #view-menu>.filters input,
html body #view-ingredients>.filters select,
html body #view-ingredients>.filters input,
html body #prv2TableSearch,
html body .prv2-table-sort-btn,
html body .menu-sort-btn{
  border-color:var(--cp-line)!important;box-shadow:var(--cp-shadow-sm)!important;background-clip:padding-box!important;
}

/* Prepared Recipe detail: destructive action must read as destructive. */
html body .prv2-detail-actions .danger-zone,
html body .prv2-detail-actions button.danger,
html body .prv2-detail-actions [data-action="delete"]{
  color:#a72b22!important;border-color:#edcfcb!important;background:linear-gradient(145deg,#fff8f6,#f8e8e5)!important;
  box-shadow:0 7px 15px rgba(167,43,34,.08),inset 0 1px 0 #fff!important;
}
html body .prv2-detail-actions button:not(.danger-zone):not(.danger){
  color:var(--cp-green)!important;border-color:#d0ddd6!important;background:linear-gradient(145deg,#fff,#edf4f0)!important;
}

/* Full-screen editors / modals: one coherent surface language. */
html body dialog.bc-editor-page{background:linear-gradient(180deg,#f7faf8,#edf3ef)!important}
html body dialog.bc-editor-page>.modal-card{background:linear-gradient(180deg,#fbfcfb,#f5f8f6)!important}
html body dialog.bc-editor-page .modal-head,
html body dialog.bc-editor-page .modal-actions{background:rgba(250,252,251,.97)!important;border-color:#dbe4df!important;backdrop-filter:blur(12px)!important}
html body dialog.bc-editor-page input,
html body dialog.bc-editor-page select,
html body dialog.bc-editor-page textarea{
  border-color:#cfdcd5!important;border-radius:15px!important;background:linear-gradient(180deg,#fff,#f8faf9)!important;
  box-shadow:inset 0 2px 5px rgba(18,48,32,.055),0 4px 10px rgba(18,48,32,.035)!important;
}
html body dialog.bc-editor-page input[type="checkbox"]{
  width:22px!important;height:22px!important;min-height:22px!important;padding:0!important;accent-color:var(--cp-green)!important;
  box-shadow:none!important;border-radius:6px!important;
}
html body dialog.bc-editor-page .modal-actions .primary{background:linear-gradient(145deg,#2b815f,#15583f)!important}
html body dialog.bc-editor-page .modal-actions .secondary{color:var(--cp-green)!important;background:linear-gradient(145deg,#fff,#edf4f0)!important}

/* Recipe & Cost: remove the one-off blue/purple action look. */
html body #uxMenuRecipePanel .rp-add-component,
html body #uxMenuRecipePanel .rcs-base-footer .rp-add-component{
  border-color:#176047!important;background:linear-gradient(145deg,#2b815f,#15583f)!important;color:#fff!important;
  box-shadow:0 10px 20px rgba(20,88,62,.23),inset 0 1px 0 rgba(255,255,255,.25)!important;
}
html body #uxMenuRecipePanel .rp-components-total,
html body #uxMenuRecipePanel .rcs-current-total{
  border-color:#cddbd4!important;background:linear-gradient(145deg,#f7faf8,#eaf2ee)!important;
}

/* Analyze: retain depth without the oversized dark-green frame. */
html body #view-pricing .pd-hero{
  padding:9px!important;border:1px solid #bfd5c9!important;border-radius:24px!important;
  background:linear-gradient(145deg,#e5f2eb,#d9ebe2)!important;
  box-shadow:0 15px 30px rgba(18,78,55,.14),inset 0 1px 0 #fff!important;
}
html body #view-pricing .pd-selector-wrap{box-shadow:0 8px 18px rgba(17,48,33,.10),inset 0 1px 0 #fff!important}

/* Sticky save bars must clear the floating nav instead of sitting underneath it. */
html body #view-business-costs .bcs-savebar{
  bottom:calc(108px + env(safe-area-inset-bottom))!important;z-index:26!important;
  border-color:#cad9d1!important;background:rgba(248,251,249,.97)!important;
  box-shadow:0 16px 34px rgba(18,48,32,.17),inset 0 1px 0 #fff!important;
}
html body #view-reports .sc-save-bar{
  bottom:calc(108px + env(safe-area-inset-bottom))!important;z-index:26!important;
  border-color:#cad9d1!important;background:rgba(248,251,249,.97)!important;
}
html body #view-calculator .sc-save-bar{display:none!important}

/* Reduce the foggy outer glow: depth belongs to cards, not empty page space. */
html body:not(.auth-route-ready) #memberView{
  background:radial-gradient(circle at 6% 5%,rgba(45,125,87,.07),transparent 25%),linear-gradient(180deg,#f8faf9 0%,#eef4f0 55%,#f8faf9 100%)!important;
}

@media(max-width:520px){
  html body #view-manage .ux-manage-card{min-height:76px!important;padding:11px 13px!important}
  html body #view-manage .ux-manage-icon{width:42px!important;height:42px!important}
  html body #memberView .ns2-bottom-nav{left:12px!important;right:12px!important;border-radius:21px!important}
  html body #memberView .ns2-bottom-nav .tab{min-height:48px!important}
  html body #memberView .ns2-bottom-nav #buildMainTab>span{width:49px!important;height:49px!important}
  html body #view-business-costs .bcs-savebar{left:12px!important;right:12px!important;bottom:calc(104px + env(safe-area-inset-bottom))!important}
  html body #view-reports .sc-save-bar{bottom:calc(104px + env(safe-area-inset-bottom))!important}
}
