/* COATDOCTOR RecipeLab — V15.21 Light Industrial Master UI */
:root,
:root[data-theme="light"],
:root[data-theme="dark"]{
  color-scheme:light!important;
  --bg:#f3f7fb!important;
  --panel:#ffffff!important;
  --panel2:#f7faff!important;
  --line:#d9e4ef!important;
  --text:#0b1d39!important;
  --muted:#68798f!important;
  --accent:#136bd7!important;
  --accent2:#0e56b7!important;
  --warning:#c77a08!important;
  --danger:#d84646!important;
  --shadow:0 16px 44px rgba(24,58,94,.10)!important;
}
html,body,#root{background:#f3f7fb!important}
body{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:#0b1d39!important}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 78% 3%,rgba(65,145,237,.12),transparent 28%),linear-gradient(180deg,#f9fbfe 0,#f3f7fb 45%,#eef4fa 100%);z-index:0}
#root{position:relative;z-index:1}

.app-shell{grid-template-columns:232px minmax(0,1fr)!important;min-height:100vh!important;height:100vh!important}
.sidebar{background:rgba(255,255,255,.97)!important;border-right:1px solid #dbe6f0!important;padding:28px 18px 20px!important;box-shadow:8px 0 30px rgba(33,74,116,.04)}
.brand{padding:0 9px 30px!important;gap:12px!important}
.brand-mark{width:42px!important;height:42px!important;border-radius:13px!important;background:linear-gradient(145deg,#126bd7,#3190ee)!important;color:#fff!important;box-shadow:0 9px 22px rgba(19,107,215,.22)}
.brand strong{font-size:16px!important;font-weight:800!important;letter-spacing:.01em!important;color:#0a2142!important}
.brand span{font-size:12px!important;color:#738398!important;font-weight:600!important}
.sidebar nav{gap:7px!important}
.sidebar nav button{height:48px!important;border-radius:12px!important;color:#65778d!important;padding:0 13px!important;font-weight:650!important;transition:.18s ease!important}
.sidebar nav button:hover{background:#f1f6fc!important;color:#0c2b50!important}
.sidebar nav button.active{background:#eaf3ff!important;color:#1068d4!important;box-shadow:inset 3px 0 0 #1670df!important}
.smart-ready{background:#f8fbff!important;border-color:#dbe6f1!important;border-radius:13px!important}
.smart-ready strong{color:#173253!important}.smart-ready small{color:#76889d!important}.pulse{background:#18a875!important;box-shadow:0 0 0 5px rgba(24,168,117,.11)!important}

main{padding:27px 31px 31px!important;overflow:hidden!important}
main>header{height:auto!important;min-height:76px!important;margin-bottom:18px!important;align-items:flex-start!important;padding:3px 2px 0!important}
main>header:after{content:"Calculate. Scale. Correct. Keep it right.";position:absolute;top:50px;left:2px;font-size:12px;font-weight:600;color:#718197;letter-spacing:.01em}
main>header h1{font-size:34px!important;line-height:1!important;letter-spacing:-1.25px!important;color:#081b38!important;font-weight:800!important}
.eyebrow{color:#166bd6!important;font-size:9px!important;font-weight:800!important;letter-spacing:1.65px!important}
.header-actions{padding-top:3px!important}.icon-button{background:#fff!important;border-color:#d8e3ee!important;color:#65788f!important;box-shadow:0 4px 14px rgba(24,58,94,.05)!important}.icon-button:hover{color:#1068d4!important;border-color:#a9c9ea!important;background:#f8fbff!important}

.workspace-grid{height:calc(100vh - 146px)!important;grid-template-columns:minmax(640px,1fr) 300px!important;gap:20px!important}
.card,.quick-actions,.panel{background:#fff!important;border:1px solid #dbe5ef!important;border-radius:19px!important;box-shadow:0 15px 38px rgba(29,64,101,.07)!important}
.recipe-card{position:relative!important}
.recipe-card:before{content:"FORMULATION WORKSPACE";display:block;padding:12px 19px 0;font-size:9px;font-weight:800;letter-spacing:1.5px;color:#166bd6}
.recipe-head{grid-template-columns:minmax(240px,1fr) 220px auto!important;gap:14px!important;padding:13px 18px 17px!important;border-bottom:1px solid #e2eaf2!important}
.recipe-head label>span,.field-label{font-size:9px!important;letter-spacing:.85px!important;color:#71839a!important;font-weight:800!important}
.recipe-head input,.recipe-head select,table input,.large-select,.setting-row select{background:#f9fbfe!important;border-color:#dbe5ef!important;color:#102642!important;border-radius:10px!important}
.recipe-head input:focus,table input:focus,.large-select:focus,.number-input input:focus{border-color:#3187df!important;box-shadow:0 0 0 3px rgba(49,135,223,.10)!important}
.primary{background:linear-gradient(180deg,#1a75dc,#1164c8)!important;border-color:#1164c8!important;color:#fff!important;box-shadow:0 6px 14px rgba(17,100,200,.18)!important}.primary:hover{background:linear-gradient(180deg,#2080e9,#136bd7)!important}
.ghost{background:#fff!important;border-color:#d7e2ed!important;color:#27405f!important}.ghost:hover{background:#f5f9fd!important}

.table-wrap{background:#fff!important}
table{font-variant-numeric:tabular-nums}
th{background:#f7faff!important;color:#71849a!important;border-bottom-color:#dce6ef!important;padding:13px 14px!important;font-size:9px!important;font-weight:800!important}
td{border-bottom-color:#edf2f6!important;padding:10px 14px!important;color:#18324f!important}
table input{color:#16304d!important}
table input:hover,table input:focus{background:#f6faff!important}
.weight-cell{color:#0d315c!important}.weight-cell small{color:#8190a2!important}
.row-delete{color:#8594a5!important}.row-delete:hover{background:#fff0f0!important;color:#d44646!important}
.table-footer{background:#fbfdff!important;border-top-color:#dce6ef!important;padding:11px 18px!important}
.add-row,.text-button{color:#126bd7!important}.totals{color:#75869a!important}.totals strong{color:#14304f!important}
.status.valid{background:#eaf8f2!important;color:#13865e!important;border:1px solid #c8ecdd!important}.status.warning{background:#fff7e7!important;color:#b66a00!important;border:1px solid #f1ddae!important}

.quick-actions{padding:18px!important;background:linear-gradient(180deg,#fff,#fbfdff)!important}
.quick-actions .section-heading{padding-bottom:10px!important;border-bottom:1px solid #e7edf4!important;margin-bottom:13px!important}
.quick-actions .section-heading h2{font-size:19px!important;color:#0e2848!important}
.action-list{gap:10px!important}
.action-list button,.action-grid button{background:#fff!important;border-color:#dbe6ef!important;color:#16314f!important;border-radius:13px!important;box-shadow:0 5px 14px rgba(29,65,102,.04)!important;transition:.18s ease!important}
.action-list button:hover,.action-grid button:hover{border-color:#9bc1e9!important;box-shadow:0 9px 21px rgba(24,87,150,.09)!important;transform:translateY(-1px)!important}
.action-list button>span:nth-child(2){font-size:12px!important;line-height:1.25!important}
.action-icon{background:#eaf3ff!important;color:#126bd7!important;border:1px solid #d7e9fb!important}
.action-list button:nth-child(2) .action-icon,.action-grid button:nth-child(2) .action-icon{background:#fff0f0!important;color:#d04747!important;border-color:#f4d0d0!important}
.action-list button:nth-child(3) .action-icon,.action-grid button:nth-child(3) .action-icon{background:#fff7e7!important;color:#b86c00!important;border-color:#f0deb8!important}
.action-list button:nth-child(4) .action-icon,.action-grid button:nth-child(4) .action-icon{background:#ecf8f3!important;color:#11845d!important;border-color:#cdebdc!important}
.action-list button:nth-child(5) .action-icon,.action-grid button:nth-child(5) .action-icon{background:#f3f0ff!important;color:#6955b7!important;border-color:#dfd8fa!important}

.panel{height:calc(100vh - 146px)!important;padding:22px!important}.panel .section-heading{margin-bottom:20px!important}.panel .section-heading h2{font-size:25px!important;color:#0c2545!important}.action-grid{grid-template-columns:repeat(2,minmax(250px,1fr))!important;gap:14px!important}.action-grid button{min-height:92px!important;padding:16px!important}.action-grid button>span:nth-child(2){font-size:14px!important}

.settings-popover{background:#fff!important;border-color:#d8e4ef!important;box-shadow:0 22px 60px rgba(20,56,92,.16)!important}.segmented{background:#f5f9fd!important;border-color:#d8e4ef!important}.segmented button.selected{background:#fff!important;color:#126bd7!important;box-shadow:0 2px 8px rgba(20,62,104,.08)!important}.setting-row{border-top-color:#e1e9f1!important}

.overlay{background:rgba(9,27,47,.48)!important;backdrop-filter:blur(7px)!important}.dialog{background:#fff!important;border-color:#d9e4ef!important;border-radius:20px!important;box-shadow:0 30px 90px rgba(5,27,52,.24)!important}.dialog-head{border-bottom-color:#e0e8f0!important;padding:19px 21px!important}.dialog-head h2{font-size:22px!important;color:#0b2748!important}.dialog-body{padding:21px!important;gap:17px!important}.dialog-footer{border-top-color:#e0e8f0!important;background:#fbfdff!important}.number-input{background:#f8fbfe!important;border-color:#d8e3ee!important}.number-input input{color:#102946!important}.number-input span{border-left-color:#d8e3ee!important;color:#6f8094!important}.large-select{background:#f8fbfe!important}
.result-box{border-color:#bfe6d5!important;background:#f5fcf9!important;border-radius:14px!important}.result-total{border-bottom-color:#d8eee4!important}.result-total span{color:#6f8190!important}.result-total strong{color:#11875e!important}.result-list>div{border-bottom-color:#e1efe8!important;color:#17334f!important}.result-list>div span:nth-child(2){color:#7c8c9e!important}.limiting{background:#fff7e8!important;color:#aa6707!important}.availability-list{gap:10px!important}.check-list label{background:#f8fbfe!important;border-color:#dce6ef!important}.history-list>div{border-bottom-color:#e4ebf2!important}.history-dot{background:#17885f!important}.empty-panel{color:#74869a!important}.empty-panel>span{background:#edf5ff!important;color:#126bd7!important}.empty-panel h3{color:#112c4b!important}.connection-grid button{background:#fff!important;border-color:#dbe5ef!important;color:#17324f!important}.connection-grid button>span{background:#eaf3ff!important;color:#126bd7!important}.connection-grid button small{color:#75879b!important}
.toast{background:#0b284a!important;color:#fff!important;box-shadow:0 12px 34px rgba(9,43,80,.24)!important}

/* desktop helper line — explains the three core use-cases without changing functionality */
.quick-actions:after{content:"Scale a batch · Correct an overdosed component · Recalculate from available material";display:block;margin-top:14px;padding-top:13px;border-top:1px solid #e6edf4;color:#7a899a;font-size:10px;line-height:1.45;font-weight:650}

@media(max-width:950px){
 .app-shell{grid-template-columns:78px 1fr!important}
 .workspace-grid{grid-template-columns:1fr!important}
 .recipe-head{grid-template-columns:1fr 180px!important}
 .quick-actions{display:none!important}
}
@media(max-width:720px){
 body:before{background:linear-gradient(180deg,#f9fbfe,#f2f7fb)!important}
 .app-shell{display:flex!important;min-height:100dvh!important;height:auto!important}
 .sidebar{position:sticky!important;top:0!important;background:rgba(255,255,255,.96)!important;border-bottom:1px solid #dce6ef!important;box-shadow:0 8px 24px rgba(25,62,99,.06)!important}
 main{padding:16px!important;background:transparent!important}
 main>header{min-height:78px!important;margin-bottom:12px!important}
 main>header:after{top:48px!important;font-size:10px!important}
 main>header h1{font-size:31px!important}
 .recipe-card:before{padding-top:13px!important}
 .recipe-head{padding:12px 14px 14px!important}
 .card{border-radius:16px!important}
 .table-footer{align-items:flex-start!important;gap:10px!important;flex-direction:column!important}.totals{flex-wrap:wrap!important;gap:8px 12px!important}
 .dialog{border-radius:18px!important}
}
